Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2007-11-15 11:31:29


Author: bemandawes
Date: 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
New Revision: 41109
URL: http://svn.boost.org/trac/boost/changeset/41109

Log:
Merged tools, system, filesystem from trunk at 41106
Added:
   branches/release/boost/cerrno.hpp
      - copied unchanged from r41103, /trunk/boost/cerrno.hpp
   branches/release/boost/system/
      - copied from r41103, /trunk/boost/system/
   branches/release/libs/filesystem/doc/reference.html
      - copied unchanged from r41096, /trunk/libs/filesystem/doc/reference.html
   branches/release/libs/system/
      - copied from r41103, /trunk/libs/system/
   branches/release/tools/boostbook/xsl/callout.xsl
      - copied unchanged from r41096, /trunk/tools/boostbook/xsl/callout.xsl
   branches/release/tools/boostbook/xsl/xhtml.xsl
      - copied unchanged from r41096, /trunk/tools/boostbook/xsl/xhtml.xsl
   branches/release/tools/build/v2/boost_build.png
      - copied unchanged from r41096, /trunk/tools/build/v2/boost_build.png
   branches/release/tools/build/v2/doc/src/standalone.xml
      - copied unchanged from r41096, /trunk/tools/build/v2/doc/src/standalone.xml
   branches/release/tools/build/v2/example/qt/qt4/hello/
      - copied from r41096, /trunk/tools/build/v2/example/qt/qt4/hello/
   branches/release/tools/build/v2/example/qt/qt4/hello/Jamroot (props changed)
      - copied unchanged from r41096, /trunk/tools/build/v2/example/qt/qt4/hello/Jamroot
   branches/release/tools/build/v2/example/qt/qt4/hello/arrow.cpp
      - copied unchanged from r41096, /trunk/tools/build/v2/example/qt/qt4/hello/arrow.cpp
   branches/release/tools/build/v2/example/qt/qt4/hello/arrow.h
      - copied unchanged from r41096, /trunk/tools/build/v2/example/qt/qt4/hello/arrow.h
   branches/release/tools/build/v2/example/qt/qt4/hello/main.cpp
      - copied unchanged from r41096, /trunk/tools/build/v2/example/qt/qt4/hello/main.cpp
   branches/release/tools/build/v2/test/example_customization.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/example_customization.py
   branches/release/tools/build/v2/test/example_gettext.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/example_gettext.py
   branches/release/tools/build/v2/test/example_libraries.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/example_libraries.py
   branches/release/tools/build/v2/test/example_make.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/example_make.py
   branches/release/tools/build/v2/test/example_qt4.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/example_qt4.py
   branches/release/tools/build/v2/test/free_features_request.py
      - copied unchanged from r41096, /trunk/tools/build/v2/test/free_features_request.py
   branches/release/tools/build/v2/tools/mipspro.jam
      - copied unchanged from r41096, /trunk/tools/build/v2/tools/mipspro.jam
   branches/release/tools/build/v2/tools/pathscale.jam
      - copied unchanged from r41096, /trunk/tools/build/v2/tools/pathscale.jam
   branches/release/tools/build/v2/tools/pgi.jam
      - copied unchanged from r41096, /trunk/tools/build/v2/tools/pgi.jam
   branches/release/tools/build/v2/tools/qt.jam
      - copied unchanged from r41096, /trunk/tools/build/v2/tools/qt.jam
   branches/release/tools/build/v2/tools/qt3.jam
      - copied unchanged from r41096, /trunk/tools/build/v2/tools/qt3.jam
   branches/release/tools/buildbot/
      - copied from r41096, /trunk/tools/buildbot/
   branches/release/tools/buildbot/config/
      - copied from r41096, /trunk/tools/buildbot/config/
   branches/release/tools/buildbot/config/master/
      - copied from r41096, /trunk/tools/buildbot/config/master/
   branches/release/tools/buildbot/config/master/alpha/
      - copied from r41096, /trunk/tools/buildbot/config/master/alpha/
   branches/release/tools/buildbot/config/master/alpha/master.cfg
      - copied unchanged from r41096, /trunk/tools/buildbot/config/master/alpha/master.cfg
   branches/release/tools/buildbot/src/
      - copied from r41096, /trunk/tools/buildbot/src/
   branches/release/tools/buildbot/src/boost/
      - copied from r41096, /trunk/tools/buildbot/src/boost/
   branches/release/tools/buildbot/src/boost/__init__.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/__init__.py
   branches/release/tools/buildbot/src/boost/bot/
      - copied from r41096, /trunk/tools/buildbot/src/boost/bot/
   branches/release/tools/buildbot/src/boost/bot/__init__.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/bot/__init__.py
   branches/release/tools/buildbot/src/boost/bot/char_translation_table.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/bot/char_translation_table.py
   branches/release/tools/buildbot/src/boost/bot/factory.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/bot/factory.py
   branches/release/tools/buildbot/src/boost/bot/remote.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/bot/remote.py
   branches/release/tools/buildbot/src/boost/bot/step.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/bot/step.py
   branches/release/tools/buildbot/src/boost/buildbot/
      - copied from r41096, /trunk/tools/buildbot/src/boost/buildbot/
   branches/release/tools/buildbot/src/boost/buildbot/__init__.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/__init__.py
   branches/release/tools/buildbot/src/boost/buildbot/char_translation_table.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/char_translation_table.py
   branches/release/tools/buildbot/src/boost/buildbot/factory.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/factory.py
   branches/release/tools/buildbot/src/boost/buildbot/remote.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/remote.py
   branches/release/tools/buildbot/src/boost/buildbot/script.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/script.py
   branches/release/tools/buildbot/src/boost/buildbot/server.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/server.py
   branches/release/tools/buildbot/src/boost/buildbot/step.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/buildbot/step.py
   branches/release/tools/buildbot/src/boost/patchwork.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/boost/patchwork.py
   branches/release/tools/buildbot/src/buildbot.py
      - copied unchanged from r41096, /trunk/tools/buildbot/src/buildbot.py
   branches/release/tools/common/
      - copied from r41096, /trunk/tools/common/
   branches/release/tools/common/time_string.hpp
      - copied unchanged from r41096, /trunk/tools/common/time_string.hpp
   branches/release/tools/inspect/doc/
      - copied from r41096, /trunk/tools/inspect/doc/
   branches/release/tools/inspect/doc/build.jam
      - copied unchanged from r41096, /trunk/tools/inspect/doc/build.jam
   branches/release/tools/inspect/doc/inspect.qbk
      - copied unchanged from r41096, /trunk/tools/inspect/doc/inspect.qbk
   branches/release/tools/inspect/run_inspect.sh
      - copied unchanged from r41096, /trunk/tools/inspect/run_inspect.sh
   branches/release/tools/inspect/unnamed_namespace_check.cpp
      - copied unchanged from r41096, /trunk/tools/inspect/unnamed_namespace_check.cpp
   branches/release/tools/inspect/unnamed_namespace_check.hpp
      - copied unchanged from r41096, /trunk/tools/inspect/unnamed_namespace_check.hpp
   branches/release/tools/jam/doc/history.qbk
      - copied unchanged from r41096, /trunk/tools/jam/doc/history.qbk
   branches/release/tools/jam/src/boehm_gc/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/
   branches/release/tools/jam/src/boehm_gc/AmigaOS.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/AmigaOS.c
   branches/release/tools/jam/src/boehm_gc/BCC_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/BCC_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/ChangeLog
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/ChangeLog
   branches/release/tools/jam/src/boehm_gc/EMX_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/EMX_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/MacOS.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/MacOS.c
   branches/release/tools/jam/src/boehm_gc/MacProjects.sit.hqx
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/MacProjects.sit.hqx
   branches/release/tools/jam/src/boehm_gc/Mac_files/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/Mac_files/
   branches/release/tools/jam/src/boehm_gc/Mac_files/MacOS_Test_config.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Mac_files/MacOS_Test_config.h
   branches/release/tools/jam/src/boehm_gc/Mac_files/MacOS_config.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Mac_files/MacOS_config.h
   branches/release/tools/jam/src/boehm_gc/Mac_files/dataend.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Mac_files/dataend.c
   branches/release/tools/jam/src/boehm_gc/Mac_files/datastart.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Mac_files/datastart.c
   branches/release/tools/jam/src/boehm_gc/Makefile.DLLs
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Makefile.DLLs
   branches/release/tools/jam/src/boehm_gc/Makefile.am
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Makefile.am
   branches/release/tools/jam/src/boehm_gc/Makefile.direct
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Makefile.direct
   branches/release/tools/jam/src/boehm_gc/Makefile.dj
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Makefile.dj
   branches/release/tools/jam/src/boehm_gc/Makefile.in
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/Makefile.in
   branches/release/tools/jam/src/boehm_gc/NT_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/NT_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/NT_STATIC_THREADS_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/NT_STATIC_THREADS_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/NT_THREADS_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/NT_THREADS_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/OS2_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/OS2_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/PCR-Makefile
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/PCR-Makefile
   branches/release/tools/jam/src/boehm_gc/README.QUICK
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/README.QUICK
   branches/release/tools/jam/src/boehm_gc/SMakefile.amiga
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/SMakefile.amiga
   branches/release/tools/jam/src/boehm_gc/WCC_MAKEFILE
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/WCC_MAKEFILE
   branches/release/tools/jam/src/boehm_gc/acinclude.m4
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/acinclude.m4
   branches/release/tools/jam/src/boehm_gc/aclocal.m4
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/aclocal.m4
   branches/release/tools/jam/src/boehm_gc/add_gc_prefix.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/add_gc_prefix.c
   branches/release/tools/jam/src/boehm_gc/allchblk.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/allchblk.c
   branches/release/tools/jam/src/boehm_gc/alloc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/alloc.c
   branches/release/tools/jam/src/boehm_gc/alpha_mach_dep.S
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/alpha_mach_dep.S
   branches/release/tools/jam/src/boehm_gc/backgraph.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/backgraph.c
   branches/release/tools/jam/src/boehm_gc/bdw-gc.pc
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/bdw-gc.pc
   branches/release/tools/jam/src/boehm_gc/bdw-gc.pc.in
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/bdw-gc.pc.in
   branches/release/tools/jam/src/boehm_gc/blacklst.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/blacklst.c
   branches/release/tools/jam/src/boehm_gc/callprocs
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/callprocs
   branches/release/tools/jam/src/boehm_gc/checksums.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/checksums.c
   branches/release/tools/jam/src/boehm_gc/compile
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/compile
   branches/release/tools/jam/src/boehm_gc/config.guess
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/config.guess
   branches/release/tools/jam/src/boehm_gc/config.sub
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/config.sub
   branches/release/tools/jam/src/boehm_gc/configure
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/configure
   branches/release/tools/jam/src/boehm_gc/configure.ac
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/configure.ac
   branches/release/tools/jam/src/boehm_gc/configure.host
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/configure.host
   branches/release/tools/jam/src/boehm_gc/configure_atomic_ops.sh
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/configure_atomic_ops.sh
   branches/release/tools/jam/src/boehm_gc/cord/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/cord/
   branches/release/tools/jam/src/boehm_gc/cord/cord.am
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/cord.am
   branches/release/tools/jam/src/boehm_gc/cord/cordbscs.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/cordbscs.c
   branches/release/tools/jam/src/boehm_gc/cord/cordprnt.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/cordprnt.c
   branches/release/tools/jam/src/boehm_gc/cord/cordtest.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/cordtest.c
   branches/release/tools/jam/src/boehm_gc/cord/cordxtra.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/cordxtra.c
   branches/release/tools/jam/src/boehm_gc/cord/de.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de.c
   branches/release/tools/jam/src/boehm_gc/cord/de_cmds.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de_cmds.h
   branches/release/tools/jam/src/boehm_gc/cord/de_win.ICO
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de_win.ICO
   branches/release/tools/jam/src/boehm_gc/cord/de_win.RC
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de_win.RC
   branches/release/tools/jam/src/boehm_gc/cord/de_win.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de_win.c
   branches/release/tools/jam/src/boehm_gc/cord/de_win.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/cord/de_win.h
   branches/release/tools/jam/src/boehm_gc/darwin_stop_world.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/darwin_stop_world.c
   branches/release/tools/jam/src/boehm_gc/dbg_mlc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/dbg_mlc.c
   branches/release/tools/jam/src/boehm_gc/depcomp
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/depcomp
   branches/release/tools/jam/src/boehm_gc/digimars.mak
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/digimars.mak
   branches/release/tools/jam/src/boehm_gc/doc/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/doc/
   branches/release/tools/jam/src/boehm_gc/doc/README
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README
   branches/release/tools/jam/src/boehm_gc/doc/README.DGUX386
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.DGUX386
   branches/release/tools/jam/src/boehm_gc/doc/README.Mac
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.Mac
   branches/release/tools/jam/src/boehm_gc/doc/README.MacOSX
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.MacOSX
   branches/release/tools/jam/src/boehm_gc/doc/README.OS2
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.OS2
   branches/release/tools/jam/src/boehm_gc/doc/README.amiga
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.amiga
   branches/release/tools/jam/src/boehm_gc/doc/README.arm.cross
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.arm.cross
   branches/release/tools/jam/src/boehm_gc/doc/README.autoconf
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.autoconf
   branches/release/tools/jam/src/boehm_gc/doc/README.changes
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.changes
   branches/release/tools/jam/src/boehm_gc/doc/README.contributors
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.contributors
   branches/release/tools/jam/src/boehm_gc/doc/README.cords
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.cords
   branches/release/tools/jam/src/boehm_gc/doc/README.darwin
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.darwin
   branches/release/tools/jam/src/boehm_gc/doc/README.dj
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.dj
   branches/release/tools/jam/src/boehm_gc/doc/README.environment
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.environment
   branches/release/tools/jam/src/boehm_gc/doc/README.ews4800
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.ews4800
   branches/release/tools/jam/src/boehm_gc/doc/README.hp
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.hp
   branches/release/tools/jam/src/boehm_gc/doc/README.linux
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.linux
   branches/release/tools/jam/src/boehm_gc/doc/README.macros
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.macros
   branches/release/tools/jam/src/boehm_gc/doc/README.rs6000
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.rs6000
   branches/release/tools/jam/src/boehm_gc/doc/README.sgi
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.sgi
   branches/release/tools/jam/src/boehm_gc/doc/README.solaris2
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.solaris2
   branches/release/tools/jam/src/boehm_gc/doc/README.uts
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.uts
   branches/release/tools/jam/src/boehm_gc/doc/README.win32
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.win32
   branches/release/tools/jam/src/boehm_gc/doc/README.win64
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/README.win64
   branches/release/tools/jam/src/boehm_gc/doc/barrett_diagram
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/barrett_diagram
   branches/release/tools/jam/src/boehm_gc/doc/debugging.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/debugging.html
   branches/release/tools/jam/src/boehm_gc/doc/doc.am
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/doc.am
   branches/release/tools/jam/src/boehm_gc/doc/gc.man
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/gc.man
   branches/release/tools/jam/src/boehm_gc/doc/gcdescr.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/gcdescr.html
   branches/release/tools/jam/src/boehm_gc/doc/gcinterface.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/gcinterface.html
   branches/release/tools/jam/src/boehm_gc/doc/leak.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/leak.html
   branches/release/tools/jam/src/boehm_gc/doc/overview.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/overview.html
   branches/release/tools/jam/src/boehm_gc/doc/porting.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/porting.html
   branches/release/tools/jam/src/boehm_gc/doc/scale.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/scale.html
   branches/release/tools/jam/src/boehm_gc/doc/simple_example.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/simple_example.html
   branches/release/tools/jam/src/boehm_gc/doc/tree.html
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/doc/tree.html
   branches/release/tools/jam/src/boehm_gc/dyn_load.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/dyn_load.c
   branches/release/tools/jam/src/boehm_gc/finalize.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/finalize.c
   branches/release/tools/jam/src/boehm_gc/gc.mak
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gc.mak
   branches/release/tools/jam/src/boehm_gc/gc_cpp.cc
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gc_cpp.cc
   branches/release/tools/jam/src/boehm_gc/gc_cpp.cpp
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gc_cpp.cpp
   branches/release/tools/jam/src/boehm_gc/gc_dlopen.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gc_dlopen.c
   branches/release/tools/jam/src/boehm_gc/gcj_mlc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gcj_mlc.c
   branches/release/tools/jam/src/boehm_gc/gcname.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/gcname.c
   branches/release/tools/jam/src/boehm_gc/headers.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/headers.c
   branches/release/tools/jam/src/boehm_gc/hpux_test_and_clear.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/hpux_test_and_clear.s
   branches/release/tools/jam/src/boehm_gc/ia64_save_regs_in_stack.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/ia64_save_regs_in_stack.s
   branches/release/tools/jam/src/boehm_gc/if_mach.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/if_mach.c
   branches/release/tools/jam/src/boehm_gc/if_not_there.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/if_not_there.c
   branches/release/tools/jam/src/boehm_gc/include/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/include/
   branches/release/tools/jam/src/boehm_gc/include/cord.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/cord.h
   branches/release/tools/jam/src/boehm_gc/include/ec.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/ec.h
   branches/release/tools/jam/src/boehm_gc/include/gc.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc.h
   branches/release/tools/jam/src/boehm_gc/include/gc_allocator.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_allocator.h
   branches/release/tools/jam/src/boehm_gc/include/gc_amiga_redirects.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_amiga_redirects.h
   branches/release/tools/jam/src/boehm_gc/include/gc_backptr.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_backptr.h
   branches/release/tools/jam/src/boehm_gc/include/gc_config_macros.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_config_macros.h
   branches/release/tools/jam/src/boehm_gc/include/gc_cpp.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_cpp.h
   branches/release/tools/jam/src/boehm_gc/include/gc_gcj.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_gcj.h
   branches/release/tools/jam/src/boehm_gc/include/gc_inline.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_inline.h
   branches/release/tools/jam/src/boehm_gc/include/gc_mark.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_mark.h
   branches/release/tools/jam/src/boehm_gc/include/gc_pthread_redirects.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_pthread_redirects.h
   branches/release/tools/jam/src/boehm_gc/include/gc_tiny_fl.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_tiny_fl.h
   branches/release/tools/jam/src/boehm_gc/include/gc_typed.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/gc_typed.h
   branches/release/tools/jam/src/boehm_gc/include/include.am
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/include.am
   branches/release/tools/jam/src/boehm_gc/include/javaxfc.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/javaxfc.h
   branches/release/tools/jam/src/boehm_gc/include/leak_detector.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/leak_detector.h
   branches/release/tools/jam/src/boehm_gc/include/new_gc_alloc.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/new_gc_alloc.h
   branches/release/tools/jam/src/boehm_gc/include/private/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/include/private/
   branches/release/tools/jam/src/boehm_gc/include/private/cord_pos.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/cord_pos.h
   branches/release/tools/jam/src/boehm_gc/include/private/darwin_semaphore.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/darwin_semaphore.h
   branches/release/tools/jam/src/boehm_gc/include/private/darwin_stop_world.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/darwin_stop_world.h
   branches/release/tools/jam/src/boehm_gc/include/private/dbg_mlc.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/dbg_mlc.h
   branches/release/tools/jam/src/boehm_gc/include/private/gc_hdrs.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/gc_hdrs.h
   branches/release/tools/jam/src/boehm_gc/include/private/gc_locks.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/gc_locks.h
   branches/release/tools/jam/src/boehm_gc/include/private/gc_pmark.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/gc_pmark.h
   branches/release/tools/jam/src/boehm_gc/include/private/gc_priv.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/gc_priv.h
   branches/release/tools/jam/src/boehm_gc/include/private/gcconfig.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/gcconfig.h
   branches/release/tools/jam/src/boehm_gc/include/private/msvc_dbg.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/msvc_dbg.h
   branches/release/tools/jam/src/boehm_gc/include/private/pthread_stop_world.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/pthread_stop_world.h
   branches/release/tools/jam/src/boehm_gc/include/private/pthread_support.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/pthread_support.h
   branches/release/tools/jam/src/boehm_gc/include/private/specific.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/specific.h
   branches/release/tools/jam/src/boehm_gc/include/private/thread_local_alloc.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/private/thread_local_alloc.h
   branches/release/tools/jam/src/boehm_gc/include/weakpointer.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/include/weakpointer.h
   branches/release/tools/jam/src/boehm_gc/install-sh
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/install-sh
   branches/release/tools/jam/src/boehm_gc/libtool.m4
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/libtool.m4
   branches/release/tools/jam/src/boehm_gc/ltmain.sh
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/ltmain.sh
   branches/release/tools/jam/src/boehm_gc/mach_dep.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mach_dep.c
   branches/release/tools/jam/src/boehm_gc/malloc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/malloc.c
   branches/release/tools/jam/src/boehm_gc/mallocx.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mallocx.c
   branches/release/tools/jam/src/boehm_gc/mark.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mark.c
   branches/release/tools/jam/src/boehm_gc/mark_rts.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mark_rts.c
   branches/release/tools/jam/src/boehm_gc/mips_sgi_mach_dep.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mips_sgi_mach_dep.s
   branches/release/tools/jam/src/boehm_gc/mips_ultrix_mach_dep.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mips_ultrix_mach_dep.s
   branches/release/tools/jam/src/boehm_gc/misc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/misc.c
   branches/release/tools/jam/src/boehm_gc/missing
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/missing
   branches/release/tools/jam/src/boehm_gc/mkinstalldirs
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/mkinstalldirs
   branches/release/tools/jam/src/boehm_gc/msvc_dbg.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/msvc_dbg.c
   branches/release/tools/jam/src/boehm_gc/new_hblk.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/new_hblk.c
   branches/release/tools/jam/src/boehm_gc/obj_map.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/obj_map.c
   branches/release/tools/jam/src/boehm_gc/os_dep.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/os_dep.c
   branches/release/tools/jam/src/boehm_gc/pcr_interface.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/pcr_interface.c
   branches/release/tools/jam/src/boehm_gc/pthread_stop_world.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/pthread_stop_world.c
   branches/release/tools/jam/src/boehm_gc/pthread_support.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/pthread_support.c
   branches/release/tools/jam/src/boehm_gc/ptr_chck.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/ptr_chck.c
   branches/release/tools/jam/src/boehm_gc/real_malloc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/real_malloc.c
   branches/release/tools/jam/src/boehm_gc/reclaim.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/reclaim.c
   branches/release/tools/jam/src/boehm_gc/rs6000_mach_dep.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/rs6000_mach_dep.s
   branches/release/tools/jam/src/boehm_gc/setjmp_t.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/setjmp_t.c
   branches/release/tools/jam/src/boehm_gc/sparc_mach_dep.S
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/sparc_mach_dep.S
   branches/release/tools/jam/src/boehm_gc/sparc_netbsd_mach_dep.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/sparc_netbsd_mach_dep.s
   branches/release/tools/jam/src/boehm_gc/sparc_sunos4_mach_dep.s
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/sparc_sunos4_mach_dep.s
   branches/release/tools/jam/src/boehm_gc/specific.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/specific.c
   branches/release/tools/jam/src/boehm_gc/stubborn.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/stubborn.c
   branches/release/tools/jam/src/boehm_gc/tests/
      - copied from r41096, /trunk/tools/jam/src/boehm_gc/tests/
   branches/release/tools/jam/src/boehm_gc/tests/leak_test.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/leak_test.c
   branches/release/tools/jam/src/boehm_gc/tests/middle.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/middle.c
   branches/release/tools/jam/src/boehm_gc/tests/test.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/test.c
   branches/release/tools/jam/src/boehm_gc/tests/test_cpp.cc
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/test_cpp.cc
   branches/release/tools/jam/src/boehm_gc/tests/tests.am
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/tests.am
   branches/release/tools/jam/src/boehm_gc/tests/thread_leak_test.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/tests/thread_leak_test.c
   branches/release/tools/jam/src/boehm_gc/thread_local_alloc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/thread_local_alloc.c
   branches/release/tools/jam/src/boehm_gc/threadlibs.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/threadlibs.c
   branches/release/tools/jam/src/boehm_gc/typd_mlc.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/typd_mlc.c
   branches/release/tools/jam/src/boehm_gc/version.h
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/version.h
   branches/release/tools/jam/src/boehm_gc/win32_threads.c
      - copied unchanged from r41096, /trunk/tools/jam/src/boehm_gc/win32_threads.c
   branches/release/tools/jam/src/mem.c
      - copied unchanged from r41096, /trunk/tools/jam/src/mem.c
   branches/release/tools/jam/src/mem.h
      - copied unchanged from r41096, /trunk/tools/jam/src/mem.h
   branches/release/tools/jam/src/output.c
      - copied unchanged from r41096, /trunk/tools/jam/src/output.c
   branches/release/tools/jam/src/output.h
      - copied unchanged from r41096, /trunk/tools/jam/src/output.h
   branches/release/tools/jam/test/builtin_w32_getregnames.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/builtin_w32_getregnames.jam
   branches/release/tools/jam/test/option_d2.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/option_d2.jam
   branches/release/tools/jam/test/option_l.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/option_l.jam
   branches/release/tools/jam/test/option_n.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/option_n.jam
   branches/release/tools/jam/test/parallel_actions.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/parallel_actions.jam
   branches/release/tools/jam/test/parallel_multifile_actions.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/parallel_multifile_actions.jam
   branches/release/tools/jam/test/stress_var_expand.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/stress_var_expand.jam
   branches/release/tools/jam/test/target_var.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/target_var.jam
   branches/release/tools/jam/test/test.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/test.jam
   branches/release/tools/jam/test/var_expand.jam
      - copied unchanged from r41096, /trunk/tools/jam/test/var_expand.jam
   branches/release/tools/litre/
      - copied from r41096, /trunk/tools/litre/
   branches/release/tools/litre/cplusplus.py
      - copied unchanged from r41096, /trunk/tools/litre/cplusplus.py
   branches/release/tools/litre/litre.py
      - copied unchanged from r41096, /trunk/tools/litre/litre.py
   branches/release/tools/litre/tool.py
      - copied unchanged from r41096, /trunk/tools/litre/tool.py
   branches/release/tools/quickbook/code_snippet.hpp
      - copied unchanged from r41096, /trunk/tools/quickbook/code_snippet.hpp
   branches/release/tools/quickbook/detail/actions_class.cpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/actions_class.cpp
   branches/release/tools/quickbook/detail/actions_class.hpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/actions_class.hpp
   branches/release/tools/quickbook/detail/collector.cpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/collector.cpp
   branches/release/tools/quickbook/detail/collector.hpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/collector.hpp
   branches/release/tools/quickbook/detail/markups.hpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/markups.hpp
   branches/release/tools/quickbook/detail/template_stack.cpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/template_stack.cpp
   branches/release/tools/quickbook/detail/template_stack.hpp
      - copied unchanged from r41096, /trunk/tools/quickbook/detail/template_stack.hpp
   branches/release/tools/quickbook/doc/html/images/callouts/
      - copied from r41096, /trunk/tools/quickbook/doc/html/images/callouts/
   branches/release/tools/quickbook/doc/html/images/callouts/1.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/1.png
   branches/release/tools/quickbook/doc/html/images/callouts/10.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/10.png
   branches/release/tools/quickbook/doc/html/images/callouts/11.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/11.png
   branches/release/tools/quickbook/doc/html/images/callouts/12.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/12.png
   branches/release/tools/quickbook/doc/html/images/callouts/13.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/13.png
   branches/release/tools/quickbook/doc/html/images/callouts/14.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/14.png
   branches/release/tools/quickbook/doc/html/images/callouts/15.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/15.png
   branches/release/tools/quickbook/doc/html/images/callouts/2.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/2.png
   branches/release/tools/quickbook/doc/html/images/callouts/3.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/3.png
   branches/release/tools/quickbook/doc/html/images/callouts/4.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/4.png
   branches/release/tools/quickbook/doc/html/images/callouts/5.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/5.png
   branches/release/tools/quickbook/doc/html/images/callouts/6.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/6.png
   branches/release/tools/quickbook/doc/html/images/callouts/7.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/7.png
   branches/release/tools/quickbook/doc/html/images/callouts/8.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/8.png
   branches/release/tools/quickbook/doc/html/images/callouts/9.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/callouts/9.png
   branches/release/tools/quickbook/doc/html/images/caution.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/caution.png
   branches/release/tools/quickbook/doc/html/images/extra/
      - copied from r41096, /trunk/tools/quickbook/doc/html/images/extra/
   branches/release/tools/quickbook/doc/html/images/extra/katepart/
      - copied from r41096, /trunk/tools/quickbook/doc/html/images/extra/katepart/
   branches/release/tools/quickbook/doc/html/images/extra/katepart/boost.hs.logo.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/extra/katepart/boost.hs.logo.png
   branches/release/tools/quickbook/doc/html/images/extra/katepart/table.boost.hs.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/extra/katepart/table.boost.hs.png
   branches/release/tools/quickbook/doc/html/images/extra/katepart/table.text.editor.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/extra/katepart/table.text.editor.png
   branches/release/tools/quickbook/doc/html/images/important.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/important.png
   branches/release/tools/quickbook/doc/html/images/warning.png
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/images/warning.png
   branches/release/tools/quickbook/doc/html/quickbook/editors/
      - copied from r41096, /trunk/tools/quickbook/doc/html/quickbook/editors/
   branches/release/tools/quickbook/doc/html/quickbook/editors.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/editors.html
   branches/release/tools/quickbook/doc/html/quickbook/editors/kde_support.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/editors/kde_support.html
   branches/release/tools/quickbook/doc/html/quickbook/editors/scite.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/editors/scite.html
   branches/release/tools/quickbook/doc/html/quickbook/faq.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/faq.html
   branches/release/tools/quickbook/doc/html/quickbook/install/
      - copied from r41096, /trunk/tools/quickbook/doc/html/quickbook/install/
   branches/release/tools/quickbook/doc/html/quickbook/install.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/install.html
   branches/release/tools/quickbook/doc/html/quickbook/install/linux.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/install/linux.html
   branches/release/tools/quickbook/doc/html/quickbook/install/macosx.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/install/macosx.html
   branches/release/tools/quickbook/doc/html/quickbook/install/windows.html
      - copied unchanged from r41096, /trunk/tools/quickbook/doc/html/quickbook/install/windows.html
   branches/release/tools/quickbook/extra/
      - copied from r41096, /trunk/tools/quickbook/extra/
   branches/release/tools/quickbook/extra/katepart/
      - copied from r41096, /trunk/tools/quickbook/extra/katepart/
   branches/release/tools/quickbook/extra/katepart/install.sh
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/install.sh
   branches/release/tools/quickbook/extra/katepart/katepart.qbk
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/katepart.qbk
   branches/release/tools/quickbook/extra/katepart/syntax/
      - copied from r41096, /trunk/tools/quickbook/extra/katepart/syntax/
   branches/release/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/syntax/boost_hs_boost.xml
   branches/release/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/syntax/boost_hs_cpp.xml
   branches/release/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/syntax/boost_hs_quickbook.xml
   branches/release/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml
      - copied unchanged from r41096, /trunk/tools/quickbook/extra/katepart/syntax/boost_hs_std.xml
   branches/release/tools/quickbook/test/import.gold (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/import.gold
   branches/release/tools/quickbook/test/import.quickbook (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/import.quickbook
   branches/release/tools/quickbook/test/stub.cpp
      - copied unchanged from r41096, /trunk/tools/quickbook/test/stub.cpp
   branches/release/tools/quickbook/test/stub.xml
      - copied unchanged from r41096, /trunk/tools/quickbook/test/stub.xml
   branches/release/tools/quickbook/test/templates.gold (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/templates.gold
   branches/release/tools/quickbook/test/templates.quickbook (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/templates.quickbook
   branches/release/tools/quickbook/test/xinclude.gold (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/xinclude.gold
   branches/release/tools/quickbook/test/xinclude.quickbook (contents, props changed)
      - copied, changed from r41096, /trunk/tools/quickbook/test/xinclude.quickbook
   branches/release/tools/regression/build/Jamroot.jam
      - copied unchanged from r41096, /trunk/tools/regression/build/Jamroot.jam
   branches/release/tools/regression/build/vcide/compiler_status.vcproj
      - copied unchanged from r41096, /trunk/tools/regression/build/vcide/compiler_status.vcproj
   branches/release/tools/regression/build/vcide/library_status.vcproj
      - copied unchanged from r41096, /trunk/tools/regression/build/vcide/library_status.vcproj
   branches/release/tools/regression/build/vcide/regression.sln
      - copied unchanged from r41096, /trunk/tools/regression/build/vcide/regression.sln
   branches/release/tools/regression/doc/
      - copied from r41096, /trunk/tools/regression/doc/
   branches/release/tools/regression/library_status.html
      - copied unchanged from r41096, /trunk/tools/regression/library_status.html
   branches/release/tools/regression/src/
      - copied from r41096, /trunk/tools/regression/src/
   branches/release/tools/regression/src/boost_svn_export_archive.sh
      - copied unchanged from r41096, /trunk/tools/regression/src/boost_svn_export_archive.sh
   branches/release/tools/regression/src/collect_and_upload_logs.py
      - copied unchanged from r41096, /trunk/tools/regression/src/collect_and_upload_logs.py
   branches/release/tools/regression/src/compiler_status.cpp
      - copied unchanged from r41096, /trunk/tools/regression/src/compiler_status.cpp
   branches/release/tools/regression/src/detail/
      - copied from r41096, /trunk/tools/regression/src/detail/
   branches/release/tools/regression/src/detail/tiny_xml.cpp
      - copied unchanged from r41096, /trunk/tools/regression/src/detail/tiny_xml.cpp
   branches/release/tools/regression/src/detail/tiny_xml.hpp
      - copied unchanged from r41096, /trunk/tools/regression/src/detail/tiny_xml.hpp
   branches/release/tools/regression/src/detail/tiny_xml_test.cpp
      - copied unchanged from r41096, /trunk/tools/regression/src/detail/tiny_xml_test.cpp
   branches/release/tools/regression/src/detail/tiny_xml_test.txt
      - copied unchanged from r41096, /trunk/tools/regression/src/detail/tiny_xml_test.txt
   branches/release/tools/regression/src/library_status.cpp
      - copied unchanged from r41096, /trunk/tools/regression/src/library_status.cpp
   branches/release/tools/regression/src/library_test.bat
      - copied unchanged from r41096, /trunk/tools/regression/src/library_test.bat
   branches/release/tools/regression/src/library_test.sh
      - copied unchanged from r41096, /trunk/tools/regression/src/library_test.sh
   branches/release/tools/regression/src/library_test_all.sh
      - copied unchanged from r41096, /trunk/tools/regression/src/library_test_all.sh
   branches/release/tools/regression/src/process_jam_log.cpp
      - copied unchanged from r41096, /trunk/tools/regression/src/process_jam_log.cpp
   branches/release/tools/regression/src/regression-logs.pl
      - copied unchanged from r41096, /trunk/tools/regression/src/regression-logs.pl
   branches/release/tools/regression/src/regression.py
      - copied unchanged from r41096, /trunk/tools/regression/src/regression.py
   branches/release/tools/regression/src/run.py
      - copied unchanged from r41096, /trunk/tools/regression/src/run.py
   branches/release/tools/regression/src/run_tests.sh
      - copied unchanged from r41096, /trunk/tools/regression/src/run_tests.sh
   branches/release/tools/regression/src/smoke.py
      - copied unchanged from r41096, /trunk/tools/regression/src/smoke.py
   branches/release/tools/regression/test/Jamfile.v2
      - copied unchanged from r41096, /trunk/tools/regression/test/Jamfile.v2
   branches/release/tools/regression/test/test-boost-build/
      - copied from r41096, /trunk/tools/regression/test/test-boost-build/
   branches/release/tools/regression/test/test-boost-build/ignored_rc/
      - copied from r41096, /trunk/tools/regression/test/test-boost-build/ignored_rc/
   branches/release/tools/regression/test/test-boost-build/ignored_rc/ignored_rc.jam
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/ignored_rc/ignored_rc.jam
   branches/release/tools/regression/test/test-boost-build/ignored_rc/recognized_rc.jam
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/ignored_rc/recognized_rc.jam
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/
      - copied from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/Jamfile.v2
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/Jamfile.v2
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/lib/
      - copied from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/lib/
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/lib/Jamfile.v2
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/lib/Jamfile.v2
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/lib/lib.cpp
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/lib/lib.cpp
   branches/release/tools/regression/test/test-boost-build/missing_dependencies/test.cpp
      - copied unchanged from r41096, /trunk/tools/regression/test/test-boost-build/missing_dependencies/test.cpp
   branches/release/tools/regression/test/test-cases/Huber2629/ (props changed)
      - copied from r41096, /trunk/tools/regression/test/test-cases/Huber2629/
   branches/release/tools/regression/test/test-cases/Huber2629/bjam.log (props changed)
      - copied unchanged from r41096, /trunk/tools/regression/test/test-cases/Huber2629/bjam.log
   branches/release/tools/regression/test/test-cases/Huber2629/expected/
      - copied from r41096, /trunk/tools/regression/test/test-cases/Huber2629/expected/
   branches/release/tools/regression/test/test-cases/Huber2629/expected/results.xml
      - copied unchanged from r41096, /trunk/tools/regression/test/test-cases/Huber2629/expected/results.xml
   branches/release/tools/regression/xsl_reports/boostbook_report.py
      - copied unchanged from r41096, /trunk/tools/regression/xsl_reports/boostbook_report.py
   branches/release/tools/regression/xsl_reports/build_results.sh
      - copied unchanged from r41096, /trunk/tools/regression/xsl_reports/build_results.sh
   branches/release/tools/regression/xsl_reports/utils/rename.py
      - copied unchanged from r41096, /trunk/tools/regression/xsl_reports/utils/rename.py
   branches/release/tools/regression/xsl_reports/xsl/v2/boostbook_log.xsl
      - copied unchanged from r41096, /trunk/tools/regression/xsl_reports/xsl/v2/boostbook_log.xsl
   branches/release/tools/regression/xsl_reports/xsl/v2/dump_toolsets.xsl
      - copied unchanged from r41096, /trunk/tools/regression/xsl_reports/xsl/v2/dump_toolsets.xsl
Removed:
   branches/release/boost/filesystem/cerrno.hpp
   branches/release/libs/filesystem/doc/tr2_proposal.html
   branches/release/tools/quickbook/doc/html/boostbook.css
   branches/release/tools/quickbook/doc/quickbook.xml
   branches/release/tools/regression/build/Jamfile.v2
   branches/release/tools/regression/compiler_status.cpp
   branches/release/tools/regression/detail/
   branches/release/tools/regression/process_jam_log.cpp
   branches/release/tools/regression/regression-logs.pl
   branches/release/tools/regression/run_tests.sh
   branches/release/tools/regression/test/test-cases/borland/
   branches/release/tools/regression/test/test-cases/libs/
   branches/release/tools/regression/xsl_reports/db/
   branches/release/tools/regression/xsl_reports/runner/instructions.rst
   branches/release/tools/regression/xsl_reports/test/test-components/
   branches/release/tools/release/user-config.jam
Properties modified:
   branches/release/tools/build/v2/example/customization/inline_file.py (props changed)
   branches/release/tools/build/v2/nightly.sh (contents, props changed)
   branches/release/tools/build/v2/roll.sh (contents, props changed)
   branches/release/tools/jam/build_dist.bat (contents, props changed)
   branches/release/tools/jam/build_dist.sh (contents, props changed)
   branches/release/tools/jam/src/build.sh (contents, props changed)
   branches/release/tools/jam/test/test.sh (contents, props changed)
   branches/release/tools/regression/xsl_reports/runner/regression.py (contents, props changed)
Text files modified:
   branches/release/boost/filesystem/config.hpp | 9
   branches/release/boost/filesystem/convenience.hpp | 95
   branches/release/boost/filesystem/operations.hpp | 276 +
   branches/release/boost/filesystem/path.hpp | 223
   branches/release/libs/filesystem/build/Jamfile.v2 | 26
   branches/release/libs/filesystem/doc/faq.htm | 421 +-
   branches/release/libs/filesystem/doc/index.htm | 161
   branches/release/libs/filesystem/example/Jamfile.v2 | 6
   branches/release/libs/filesystem/example/mbpath.cpp | 7
   branches/release/libs/filesystem/src/operations.cpp | 438 +-
   branches/release/libs/filesystem/src/path.cpp | 58
   branches/release/libs/filesystem/src/portability.cpp | 2
   branches/release/libs/filesystem/src/utf8_codecvt_facet.hpp | 9
   branches/release/libs/filesystem/test/Jamfile.v2 | 31
   branches/release/libs/filesystem/test/convenience_test.cpp | 114
   branches/release/libs/filesystem/test/fstream_test.cpp | 10
   branches/release/libs/filesystem/test/lpath.hpp | 2
   branches/release/libs/filesystem/test/operations_test.cpp | 300 +
   branches/release/libs/filesystem/test/path_test.cpp | 19
   branches/release/libs/filesystem/test/wide_test.cpp | 14
   branches/release/tools/bcp/add_path.cpp | 4
   branches/release/tools/bcp/bcp.hpp | 1
   branches/release/tools/bcp/bcp.html | 20
   branches/release/tools/bcp/bcp_imp.cpp | 12
   branches/release/tools/bcp/bcp_imp.hpp | 3
   branches/release/tools/bcp/file_types.cpp | 2
   branches/release/tools/bcp/main.cpp | 4
   branches/release/tools/bcp/scan_cvs_path.cpp | 86
   branches/release/tools/boostbook/doc/boostbook.xml | 12
   branches/release/tools/boostbook/doc/reference.dtdxml | 151
   branches/release/tools/boostbook/doc/reference.xml | 228
   branches/release/tools/boostbook/dtd/boostbook.dtd | 78
   branches/release/tools/boostbook/setup_boostbook.py | 35
   branches/release/tools/boostbook/setup_boostbook.sh | 27
   branches/release/tools/boostbook/xsl/caramel/concept2docbook.xsl | 424 +-
   branches/release/tools/boostbook/xsl/chunk-common.xsl | 2
   branches/release/tools/boostbook/xsl/docbook.xsl | 25
   branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 92
   branches/release/tools/boostbook/xsl/fo.xsl | 92
   branches/release/tools/boostbook/xsl/function.xsl | 119
   branches/release/tools/boostbook/xsl/html.xsl | 60
   branches/release/tools/boostbook/xsl/library.xsl | 2
   branches/release/tools/boostbook/xsl/lookup.xsl | 163
   branches/release/tools/boostbook/xsl/navbar.xsl | 4
   branches/release/tools/boostbook/xsl/reference.xsl | 20
   branches/release/tools/boostbook/xsl/template.xsl | 2
   branches/release/tools/boostbook/xsl/type.xsl | 536 ++-
   branches/release/tools/boostbook/xsl/utility.xsl | 36
   branches/release/tools/build/v2/build-system.jam | 12
   branches/release/tools/build/v2/build/feature.jam | 5
   branches/release/tools/build/v2/build/modifiers.jam | 79
   branches/release/tools/build/v2/build/project.jam | 9
   branches/release/tools/build/v2/build/property.jam | 32
   branches/release/tools/build/v2/build/targets.jam | 50
   branches/release/tools/build/v2/build/toolset.jam | 23
   branches/release/tools/build/v2/build/version.jam | 2
   branches/release/tools/build/v2/changes.txt | 38
   branches/release/tools/build/v2/doc/src/faq.xml | 12
   branches/release/tools/build/v2/doc/src/reference.xml | 20
   branches/release/tools/build/v2/doc/src/tasks.xml | 8
   branches/release/tools/build/v2/doc/src/tutorial.xml | 4
   branches/release/tools/build/v2/example/generator/soap.jam | 3
   branches/release/tools/build/v2/index.html | 155
   branches/release/tools/build/v2/kernel/errors.jam | 2
   branches/release/tools/build/v2/nightly.sh | 2
   branches/release/tools/build/v2/release_procedure.txt | 20
   branches/release/tools/build/v2/roll.sh | 20
   branches/release/tools/build/v2/test/BoostBuild.py | 170
   branches/release/tools/build/v2/test/TestCmd.py | 6
   branches/release/tools/build/v2/test/boostbook.py | 8
   branches/release/tools/build/v2/test/boostbook/Jamroot | 2
   branches/release/tools/build/v2/test/boostbook/docs.xml | 2
   branches/release/tools/build/v2/test/build_dir.py | 4
   branches/release/tools/build/v2/test/gcc_runtime.py | 2
   branches/release/tools/build/v2/test/library_chain.py | 3
   branches/release/tools/build/v2/test/project_glob.py | 33
   branches/release/tools/build/v2/test/railsys/program/Jamfile | 1
   branches/release/tools/build/v2/test/rebuilds.py | 3
   branches/release/tools/build/v2/test/regression.py | 2
   branches/release/tools/build/v2/test/remove_requirement.py | 4
   branches/release/tools/build/v2/test/searched_lib.py | 2
   branches/release/tools/build/v2/test/test-config-example.jam | 4
   branches/release/tools/build/v2/test/test_all.py | 18
   branches/release/tools/build/v2/test/tree.py | 10
   branches/release/tools/build/v2/tools/acc.jam | 19
   branches/release/tools/build/v2/tools/boostbook.jam | 106
   branches/release/tools/build/v2/tools/borland.jam | 2
   branches/release/tools/build/v2/tools/builtin.jam | 22
   branches/release/tools/build/v2/tools/common.jam | 11
   branches/release/tools/build/v2/tools/darwin.jam | 4
   branches/release/tools/build/v2/tools/doxproc.py | 342 ++
   branches/release/tools/build/v2/tools/doxygen.jam | 149
   branches/release/tools/build/v2/tools/fortran.jam | 23
   branches/release/tools/build/v2/tools/gcc.jam | 108
   branches/release/tools/build/v2/tools/intel-win.jam | 5
   branches/release/tools/build/v2/tools/intel.jam | 2
   branches/release/tools/build/v2/tools/mpi.jam | 75
   branches/release/tools/build/v2/tools/msvc.jam | 19
   branches/release/tools/build/v2/tools/python.jam | 31
   branches/release/tools/build/v2/tools/qcc.jam | 6
   branches/release/tools/build/v2/tools/qt4.jam | 74
   branches/release/tools/build/v2/tools/quickbook.jam | 7
   branches/release/tools/build/v2/tools/stlport.jam | 27
   branches/release/tools/build/v2/tools/sun.jam | 17
   branches/release/tools/build/v2/tools/types/lib.jam | 4
   branches/release/tools/build/v2/tools/xsltproc.jam | 6
   branches/release/tools/build/v2/user-config.jam | 42
   branches/release/tools/build/v2/util/path.jam | 11
   branches/release/tools/inspect/build/Jamfile.v2 | 5
   branches/release/tools/inspect/index.html | 4
   branches/release/tools/inspect/inspect.cpp | 43
   branches/release/tools/inspect/link_check.cpp | 30
   branches/release/tools/inspect/link_check.hpp | 5
   branches/release/tools/jam/build_dist.bat | 35
   branches/release/tools/jam/build_dist.sh | 28
   branches/release/tools/jam/doc/bjam.qbk | 539 ++-
   branches/release/tools/jam/doc/build.jam | 6
   branches/release/tools/jam/src/Jambase | 2
   branches/release/tools/jam/src/boost-jam.spec | 128
   branches/release/tools/jam/src/build.bat | 253
   branches/release/tools/jam/src/build.jam | 209 +
   branches/release/tools/jam/src/build.sh | 30
   branches/release/tools/jam/src/builtins.c | 119
   branches/release/tools/jam/src/builtins.h | 6
   branches/release/tools/jam/src/command.c | 17
   branches/release/tools/jam/src/compile.c | 118
   branches/release/tools/jam/src/debug.c | 16
   branches/release/tools/jam/src/execcmd.h | 6
   branches/release/tools/jam/src/execmac.c | 2
   branches/release/tools/jam/src/execnt.c | 1384 ++++----
   branches/release/tools/jam/src/execunix.c | 498 ++
   branches/release/tools/jam/src/execvms.c | 6
   branches/release/tools/jam/src/expand.c | 46
   branches/release/tools/jam/src/filent.c | 5
   branches/release/tools/jam/src/fileunix.c | 7
   branches/release/tools/jam/src/frames.c | 1
   branches/release/tools/jam/src/frames.h | 8
   branches/release/tools/jam/src/hash.c | 213
   branches/release/tools/jam/src/hcache.c | 2
   branches/release/tools/jam/src/jam.c | 59
   branches/release/tools/jam/src/jam.h | 37
   branches/release/tools/jam/src/jambase.c | 2
   branches/release/tools/jam/src/lists.c | 5
   branches/release/tools/jam/src/lists.h | 1
   branches/release/tools/jam/src/make.c | 6
   branches/release/tools/jam/src/make1.c | 89
   branches/release/tools/jam/src/modules.c | 1
   branches/release/tools/jam/src/modules/order.c | 23
   branches/release/tools/jam/src/modules/regex.c | 6
   branches/release/tools/jam/src/newstr.c | 17
   branches/release/tools/jam/src/parse.c | 7
   branches/release/tools/jam/src/patchlevel.h | 6
   branches/release/tools/jam/src/regexp.c | 6
   branches/release/tools/jam/src/rules.c | 50
   branches/release/tools/jam/src/rules.h | 2
   branches/release/tools/jam/src/scan.c | 7
   branches/release/tools/jam/src/strings.c | 10
   branches/release/tools/jam/src/timestamp.c | 1
   branches/release/tools/jam/src/variable.c | 16
   branches/release/tools/jam/src/w32_getreg.c | 127
   branches/release/tools/jam/test/builtin_shell.jam | 29
   branches/release/tools/jam/test/test.bat | 5
   branches/release/tools/jam/test/test.sh | 2
   branches/release/tools/quickbook/Jamfile.v2 | 8
   branches/release/tools/quickbook/block.hpp | 170
   branches/release/tools/quickbook/detail/actions.cpp | 1092 +++++--
   branches/release/tools/quickbook/detail/actions.hpp | 702 ++--
   branches/release/tools/quickbook/detail/post_process.cpp | 206
   branches/release/tools/quickbook/detail/post_process.hpp | 2
   branches/release/tools/quickbook/detail/quickbook.cpp | 95
   branches/release/tools/quickbook/detail/utils.cpp | 191
   branches/release/tools/quickbook/detail/utils.hpp | 46
   branches/release/tools/quickbook/doc/Jamfile.v2 | 14
   branches/release/tools/quickbook/doc/html/index.html | 51
   branches/release/tools/quickbook/doc/html/quickbook/change_log.html | 103
   branches/release/tools/quickbook/doc/html/quickbook/intro.html | 76
   branches/release/tools/quickbook/doc/html/quickbook/ref.html | 1080 +++++-
   branches/release/tools/quickbook/doc/html/quickbook/syntax.html | 38
   branches/release/tools/quickbook/doc/html/quickbook/syntax/block.html | 1302 +++++++-
   branches/release/tools/quickbook/doc/html/quickbook/syntax/comments.html | 40
   branches/release/tools/quickbook/doc/html/quickbook/syntax/phrase.html | 621 ++-
   branches/release/tools/quickbook/doc/quickbook.qbk | 1075 +++++++
   branches/release/tools/quickbook/doc_info.hpp | 4
   branches/release/tools/quickbook/index.html | 11
   branches/release/tools/quickbook/phrase.hpp | 242 +
   branches/release/tools/quickbook/syntax_highlight.hpp | 20
   branches/release/tools/quickbook/test/Jamfile.v2 | 3
   branches/release/tools/quickbook/test/code-block-1.gold | 48
   branches/release/tools/quickbook/test/code-block-1.quickbook | 32
   branches/release/tools/quickbook/test/code-block-2.gold | 52
   branches/release/tools/quickbook/test/code-block-2.quickbook | 36
   branches/release/tools/quickbook/test/code-snippet.gold | 40
   branches/release/tools/quickbook/test/code-snippet.quickbook | 20
   branches/release/tools/quickbook/test/escape.gold | 33
   branches/release/tools/quickbook/test/escape.quickbook | 24
   branches/release/tools/quickbook/test/import.gold | 80
   branches/release/tools/quickbook/test/import.quickbook | 12
   branches/release/tools/quickbook/test/link-side-by-side.gold | 36
   branches/release/tools/quickbook/test/link-side-by-side.quickbook | 26
   branches/release/tools/quickbook/test/preformatted.gold | 58
   branches/release/tools/quickbook/test/preformatted.quickbook | 44
   branches/release/tools/quickbook/test/quickbook-manual.gold | 5741 ++++++++++++++++++++++++++-------------
   branches/release/tools/quickbook/test/quickbook-manual.quickbook | 3206 +++++++++++++--------
   branches/release/tools/quickbook/test/templates.gold | 140
   branches/release/tools/quickbook/test/templates.quickbook | 192
   branches/release/tools/quickbook/test/xinclude.gold | 18
   branches/release/tools/quickbook/test/xinclude.quickbook | 8
   branches/release/tools/regression/build/vcide/process_jam_log.vcproj | 28
   branches/release/tools/regression/index.htm | 18
   branches/release/tools/regression/xsl_reports/boost_wide_report.py | 68
   branches/release/tools/regression/xsl_reports/email_maintainers.py | 52
   branches/release/tools/regression/xsl_reports/make_snapshot.py | 71
   branches/release/tools/regression/xsl_reports/report.py | 4
   branches/release/tools/regression/xsl_reports/runner/collect_and_upload_logs.py | 183 +
   branches/release/tools/regression/xsl_reports/runner/default.css | 6
   branches/release/tools/regression/xsl_reports/runner/instructions.html | 625 ---
   branches/release/tools/regression/xsl_reports/runner/regression.py | 180
   branches/release/tools/regression/xsl_reports/test/common.py | 8
   branches/release/tools/regression/xsl_reports/test/generate_test_results.py | 10
   branches/release/tools/regression/xsl_reports/test/test.py | 2
   branches/release/tools/regression/xsl_reports/utils/__init__.py | 1
   branches/release/tools/regression/xsl_reports/utils/libxslt.py | 16
   branches/release/tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl | 9
   branches/release/tools/regression/xsl_reports/xsl/v2/common.xsl | 13
   branches/release/tools/regression/xsl_reports/xsl/v2/html/master.css | 5
   branches/release/tools/regression/xsl_reports/xsl/v2/issues_page.xsl | 4
   branches/release/tools/regression/xsl_reports/xsl/v2/links_page.xsl | 38
   branches/release/tools/regression/xsl_reports/xsl/v2/result_page.xsl | 8
   branches/release/tools/wave/build/Jamfile.v2 | 14
   branches/release/tools/wave/cpp.cpp | 129
   branches/release/tools/wave/cpp_version.hpp | 4
   branches/release/tools/wave/trace_macro_expansion.hpp | 506 ++
   232 files changed, 19306 insertions(+), 10362 deletions(-)

Deleted: branches/release/boost/filesystem/cerrno.hpp
==============================================================================
--- branches/release/boost/filesystem/cerrno.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,23 +0,0 @@
-// Boost Filesystem cerrno.hpp header --------------------------------------//
-
-// Copyright Beman Dawes 2005.
-// Use, modification, and distribution is subject to the 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
-
-#ifndef BOOST_FILESYSTEM_CERRNO_HPP
-#define BOOST_FILESYSTEM_CERRNO_HPP
-
-#include <cerrno>
-
-#if defined __BORLANDC__
-#define ENOSYS 9997
-#endif
-
-#define EBADHANDLE 9998 // bad handle
-#define EOTHER 9999 // Other error not translatable
- // to a POSIX errno value
-
-#endif // include guard

Modified: branches/release/boost/filesystem/config.hpp
==============================================================================
--- branches/release/boost/filesystem/config.hpp (original)
+++ branches/release/boost/filesystem/config.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,9 @@
 // boost/filesystem/config.hpp ---------------------------------------------//
 
 // Copyright Beman Dawes 2003
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
+
+// Distributed under the 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
 
@@ -23,6 +23,7 @@
 // http://www.boost.org/more/separate_compilation.html
 
 #include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
 
 // determine platform ------------------------------------------------------//
 
@@ -59,7 +60,7 @@
 
 // narrow support only for badly broken compilers or libraries -------------//
 
-# if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE)
+# if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
 # define BOOST_FILESYSTEM_NARROW_ONLY
 # endif
 

Modified: branches/release/boost/filesystem/convenience.hpp
==============================================================================
--- branches/release/boost/filesystem/convenience.hpp (original)
+++ branches/release/boost/filesystem/convenience.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,6 +14,7 @@
 #define BOOST_FILESYSTEM_CONVENIENCE_HPP
 
 #include <boost/filesystem/operations.hpp>
+#include <boost/system/error_code.hpp>
 #include <vector>
 #include <stack>
 
@@ -28,7 +29,7 @@
 # else
 # define BOOST_FS_FUNC(BOOST_FS_TYPE) inline BOOST_FS_TYPE
     typedef boost::filesystem::path Path;
-# define BOOST_FS_FUNC_STRING std::string
+# define BOOST_FS_FUNC_STRING inline std::string
 # define BOOST_FS_TYPENAME
 # endif
 
@@ -43,7 +44,8 @@
          {
            if ( !ph.empty() && !is_directory(ph) )
                boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::create_directories", ph, -1 ) );
+ "boost::filesystem::create_directories", ph,
+ make_error_code( boost::system::posix::file_exists ) ) );
            return false;
          }
 
@@ -138,7 +140,8 @@
       basic_recursive_directory_iterator(){} // creates the "end" iterator
 
       explicit basic_recursive_directory_iterator( const Path & dir_path );
- basic_recursive_directory_iterator( const Path & dir_path, system_error_type & ec );
+ basic_recursive_directory_iterator( const Path & dir_path,
+ system::error_code & ec );
 
       int level() const { return m_imp->m_level; }
 
@@ -185,6 +188,7 @@
 
       bool equal( const basic_recursive_directory_iterator & rhs ) const
         { return m_imp == rhs.m_imp; }
+
     };
 
     typedef basic_recursive_directory_iterator<path> recursive_directory_iterator;
@@ -201,15 +205,20 @@
       : m_imp( new detail::recur_dir_itr_imp<Path> )
     {
       m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path ) );
+ if ( m_imp->m_stack.top () == basic_directory_iterator<Path>() )
+ { m_imp.reset (); }
     }
 
     template<class Path>
     basic_recursive_directory_iterator<Path>::
- basic_recursive_directory_iterator( const Path & dir_path, system_error_type & ec )
+ basic_recursive_directory_iterator( const Path & dir_path,
+ system::error_code & ec )
       : m_imp( new detail::recur_dir_itr_imp<Path> )
     {
- m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path, std::nothrow ) );
       m_imp->m_no_throw = true;
+ m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path, ec ) );
+ if ( m_imp->m_stack.top () == basic_directory_iterator<Path>() )
+ { m_imp.reset (); }
     }
 
     // increment
@@ -220,15 +229,15 @@
       
       static const basic_directory_iterator<Path> end_itr;
 
- if ( m_imp->m_no_push ) m_imp->m_no_push = false;
+ if ( m_imp->m_no_push )
+ { m_imp->m_no_push = false; }
       else if ( is_directory( m_imp->m_stack.top()->status() ) )
       {
- system_error_type ec;
+ system::error_code ec;
         m_imp->m_stack.push(
           m_imp->m_no_throw
             ? basic_directory_iterator<Path>( *m_imp->m_stack.top(), ec )
- : basic_directory_iterator<Path>( *m_imp->m_stack.top() )
- );
+ : basic_directory_iterator<Path>( *m_imp->m_stack.top() ) );
         if ( m_imp->m_stack.top() != end_itr )
         {
           ++m_imp->m_level;
@@ -254,71 +263,17 @@
       BOOST_ASSERT( m_imp.get() && "pop on end iterator" );
       BOOST_ASSERT( m_imp->m_level > 0 && "pop with level < 1" );
 
- m_imp->m_stack.pop();
- --m_imp->m_level;
- }
-
- // what() basic_filesystem_error_decoder -------------------------------//
-
- namespace detail
- {
-
-# if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x581))
- using boost::filesystem::system_message;
-# endif
-
- inline void decode_system_message( system_error_type ec, std::string & target )
- {
- system_message( ec, target );
- }
-
-# if defined(BOOST_WINDOWS_API) && !defined(BOOST_FILESYSTEM_NARROW_ONLY)
- inline void decode_system_message( system_error_type ec, std::wstring & target )
- {
- system_message( ec, target );
- }
-# endif
-
- template<class String>
- void decode_system_message( system_error_type ec, String & target )
- {
- std::string temp;
- system_message( ec, temp );
- for ( const char * p = temp.c_str(); *p != 0; ++p )
- { target += static_cast<typename String::value_type>( *p ); }
- }
- }
-
- template<class Path>
- typename Path::string_type what( const basic_filesystem_error<Path> & ex )
- {
- typename Path::string_type s;
- for ( const char * p = ex.what(); *p != 0; ++p )
- { s += static_cast<typename Path::string_type::value_type>( *p ); }
+ static const basic_directory_iterator<Path> end_itr;
 
- if ( !ex.path1().empty() )
- {
- s += static_cast<typename Path::string_type::value_type>( ':' );
- s += static_cast<typename Path::string_type::value_type>( ' ' );
- s += static_cast<typename Path::string_type::value_type>( '\"' );
- s += ex.path1().file_string();
- s += static_cast<typename Path::string_type::value_type>( '\"' );
- }
- if ( !ex.path2().empty() )
+ do
       {
- s += static_cast<typename Path::string_type::value_type>( ',' );
- s += static_cast<typename Path::string_type::value_type>( ' ' );
- s += static_cast<typename Path::string_type::value_type>( '\"' );
- s += ex.path2().file_string();
- s += static_cast<typename Path::string_type::value_type>( '\"' );
+ m_imp->m_stack.pop();
+ --m_imp->m_level;
       }
- if ( ex.system_error() )
- {
- s += static_cast<typename Path::string_type::value_type>( ' ' );
+ while ( !m_imp->m_stack.empty()
+ && ++m_imp->m_stack.top() == end_itr );
 
- detail::decode_system_message( ex.system_error(), s );
- }
- return s;
+ if ( m_imp->m_stack.empty() ) m_imp.reset(); // done, so make end iterator
     }
 
   } // namespace filesystem

Modified: branches/release/boost/filesystem/operations.hpp
==============================================================================
--- branches/release/boost/filesystem/operations.hpp (original)
+++ branches/release/boost/filesystem/operations.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -4,9 +4,8 @@
 // Copyright 2002 Jan Langer
 // Copyright 2001 Dietmar Kuehl
 //
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
-// at http://www.boost.org/LICENSE_1_0.txt)
+// Distributed under the 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
 
@@ -15,7 +14,7 @@
 #ifndef BOOST_FILESYSTEM_OPERATIONS_HPP
 #define BOOST_FILESYSTEM_OPERATIONS_HPP
 
-#include <boost/filesystem/path.hpp> // includes <boost/filesystem/config.hpp>
+#include <boost/filesystem/path.hpp>
 
 #include <boost/shared_ptr.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -81,7 +80,8 @@
       character_file,
       fifo_file,
       socket_file,
- type_unknown // file does exist, but isn't one of the above types
+ type_unknown // file does exist, but isn't one of the above types or
+ // we don't have strong enough permission to find its type
     };
 
     class file_status
@@ -117,22 +117,22 @@
 
     namespace detail
     {
- typedef std::pair< boost::filesystem::system_error_type, bool >
+ typedef std::pair< system::error_code, bool >
         query_pair;
 
- typedef std::pair< boost::filesystem::system_error_type, boost::uintmax_t >
+ typedef std::pair< system::error_code, boost::uintmax_t >
         uintmax_pair;
 
- typedef std::pair< boost::filesystem::system_error_type, std::time_t >
+ typedef std::pair< system::error_code, std::time_t >
         time_pair;
 
- typedef std::pair< boost::filesystem::system_error_type, space_info >
+ typedef std::pair< system::error_code, space_info >
         space_pair;
 
       template< class Path >
       struct directory_pair
       {
- typedef std::pair< boost::filesystem::system_error_type,
+ typedef std::pair< system::error_code,
           typename Path::external_string_type > type;
       };
 
@@ -142,10 +142,10 @@
 # endif
 
       BOOST_FILESYSTEM_DECL file_status
- status_api( const std::string & ph, system_error_type & ec );
+ status_api( const std::string & ph, system::error_code & ec );
 # ifndef BOOST_WINDOWS_API
       BOOST_FILESYSTEM_DECL file_status
- symlink_status_api( const std::string & ph, system_error_type & ec );
+ symlink_status_api( const std::string & ph, system::error_code & ec );
 # endif
       BOOST_FILESYSTEM_DECL query_pair
         is_empty_api( const std::string & ph );
@@ -157,34 +157,36 @@
         space_api( const std::string & ph );
       BOOST_FILESYSTEM_DECL time_pair
         last_write_time_api( const std::string & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         last_write_time_api( const std::string & ph, std::time_t new_value );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         get_current_path_api( std::string & ph );
+ BOOST_FILESYSTEM_DECL system::error_code
+ set_current_path_api( const std::string & ph );
       BOOST_FILESYSTEM_DECL query_pair
         create_directory_api( const std::string & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         create_hard_link_api( const std::string & to_ph,
           const std::string & from_ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         create_symlink_api( const std::string & to_ph,
           const std::string & from_ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         remove_api( const std::string & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         rename_api( const std::string & from, const std::string & to );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         copy_file_api( const std::string & from, const std::string & to );
 
 # if defined(BOOST_WINDOWS_API)
       
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         get_full_path_name_api( const std::string & ph, std::string & target );
 
 # if !defined(BOOST_FILESYSTEM_NARROW_ONLY)
 
       BOOST_FILESYSTEM_DECL boost::filesystem::file_status
- status_api( const std::wstring & ph, system_error_type & ec );
+ status_api( const std::wstring & ph, system::error_code & ec );
       BOOST_FILESYSTEM_DECL query_pair
         is_empty_api( const std::wstring & ph );
       BOOST_FILESYSTEM_DECL query_pair
@@ -193,29 +195,31 @@
         file_size_api( const std::wstring & ph );
       BOOST_FILESYSTEM_DECL space_pair
         space_api( const std::wstring & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         get_full_path_name_api( const std::wstring & ph, std::wstring & target );
       BOOST_FILESYSTEM_DECL time_pair
         last_write_time_api( const std::wstring & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         last_write_time_api( const std::wstring & ph, std::time_t new_value );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         get_current_path_api( std::wstring & ph );
+ BOOST_FILESYSTEM_DECL system::error_code
+ set_current_path_api( const std::wstring & ph );
       BOOST_FILESYSTEM_DECL query_pair
         create_directory_api( const std::wstring & ph );
 # ifdef BOOST_FS_HARD_LINK
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         create_hard_link_api( const std::wstring & existing_ph,
           const std::wstring & new_ph );
 # endif
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         create_symlink_api( const std::wstring & to_ph,
           const std::wstring & from_ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         remove_api( const std::wstring & ph );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         rename_api( const std::wstring & from, const std::wstring & to );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         copy_file_api( const std::wstring & from, const std::wstring & to );
 
 # endif
@@ -235,13 +239,13 @@
 // query functions ---------------------------------------------------------//
 
     BOOST_INLINE_FS_FUNC(file_status)
- status( const Path & ph, system_error_type & ec )
+ status( const Path & ph, system::error_code & ec )
       { return detail::status_api( ph.external_file_string(), ec ); }
 
     BOOST_FS_FUNC(file_status)
     status( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -250,7 +254,7 @@
     }
 
     BOOST_INLINE_FS_FUNC(file_status)
- symlink_status( const Path & ph, system_error_type & ec )
+ symlink_status( const Path & ph, system::error_code & ec )
 # ifdef BOOST_WINDOWS_API
       { return detail::status_api( ph.external_file_string(), ec ); }
 # else
@@ -260,7 +264,7 @@
     BOOST_FS_FUNC(file_status)
     symlink_status( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( symlink_status( ph, ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -275,7 +279,7 @@
 
     BOOST_FS_FUNC(bool) exists( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -285,7 +289,7 @@
 
     BOOST_FS_FUNC(bool) is_directory( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -295,7 +299,7 @@
 
     BOOST_FS_FUNC(bool) is_regular( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -305,7 +309,7 @@
 
     BOOST_FS_FUNC(bool) is_other( const Path & ph )
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -321,7 +325,7 @@
 # else
       const Path & ph)
     {
- system_error_type ec;
+ system::error_code ec;
       file_status result( detail::symlink_status_api( ph.external_file_string(), ec ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
@@ -340,8 +344,9 @@
     BOOST_FS_FUNC(bool) _is_empty( const Path & ph )
 # endif
     {
- detail::query_pair result = detail::is_empty_api( ph.external_file_string() );
- if ( result.first != 0 )
+ detail::query_pair result(
+ detail::is_empty_api( ph.external_file_string() ) );
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::is_empty", ph, result.first ) );
       return result.second;
@@ -349,9 +354,9 @@
 
     BOOST_FS_FUNC(bool) equivalent( const Path & ph1, const Path & ph2 )
     {
- detail::query_pair result = detail::equivalent_api(
- ph1.external_file_string(), ph2.external_file_string() );
- if ( result.first != 0 )
+ detail::query_pair result( detail::equivalent_api(
+ ph1.external_file_string(), ph2.external_file_string() ) );
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::equivalent", ph1, ph2, result.first ) );
       return result.second;
@@ -360,8 +365,8 @@
     BOOST_FS_FUNC(boost::uintmax_t) file_size( const Path & ph )
     {
       detail::uintmax_pair result
- = detail::file_size_api( ph.external_file_string() );
- if ( result.first != 0 )
+ ( detail::file_size_api( ph.external_file_string() ) );
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::file_size", ph, result.first ) );
       return result.second;
@@ -370,8 +375,8 @@
     BOOST_FS_FUNC(space_info) space( const Path & ph )
     {
       detail::space_pair result
- = detail::space_api( ph.external_file_string() );
- if ( result.first != 0 )
+ ( detail::space_api( ph.external_file_string() ) );
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::space", ph, result.first ) );
       return result.second;
@@ -380,8 +385,8 @@
     BOOST_FS_FUNC(std::time_t) last_write_time( const Path & ph )
     {
       detail::time_pair result
- = detail::last_write_time_api( ph.external_file_string() );
- if ( result.first != 0 )
+ ( detail::last_write_time_api( ph.external_file_string() ) );
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::last_write_time", ph, result.first ) );
       return result.second;
@@ -394,7 +399,7 @@
     {
       detail::query_pair result(
         detail::create_directory_api( dir_ph.external_directory_string() ) );
- if ( result.first != 0 )
+ if ( result.first )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::create_directory",
           dir_ph, result.first ) );
@@ -405,19 +410,19 @@
     BOOST_FS_FUNC(void)
     create_hard_link( const Path & to_ph, const Path & from_ph )
     {
- system_error_type result(
+ system::error_code ec(
         detail::create_hard_link_api(
           to_ph.external_file_string(),
           from_ph.external_file_string() ) );
- if ( result != 0 )
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::create_hard_link",
- to_ph, from_ph, result ) );
+ to_ph, from_ph, ec ) );
     }
 
- BOOST_FS_FUNC(system_error_type)
+ BOOST_FS_FUNC(system::error_code)
     create_hard_link( const Path & to_ph, const Path & from_ph,
- system_error_type & ec )
+ system::error_code & ec )
     {
       ec = detail::create_hard_link_api(
             to_ph.external_file_string(),
@@ -429,19 +434,19 @@
     BOOST_FS_FUNC(void)
     create_symlink( const Path & to_ph, const Path & from_ph )
     {
- system_error_type result(
+ system::error_code ec(
         detail::create_symlink_api(
           to_ph.external_file_string(),
           from_ph.external_file_string() ) );
- if ( result )
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::create_symlink",
- to_ph, from_ph, result ) );
+ to_ph, from_ph, ec ) );
     }
 
- BOOST_FS_FUNC(system_error_type)
+ BOOST_FS_FUNC(system::error_code)
     create_symlink( const Path & to_ph, const Path & from_ph,
- system_error_type & ec )
+ system::error_code & ec )
     {
       ec = detail::create_symlink_api(
              to_ph.external_file_string(),
@@ -457,11 +462,10 @@
         // the link rather than what it points to is deleted. Windows behavior
         // doesn't matter; is_symlink() is always false on Windows.
       {
- system_error_type result = detail::remove_api( ph.external_file_string() );
- if ( result != 0 )
+ system::error_code ec( detail::remove_api( ph.external_file_string() ) );
+ if ( ec )
           boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::remove",
- ph, result ) );
+ "boost::filesystem::remove", ph, ec ) );
         return true;
       }
       return false;
@@ -475,37 +479,46 @@
 
     BOOST_FS_FUNC(void) rename( const Path & from_path, const Path & to_path )
     {
- system_error_type result = detail::rename_api(
+ system::error_code ec( detail::rename_api(
         from_path.external_directory_string(),
- to_path.external_directory_string() );
- if ( result != 0 )
+ to_path.external_directory_string() ) );
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::rename",
- from_path, to_path, result ) );
+ from_path, to_path, ec ) );
     }
 
     BOOST_FS_FUNC(void) copy_file( const Path & from_path, const Path & to_path )
     {
- system_error_type result = detail::copy_file_api(
+ system::error_code ec( detail::copy_file_api(
         from_path.external_directory_string(),
- to_path.external_directory_string() );
- if ( result != 0 )
+ to_path.external_directory_string() ) );
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::copy_file",
- from_path, to_path, result ) );
+ from_path, to_path, ec ) );
     }
 
     template< class Path >
     Path current_path()
     {
       typename Path::external_string_type ph;
- boost::filesystem::system_error_type result;
- if ( (result = detail::get_current_path_api( ph )) != 0 )
+ system::error_code ec( detail::get_current_path_api( ph ) );
+ if ( ec )
           boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::current_path", result ) );
+ "boost::filesystem::current_path", ec ) );
       return Path( Path::traits_type::to_internal( ph ) );
     }
 
+ BOOST_FS_FUNC(void) current_path( const Path & ph )
+ {
+ system::error_code ec( detail::set_current_path_api(
+ ph.external_directory_string() ) );
+ if ( ec )
+ boost::throw_exception( basic_filesystem_error<Path>(
+ "boost::filesystem::current_path", ph, ec ) );
+ }
+
     template< class Path >
     const Path & initial_path()
     {
@@ -527,11 +540,11 @@
 # ifdef BOOST_WINDOWS_API
       if ( ph.empty() ) return ph;
       BOOST_FS_TYPENAME Path::external_string_type sys_ph;
- boost::filesystem::system_error_type result;
- if ( (result = detail::get_full_path_name_api( ph.external_file_string(),
- sys_ph )) != 0 )
+ system::error_code ec( detail::get_full_path_name_api( ph.external_file_string(),
+ sys_ph ) );
+ if ( ec )
           boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::system_complete", ph, result ) );
+ "boost::filesystem::system_complete", ph, ec ) );
       return Path( Path::traits_type::to_internal( sys_ph ) );
 # else
       return (ph.empty() || ph.is_complete())
@@ -566,11 +579,11 @@
     BOOST_FS_FUNC(void)
     last_write_time( const Path & ph, const std::time_t new_time )
     {
- boost::filesystem::system_error_type result;
- if ( (result = detail::last_write_time_api( ph.external_file_string(),
- new_time )) != 0 )
+ system::error_code ec( detail::last_write_time_api( ph.external_file_string(),
+ new_time ) );
+ if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
- "boost::filesystem::last_write_time", ph, result ) );
+ "boost::filesystem::last_write_time", ph, ec ) );
     }
 
 # ifndef BOOST_FILESYSTEM_NARROW_ONLY
@@ -582,9 +595,9 @@
     inline file_status status( const wpath & ph )
       { return status<wpath>( ph ); }
 
- inline file_status status( const path & ph, system_error_type & ec )
+ inline file_status status( const path & ph, system::error_code & ec )
       { return status<path>( ph, ec ); }
- inline file_status status( const wpath & ph, system_error_type & ec )
+ inline file_status status( const wpath & ph, system::error_code & ec )
       { return status<wpath>( ph, ec ); }
 
     inline file_status symlink_status( const path & ph )
@@ -592,9 +605,9 @@
     inline file_status symlink_status( const wpath & ph )
       { return symlink_status<wpath>( ph ); }
 
- inline file_status symlink_status( const path & ph, system_error_type & ec )
+ inline file_status symlink_status( const path & ph, system::error_code & ec )
       { return symlink_status<path>( ph, ec ); }
- inline file_status symlink_status( const wpath & ph, system_error_type & ec )
+ inline file_status symlink_status( const wpath & ph, system::error_code & ec )
       { return symlink_status<wpath>( ph, ec ); }
 
     inline bool exists( const path & ph ) { return exists<path>( ph ); }
@@ -658,11 +671,11 @@
       const wpath & from_ph )
       { return create_hard_link<wpath>( to_ph, from_ph ); }
 
- inline system_error_type create_hard_link( const path & to_ph,
- const path & from_ph, system_error_type & ec )
+ inline system::error_code create_hard_link( const path & to_ph,
+ const path & from_ph, system::error_code & ec )
       { return create_hard_link<path>( to_ph, from_ph, ec ); }
- inline system_error_type create_hard_link( const wpath & to_ph,
- const wpath & from_ph, system_error_type & ec )
+ inline system::error_code create_hard_link( const wpath & to_ph,
+ const wpath & from_ph, system::error_code & ec )
       { return create_hard_link<wpath>( to_ph, from_ph, ec ); }
 #endif
     
@@ -673,11 +686,11 @@
       const wpath & from_ph )
       { return create_symlink<wpath>( to_ph, from_ph ); }
 
- inline system_error_type create_symlink( const path & to_ph,
- const path & from_ph, system_error_type & ec )
+ inline system::error_code create_symlink( const path & to_ph,
+ const path & from_ph, system::error_code & ec )
       { return create_symlink<path>( to_ph, from_ph, ec ); }
- inline system_error_type create_symlink( const wpath & to_ph,
- const wpath & from_ph, system_error_type & ec )
+ inline system::error_code create_symlink( const wpath & to_ph,
+ const wpath & from_ph, system::error_code & ec )
       { return create_symlink<wpath>( to_ph, from_ph, ec ); }
 
     inline bool remove( const path & ph )
@@ -722,7 +735,12 @@
     inline void last_write_time( const wpath & ph, const std::time_t new_time )
       { last_write_time<wpath>( ph, new_time ); }
 
-# endif // BOOST_FILESYSTEM_NARROW_ONLY
+ inline void current_path( const path & ph )
+ { current_path<path>( ph ); }
+ inline void current_path( const wpath & ph )
+ { current_path<wpath>( ph ); }
+
+# endif // ifndef BOOST_FILESYSTEM_NARROW_ONLY
 
     namespace detail
     {
@@ -757,7 +775,7 @@
 // basic_directory_iterator, and so avoid iterator_facade DLL template
 // problems. They also overload to the proper external path character type.
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         dir_itr_first( void *& handle,
 #if defined(BOOST_POSIX_API)
             void *& buffer,
@@ -766,7 +784,7 @@
           std::string & target, file_status & fs, file_status & symlink_fs );
       // eof: return==0 && handle==0
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         dir_itr_increment( void *& handle,
 #if defined(BOOST_POSIX_API)
             void *& buffer,
@@ -774,7 +792,7 @@
           std::string & target, file_status & fs, file_status & symlink_fs );
       // eof: return==0 && handle==0
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         dir_itr_close( void *& handle
 #if defined(BOOST_POSIX_API)
             , void *& buffer
@@ -783,10 +801,10 @@
       // Effects: none if handle==0, otherwise close handle, set handle=0
 
 # if defined(BOOST_WINDOWS_API) && !defined(BOOST_FILESYSTEM_NARROW_ONLY)
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         dir_itr_first( void *& handle, const std::wstring & ph,
           std::wstring & target, file_status & fs, file_status & symlink_fs );
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL system::error_code
         dir_itr_increment( void *& handle, std::wstring & target,
           file_status & fs, file_status & symlink_fs );
 # endif
@@ -813,7 +831,8 @@
           ); }
       };
 
- BOOST_FILESYSTEM_DECL extern system_error_type not_found_error;
+ BOOST_FILESYSTEM_DECL system::error_code not_found_error();
+
     } // namespace detail
 
 // basic_directory_iterator ------------------------------------------------//
@@ -831,7 +850,7 @@
       basic_directory_iterator(){} // creates the "end" iterator
 
       explicit basic_directory_iterator( const Path & dir_path );
- basic_directory_iterator( const Path & dir_path, system_error_type & ec );
+ basic_directory_iterator( const Path & dir_path, system::error_code & ec );
 
     private:
 
@@ -855,7 +874,7 @@
       bool equal( const basic_directory_iterator & rhs ) const
         { return m_imp == rhs.m_imp; }
 
- system_error_type m_init( const Path & dir_path );
+ system::error_code m_init( const Path & dir_path );
     };
 
     typedef basic_directory_iterator< path > directory_iterator;
@@ -866,27 +885,27 @@
     // basic_directory_iterator implementation ---------------------------//
 
     template<class Path>
- system_error_type basic_directory_iterator<Path>::m_init(
+ system::error_code basic_directory_iterator<Path>::m_init(
       const Path & dir_path )
     {
       if ( dir_path.empty() )
       {
         m_imp.reset();
- return detail::not_found_error;
+ return detail::not_found_error();
       }
- system_error_type sys_err;
       typename Path::external_string_type name;
       file_status fs, symlink_fs;
-
- if ( (sys_err = detail::dir_itr_first( m_imp->m_handle,
+ system::error_code ec( detail::dir_itr_first( m_imp->m_handle,
 #if defined(BOOST_POSIX_API)
         m_imp->m_buffer,
 #endif
         dir_path.external_directory_string(),
- name, fs, symlink_fs )) != 0 )
+ name, fs, symlink_fs ) );
+
+ if ( ec )
       {
         m_imp.reset();
- return sys_err;
+ return ec;
       }
       
       if ( m_imp->m_handle == 0 ) m_imp.reset(); // eof, so make end iterator
@@ -900,7 +919,7 @@
               && name.size() == 2)) )
           { increment(); }
       }
- return 0;
+ return boost::system::error_code();
     }
 
     template<class Path>
@@ -908,10 +927,10 @@
       const Path & dir_path )
       : m_imp( new detail::dir_itr_imp<Path> )
     {
- system_error_type ec( m_init(dir_path) );
- if ( ec != 0 )
+ system::error_code ec( m_init(dir_path) );
+ if ( ec )
       {
- boost::throw_exception( basic_filesystem_error<Path>(
+ boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::basic_directory_iterator constructor",
           dir_path, ec ) );
       }
@@ -919,7 +938,7 @@
 
     template<class Path>
     basic_directory_iterator<Path>::basic_directory_iterator(
- const Path & dir_path, system_error_type & ec )
+ const Path & dir_path, system::error_code & ec )
       : m_imp( new detail::dir_itr_imp<Path> )
     {
       ec = m_init(dir_path);
@@ -931,21 +950,22 @@
       BOOST_ASSERT( m_imp.get() && "attempt to increment end iterator" );
       BOOST_ASSERT( m_imp->m_handle != 0 && "internal program error" );
       
- system_error_type sys_err(0);
       typename Path::external_string_type name;
       file_status fs, symlink_fs;
+ system::error_code ec;
 
       for (;;)
       {
- if ( (sys_err = detail::dir_itr_increment( m_imp->m_handle,
+ ec = detail::dir_itr_increment( m_imp->m_handle,
 #if defined(BOOST_POSIX_API)
           m_imp->m_buffer,
 #endif
- name, fs, symlink_fs )) != 0 )
+ name, fs, symlink_fs );
+ if ( ec )
         {
           boost::throw_exception( basic_filesystem_error<Path>(
             "boost::filesystem::basic_directory_iterator increment",
- m_imp->m_directory_entry.path().branch_path(), sys_err ) );
+ m_imp->m_directory_entry.path().branch_path(), ec ) );
         }
         if ( m_imp->m_handle == 0 ) { m_imp.reset(); return; } // eof, make end
         if ( !(name[0] == dot<Path>::value // !(dot or dot-dot)
@@ -990,11 +1010,11 @@
        m_symlink_status = symlink_st;
      }
 
- const Path & path() const { return m_path; }
+ const Path & path() const { return m_path; }
       file_status status() const;
- file_status status( system_error_type & ec ) const;
+ file_status status( system::error_code & ec ) const;
       file_status symlink_status() const;
- file_status symlink_status( system_error_type & ec ) const;
+ file_status symlink_status( system::error_code & ec ) const;
 
       // conversion simplifies the most common use of basic_directory_entry
       operator const path_type &() const { return m_path; }
@@ -1046,20 +1066,20 @@
 
     template<class Path>
     file_status
- basic_directory_entry<Path>::status( system_error_type & ec ) const
+ basic_directory_entry<Path>::status( system::error_code & ec ) const
     {
       if ( !status_known( m_status ) )
       {
 # ifndef BOOST_WINDOWS_API
         if ( status_known( m_symlink_status )
           && !is_symlink( m_symlink_status ) )
- { ec = 0; m_status = m_symlink_status; }
+ { ec = boost::system::error_code();; m_status = m_symlink_status; }
         else { m_status = boost::filesystem::status( m_path, ec ); }
 # else
         m_status = boost::filesystem::status( m_path, ec );
 # endif
       }
- else ec = 0;
+ else ec = boost::system::error_code();;
       return m_status;
     }
 
@@ -1078,12 +1098,12 @@
 
     template<class Path>
     file_status
- basic_directory_entry<Path>::symlink_status( system_error_type & ec ) const
+ basic_directory_entry<Path>::symlink_status( system::error_code & ec ) const
     {
 # ifndef BOOST_WINDOWS_API
       if ( !status_known( m_symlink_status ) )
         { m_symlink_status = boost::filesystem::symlink_status( m_path, ec ); }
- else ec = 0;
+ else ec = boost::system::error_code();;
       return m_symlink_status;
 # else
       return status( ec );

Modified: branches/release/boost/filesystem/path.hpp
==============================================================================
--- branches/release/boost/filesystem/path.hpp (original)
+++ branches/release/boost/filesystem/path.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,9 @@
 // boost/filesystem/path.hpp -----------------------------------------------//
 
 // Copyright Beman Dawes 2002-2005
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
+
+// Distributed under the 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
 
@@ -13,6 +13,7 @@
 #define BOOST_FILESYSTEM_PATH_HPP
 
 #include <boost/filesystem/config.hpp>
+#include <boost/system/system_error.hpp>
 #include <boost/iterator/iterator_facade.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/shared_ptr.hpp>
@@ -54,11 +55,11 @@
 
 # ifndef BOOST_FILESYSTEM_NARROW_ONLY
 
- struct wpath_traits;
+ struct BOOST_FILESYSTEM_DECL wpath_traits;
     
     typedef basic_path< std::wstring, wpath_traits > wpath;
 
- struct wpath_traits
+ struct BOOST_FILESYSTEM_DECL wpath_traits
     {
       typedef std::wstring internal_string_type;
 # ifdef BOOST_WINDOWS_API
@@ -80,102 +81,6 @@
 
 # endif // ifndef BOOST_FILESYSTEM_NARROW_ONLY
 
-// error reporting support -------------------------------------------------//
-
- typedef int errno_type; // determined by C standard
-
-# ifdef BOOST_WINDOWS_API
- typedef unsigned system_error_type;
-
- BOOST_FILESYSTEM_DECL
- errno_type lookup_errno( system_error_type sys_err_code );
-# else
- typedef int system_error_type;
-
- inline errno_type lookup_errno( system_error_type sys_err_code )
- { return sys_err_code; }
-# endif
-
- // deprecated support for legacy function name
- inline errno_type lookup_error_code( system_error_type sys_err_code )
- { return lookup_errno( sys_err_code ); }
-
- BOOST_FILESYSTEM_DECL
- void system_message( system_error_type sys_err_code, std::string & target );
- // Effects: appends error message to target
-
-# if defined(BOOST_WINDOWS_API) && !defined(BOOST_FILESYSTEM_NARROW_ONLY)
- BOOST_FILESYSTEM_DECL void
- system_message( system_error_type sys_err_code, std::wstring & target );
-# endif
-
- // filesystem_error ----------------------------------------------------//
-
- class filesystem_error : public std::runtime_error
- // see http://www.boost.org/more/error_handling.html for design rationale
- {
- public:
- filesystem_error()
- : std::runtime_error("filesystem error"), m_sys_err(0) {}
- explicit filesystem_error(
- const std::string & what_arg, system_error_type sys_ec = 0 )
- : std::runtime_error(what_arg), m_sys_err(sys_ec) {}
-
- system_error_type system_error() const { return m_sys_err; }
- // Note: system_error() == 0 implies a library (rather than system) error
-
- private:
- system_error_type m_sys_err;
- };
-
- // basic_filesystem_error ----------------------------------------------//
-
- template<class Path>
- class basic_filesystem_error : public filesystem_error
- {
- // see http://www.boost.org/more/error_handling.html for design rationale
- public:
- // compiler generates copy constructor and copy assignment
-
- typedef Path path_type;
-
- basic_filesystem_error( const std::string & what,
- system_error_type sys_err_code );
-
- basic_filesystem_error( const std::string & what,
- const path_type & path1, system_error_type sys_err_code );
-
- basic_filesystem_error( const std::string & what, const path_type & path1,
- const path_type & path2, system_error_type sys_err_code );
-
- ~basic_filesystem_error() throw() {}
-
- const path_type & path1() const
- {
- static const path_type empty_path;
- return m_imp_ptr.get() ? m_imp_ptr->m_path1 : empty_path ;
- }
- const path_type & path2() const
- {
- static const path_type empty_path;
- return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path ;
- }
-
- private:
- struct m_imp
- {
- path_type m_path1; // may be empty()
- path_type m_path2; // may be empty()
- };
- boost::shared_ptr<m_imp> m_imp_ptr;
- };
-
- typedef basic_filesystem_error<path> filesystem_path_error;
-
-# ifndef BOOST_FILESYSTEM_NARROW_ONLY
- typedef basic_filesystem_error<wpath> filesystem_wpath_error;
-# endif
-
     // path traits ---------------------------------------------------------//
 
     template<class Path> struct is_basic_path
@@ -661,6 +566,110 @@
     }
 # endif
 
+ // basic_filesystem_error helpers --------------------------------------//
+
+ // Originally choice of implementation was done via specialization of
+ // basic_filesystem_error::what(). Several compilers (GCC, aCC, etc.)
+ // couldn't handle that, so the choice is now accomplished by overloading.
+
+ namespace detail
+ {
+ // BOOST_FILESYSTEM_DECL version works for VC++ but not GCC. Go figure!
+ inline
+ const char * what( const char * sys_err_what,
+ const path & path1, const path & path2, std::string & target )
+ {
+ try
+ {
+ if ( target.empty() )
+ {
+ target = sys_err_what;
+ if ( !path1.empty() )
+ {
+ target += ": \"";
+ target += path1.file_string();
+ target += "\"";
+ }
+ if ( !path2.empty() )
+ {
+ target += ", \"";
+ target += path2.file_string();
+ target += "\"";
+ }
+ }
+ return target.c_str();
+ }
+ catch (...)
+ {
+ return sys_err_what;
+ }
+ }
+
+ template<class Path>
+ const char * what( const char * sys_err_what,
+ const Path & /*path1*/, const Path & /*path2*/, std::string & /*target*/ )
+ {
+ return sys_err_what;
+ }
+ }
+
+ // basic_filesystem_error ----------------------------------------------//
+
+ template<class Path>
+ class basic_filesystem_error : public system::system_error
+ {
+ // see http://www.boost.org/more/error_handling.html for design rationale
+ public:
+ // compiler generates copy constructor and copy assignment
+
+ typedef Path path_type;
+
+ basic_filesystem_error( const std::string & what,
+ system::error_code ec );
+
+ basic_filesystem_error( const std::string & what,
+ const path_type & path1, system::error_code ec );
+
+ basic_filesystem_error( const std::string & what, const path_type & path1,
+ const path_type & path2, system::error_code ec );
+
+ ~basic_filesystem_error() throw() {}
+
+ const path_type & path1() const
+ {
+ static const path_type empty_path;
+ return m_imp_ptr.get() ? m_imp_ptr->m_path1 : empty_path ;
+ }
+ const path_type & path2() const
+ {
+ static const path_type empty_path;
+ return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path ;
+ }
+
+ const char * what() const throw()
+ {
+ if ( !m_imp_ptr.get() )
+ return system::system_error::what();
+ return detail::what( system::system_error::what(), m_imp_ptr->m_path1,
+ m_imp_ptr->m_path2, m_imp_ptr->m_what );
+ }
+
+ private:
+ struct m_imp
+ {
+ path_type m_path1; // may be empty()
+ path_type m_path2; // may be empty()
+ std::string m_what; // not built until needed
+ };
+ boost::shared_ptr<m_imp> m_imp_ptr;
+ };
+
+ typedef basic_filesystem_error<path> filesystem_error;
+
+# ifndef BOOST_FILESYSTEM_NARROW_ONLY
+ typedef basic_filesystem_error<wpath> wfilesystem_error;
+# endif
+
   // path::name_checks -----------------------------------------------------//
 
     BOOST_FILESYSTEM_DECL bool portable_posix_name( const std::string & name );
@@ -1376,8 +1385,8 @@
 
     template<class Path>
     basic_filesystem_error<Path>::basic_filesystem_error(
- const std::string & what, system_error_type sys_err_code )
- : filesystem_error(what, sys_err_code)
+ const std::string & what, system::error_code ec )
+ : system::system_error(ec, what)
     {
       try
       {
@@ -1389,8 +1398,8 @@
     template<class Path>
     basic_filesystem_error<Path>::basic_filesystem_error(
       const std::string & what, const path_type & path1,
- system_error_type sys_err_code )
- : filesystem_error(what, sys_err_code)
+ system::error_code ec )
+ : system::system_error(ec, what)
     {
       try
       {
@@ -1403,8 +1412,8 @@
     template<class Path>
     basic_filesystem_error<Path>::basic_filesystem_error(
       const std::string & what, const path_type & path1,
- const path_type & path2, system_error_type sys_err_code )
- : filesystem_error(what, sys_err_code)
+ const path_type & path2, system::error_code ec )
+ : system::system_error(ec, what)
     {
       try
       {

Modified: branches/release/libs/filesystem/build/Jamfile.v2
==============================================================================
--- branches/release/libs/filesystem/build/Jamfile.v2 (original)
+++ branches/release/libs/filesystem/build/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,33 +1,33 @@
-# Boost Filesystem Library Build Jamfile
 
-# (C) Copyright Beman Dawes 2002, 2006
+# Boost Filesystem Library Build Jamfile
 
+# (C) Copyright Beman Dawes 2002-2006
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
 
+
 # See library home page at http://www.boost.org/libs/filesystem
 
 project boost/filesystem
- :
- source-location ../src
+ : source-location ../src
+ : usage-requirements # pass these requirement to dependents (i.e. users)
+ <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
     ;
 
 SOURCES =
- exception operations path portability utf8_codecvt_facet ;
+ operations path portability utf8_codecvt_facet ;
 
 lib boost_filesystem
     :
     $(SOURCES).cpp
+ ../../system/build//boost_system
     :
- <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 # tell source we're building dll's
- ;
-
-install dist-lib
+ <link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
+ <link>static:<define>BOOST_All_STATIC_LINK=1 # tell source we're building static lib's
     :
- boost_filesystem
     :
- <install-type>LIB
- <location>../../../dist/lib
+ <library>../../system/build//boost_system
     ;
 
-explicit dist-lib ;
+boost-install boost_filesystem ;
\ No newline at end of file

Modified: branches/release/libs/filesystem/doc/faq.htm
==============================================================================
--- branches/release/libs/filesystem/doc/faq.htm (original)
+++ branches/release/libs/filesystem/doc/faq.htm 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,269 +1,156 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
- <head>
- <title>
- Boost Filesystem FAQ
- </title>
-<style type="text/css">
- body {
- background-color: #FFFFFF;
- }
- p.c1 {font-weight: bold}
-</style>
- </head>
- <body>
- <h1>
- <img border="0" src="../../../boost.png" align="middle" alt=
- "Boost C++ libraries logo" width="277" height="86"> Filesystem
- FAQ
- </h1>
 
- <p class="c1">
- Why base the generic-path string format on POSIX?
- </p>
- <p>
- [POSIX-01] is an ISO Standard.
- It is the basis for the most familiar path-string formats,
- including the URL portion of URI's and the native Windows format.
- It is ubiquitous and familiar.&nbsp; On many systems, it is very
- easy to implement because it is either the native operating
- system format (Unix and Windows) or via a operating system
- supplied POSIX library (z/OS, OS/390, and many more.)
- </p>
- <p class="c1">
- Why not use a full URI (Universal Resource Identifier) based
- path?
- </p>
-
- <p>
- URI's would promise more than the
- Filesystem Library can actually deliver, since URI's extend far
- beyond what most operating systems consider a file or a
- directory.&nbsp; Thus for the primary "portable script-style file
- system operations" requirement of the Filesystem Library, full
- URI's appear to be over-specification.
- </p>
- <p class="c1">
- Why isn't <i>path</i> a base class with derived
- <i>directory_path</i> and <i>file_path</i> classes?
- </p>
-
- <p>
- Why bother?&nbsp; The behavior of all three classes is
- essentially identical. Several early versions did require users
- to identify each path as a file or directory path, and this
- seemed to increase errors and decrease code readability. There
- was no apparent upside benefit.
- </p>
- <p class="c1">
- Why are fully specified paths called <i>complete</i> rather than
- <i><a name="absolute" id="absolute">absolute</a></i>?
- </p>
-
- <p>
- To avoid long-held assumptions (what do you mean, <i>"/foo"</i>
- isn't absolute on some systems?) by programmers used to
- single-rooted filesystems. Using an unfamiliar name for the
- concept and related functions causes programmers to read the
- specs rather than just assuming the meaning is known.
- </p>
- <p class="c1">
- Why not support a concept of specific kinds of file systems, such
- as posix_file_system or windows_file_system.
- </p>
- <p>
- Portability is one of the most important requirements for the
- library.&nbsp;Gaining some advantage by using features specific
- to particular operating systems is not a requirement. There
- doesn't appear to be much need for the ability to manipulate,
- say, a classic Mac OS path while running on an OpenVMS machine.
- </p>
-
- <p>
- Furthermore, concepts like "file system" are very slippery. What
- happens when a NTFS or FAT file system is mounted in directory on
- a machine running a POSIX-like operating system, for example?
- Some of the POSIX API's may return very un-POSIX like results.
- </p>
- <p class="c1">
- Why not supply a 'handle' type, and let the file and directory
- operations traffic in it?
- </p>
- <p>
- It isn't clear there is any feasible way to meet the "portable
- script-style file system operations" requirement with such a
- system. File systems exist where operations are usually performed
- on some non-string handle type. The classic Mac OS has been
- mentioned explicitly as a case where trafficking in paths isn't
- always natural.&nbsp;&nbsp;&nbsp;
- </p>
-
- <p>
- The case for the "handle" (opaque data type to identify a file)
- style may be strongest for directory iterator value type.&nbsp;
- (See Jesse Jones' Jan 28, 2002, Boost postings). However, as
- class path has evolved, it seems sufficient even as the directory
- iterator value type.
- </p>
- <p class="c1">
- Why are the operations.hpp non-member functions so low-level?
- </p>
- <p>
- To provide a toolkit from which higher-level functionality can be
- created.
- </p>
-
- <p>
- An extended attempt to add convenience functions on top of, or as
- a replacement for, the low-level functionality failed because
- there is no widely acceptable set of simple semantics for most
- convenience functions considered.&nbsp; Attempts to provide
- alternate semantics via either run-time options or compile-time
- polices became overly complicated in relation to the value
- delivered, or became contentious.&nbsp; OTOH, the specific
- functionality needed for several trial applications was very easy
- for the user to construct from the lower-level toolkit
- functions.&nbsp; See <a href=
- "design.htm#Abandoned_Designs">Failed Attempts</a>.
- </p>
- <p class="c1">
- Isn't it inconsistent then to provide a few convenience
- functions?
- </p>
-
- <p>
- Yes, but experience with both this library, POSIX, and Windows
- indicates the utility of certain convenience functions, and that
- it is possible to provide simple, yet widely acceptable,
- semantics for them. For example, remove_all.
- </p>
- <p class="c1">
- Why are there basic_directory_iterator&lt;&gt; overloads for
- operations.hpp predicate functions? Isn't two ways to do the same
- thing poor design?
- </p>
- <p>
- Yes, two ways to do the same thing is often a poor design
- practice. But the iterator versions are often much more
- efficient. Calling status() during iteration over a directory
- containing 15,000 files took 6 seconds for the path overload, and
- 1 second for the iterator overload, for tests on a freshly booted
- machine. Times were .90 seconds and .30 seconds, for tests after
- prior use of the directory. This performance gain is large enough
- to justify deviating from preferred design practices. Neither
- overload alone meets all needs.
- </p>
-
- <p class="c1">
- Why are library functions so picky about errors?
- </p>
- <p>
- Safety. The default is to be safe rather than sorry. This is
- particularly important given the reality that on many computer
- systems files and directories are <a href="#global">globally
- shared</a> resources, and thus subject to unexpected errors.
- </p>
- <p class="c1">
- Why are errors reported by exception rather than return code or
- error notification variable?
- </p>
-
- <p>
- Safety.&nbsp;Return codes or error notification variables are
- often ignored by programmers.&nbsp; Exceptions are much harder to
- ignore, provided desired default behavior (program termination)
- if not caught, yet allow error recovery if desired. Non-throwing
- versions of functions are provided where experience indicates the
- need.
- </p>
- <p class="c1">
- Why are attributes accessed via named functions rather than
- property maps?
- </p>
- <p>
- For commonly used attributes (existence, directory or file,
- emptiness), simple syntax and guaranteed presence outweigh other
- considerations. Because access to many other attributes is
- inherently system dependent, property maps are viewed as the best
- hope for access and modification, but it is better design to
- provide such functionality in a separate library. (Historical
- note: even the apparently simple attribute "read-only" turned out
- to be so system depend as to be disqualified as a "guaranteed
- presence" operation.)
- </p>
-
- <p class="c1">
- Why isn't there a set_current_directory function?
- </p>
- <p>
- Global variables are considered harmful [<a href=
- "design.htm#Wulf-Shaw-73">wulf-shaw-73</a>]. While we can't
- prevent people from shooting themselves in the foot, we aren't
- about to hand them a loaded gun pointed right at their big toe.
- </p>
- <p class="c1">
- Why aren't <a name="wide-character_names" id=
- "wide-character_names">wide-character names</a> supported? Why
- not std::wstring or even a templated type?
- </p>
-
- <p>
- They <u>are</u> supported, starting with version 1.33. See
- Internationalization.
- </p>
- <p class="c1">
- Why isn't automatic name portability error detection provided?
- </p>
- <p>
-
- A number (at least six) of designs for name validity error
- detection were evaluated, including at least four complete
- implementations.&nbsp; While the details for rejection differed,
- all of the more powerful name validity checking designs distorted
- other otherwise simple aspects of the library. Even the simple
- name checking provided in prior library versions was a constant
- source of user complaints. While name checking can be helpful, it
- isn't important enough to justify added a lot of additional
- complexity.
- </p>
- <p class="c1">
- Why are paths sometimes manipulated by member functions and
- sometimes by non-member functions?
- </p>
- <p>
- The design rule is that purely lexical operations are supplied as
- <i>class basic_path</i> member functions, while operations
- performed by the operating system are provided as free functions.
- </p>
-
- <p class="c1">
- Why is path <i>normalized form</i> different from <i>canonical
- form</i>?
- </p>
- <p>
- On operating systems such as POSIX which allow symbolic links to
- directories, the normalized form of a path can represent a
- different location than the canonical form. See <a href=
- "design.htm#symbolic-link-use-case">use case</a> from Walter
- Landry.
- </p>
-
- <hr>
- <p>
- Revised
- <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
- 06 February, 2006
- <!--webbot bot="Timestamp" endspan i-checksum="40411" -->
- </p>
- <p>
- © Copyright Beman Dawes, 2002
- </p>
- <p>
-
- Use, modification, and distribution are subject to the Boost
- Software License, Version 1.0. (See accompanying file <a href=
- "../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at
- www.boost.org/LICENSE_1_0.txt)
- </p>
- </body>
-</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>Filesystem FAQ</title>
+<link rel="stylesheet" type="text/css" href="../../../doc/html/minimal.css">
+</head>
+
+<body>
+
+<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="710">
+ <tr>
+ <td width="277">
+<a href="../../../index.htm">
+<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td>
+ <td width="410" align="middle">
+ <font size="7">Filesystem Library</font>
+ </td>
+ </tr>
+</table>
+
+<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
+ <tr>
+ <td>Boost Home&nbsp;&nbsp;&nbsp;
+ Library Home&nbsp; &nbsp;
+ Tutorial&nbsp; &nbsp; <a href="reference.html">
+ Reference</a>&nbsp;&nbsp; FAQ</td>
+ </tr>
+</table>
+
+<h1>
+Frequently Asked Questions</h1>
+<p><b>Why base the generic-path string format on POSIX?</b></p>
+<p>[POSIX-01] is an ISO Standard. It is the basis for the most familiar path-string formats,
+not just for POSIX systems but also for the native Windows format and the
+URL portion of URI's. It is ubiquitous and
+familiar.&nbsp; On many systems, it is very easy to implement because it is
+either the native operating system format (Unix and Windows) or via a
+operating system supplied
+POSIX library (z/OS, OS/390, and many more.)</p>
+<p><b>Why not use a full URI (Universal Resource Identifier) based path?</b></p>
+<p>URI's would promise more than the Filesystem Library can actually deliver,
+since URI's extend far beyond what most operating systems consider a file or a
+directory.&nbsp; Thus for the primary &quot;portable script-style file system
+operations&quot; requirement of the Filesystem Library, full URI's appear to be over-specification.</p>
+<p><b>Why isn't <i>path</i> a base class with derived <i>directory_path</i> and
+<i>file_path</i> classes?</b></p>
+<p>Why bother?&nbsp; The behavior of all three classes is essentially identical.
+Several early versions did require users to identify each path as a file or
+directory path, and this seemed to increase errors and decrease code
+readability. There was no apparent upside benefit.</p>
+<p><b>Why are fully specified paths called <i>complete</i> rather than <i>
+<a name="absolute">absolute</a></i>?</b></p>
+<p>To avoid long-held assumptions (what do you mean, <i>&quot;/foo&quot;</i> isn't
+absolute on some systems?) by programmers used to single-rooted filesystems.
+Using an unfamiliar name for the concept and related functions causes
+programmers to read the specs rather than just assuming the meaning is known.</p>
+<p><b>Why not support a concept of specific kinds of file systems, such as posix_file_system or windows_file_system.</b></p>
+<p>Portability is one of the most important requirements for the
+library.&nbsp;Gaining some advantage by using features specific to particular
+operating systems is not a requirement. There doesn't appear to be much need for
+the ability to manipulate, say, a classic Mac OS path while running on an
+OpenVMS machine.</p>
+<p>Furthermore, concepts like &quot;file system&quot;
+are very slippery. What happens when a NTFS or FAT file system is mounted
+in directory on a machine running a POSIX-like operating system, for example?
+Some of the POSIX API's may return very un-POSIX like results.</p>
+<p><b>Why not supply a 'handle' type, and let the file and directory operations
+traffic in it?</b></p>
+<p>It isn't clear there is any feasible way to meet the &quot;portable script-style
+file system operations&quot; requirement with such a system. File systems exist where operations are usually performed on
+ some non-string handle type. The classic Mac OS has been mentioned explicitly as a case where
+trafficking in paths isn't always natural.&nbsp;&nbsp;&nbsp; </p>
+<p>The case for the &quot;handle&quot; (opaque data type to identify a file)
+style may be strongest for directory iterator value type.&nbsp; (See Jesse Jones' Jan 28,
+2002, Boost postings). However, as class path has evolved, it seems sufficient
+even as the directory iterator value type.</p>
+<p><b>Why are the operations.hpp non-member functions so low-level?</b></p>
+<p>To provide a toolkit from which higher-level functionality can be created.</p>
+<p>An
+extended attempt to add convenience functions on top of, or as a replacement
+for, the low-level functionality failed because there is no widely acceptable
+set of simple semantics for most convenience functions considered.&nbsp;
+Attempts to provide alternate semantics via either run-time options or
+compile-time polices became overly complicated in relation to the value
+delivered, or became contentious.&nbsp; OTOH, the specific functionality needed for several trial
+applications was very easy for the user to construct from the lower-level
+toolkit functions.&nbsp; See <a href="design.htm#Abandoned_Designs">Failed
+Attempts</a>.</p>
+<p><b>Isn't it inconsistent then to provide a few convenience functions?</b></p>
+<p>Yes, but experience with both this library, POSIX, and Windows indicates
+the utility of certain convenience functions, and that it is possible to provide
+simple, yet widely acceptable, semantics for them. For example, remove_all.</p>
+<p><b>Why are there basic_directory_iterator&lt;&gt; overloads for operations.hpp
+predicate functions? Isn't two ways to do the same thing poor design?</b></p>
+<p>Yes, two ways to do the same thing is often a poor design practice. But the
+iterator versions are often much more efficient. Calling status() during
+iteration over a directory containing 15,000 files took 6 seconds for the path
+overload, and 1 second for the iterator overload, for tests on a freshly booted
+machine. Times were .90 seconds and .30 seconds, for tests after prior use of
+the directory. This performance gain is large enough to justify deviating from
+preferred design practices. Neither overload alone meets all needs.</p>
+<p><b>Why are library functions so picky about errors?</b></p>
+<p>Safety. The default is to be safe rather than sorry. This is particularly
+important given the reality that on many computer systems files and directories
+are globally shared resources, and thus subject to
+unexpected errors.</p>
+<p><b>Why are errors reported by exception rather than return code or error
+notification variable?</b></p>
+<p>Safety.&nbsp;Return codes or error notification variables are often ignored
+by programmers.&nbsp; Exceptions are much harder to ignore, provided desired
+default behavior (program termination) if not caught, yet allow error recovery
+if desired. Non-throwing versions of functions are provided where experience
+indicates the need.</p>
+<p><b>Why are attributes accessed via named functions rather than property maps?</b></p>
+<p>For commonly used attributes (existence, directory or file, emptiness),
+simple syntax and guaranteed presence outweigh other considerations. Because
+access to many other attributes is inherently system dependent,
+property maps are viewed as the best hope for access and modification, but it is
+better design to provide such functionality in a separate library. (Historical
+note: even the apparently simple attribute &quot;read-only&quot; turned out to be so
+system depend as to be disqualified as a &quot;guaranteed presence&quot; operation.)</p>
+<p><b>Why aren't <a name="wide-character_names">wide-character names</a> supported? Why not std::wstring or even
+a templated type?</b></p>
+<p>They <u>are</u> supported, starting with version 1.33. See
+Internationalization.</p>
+<p><b>Why isn't automatic name portability error detection provided?</b></p>
+<p>A number (at least six) of designs for name validity error
+detection were evaluated, including at least four complete implementations.&nbsp;
+While the details for rejection differed, all of the more powerful name validity checking
+designs distorted other
+otherwise simple aspects of the library. Even the simple name checking provided
+in prior library versions was a constant source of user complaints. While name checking can be helpful, it
+isn't important enough to justify added a lot of additional complexity.</p>
+<p><b>Why are paths sometimes manipulated by member functions and sometimes by
+non-member functions?</b></p>
+<p>The design rule is that purely lexical operations are supplied as <i>class
+basic_path</i> member
+functions, while operations performed by the operating system are provided as
+free functions.</p>
+<p><b>Why is path normalized form different
+from canonical form?</b></p>
+<p>On operating systems such as POSIX which allow symbolic links to directories,
+the normalized form of a path can represent a different location than the
+canonical form. See use case
+from Walter Landry.</p>
+<hr>
+<p>Revised
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->08 November, 2007<!--webbot bot="Timestamp" endspan i-checksum="39371" --></p>
+<p>© Copyright Beman Dawes, 2002</p>
+<p> Use, modification, and distribution are subject to the Boost Software
+License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">
+www.boost.org/LICENSE_1_0.txt</a></p>
\ No newline at end of file

Modified: branches/release/libs/filesystem/doc/index.htm
==============================================================================
--- branches/release/libs/filesystem/doc/index.htm (original)
+++ branches/release/libs/filesystem/doc/index.htm 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,54 +5,67 @@
 <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>Boost Filesystem Library</title>
+<title>Filesystem Home</title>
+<link rel="stylesheet" type="text/css" href="../../../doc/html/minimal.css">
 </head>
 
-<body bgcolor="#FFFFFF">
+<body>
 
-<h1>
-<img border="0" src="../../../boost.png" align="center" width="277" height="86">Boost
-Filesystem Library</h1>
-<table border="0" cellpadding="0" width="100%">
+<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="710">
   <tr>
- <td width="50%" valign="top"><font size="4">This Document</font><br>
-&nbsp;&nbsp;&nbsp; Introduction<br>
-&nbsp;&nbsp;&nbsp; Two-minute tutorial<br>
-&nbsp;&nbsp;&nbsp; Cautions<br>
-&nbsp;&nbsp;&nbsp; <a href="#Using_reference_doc">Using the Reference
- Documentation</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;Examples<br>
-&nbsp;&nbsp;&nbsp; Implementation<br>
-&nbsp;&nbsp;&nbsp; <a href="#narrow-only">Restricting library to narrow
- character paths</a><br>
-&nbsp;&nbsp;&nbsp; Building the object-library<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notes for Cygwin users<br>
-&nbsp;&nbsp;&nbsp; Acknowledgements<br>
-&nbsp;&nbsp;&nbsp; Change history</td>
- <td width="50%" valign="top"><font size="4">Other Documents</font><br>
-&nbsp;&nbsp;&nbsp; Reference<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Table of Contents<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- TR2 Introduction<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Formal reference text<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <a href="tr2_proposal.html#frontmatter">Introductory
- chapter</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <a href="tr2_proposal.html#Filesystem-library">Filesystem
- library chapter</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <a href="tr2_proposal.html#Header-filesystem-synopsis">Header
- &lt;boost/filesystem.hpp&gt; synopsis</a><br>
-&nbsp;&nbsp;&nbsp; Library Design<br>
-&nbsp;&nbsp;&nbsp; FAQ<br>
-&nbsp;&nbsp;&nbsp; Portability Guide<br>
- &nbsp;&nbsp;&nbsp; Do-list<br>
- &nbsp;</td>
+ <td width="277">
+<a href="../../../index.htm">
+<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td>
+ <td width="410" align="middle">
+ <font size="7">Filesystem Library</font>
+ </td>
   </tr>
 </table>
+
+<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
+ <tr>
+ <td>Boost Home&nbsp;&nbsp;&nbsp;
+ Library Home&nbsp; &nbsp; Tutorial&nbsp; &nbsp; <a href="reference.html">
+ Reference</a>&nbsp;&nbsp; FAQ</td>
+ </tr>
+</table>
+
+<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" align="right">
+ <tr>
+ <td width="100%" bgcolor="#D7EEFF" align="center">
+ <i><b>Contents</b></i></td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#E8F5FF">
+ Introduction<br>
+ Two-minute tutorial<br>
+ Cautions<br>
+ Using the Reference Documentation<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;Examples<br>
+ Implementation<br>
+ Using only narrow character paths<br>
+ Building the object-library<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;Notes for Cygwin users<br>
+ Acknowledgements<br>
+ Change history</td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#D7EEFF" align="center">
+ <i><b>Other Documents</b></i></td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#E8F5FF">
+ Reference<br>
+ Library Design<br>
+ FAQ<br>
+ Portability Guide<br>
+ Do-list
+ </td>
+ </tr>
+</table>
+
 <h2><a name="Introduction">Introduction</a></h2>
-<p>The Boost Filesystem Library provides portable facilities to query and
+<p>The Boost.Filesystem library provides portable facilities to query and
 manipulate paths, files, and directories.</p>
 
 <p>The motivation for the library is the need to perform portable script-like operations from within C++ programs. The intent is not to
@@ -62,7 +75,7 @@
 
 <p>Programs using the library are <b><i>portable</i></b>, both in the sense that
 the syntax of program code is portable, and the sense that the semantics or
-behavior of code is portable. The <a href="tr2_proposal.html#Pathname-grammar">generic path
+behavior of code is portable. The <a href="reference.html">generic path
 grammar</a> is another important aid to portability.</p>
 
 <p>Usage is <i><b>safe</b></i> in the sense that errors cannot be ignored since most functions throw C++
@@ -70,18 +83,18 @@
 it alleviates the&nbsp;need to explicitly check error
 return codes.</p>
 
-<p>A proposal has been
-submitted to the C++ Standards Committee for inclusion of the library in the
-Standard Library Technical Report 2 (TR2). The Boost.Filesystem library will
-stay in alignment with the TR2 Filesystem proposal as it works its way through
-the committee process. Note, however, that namespaces and header granularity
-differs between Boost.Filesystem and the TR2 proposal. See
-Using the Reference Documentation.</p>
+<p>A proposal,
+<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1975.html">
+N1975</a>, to include Boost.Filesystem in Technical Report 2 has been accepted
+by the C++ Standards Committee. The Boost.Filesystem library will stay in
+alignment with the TR2 Filesystem proposal as it works its way through the TR2
+process. Note, however, that namespaces and header granularity differs between
+Boost.Filesystem and the TR2 proposal.</p>
 
-<p>The Filesystem Library supplies several&nbsp; headers:</p>
+<p>The Boost.Filesystem library provides several&nbsp; headers:</p>
 
 <ul>
- <li>Header boost/filesystem.hpp provides class <i>
+ <li>Header &lt;boost/filesystem.hpp&gt; provides class <i>
   basic_path, </i>a portable mechanism for representing
       <a href="#path">paths</a> in C++ programs. Typedefs <i>path</i> and <i>
   wpath</i> ease the most common usages of <i>basic_path</i>. Operational
@@ -91,14 +104,9 @@
   the contents of directories. Convenience functions and classes combine lower-level functionality
   in useful ways.<br>
 &nbsp;</li>
- <li>Header boost/filesystem/fstream.hpp provides the same components as the C++ Standard
+ <li>Header &lt;boost/filesystem/fstream.hpp&gt; provides the same components as the C++ Standard
   Library's <i>fstream</i> header, except
- that files are identified by <i>basic_path</i> objects rather that <i>char *</i>'s.<br>
-&nbsp;</li>
- <li>Header <a href="../../../boost/filesystem/cerrno.hpp">
- boost/filesystem/cerrno.hpp</a> provides POSIX errno macros used by
- Boost.Filesystem, and two new macros (EBADHANDLE, EOTHER) not defined by
- POSIX.</li>
+ that files are identified by <i>basic_path</i> objects rather that <i>char *</i>'s.</li>
 </ul>
 <h2>Two-minute <a name="tutorial">tutorial</a></h2>
 <p>First some preliminaries:</p>
@@ -251,20 +259,6 @@
 BOOST_NO_EXCEPTIONS at the time the filesystem source files are compiled.</p>
 <p>Non-throwing versions are provided of several functions that are often used
 in contexts where error codes may be the preferred way to report an error.</p>
-<h2><a name="Using_reference_doc">Using the Reference Documentation</a></h2>
-<p>The proposal for adding Boost.Filesystem to the C++ Standard Library's
-Technical Report 2 is used as the <a href="tr2_proposal.html">Reference
-Documentation</a>. This eliminates the need to maintain two sets of
-documentation, but means that the actual Boost.Filesystem library differs from
-this reference documentation in several ways.</p>
-<ul>
- <li>The Boost.Filesystem header is <a href="../../../boost/filesystem.hpp">
- <code>&lt;boost/filesystem.hpp&gt;</code></a> rather than <code>&lt;filesystem&gt;</code>.</li>
- <li>The namespace is <code>boost::filesystem</code> rather than <code>
- std::tr2::sys</code>.</li>
- <li>Several legacy interfaces are provided by Boost.Filesystem that are not
- part of the TR2 proposal.</li>
-</ul>
 <h2><a name="Examples">Examples</a></h2>
 <h3>simple_ls.cpp</h3>
 <p>The example program simple_ls.cpp is
@@ -347,7 +341,7 @@
 <h2><a name="Acknowledgements">Acknowledgements</a></h2>
 <p>The Filesystem Library was designed and implemented by Beman Dawes. The
 original <i>directory_iterator</i> and <i>filesystem_error</i> classes were
-based on prior work from Dietmar Kühl, as modified by Jan Langer. Thomas Witt
+based on prior work from Dietmar Kühl, as modified by Jan Langer. Thomas Witt
 was a particular help in later stages of initial development. Peter Dimov and
 Rob Stewart made many useful suggestions and comments over a long period of
 time. Howard Hinnant helped with internationalization issues.</p>
@@ -462,6 +456,16 @@
 
 <h2><a name="Change-history">Change history</a></h2>
 
+<h3>Version 1.35.0</h3>
+
+<ul>
+ <li>Diagnostics moved to the separate <a href="../../system/doc/index.html">
+ Boost.System</a> library.</li>
+ <li>current_path() function added to set the current directory path.</li>
+ <li>Test coverage extended.</li>
+ <li>A few minor implementation fixes.</li>
+</ul>
+
 <h3>Version 1.34.0</h3>
 
 <ul>
@@ -525,7 +529,7 @@
   <li>The object library can now be built for either
   static or dynamic (shared/dll) linking. </li>
   <li>Several added functions, including improved checking for directory and
- file name portability. See <a href="portability_guide.htm#name_check­_functions">
+ file name portability. See <a href="portability_guide.htm#name_check­_functions">
   Name check functions</a>.</li>
   <li>Separation of canonical form and normalized form and a new path member
   function normalize(). This changes behavior,
@@ -536,13 +540,12 @@
 
 <hr>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->03 June, 2007<!--webbot bot="Timestamp" endspan i-checksum="19946" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->08 November, 2007<!--webbot bot="Timestamp" endspan i-checksum="39371" --></p>
 
 <p>© Copyright Beman Dawes, 2002-2005</p>
 <p> Use, modification, and distribution are subject to 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>
+License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">
+www.boost.org/LICENSE_1_0.txt</a></p>
 
 </body>
 

Deleted: branches/release/libs/filesystem/doc/tr2_proposal.html
==============================================================================
--- branches/release/libs/filesystem/doc/tr2_proposal.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,3435 +0,0 @@
-<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>Filesystem Library Proposal
-</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>Doc. no.&nbsp;&nbsp; WG21/D1934=06-0004<br>
-Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2006-01-31<br>
-Project:&nbsp;&nbsp;&nbsp;&nbsp; Programming Language C++<br>
-Reply to:&nbsp;&nbsp; Beman Dawes &lt;<a href="mailto:bdawes_at_[hidden]">bdawes_at_[hidden]</a>&gt;</p>
-
-<h1 align="center"><i><font size="7">Draft</font></i></h1>
-
-<h1>Filesystem Library Proposal for TR2 (Revision 2)</h1>
-
-<h2><a name="TOC">Table of Contents</a></h2>
-
-<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="26%" valign="top">Introduction<br>
-Motivation and Scope<br>
-Impact on the Standard<br>
-Important Design Decisions<br>
-Proposed Text for TR2<br>
-&nbsp;&nbsp;&nbsp; Introductory chapter<br>
-&nbsp;&nbsp;&nbsp; Filesystem library chapter<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definitions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Requirements<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Requirements on programs<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Requirements<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-on implementations<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#Header-filesystem-synopsis">
- Header &lt;filesystem&gt; synopsis</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Path traits<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#Class-template-basic_path">
- Class template basic_path</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Pathname formats<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Pathname grammar<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Filename conversion<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Requirements </td>
- <td width="35%" valign="top">&nbsp;Class template basic_path (continued)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path constructors<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path assignments<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path modifiers<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path operators<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path observers<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path iterators<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path non-member functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_path inserter and extractor<span style="background-color: #FFFFFF"><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-</span> <a href="#Class-filesystem_error">
-<span style="background-color: #FFFFFF">Class filesystem_error</span></a><span style="background-color: #FFFFFF"><br>
-</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#Class-template-basic_filesystem_error">Class template
- basic_filesystem_error</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#basic_filesystem_error-constructors">basic_filesystem_error
- constructors</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_filesystem_error observers<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#Class-template-basic_directory_entry">Class template
- basic_directory_entry</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_directory_entry constructors<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_directory_entry modifiers<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_directory_entry observers<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-basic_directory_entry comparisons</td>
- <td width="89%" valign="top">Filesystem library chapter (continued)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#Class-template-basic_directory_iterator">Class template
- basic_directory_iterator</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#basic_directory_iterator-constructors">basic_directory_iterator
- constructors</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="#Class-template-basic_recursive_directory_iterator">Class template
- basic_recursive_directory_iterator</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#file_status">Class
- file_status</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#Non-member-functions">
- Non-member operational functions</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Status functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Predicate functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Attribute functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Other operations functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Convenience functions<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#header-cerrno">Additions to
- header &lt;cerrno&gt;</a><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#header-fstream">Additions
- to header &lt;fstream&gt;</a><br>
-Suggestions for <fstream><code><br>
-&nbsp; </code>
- implementations<br>
-Path decomposition table<br>
-Issues<br>
-Acknowledgements<br>
-References<br>
-<a href="#Revision-History"><span style="background-color: #FFFFFF">Revision
-History</span></a></td>
- </tr>
-</table>
-
-<h2><a name="Introduction">Introduction</a></h2>
-<p>This paper proposes addition of a&nbsp; filesystem library component
-to the C++ Standard Library Technical Report 2. The proposal is based on the Boost Filesystem Library (see www.boost.org/libs/filesystem).</p>
-<p>The library provides portable facilities to query and
-manipulate paths, files, and directories. The Boost version of the library is widely used. It would
-be a pure addition to the C++ standard, leaving in place existing
-standard library functionality in the relatively few areas where there is overlap.</p>
-<p>Users say they prefer the Boost Filesystem Library interface to native
-operating system or
-<i>POSIX</i> API's, even in code without portability requirements, because the design
-follows modern C++ practice.</p>
-<p>The proposed text includes an example of a
-program using the library.</p>
-<h2><a name="Motivation">Motivation</a> and Scope</h2>
-<p><b><i>Why is this important? </i></b></p>
-<p>The motivation for the library is the desire to perform <i><b>safe, portable, script-like filesystem operations</b></i> from within C++ programs. Because the
-C++ Standard Library currently contains no facilities for such filesystem tasks
-as directory iteration or directory creation, programmers currently must rely on
-operating system specific interfaces, making it difficult to write
-portable programs.</p>
-<p>The intent is not to compete
-with Python, Perl, or shell scripting languages, but rather to provide
-file system operations where C++ is already the language of choice. The design
-encourages, but does not require, safe and portable usage.</p>
-<p><b><i>What kinds of problems does it address, and what kinds of programmers is
-it intended to support?</i></b></p>
-<p>The library addresses everyday needs, for both application programs and
-libraries. It is useful across every application domain that uses files. It is
-intended to be useful to all levels of programmers, from rank beginners to
-seasoned experts.</p>
-<p><b><i>Is it based on existing practice?</i></b></p>
-<p>Yes, very much so. The proposal is based on the Boost Filesystem Library,
-which has been in use since 2002 and by now is in very wide use. For example,
-current versions of Adobe Systems products such as Adobe Reader use the Boost
-Filesystem Library on the many platforms they support.</p>
-<p>Note, however, that until recently all the Boost experience was with a
-narrow-character only version of the library. The internationalized version as
-described in this proposal is just starting to be used, and will not be fully
-released until Boost release 1.34.</p>
-<p>The underlying mechanisms have been in use for decades on the world's most
-wide-spread operating systems, such as <i>POSIX</i>, <i>Windows</i>, and various
-mainframe operating systems. What this proposal brings to the table is an
-approach that is C++
-Standard Library friendly and fully internationalized.</p>
-<p><b><i>Is there a reference implementation?</i></b></p>
-<p>Yes. The Boost Filesystem Library is freely and publicly available. The Boost library will track the TR2 proposed
-library as the proposal evolves.</p>
-<h2><a name="Impact">Impact</a> on the Standard</h2>
-<p><b><i>What does it depend on, and what depends on it?</i></b></p>
-<p>It depends on
-some standard library components, such as basic_string. No other proposals
-depend on it.</p>
-<p>If a revision to the Code Conversion Proposal (See
-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1683.html">
-http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1683.html>) is
-accepted, it may be advantageous for the Filesystem Library
-to use that library rather than the current code conversion facilities proposed
-below.</p>
-<p><b><i>Is it a pure extension, or does it require changes to standard
-components?</i></b></p>
-<p>Most of the proposed library is a pure extension.</p>
-<p>There are
additions to header <cerrno>. Since
-the critical portions that might require change to C headers (always a sore
-point) are already mandated for <i>POSIX</i> compliance, and codify
-existing practice for many non-<i>POSIX</i> implementations such as for <i>Windows</i>, it is not expected that they will cause any problems.</p>
-<p>There are additions to header <fstream>.&nbsp;
-These have been carefully specified to avoid breaking existing code in common operating environments such as <i>POSIX</i>, <i>
-Windows</i>, and <i>OpenVMS</i>. See <a href="#Suggestions-for-fstream">
-Suggestions for <code>&lt;fstream&gt;</code> implementations</a> for techniques to
-avoid breaking existing code in other environments, particularly on operating
-systems allowing slashes in filenames.</p>
-<p><b><i>Can it be implemented using today's compilers, or does it require
-language features that will only be available as part of C++0x?</i></b></p>
-<p>It can
-be (and has been) implemented with today's compilers.</p>
-<p>There is one minor function that can best be implemented by an addition to
-current C++ runtime libraries, although an acceptable workaround is documented.</p>
-<p>On operating systems with built-in support for wide-character file names,
-such as <i>Windows</i>, high-quality implementation of the header &lt;fstream&gt;
-additions require an addition to the C++ Standard Library implementation. The
-addition is relatively small and localized. There is a workaround that avoids
-modifying the standard library, but it is very much a hack and depends on a <i>
-Windows</i> feature (8.3 filename support) which some users disable, thereby
-disabling the workaround. The issue doesn't affect implementations on operating
-systems which only support narrow character file names.</p>
-<h2>Important <a name="Design">Design</a> Decisions</h2>
-<h4><i>Why did you choose the specific design that you did?</i></h4>
-<p>Many of the specific design decisions were driven by the desire to provide a modern C++ interface
-that works
-well with the C++ Standard Library. The intent is that Standard Library users
-can become comfortable with the Filesystem Library in very short order.</p>
-<p>The proposed library encourages both syntactic and semantic portability, yet
-does not force implementors into heroic efforts on hopeless systems. This
-balances the benefits to users of both code and knowledge portability with the
-realities faced by implementors on some operating systems.</p>
-
-<p><span style="background-color: #FFFFFF">In some
-cases users always need portable semantics. In some cases users always need
-platform specific semantics. In some cases users need to be able to choose
-between portable and platform specific semantics. The design evolved over a
-period of years to identify and meet each of those needs. </span></p>
-
-<p>Because of the desire to support simple &quot;script-like&quot; usage, use cases often
-drove design choices. For example, users can write <code>if (exists(&quot;foo&quot;))</code> rather than
-the lengthier <code>if (exists(path(&quot;foo&quot;)))</code>.</p>
-
-<p>Because filesystem operations often encounter unexpected runtime errors, the library reports runtime errors via C++ exceptions,
-and ensures enough information is provided for meaningful error messages,
-including internationalized error messages.</p>
-
-<p><b><i>What alternatives did you consider, and what are the tradeoffs?</i></b></p>
-<p><i>Additional observers and modifiers for file system attributes.</i>
-Attribute functions which cannot supply portable semantics are not provided,
-avoiding the illusion of portability in cases where it cannot in fact exist.</p>
-<p><i>A larger number of operational convenience functions.</i>
-Convenience functions (functions which can be portably created by composition
-from basic functions) were not provided unless there was widespread agreement on
-usefulness and need.</p>
-<p><i>Compile-time or run-time options for operational functions.</i>
-Numerous trial implementations were abandoned because the added complexity
-out weighed the benefits, and because consensus could not be reached on the
-feature set.</p>
-<p><i>Automatic path name checking.</i> This feature, supplied by the Boost
-library for several years, allowed users to specify both default and per
-constructor path name checking, and thus allowed the desired degree of portability to be
-automatically enforce. This implicit name checking was abandoned because of user
-confusion and complaints.</p>
-<p><i>Separate path types for regular file and directory pathnames.</i> Pathname
-formats that use different syntax for regular pathnames versus directory
-pathnames are passing into extinction. Why prolong the agony at the cost of
-torturing those using modern systems? It is perhaps significant that one of the few web
-sites dedicated to preserving a dual pathname format operating system is named
-<i>Deathrow</i> (http://deathrow.vistech.net/).</p>
-<p><i>Single path type which can at runtime accept narrow or wide character
-pathnames.</i> Although certainly interesting, and possibly superior, such a
-design would not interoperate well with the current Standard Library's compile-time
-typed <code>basic_string</code>. A new runtime polymorphic string class would be
-the best place to experiment with this concept, not a path class.</p>
-<p><b><i>What are the consequences of your choices, for users and implementors?</i></b></p>
-<p>The design has evolved over a period of four years of actual experience by
-Boost users, and the most frequent causes of user complaints (such as enforced
-name-checking and several over-strict preconditions) were eliminated. The TR
-process will allow further refinement. The intent is to ensure user needs are
-met.</p>
-<p>Because the Boost implementation is tested and
-used in a wide range of <i>POSIX</i> and <i>Windows</i> environments, many implementation
-concerns have already been addressed.</p>
-<p><b><i>What decisions are left up to implementors?</i></b></p>
-<p>Because implementations of the library are dependent on facilities of the
-underlying operating system, implementors are given unusual freedom to redefine
-semantics of the library. That being said, implementors are given strong
-normative encouragement to provide the TR described semantics whenever feasible.</p>
-<p><b><i>If there are any similar libraries in use, how do their design
-decisions compare to yours?</i></b></p>
-<p>There are a number of libraries which address the problem domain. Most of the
-C/C++ libraries have C, rather than C++ interfaces. For example, see the Apache Portable Runtime
-Project (http://apr.apache.org). The ACE
-toolkit (http://www.cs.wustl.edu/~schmidt/ACE.html)
-uses a C++ approach, but doesn't mesh well with the C++ Standard Library. For
-example, the ACE directory iterator differs greatly from Standard Library
-iterator requirements.</p>
-<h2>Proposed <a name="Text">Text</a> for Technical Report 2</h2>
-<p><span style="font-style: italic; background-color: #E0E0E0">Gray-shaded
-italic text is commentary on the proposal. It is not to be added to the TR.</span></p>
-<p><span style="background-color: #FFFFFF"><i>Italic text is editorial guidance.
-It is not to be added to the TR.</i></span></p>
-<p><span style="font-style: italic; background-color: #FFFFFF">
-<a name="frontmatter">Add</a> to the
-introductory section of the TR:</span></p>
-<p>The following standard contains provisions which, through reference in this
-text, constitute provisions of this Technical Report. At the time of
-publication, the editions indicated were valid. All standards are subject to
-revision, and parties to agreements based on this Technical Report are
-encouraged to investigate the possibility of applying the most recent editions
-of the standard indicated below. Members of IEC and ISO maintain registers of
-currently valid International Standards.</p>
- <ul>
- <li>ISO/IEC 9945:2003, <i>Portable Operating System Interface (POSIX1),
- part 1 (Base Definitions) and part 2 (System Interfaces)</i>, both as corrected by their
- respective 2004 Correction 1 documents.<p>[<i>Note:</i> ISO/IEC 9945:2003 is
- also IEEE&nbsp;Std&nbsp;1003.1-2001, and The Open Group Base Specifications, Issue 6,
- and also known as The Single Unix<font face="Times New Roman"><sup>2</sup><i><b>
- </b></i>Specification, Version 3. It is available from each of those organizations,
- and may be read online or downloaded from
- <a href="http://www.unix.org/single_unix_specification/">
- www.unix.org/single_unix_specification/</a> <i>-- end note</i>]</font></p>
- </li>
- </ul>
-<p>ISO/IEC 9945:2003, with the indicated corrections, is hereinafter called <i>
-POSIX</i>.</p>
-<p>Some library behavior in this Technical Report is defined by reference to <i>
-POSIX</i>. How such behavior is actually implemented is unspecified.</p>
-<blockquote>
-<p>[<i>Note:</i> This constitutes an &quot;as if&quot; rule for implementation of
-operating system dependent behavior. Presumably implementations will actually call native
-operating system API's. <i>--end note</i>]</p>
-</blockquote>
-<p>Implementations are encouraged, but not required, to support such behavior
-
-as it is defined by <i>POSIX</i>. Implementations shall document any
-behavior that differs from the <i>POSIX</i> defined behavior. Implementations that do not support exact <i>POSIX</i> behavior are
-encouraged to provide behavior as close to <i>POSIX</i> behavior as is reasonable given the
-limitations of actual operating systems. If an implementation cannot provide any
-reasonable behavior, the implementation shall report an error in an
-implementation-defined manner.</p>
-<blockquote>
-<p>[<i>Note:</i> Such errors might be reported by an #error directive, a <code>
-static_assert</code>, a <code>basic_filesystem_error</code> exception, a special
-return value, or some other manner. <i>--end note</i>]</p>
-</blockquote>
-<p><a name="Footnote-1">Footnote 1</a>: <i>POSIX</i>® is a registered trademark of The
-IEEE.</p>
-<p><a name="Footnote-2">Footnote 2</a>: <i>UNIX</i>® is a registered trademark of The
-Open Group.</p>
-<p><span style="background-color: #FFFFFF"><i>Add a new clause to the TR:</i></span></p>
-<hr>
-<h2>Chapter <span style="font-weight: 400"><i>(tbs)</i></span> - <a name="Filesystem-library">Filesystem library</a></h2>
-<hr>
-<p>This clause describes components that C++ programs may use to interrogate and
-manipulate files (including directories), and certain of their
-attributes.</p>
-<p>This clause applies only to hosted implementations (C++ Std, 1.4,
-Implementation compliance [intro.compliance]).</p>
-<blockquote>
-<p>[<i>Note:</i> This clause applies to any hosted implementation.
-Specific operating systems such as <i>OpenMVS</i><sup>3</sup>,
-<i>UNIX</i>, and <i>Windows</i><sup>4</sup> are mentioned only for purposes of illustration or to
-give guidance to implementors. No slight to other operating systems is implied
-or intended. <i>--end note</i>.]</p>
-</blockquote>
-<p>Unless otherwise specified, all components described in this clause are
-declared in namespace <code>std::tr2::sys</code>.</p>
-<blockquote>
-<p>[<i>Note:</i> The <code>sys</code> sub-namespace prevents collisions with
-names already in the standard library and emphasizes reliance on the
-operating system dependent behavior inherent in file system operations. <i>-- end
-note</i>]</p>
-</blockquote>
-<p>The <i>Effects</i> and <i>Postconditions</i> of functions described in this clause
-may not be achieved in
-the presence of race conditions. No diagnostic is required.</p>
-<p>If the possibility of race conditions makes it unreliable for a program to
-test for a precondition before calling a function described in this clause, <i>
-Requires</i> is not specified for the condition. Instead, the condition is
-specified as a <i>Throws</i> condition.</p>
-<blockquote>
-<p>[<i>Note:</i> As a design practice, preconditions are not specified when it
-is unreasonable for a program to detect them prior to calling the function. <i>
--- end note</i>]</p>
-</blockquote>
-<p><a name="Footnote-3">Footnote 3</a>: <i>OpenMVS</i>® is a registered
-trademark of Hewlett-Packard Development Company.</p>
-<p><a name="Footnote-4">Footnote 4</a>: <i>Windows</i>® is a registered
-trademark of Microsoft Corporation.</p>
-<h3><a name="Definitions">Definitions</a></h3>
-<p>The following definitions shall apply to this clause:</p>
-<p><i><a name="File">File</a>: </i>An object that can be written to, or read from, or both. A file
-has certain attributes, including type. File types include regular file,
-symbolic link, and directory. Other types of files may be supported by the
-implementation.</p>
-<p><i><a name="File-system">File system</a>:</i> A collection of files and certain of their attributes.</p>
-<p><i><a name="Filename">Filename</a>:</i> The name of a file. The format is as
-specified by the <i>POSIX
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_169">
-Filename</a></i> base definition.</p>
-<p><i><a name="Path">Path</a>:</i> A sequence of elements which identify
-a location within a filesystem. The elements are the <i>root-name</i>, <i>
-root-directory</i>, and each successive <i>filename</i>. See
-Pathname grammar.</p>
-<p><i><a name="Pathname">Pathname</a>: </i>A character string that represents a
-path.</p>
-<p><i><a name="Link">Link</a>: </i>A directory entry object that associates a
-filename with a file. On some file systems, several directory entries can
-associate names with the same file.</p>
-<p><i><a name="Hard-link">Hard link</a>:</i> A link to an existing file. Some
-file systems support multiple hard links to a file. If the last hard link to a
-file is removed, the file itself is removed.</p>
-<blockquote>
-<p>[<i>Note:</i> A hard link can be thought of as a shared-ownership smart
-pointer to a file.<i> -- end note</i>]<i> </i></p>
-</blockquote>
-<p><i><a name="Symbolic-link">Symbolic link</a>: </i>A type of file with the
-property that when the file is encountered during pathname resolution, a string
-stored by the file is used to modify the pathname resolution.</p>
-<blockquote>
-<p>[<i>Note:</i> A symbolic link can be thought of as a raw pointer to a file.
-If the file pointed to does not exist, the symbolic link is said to be a
-&quot;dangling&quot; symbolic link.<i> -- end note</i>]<i> </i></p>
-</blockquote>
-<p><i><a name="Slash">Slash</a>:</i> The character <tt>'/'</tt>, also known as
-solidus.</p>
-<p><i><a name="Dot">Dot</a>:</i> The character '.', also known as period.</p>
-<p><i><a name="Race-condition">Race condition</a>:</i> The condition that occurs
-when multiple threads, processes, or computers interleave access and
-modification of
-the same object within a file system.</p>
-<h3><a name="Requirements">Requirements</a></h3>
-<h4><a name="Requirements-on-programs">Requirements on programs</a></h4>
-<p>The arguments for template parameters named <code>Path</code>, <code>Path1</code>,
-or <code>Path2</code> described in this clause shall be of type <code>basic_path</code>,
-or a class derived from <code>basic_path</code>, unless otherwise
-specified.</p>
-<h4><a name="Requirements-on-implementations">Requirements on implementations</a></h4>
-<p>Some function templates described in this clause have a template parameter
-named <code>Path</code>, <code>Path1</code>, or <code>Path2</code>. When called
-with a function argument <code>s</code> of type <code>char*</code> or <code>
-std::string</code>, the implementation shall treat the argument as if it were
-coded <code>path(s)</code>. When called with a function argument <code>s</code>
-of type <code>wchar_t*</code> or <code>std::wstring</code>, the implementation
-shall treat the argument as if it were coded <code>wpath(s)</code>. For
-functions with two arguments, implementations shall not supply this treatment
-when <code>Path1</code> and <code>Path2</code> are different types.</p>
-<blockquote>
-<p>[<i>Note:</i> This &quot;do-the-right-thing&quot; rule allows users to write <code>exists(&quot;foo&quot;)</code>,
-taking advantage of class <code>basic_path</code>'s string conversion
-constructor,&nbsp; rather
-than the lengthier and more error prone <code>exists(path(&quot;foo&quot;))</code>. This
-is particularly important for the simple, script-like, programs which are an
-important use case for the library. Calling two argument functions with
-different types is a very rare usage, and may well be a coding error, so
-automatic conversion is not supported for such cases.</p>
-<p>The implementation technique is unspecified. One possible implementation
-technique, using
-<code>exists()</code> as an example, is:</p>
- <blockquote>
- <pre>template &lt;class Path&gt;
- typename boost::enable_if&lt;is_basic_path&lt;Path&gt;,bool&gt;::type exists(const Path&amp; p);
-inline bool exists(const path&amp; p) { return exists&lt;path&gt;(p); }
-inline bool exists(const wpath&amp; p) { return exists&lt;wpath&gt;(p); }</pre>
- </blockquote>
- <p>&nbsp;The <code>enable_if</code> will fail for a C string or <code>
- std::basic_string</code> argument, which will then be automatically converted
- to a <code>basic_path</code> object via the appropriate <code>basic_path</code> conversion
- constructor.&nbsp;&nbsp; <i>-- end note</i>]</p>
- <p><span style="background-color: #E0E0E0"><i>The two overloads are not given
- in the normative text because:</i></span></p>
- <ul>
- <li><span style="background-color: #E0E0E0"><i>Better techniques for
- achieving the desired affect may be developed, perhaps enabled by core
- language changes like Concepts.</i></span></li>
- <li><span style="background-color: #E0E0E0"><i>Implementations may prefer
- techniques that work with legacy compilers that do not support enable_if.</i></span></li>
- <li><span style="background-color: #E0E0E0"><i>Spelling out the overloads
- makes the text longer and harder to read without adding much benefit.</i></span></li>
- <li><span style="background-color: #E0E0E0"><i>More overloads will probably
- be needed for char16_t and char32_t (or whatever they end up being called),
- making it even less attractive to actually spell out each one. </i></span>
- </li>
- </ul>
-</blockquote>
-<p>Implementations of functions described in this clause are permitted to call the applications
-program interface (API) provided by the operating system. If such an operating
-system API call results in an error, implementations
-shall report the error by throwing exception <code>basic_filesystem_error</code>,
-unless otherwise specified.</p>
-<blockquote>
-<p>[<i>Note: </i>Such exceptions and the conditions that cause them to be thrown
-are not explicitly described in each <i>Throws</i> element within this clause.
-Because hardware failures, network failures, race conditions, and a plethora of
-other errors occur frequently in file system operations, users should be aware
-that <span style="background-color: #FFFFFF">unless otherwise specified</span> any file system operation, not matter how apparently innocuous, may throw
-an exception. <i>-- end note</i>]</p>
-</blockquote>
-<p><span style="background-color: #FFFFFF">Functions commonly used in contexts
-where errors are not exceptional have overloads taking an additional argument of
-type </span><code><span style="background-color: #FFFFFF">system_error_code&amp;</span></code><span style="background-color: #FFFFFF">
-ec. Such overloaded functions shall not throw exceptions. If an error occurs,
-<code>ec</code> shall be set to the
-error code reported by the operating system, otherwise <code>ec</code> shall be set to 0. If
-an overload without an argument of type </span><code>
-<span style="background-color: #FFFFFF">system_error_code&amp;</span></code><span style="background-color: #FFFFFF">
-ec returns void, the other overload (without an argument of type </span><code>
-<span style="background-color: #FFFFFF">system_error_code&amp;</span></code><span style="background-color: #FFFFFF">
-ec) returns a <code>system_error_code</code> with the value of ec.</span></p>
-<h3><a name="Header-filesystem-synopsis">Header <code>&lt;filesystem&gt;</code> synopsis</a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class String, class Traits&gt; class basic_path;
-
- template&lt;class String, class Traits&gt;
- void swap(basic_path&lt;String, Traits&gt; &amp; lhs, basic_path&lt;String, Traits&gt; &amp; rhs);
-
- template&lt;class String, class Traits&gt; bool operator&lt;(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator==(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator!=(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator&gt;(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator&lt;=(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator&gt;=(<i>a</i> a, <i>b</i> b);
- template&lt;class String, class Traits&gt; bool operator/(<i>a</i> a, <i>b</i> b);
-
- template&lt;class Path&gt;
- basic_ostream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt; &amp;
- operator&lt;&lt;(basic_ostream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp; os, const Path &amp; ph);
-
- template&lt;class Path&gt;
- basic_istream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt; &amp;
- operator&gt;&gt;(basic_istream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp; is, Path &amp; ph);
-
- struct path_traits;
- struct wpath_traits;
-
- typedef basic_path&lt;std::string, path_traits&gt; path;
- typedef basic_path&lt;std::wstring, wpath_traits&gt; wpath;
-
- template&lt;class Path&gt; struct is_basic_path;
-
- template&lt;class Path&gt; struct slash { static const char value = '/'; };
- template&lt;class Path&gt; struct dot { static const char value = '.'; };
-<span style="background-color: #FFFFFF"> template&lt;class Path&gt; struct colon { static const char value = ':'; };</span><span style="background-color: #FFFF00">
-</span>
- typedef int errno_type; // type is determined by the C standard
- typedef<i> implementation-defined </i>system_error_type; // usually int or unsigned
-
- <span style="background-color: #FFFFFF">class filesystem_error;</span><span style="background-color: #FFFF00">
-</span>
- template &lt;class Path&gt; class basic_filesystem_error;
-
- typedef basic_filesystem_error&lt;path&gt; filesystem<span style="background-color: #FFFFFF">_path</span>_error;
- typedef basic_filesystem_error&lt;wpath&gt; filesystem<span style="background-color: #FFFFFF">_wpath</span>_error;
-
- <span style="background-color: #FFFFFF">template &lt;class Path&gt; class basic_directory_entry;
-
- typedef basic_directory_entry&lt;path&gt; directory_entry;
- typedef basic_directory_entry&lt;wpath&gt; wdirectory_entry;
-</span>
- template &lt;class Path&gt; class basic_directory_iterator;
-
- typedef basic_directory_iterator&lt;path&gt; directory_iterator;
- typedef basic_directory_iterator&lt;wpath&gt; wdirectory_iterator;
-
- template &lt;class Path&gt; class basic_recursive_directory_iterator;
-
- typedef basic_recursive_directory_iterator&lt;path&gt; recursive_directory_iterator;
- typedef basic_recursive_directory_iterator&lt;wpath&gt; wrecursive_directory_iterator;
-
- enum file_type { status_unknown, file_not_found, regular_file, directory_file,
- symlink_file, block_file, character_file, fifo_file, socket_file,
- type_unknown
- };
-
- class file_status;
-
- <span style="background-color: #FFFFFF">struct space_info // returned by </span>space<span style="background-color: #FFFFFF"> function
- {
- uintmax_t capacity;
- uintmax_t free;
- uintmax_t available;
- };
-</span>
- // status functions
- template &lt;class Path&gt; file_status status(const Path&amp; p);
- template &lt;class Path&gt; file_status status(const Path&amp; p, system_error_code&amp; ec);
- template &lt;class Path&gt; file_status symlink_status(const Path&amp; p);
- template &lt;class Path&gt; file_status symlink_status(const Path&amp; p, system_error_code&amp; ec);
-
- // predicate functions
- bool status_known( file_status s );
- bool exists( file_status s );
- bool is_regular( file_status s );
- bool is_directory( file_status s );
- bool is_symlink( file_status s );
- bool is_other( file_status s );
-
- template &lt;class Path&gt; bool exists(const Path&amp; p);
- template &lt;class Path&gt; bool is_directory(const Path&amp; p);
- template &lt;class Path&gt; bool is_regular(const Path&amp; p);
- template &lt;class Path&gt; bool is_other(const Path&amp; p);
- template &lt;class Path&gt; bool is_symlink(const Path&amp; p);
- template &lt;class Path&gt; bool is_empty(const Path&amp; p);
-
- template &lt;class Path1, class Path2&gt;
- bool equivalent(const Path1&amp; p1, const Path2&amp; p2);
-
- // attribute functions
- template &lt;class Path&gt; Path current_path();
- template &lt;class Path&gt; const Path&amp; initial_path();
- template &lt;class Path&gt; <span style="background-color: #FFFFFF; ">uintmax_t</span> file_size(const Path&amp; p);
-<span style="background-color: #FFFFFF"> template &lt;class Path&gt; space_info space(const Path&amp; p);</span><span style="background-color: #FFFF00">
-</span> template &lt;class Path&gt; std::time_t last_write_time(const Path&amp; p);
- template &lt;class Path&gt;
- void last_write_time(const Path&amp; p, const std::time_t new_time);
-
- // operations functions
- template &lt;class Path&gt; bool create_directory(const Path&amp; dp);
- template &lt;class Path1, class Path2&gt;
- void create_hard_link(const Path1&amp; old_fp, const Path2&amp; new_fp);
-<span style="background-color: #FFFFFF"> template &lt;class Path1, class Path2&gt;
- system_error_type create_hard_link(const Path1&amp; old_fp, const Path2&amp; new_fp, system_error_code&amp; ec);
- template &lt;class Path1, class Path2&gt;
- void create_symlink(const Path1&amp; old_fp, const Path2&amp; new_fp);
- template &lt;class Path1, class Path2&gt;
- system_error_type create_symlink(const Path1&amp; old_fp, const Path2&amp; new_fp, system_error_code&amp; ec);
-</span> template &lt;class Path&gt; bool remove(const Path&amp; p);
- template &lt;class Path1, class Path2&gt;
- void rename(const Path1&amp; from_p, const Path2&amp; to_p);
- template &lt;class Path1, class Path2&gt;
- void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp);
- template &lt;class Path&gt; Path system_complete(const Path&amp; p);
- template &lt;class Path&gt; Path complete(const Path&amp; p, const Path&amp; base=initial_path&lt;Path&gt;());
- errno_type lookup_errno(system_error_type code);
- void system_message(system_error_type code, std::string &amp; target);
- void system_message(system_error_type code, std::wstring &amp; target);
-
- // convenience functions
- template &lt;class Path&gt; bool create_directories(const Path &amp; p);
- template &lt;class Path&gt; typename Path::string_type extension(const Path &amp; p);
- template &lt;class Path&gt; typename Path::string_type basename(const Path &amp; p);
- template &lt;class Path&gt;
- Path replace_extension(const Path &amp; p, const typename Path::string_type &amp; new_extension);
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<h3><a name="Path-traits">Path traits</a></h3>
-<p>This subclause defines requirements on classes representing path behavior
-traits, and defines two classes that satisfy those requirements for paths based
-on <code>string</code> and <code>wstring</code>.. It also defines several path
-additional path traits structure templates, and defines several specializations
-of them.</p>
-<p>Class template <code>basic_path</code> defined in this clause requires additional
-types, values, and behavior to complete the definition of its semantics.</p>
-<p>For purposes of exposition, Traits behaves as if it is a class with private
-members bool m_locked, initialized false, and std::locale m_locale, initialized </p>
-<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="50%" align="center" colspan="2"><b><i>
- <a name="Path-Behavior-Traits-Requirements">Path Behavior Traits
- Requirements</a></i></b></td>
- </tr>
- <tr>
- <td width="38%" align="center"><b><i>Expression</i></b></td>
- <td width="62%" align="center"><b><i>Requirements</i></b></td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::external_string_type</code></td>
- <td width="62%">A typedef which is a specialization of <code>basic_string</code>.
- The <code>value_type</code> is a character type used by the operating system
- to represent pathnames.</td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::internal_string_type</code></td>
- <td width="62%">A typedef which is a specialization of <code>basic_string</code>.
- The <code>value_type</code> is a character type to be used by the program to
- represent pathnames. Required be the same type as the <code>basic_path
- String</code> template parameter. </td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::to_external( p, is )</code></td>
- <td width="62%"><code>is</code>, converted by the <code>m_locale</code>
- <code>codecvt</code> facet to <code>external_string_type</code>.</td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::to_internal( p, xs )</code></td>
- <td width="62%"><code>xs</code>, converted by the <code>m_locale</code>
- <code>codecvt</code> facet to to <code>internal_string_type</code>.</td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::imbue(loc)</code></td>
- <td width="62%"><i>Effects:</i> if <code>m_locked</code>, throw. Otherwise,
- <code>m_locked = true; m_locale = loc;<br>
- </code><i>Returns:</i> <code>void</code><b><br>
- </b><i>Throws:</i> <code>basic_filesystem_error</code></td>
- </tr>
- <tr>
- <td width="38%" valign="top"><code>Traits::imbue(loc, std::nothrow)</code></td>
- <td width="62%"><i>Effects:</i> <code>if (!m_locked) m_locale = loc; bool
- temp(m_locked); m_locked = true;<br>
- </code><i>Returns:</i> <code>temp</code></td>
- </tr>
-</table>
-<p>Type <code>is_basic_path</code> shall be a <i>UnaryTypeTrait</i> (TR1, 4.1).
-The primary template shall be derived directly or indirectly from <code>
-std::tr1::false_type</code>. Type <code>is_basic_path</code> shall be
-specialized for <code>path</code>, <code>wpath</code>, and any
-user-specialized <code>basic_path</code> types, and such specializations shall
-be derived directly or indirectly from <code>std::tr1::true_type</code>.</p>
-<p>Structure templates <code>slash</code>, <code>dot</code>, and <code>
-<span style="background-color: #FFFFFF">colon</span></code><span style="background-color: #FFFFFF">
-</span>are supplied with
-values of type <code>char</code>. If a user-specialized <code>basic_path</code>
-has a <code>
-value_type</code> type which is not convertible from <code>char</code>, the
-templates&nbsp; <code>slash</code> and <code>dot</code> shall be specialized to
-provide <code>value</code> with type which is convertible to <code>
-basic_path::value_type</code>.</p>
-<h3><a name="Class-template-basic_path">Class template <code>basic_path</code></a></h3>
-<p>Class template <code>basic_path</code> provides a portable mechanism for
-representing paths in C++ programs, using a portable generic
-pathname grammar. When portability is not a
-requirement, native file system specific formats can be used.&nbsp;Class template
-<code>basic_path</code> is concerned only with the lexical and syntactic aspects
-of a path. The path does not have to exist in the operating system's file
-system, and may contain names which are not even valid for the current operating
-system. </p>
-<blockquote>
- <p>[<i>Note: </i>If the library's functions trafficked only in C++<i> </i>or
- C-style strings, they would provide only the illusion of portability since
- while the syntax of function calls would be portable, the semantics of the
- strings they operate on would not be portable. <i>-- end note</i>]</p>
-</blockquote>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class String, class Traits&gt; class basic_path
- {
- public:
- typedef basic_path&lt;String, Traits&gt; path_type;
- typedef String string_type;
- typedef typename String::value_type value_type;
- typedef Traits traits_type;
- typedef typename Traits::external_string_type external_string_type;
-
- // constructors/destructor
- basic_path();
- basic_path(const basic_path&amp; p);
- basic_path(const string_type&amp; s);
- basic_path(const value_type* s);
- template &lt;class InputIterator&gt;
- basic_path(InputIterator first, InputIterator last);
-
- ~basic_path();
-
- // assignments
- basic_path&amp; operator=(const basic_path&amp; p);
- basic_path&amp; operator=(const string_type&amp; s);
- basic_path&amp; operator=(const value_type* s);
- template &lt;class InputIterator&gt;
- basic_path&amp; assign(InputIterator first, InputIterator last);
-
- // modifiers
- basic_path&amp; operator/=(const basic_path&amp; rhs);
- basic_path&amp; operator/=(const string_type&amp; s);
- basic_path&amp; operator/=(const value_type* s);
- template &lt;class InputIterator&gt;
- basic_path&amp; append(InputIterator first, InputIterator last);
-
- <span style="background-color: #FFFFFF">void swap( basic_path &amp; rhs );</span>
- basic_path&amp; remove_leaf();
-
- // observers
- const string_type string() const;
- const string_type file_string() const;
- const string_type directory_string() const;
-
- const external_string_type external_file_string() const;
- const external_string_type external_directory_string() const;
-
- string_type root_name() const;
- string_type root_directory() const;
- basic_path root_path() const;
- basic_path relative_path() const;
- string_type leaf() const;
- basic_path branch_path() const;
-
- bool empty() const;
- bool is_complete() const;
- bool has_root_name() const;
- bool has_root_directory() const;
- bool has_root_path() const;
- bool has_relative_path() const;
- bool has_leaf() const;
- bool has_branch_path() const;
-
- // iterators
- class iterator;
- typedef iterator const_iterator;
-
- iterator begin() const;
- iterator end() const;
-
- };
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p>A <code>basic_path</code> object stores a possibly empty path.
-The internal form of the stored path is unspecified.</p>
-<p><a name="pathname-resolution">Functions</a> described in this clause which access files or their attributes do so by
-resolving a <code>basic_path</code> object into a particular file in a file
-hierarchy. The pathname, suitably converted to the string type, format, and
-encoding
-required by the operating system, is resolved as if by the <i>POSIX</i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11">
-Pathname Resolution</a> mechanism. The encoding of the resulting pathname is determined by the <code>Traits::to_external</code> conversion function.</p>
-<blockquote>
-<p>[<i>Note:</i> There is no guarantee that the path stored in a&nbsp; <code>basic_path</code>
-object is valid for a particular operating system or file system. <i>-- end note</i>]</p>
-</blockquote>
-<p>Some functions in this clause return <code>basic_path</code> objects for
-paths composed partly or wholly of pathnames obtained from the operating system.
-Such pathnames are suitably converted from the actual format and string
-type supplied by the operating system. The encoding of the resulting path is determined by the <code>Traits::to_internal</code> conversion function.</p>
-<p>For member functions described as returning &quot;<code>const string_type</code>&quot; or
-&quot;<code>const external_string_type</code>&quot;, implementations are permitted to return
-&quot;<code>const string_type&amp;</code>&quot; or&nbsp; &quot;<code>const external_string_type&amp;</code>&quot;
-respectively.</p>
-<blockquote>
-<p>[<i>Note:</i> This allows implementations to avoid unnecessary copies.
-Return-by-value is specified as
-<code>const</code> to ensure programs won't break if moved to a return-by-reference
-implementation. <i>--
-end note</i>]</p>
-</blockquote>
-<h4><a name="Pathname-formats">Pathname formats</a></h4>
-<p>There are two formats for string or sequence arguments that describe a
-path:</p>
-<ul>
- <li>The portable pathname format as described in <a href="#Pathname-grammar">
- Pathname grammar</a> and by the <i>POSIX</i> <i>Filename,
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_266">
-Pathname</a> </i>and<i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11">
-Pathname Resolution</a></i> definitions.<blockquote>
-<p>[<i>Note:</i> <span style="background-color: #FFFFFF">The <i>POSIX</i> format
-is the basis for the portable format because it is already an ISO standard, is
-the basis for the ubiquitous <i>URL</i> format, and is the native format or a
-subset of the native format for <i>UNIX</i>-like and <i>Windows</i>-like
-operating systems familiar to large numbers of programmers. </span></p>
-<p>Use of the portable format does not alone guarantee
-portability; filenames must also be portable.<span style="background-color: #FFFFFF">
-See Filename conversions. Each operating system
-always follows its own rules. Use of the portable format
-does not change that. </span> <i>-- end note</i>]</p>
- </blockquote>
- </li>
- <li>A native pathname format
- as defined by the operating system.<blockquote>
- <p>[<i>Note:</i> If an operating system supports only the <i>POSIX</i>
- pathname format, the portable format and the native format are the same. </p>
- <p><span style="background-color: #FFFFFF">Identifying user-provided paths
- as native format is a common need, and ensures maximum portability, even
- though not strictly needed except on systems where the native format
- is not implicitly recognized.</span></p>
- <p><span style="background-color: #FFFFFF">Programs using hard-coding native
- formats are likely to be non-portable.&nbsp; --</span><i><span style="background-color: #FFFFFF"> end note</span></i><span style="background-color: #FFFFFF">]</span></p>
- </blockquote>
- </li>
-</ul>
-<p><span style="background-color: #FFFFFF">All <code>basic_path</code> string or sequence arguments that describe a
-path shall accept the portable pathname format, and shall accept the native
-format if explicitly identified by a native format escape sequence prefix of
-<code>slash slash colon</code>.</span></p>
-<blockquote>
- <p><span style="background-color: #FFFFFF">[<i>Note:</i> <code>slash
- slash colon</code> was chosen as the escape sequence because a leading <code>
- slash slash</code>&nbsp; is already implementation-defined by POSIX, <code>
- colon</code> is prohibited in a Windows filename, and on any system a single
- <code>slash</code> can be used when a filename beginning with a <code>colon</code>
- is desired.&nbsp;These factors eliminate the chance of collision with a real
- filename. --</span><i><span style="background-color: #FFFFFF"> end note</span></i><span style="background-color: #FFFFFF">]</span></p>
- </blockquote>
-<p><span style="background-color: #FFFFFF">Implementations are encouraged to
-implicitly recognize the native pathname format if it can be lexically
-identified. An implementation </span>shall document whether or
-not the native pathname format is <span style="background-color: #FFFFFF">
-implicitly recognized</span>.</p>
-<blockquote>
-<p>[<i>Example:</i></p>
-<p><i>-- OpenVMS:</i> <code>&quot;SYS1::DISK1:[JANE.TYLER.HARRY]</code>&quot; is treated
-as a native pathname with a system name, drive name,&nbsp;and three directory
-filenames, rather than a portable pathname with one filename.</p>
-<p><i>-- Windows: </i><code>&quot;c:\\jane\\tyler\\harry&quot;</code> is treated as a
-native pathname with a drive letter, root-directory, and three filenames, rather
-than a portable pathname with one filename.</p>
-<p><i>-- Counter-example 1:</i> An operating system that allows slashes in
-filenames and uses dot as a directory separator. Distinguishing between portable
-and native format argument strings or sequences is not possible as there is no
-other distinguishing syntax. The implementation does not accept native format
-pathnames unless the <code>native</code> argument is present.</p>
-<p><i>-- Counter-example 2:</i> An operating system that allows slashes in
-filenames and uses some unusual character as a directory separator. The
-implementation does accept native format pathnames without the additional <code>
-native</code> argument, which only has to be used for native format arguments
-containing slashes in filenames.</p>
-<p><i>-- end example</i>]</p>
-<p>[<i>Note:</i> This <i><a name="duck-rule">duck-rule</a></i> (&quot;if it looks
-like a duck, walks like a duck, and quacks like a duck, it must be a duck&quot;)
-eliminates format confusion as a source of programmer error and support
-requests. <i>-- end note</i>]</p>
-</blockquote>
-<p>If both the portable and native formats are accepted, implementations shall
-document what characters or character sequences are used to distinguish between
-portable and native formats.</p>
-<blockquote>
-<p>[<i>Note:</i> <i>Windows</i> implementations are encouraged to define colons
-and backslashes as the characters which distinguish native from portable
-formats. <i>--end note</i>]</p>
-</blockquote>
-<h4><a name="Pathname-grammar">Pathname grammar</a></h4>
-<p>The grammar for the portable pathname format is as follows:</p>
-<blockquote>
-<p><i>pathname:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root-name<sub>opt</sub>
-root-directory<sub>opt</sub> relative-path<sub>opt</sub></i></p>
-<p><i>root-name:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-implementation-defined</i></p>
-<p><i>root-directory:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slash<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-root-directory slash<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-implementation-defined</i></p>
-<p><i>relative-path:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-filename<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; relative-path
-slash<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; relative-path
-slash filename</i></p>
-<p><i>filename:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dot<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dot dot</i></p>
-<p><i>slash:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <code>
-slash&lt;Path&gt;::value</code></i></p>
-<p><i>dot:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <code>
-dot&lt;Path&gt;::value</code></i></p>
-</blockquote>
-<p>The grammar is aligned with the <i>POSIX </i>&nbsp;<i>Filename,
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_266">
-Pathname</a> </i>and<i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11">
-Pathname Resolution</a></i> definitions. Any conflict between the grammar and <i>
-POSIX</i> is unintentional. This technical report defers to <i>POSIX</i>.</p>
-<blockquote>
-<p><span style="background-color: #E0E0E0"><i>The form of the above wording was taken
-from POSIX, which uses it in several places to defer to the C standard.</i></span></p>
-<p>[<i>Note: Windows</i> implementations are encouraged to define <i>slash slash
-name</i> as a permissible <i>root-name</i>. <i>POSIX</i> permits, but does not
-require, implementations to do the same. <i>Windows</i> implementations are
-encouraged to define an additional <i>root-directory</i> element <i>
-root_directory name.</i> It is applicable only to the <i>slash slash name</i>
-form of <i>root-name.</i></p>
-<p> <i>Windows</i> implementations are encouraged to recognize a <i>name</i>
-followed by a colon as a native format <i>root-name</i>,
-and a backslash as a format element equivalent to <i>slash</i>. <i>-- end note</i>]</p>
-</blockquote>
-<h4><a name="Filename-conversion">Filename conversion</a></h4>
-<p>When converting filenames to the native operating system format,
-implementations are encouraged, but not required, to convert otherwise invalid
-characters or character sequences to valid characters or character sequences.
-Such conversions are implementation-defined.</p>
-<blockquote>
-<p>[<i>Note:</i> Filename conversion allows much wider portability of both
-programs and filenames that would otherwise be possible.</p>
-<p>Implementations are encouraged to base conversion on existing standards or
-practice. Examples include the Uniform Resource Locator escape syntax of a percent sign (<code>'%'</code>)
-followed by two hex digits representing the character value. On
-<i>OpenVMS</i>, which does not allow percent signs in filenames, a dollar sign (<code>'$'</code>)
-followed by two hex digits is the existing practice, as is converting lowercase
-letters to uppercase.<i> -- end note.</i>]</p>
-<p><span style="background-color: #E0E0E0"><i>The Boost implementation for
-Windows currently does not map invalid characters. Pending feedback from the LWG,
-Boost may settle on % hex hex as the preferred escape sequence. If so, should
-there be normative encouragement?</i></span></p>
-</blockquote>
-<h4><a name="basic_path-requirements">Requirements</a></h4>
-<p>The argument for the template parameter named <code>String</code> shall be a
-class that includes members with the same names, types, values, and semantics as
-class template <code>basic_string</code>.</p>
-<p>The argument for the template parameter named <code>Traits</code> shall be a
-class that satisfies the requirements specified in the
-Path Behavior Traits Requirements
-table.</p>
-<p>The argument for template parameters named <code>InputIterator</code> shall satisfy the
-requirements of an input iterator (C++ Std, 24.1.1, Input iterators [lib.input.iterators]) and shall have a value type convertible to
-<code>basic_path::value_type</code>. </p>
-<p>Some function templates with a template
-parameter named <code>InputIterator</code> also have non-template overloads. Implementations shall
-only select the function template overload if the type named by <code>InputIterator</code>
-is not <code>path_format_t</code>.</p>
-<blockquote>
-<p>[<i>Note:</i> This &quot;do-the-right-thing&quot; rule ensures that the
-overload expected by the user is selected. The implementation technique is unspecified -
-implementations may use
-enable_if or
-other techniques to achieve the effect. <i>-- end note</i>]</p>
-</blockquote>
-<h4> <a name="basic_path-constructors"> <code>basic_path</code> constructors</a></h4>
-<pre>basic_path();</pre>
-<blockquote>
- <p><i>Postconditions:</i> <code>empty()</code>.</p>
- </blockquote>
-<pre>basic_path(const string_type&amp; s);
-basic_path(const value_type * s);
-template &lt;class InputIterator&gt;
- basic_path(InputIterator s, InputIterator last);</pre>
-<blockquote>
- <p><i>Remarks:</i> The format of string <code>s</code> and sequence [<code>first</code>,<code>last</code>)
- is described in Pathname formats.</p>
- <p><i>Effects:</i> The path elements in string <code>s</code> or sequence [<code>first</code>,<code>last</code>)
- are stored.</p>
-</blockquote>
-<h4> <a name="basic_path-assignments"> <code>basic_path</code> assignments</a></h4>
-<pre>basic_path&amp; operator=(const string_type&amp; s);
-basic_path&amp; operator=(const value_type* s);
-template &lt;class InputIterator&gt;
- basic_path&amp; assign(InputIterator first, InputIterator last);</pre>
-<blockquote>
- <p><i>Remarks:</i> The format of string <code>s</code> and sequence [<code>first</code>,<code>last</code>)
- is described in Pathname formats.</p>
- <p><i>Effects:</i> The path elements in string <code>s</code> or sequence [<code>first</code>,<code>last</code>)
- are stored.</p>
- <p><i>Returns: </i><code>*this</code></p>
- </blockquote>
-<h4> <a name="basic_path-modifiers"> <code>basic_path</code> modifiers</a></h4>
-<pre>basic_path&amp; operator/=(const basic_path&amp; rhs);</pre>
-<blockquote>
- <p><i>Effects:</i> The path stored in <code>rhs</code> is appended to the
- stored path.</p>
- <p><i>Returns:</i> <code>*this</code></p>
-</blockquote>
-<pre>basic_path&amp; operator/=(const string_type&amp; s);
-basic_path&amp; operator/=(const value_type* s);
-template &lt;class InputIterator&gt;
-basic_path&amp; append(InputIterator first, InputIterator last);</pre>
-<blockquote>
- <p><i>Remarks:</i> The format of string <code>s</code> and sequence [<code>first</code>,<code>last</code>)
- is described in Pathname formats.</p>
-<p><i>Effects:</i> The path elements in string <code>s</code> or sequence [<code>first</code>,<code>last</code>)
- are appended to the stored path.</p>
- <p><i>Returns: </i><code>*this</code></p>
- </blockquote>
-<pre><code><span style="background-color: #FFFFFF">void swap( basic_path &amp; rhs );</span></code></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- Swaps the contents of the two paths.</span></p>
- <p><i><span style="background-color: #FFFFFF">Throws: </span></i>
- <span style="background-color: #FFFFFF">nothing.</span></p>
- <p><i><span style="background-color: #FFFFFF">Postcondition:</span></i><span style="background-color: #FFFFFF">
- </span><code><span style="background-color: #FFFFFF">this-&gt;string()</span></code><span style="background-color: #FFFFFF">
- contains the same sequence of characters that were in </span><code>
- <span style="background-color: #FFFFFF">rhs</span></code><span style="background-color: #FFFFFF">,
- </span><code><span style="background-color: #FFFFFF">rhs</span></code><span style="background-color: #FFFFFF">
- contains the same sequence of characters that were is </span><code>
- <span style="background-color: #FFFFFF">this-&gt;string()</span></code><span style="background-color: #FFFFFF">.</span></p>
- <p><i><span style="background-color: #FFFFFF">Complexity: </span></i>
- <span style="background-color: #FFFFFF">constant time.</span></p>
-</blockquote>
-<pre>basic_path&amp; remove_leaf();</pre>
-<blockquote>
- <p><i>Effects:</i> If <code>has_branch_path()</code> then remove the last <i>filename</i> from the stored path. If that leaves
- the stored path with one or more trailing <i>slash</i> elements not
- representing&nbsp; <i>root-directory</i>, remove them.</p>
- <p><i>Returns:</i> <code>*this</code></p>
- <p>[<i>Note:</i> This function is needed to efficiently implement <code>
- basic_directory_iterator</code>. It is made public to allow additional uses. <i>-- end
- note</i>]</p>
-</blockquote>
-<h4> <a name="basic_path-observers"> <code>basic_path</code> observers</a></h4>
-<blockquote>
-<p><span style="background-color: #E0E0E0"><i>See the
-Path decomposition table for examples
-for values returned by decomposition functions.</i></span></p>
-</blockquote>
-<pre>const string_type string() const;</pre>
-<blockquote>
-<p><i>Returns:</i> The stored path, formatted according to the
-Pathname grammar rules.</p>
-</blockquote>
-<pre>const string_type file_string() const;</pre>
-<blockquote>
-<p><i>Returns:</i> The stored path, formatted according to the
-operating system rules for regular file pathnames, with any
-Filename conversion applied.</p>
-<p>[<i>Note:</i> For some operating systems, including <i>POSIX</i> and <i>
-Windows</i>, the native format for regular file pathnames and directory
-pathnames is the same, so <code>file_string()</code> and <code>directory_string()</code>
-return the same string. On OpenMVS, however, the expression <code>path(&quot;/cats/jane&quot;).file_string()</code>
-would return the string <code>&quot;[CATS]JANE&quot;</code> while <code>path(&quot;/cats/jane&quot;).directory_string()</code>
-would return the string <code>&quot;[CATS.JANE]&quot;</code>. <i>-- end note</i>]</p>
-</blockquote>
-<pre>const string_type directory_string() const;</pre>
-<blockquote>
-<p><i>Returns:</i> The stored path, formatted according to the
-operating system rules for directory pathnames, with any
-Filename conversion applied.</p>
-</blockquote>
-<pre>const external_string_type external_file_string() const;</pre>
-<blockquote>
-<p><i>Returns:</i> The stored path, formatted according to the
-operating system rules for regular file pathnames, with any
-Filename conversion applied, and encoded by the <code>Traits::to_external</code>
-conversion function.</p>
-</blockquote>
-<pre>const external_string_type external_directory_string() const;</pre>
-<blockquote>
-<p><i>Returns:</i> The stored path, formatted according to the
-operating system rules for directory pathnames, with any
-Filename conversion applied, and encoded by the <code>Traits::to_external</code>
-conversion function.</p>
-</blockquote>
-<pre>string_type root_name() const;</pre>
-<blockquote>
-<p><i>Returns:</i> <i>root-name,</i> if the stored path includes <i>
-root-name</i>, otherwise <code>string_type()</code>. </p>
-</blockquote>
-<pre>string_type root_directory() const;</pre>
-<blockquote>
-<p><i>Returns:</i> <i>root-directory</i>, if the stored path includes <i>
-root-directory</i>, otherwise <code>string_type()</code>.</p>
-<p>If <i>root-directory</i> is composed <i>slash name</i>, <i>slash</i> is
-excluded from the returned string.</p>
-</blockquote>
-<pre>basic_path root_path() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>root_name() / root_directory()</code></p>
-</blockquote>
-<pre>basic_path relative_path() const;</pre>
-<blockquote>
-<p><i>Returns:</i> A <code>basic_path</code> composed from the the stored path, if any, beginning
-with the first <i>filename</i> after <i>root-path</i>.
-Otherwise, an empty <code>basic_path</code>.</p>
-</blockquote>
-<pre>string_type leaf() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>empty() ? string_type() : *--end()</code></p>
-</blockquote>
-<pre>basic_path branch_path() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>(string().empty() || begin() == --end()) ? path_type(&quot;&quot;) :
- <i>br</i></code>, where <code><i>br</i></code> is constructed as if by
- starting with an empty <code>basic_path</code> and successively applying <code>
- operator/=</code> for each element in the range <code>begin()</code>, <code>
- --end()</code>.</p>
-</blockquote>
-<pre>bool empty() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>string().empty()</code>.</p>
-</blockquote>
-<pre>bool is_complete() const;</pre>
-<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>true</code>,
- if the elements of root_path() uniquely identify a directory, else <code>false</code>.</span></p>
-</blockquote>
-<pre>bool has_root_path() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!root_path().empty()</code></p>
-</blockquote>
-<pre>bool has_root_name() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!root_name().empty()</code></p>
-</blockquote>
-<pre>bool has_root_directory() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!root_directory().empty()</code></p>
-</blockquote>
-<pre>bool has_relative_path() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!relative_path().empty()</code></p>
-</blockquote>
-<pre>bool has_leaf() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!leaf().empty()</code></p>
-</blockquote>
-<pre>bool has_branch_path() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!branch_path().empty()</code></p>
-</blockquote>
-<h4> <a name="basic_path-iterators"> <code>basic_path</code> iterators</a></h4>
-<p> A <code>basic_path::iterator</code> is a constant iterator satisfying all
-the requirements of a bidirectional iterator (C++ Std, 24.1.4 Bidirectional
-iterators [lib.bidirectional.iterators]). Its <code>value_type</code> is
-<code>string_type</code>.</p>
- <p>Calling any non-const member function of a <code>basic_path</code> object
- invalidates all iterators referring to elements of the object.</p>
-<p> The forward traversal order is as follows:</p>
-<ul>
- <li>The <i>root-name</i> element, if present.</li>
- <li>The <i>root-directory</i> element, if present.</li>
- <li>Each successive <i>filename</i> element, if present.</li>
- <li><i>Dot</i>, if one or more trailing non-root <i>slash</i>
- characters are present.</li>
-</ul>
- <p>The backward traversal order is the reverse of forward traversal.</p>
- <pre>iterator begin() const;</pre>
-<blockquote>
- <p><i>Returns:</i> An iterator for the first present element in the traversal
- list above. If no elements are present, the end iterator.</p>
-</blockquote>
-<pre>iterator end() const;</pre>
-<blockquote>
- <p><i>Returns:</i> The end iterator.</p>
-</blockquote>
-<h4> <a name="basic_path-non-member-functions">
-<span style="background-color: #FFFFFF">basic_path non-member functions</span></a></h4>
-<pre><span style="background-color: #FFFFFF">template&lt;class String, class Traits&gt;
-void swap( basic_path&lt;String, Traits&gt; &amp; lhs, basic_path&lt;String, Traits&gt; &amp; rhs )</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects: </span></i><code>
- <span style="background-color: #FFFFFF">lhs.swap(
- rhs )</span></code></p>
-</blockquote>
- <h4><span style="background-color: #FFFFFF">basic_path non-member operators</span></h4>
- <p><span style="background-color: #FFFFFF">There are seven basic_path non-member operators (/,
- </span> <code><span style="background-color: #FFFFFF">==</span></code><span style="background-color: #FFFFFF">,
- </span> <code>
- <span style="background-color: #FFFFFF">!=</span></code><span style="background-color: #FFFFFF">,
- </span> <code><span style="background-color: #FFFFFF">&lt;</span></code><span style="background-color: #FFFFFF">,
- </span> <code><span style="background-color: #FFFFFF">&gt;</span></code><span style="background-color: #FFFFFF">,
- </span> <code><span style="background-color: #FFFFFF">&lt;=</span></code><span style="background-color: #FFFFFF">,
- </span> <code><span style="background-color: #FFFFFF">&gt;=</span></code><span style="background-color: #FFFFFF">),
- each with five overloads. For brevity, the specifications are given in tabular
- form. Each of the resulting thirty-five signatures is a template, with
- template parameter list template</span><code><span style="background-color: #FFFFFF">&lt;class
- String, class Traits&gt;</span></code><span style="background-color: #FFFFFF">.
- The format of such arguments is described in </span> <a href="#Pathname-formats">
- <span style="background-color: #FFFFFF">Pathname formats</span></a><span style="background-color: #FFFFFF">.</span></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="100%">
- <p align="center"><i><b><span style="background-color: #FFFFFF">Argument type overloads</span></b></i></td>
- </tr>
- <tr>
- <td width="100%"><span style="background-color: #FFFFFF"><code>
- basic_path&lt;String, Traits&gt;&amp; a, basic_path&lt;String, Traits&gt;&amp;
- b</code></span></td>
- </tr>
- <tr>
- <td width="100%"><span style="background-color: #FFFFFF"><code>const
- typename basic_path&lt;String, Traits&gt;::string_type&amp; a,
- basic_path&lt;String, Traits&gt;&amp; b</code></span></td>
- </tr>
- <tr>
- <td width="100%"><span style="background-color: #FFFFFF"><code>const
- typename basic_path&lt;String, Traits&gt;::string_type::value_type* a,
- basic_path&lt;String, Traits&gt;&amp; b</code></span></td>
- </tr>
- <tr>
- <td width="100%"><span style="background-color: #FFFFFF"><code>const
- basic_path&lt;String, Traits&gt;&amp; a, typename basic_path&lt;String, Traits&gt;::string_type&amp;
- b</code></span></td>
- </tr>
- <tr>
- <td width="100%"><span style="background-color: #FFFFFF"><code>const
- basic_path&lt;String, Traits&gt;&amp; a, typename
- basic_path&lt;String, Traits&gt;::string_type::value_type* b</code></span></td>
- </tr>
- </table>
- <p><span style="background-color: #FFFFFF">In the </span><b><i>
- <span style="background-color: #FFFFFF">basic_path non-member operators </span>
- </i></b><span style="background-color: #FFFFFF">table, </span><code>
- <span style="background-color: #FFFFFF">a</span></code><span style="background-color: #FFFFFF">
- and </span><code><span style="background-color: #FFFFFF">b</span></code><span style="background-color: #FFFFFF">
- are of the types given in the </span><i><b>
- <span style="background-color: #FFFFFF">Argument type overloads</span></b></i><span style="background-color: #FFFFFF">
- table. If </span><code><span style="background-color: #FFFFFF">a</span></code><span style="background-color: #FFFFFF">
- or </span><code><span style="background-color: #FFFFFF">b</span></code><span style="background-color: #FFFFFF">
- is of type </span><code><span style="background-color: #FFFFFF">const
- basic_path&lt;String, Traits&gt;&amp;</span></code><span style="background-color: #FFFFFF">,
- then </span><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i></code><span style="background-color: #FFFFFF">
- or </span><i><b><span style="background-color: #FFFFFF">b'</span></b></i><span style="background-color: #FFFFFF">
- respectively is </span><code><span style="background-color: #FFFFFF">a</span></code><span style="background-color: #FFFFFF">
- or </span><code><span style="background-color: #FFFFFF">b</span></code><span style="background-color: #FFFFFF">
- respectively. Otherwise </span><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i></code><span style="background-color: #FFFFFF">
- or </span><i><b><span style="background-color: #FFFFFF">b'</span></b></i><span style="background-color: #FFFFFF">
- respectively represent named or unnamed temporary </span><code>
- <span style="background-color: #FFFFFF">basic_path&lt;String, Traits&gt;</span></code><span style="background-color: #FFFFFF">
- objects constructed from </span><code><span style="background-color: #FFFFFF">
- a</span></code><span style="background-color: #FFFFFF"> or </span><code>
- <span style="background-color: #FFFFFF">b</span></code><span style="background-color: #FFFFFF">
- respectively.</span></p>
-<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="280">
- <tr>
- <td width="100%" colspan="3" align="center" height="19"><b><i>
- <span style="background-color: #FFFFFF">basic_path non-member operators</span></i></b></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19"><i><b>
- <span style="background-color: #FFFFFF">Expression</span></b></i></td>
- <td width="25%" align="center" height="19"><i><b>
- <span style="background-color: #FFFFFF">Return type</span></b></i></td>
- <td width="55%" align="center" height="19"><i><b>
- <span style="background-color: #FFFFFF">Semantics</span></b></i></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="30" valign="top"><code>
- <span style="background-color: #FFFFFF">a / b</span></code></td>
- <td width="25%" align="center" height="30" valign="top"><code>
- <span style="background-color: #FFFFFF">basic_path&lt;String, Traits&gt;</span></code></td>
- <td width="55%" height="30"><code><span style="background-color: #FFFFFF">
- basic_path&lt;String, Traits&gt; tmp(a);<br>
- return a /= </span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">;</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a &lt; b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return lexicographical_compare(</span></code><span style="background-color: #FFFFFF"><i><b>a</b></i></span><code><span style="background-color: #FFFFFF"><i><b>'</b></i>.begin(), </span></code><i><b>
- <span style="background-color: #FFFFFF">a</span></b></i><code><span style="background-color: #FFFFFF"><i><b>'</b></i>.end(), </span></code><i><b>
- <span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">.begin(), </span></code><i><b>
- <span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">.end());</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a == b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return !(</span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">
- &lt; </span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">)
- &amp;&amp; !(</span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">
- &lt; </span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">);</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a != b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return !(</span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">
- == </span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">);</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a &gt; b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return </span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">
- &lt; </span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">;</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a &lt;= b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return !(</span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">
- &lt; </span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">);</span></code></td>
- </tr>
- <tr>
- <td width="20%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">a &gt;= b</span></code></td>
- <td width="25%" align="center" height="19" valign="top"><code>
- <span style="background-color: #FFFFFF">bool</span></code></td>
- <td width="55%" height="19"><code><span style="background-color: #FFFFFF">
- return !(</span></code><i><b><span style="background-color: #FFFFFF">a</span></b></i><code><i><b><span style="background-color: #FFFFFF">'</span></b></i><span style="background-color: #FFFFFF">
- &lt; </span></code><i><b><span style="background-color: #FFFFFF">b'</span></b></i><code><span style="background-color: #FFFFFF">);</span></code></td>
- </tr>
-</table>
- <blockquote>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
- </span> <a name="Path-equality"><span style="background-color: #FFFFFF">Path equality</span></a><span style="background-color: #FFFFFF"> and path
- equivalence have different semantics.</span></p>
- <p><span style="background-color: #FFFFFF">Equality is determined by </span> <i>
- <span style="background-color: #FFFFFF">basic_path</span></i><span style="background-color: #FFFFFF">'s
- non-member </span> <code><a href="#operator-eq">
- <span style="background-color: #FFFFFF">operator==</span></a></code><span style="background-color: #FFFFFF">, which considers the two path's lexical representations
- only. Paths &quot;abc&quot; and &quot;ABC&quot; are never equal.</span></p>
- <p><span style="background-color: #FFFFFF">Equivalence is determined by the
- </span> equivalent()<span style="background-color: #FFFFFF">
- non-member function, which determines if two paths </span>
- resolve<span style="background-color: #FFFFFF"> to the same file system entity.
- Paths &quot;abc&quot;
- and &quot;ABC&quot; may or may not resolve to the same file, depending on the file
- system.</span></p>
- <p><span style="background-color: #FFFFFF">Programmers wishing to determine if two paths are &quot;the same&quot; must decide if
- &quot;the same&quot; means &quot;the same representation&quot; or &quot;resolve to the same actual
- file&quot;, and choose the appropriate function accordingly. </span> <i>
- <span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
-</blockquote>
- <h4><a name="basic_path-inserter-extractor"> <code>
- <span style="background-color: #FFFFFF">basic_path</span></code><span style="background-color: #FFFFFF"> inserter
- and extractor</span></a></h4>
-<pre><span style="background-color: #FFFFFF">template&lt;class Path&gt;
- basic_istream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp;
- operator&gt;&gt;(basic_istream&lt; typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp; is,
- Path&amp; ph );</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:&nbsp; </span></i>
- <code><span style="background-color: #FFFFFF">typename Path::string_type str;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- is &gt;&gt; str;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- ph = str;</span></code></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">is</span></code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">template&lt;class Path&gt;
- basic_ostream&lt;typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp;
- operator&lt;&lt;(basic_ostream&lt; typename Path::string_type::value_type, typename Path::string_type::traits_type&gt;&amp; os,
- const Path&amp; ph );</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">&nbsp;
- </span> <code><span style="background-color: #FFFFFF">os &lt;&lt; ph.string()</span></code></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">os</span></code></p>
-</blockquote>
-<h3><u><a name="Class-filesystem_error"><span style="background-color: #FFFFFF">
-Class </span><code><span style="background-color: #FFFFFF">filesystem_error</span></code></a></u></h3>
-<pre><span style="background-color: #FFFFFF">namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- class filesystem_error : public std::runtime_error
- {
- public:
- explicit filesystem_error(const std::string &amp; what_arg, system_error_type ec=0);
- system_error_type system_error() const;
- };
- } // namespace sys
- } // namespace tr2
-} // namespace std</span></pre>
-<p><span style="background-color: #FFFFFF">The class <code>filesystem_error</code> defines the
-base type of
-objects thrown as exceptions to report file system errors from functions described in this
-clause.</span></p>
-<blockquote>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
- A non-template base class allows users who are uninterested in path specifics
- to catch a single exception type. </span> <i>
- <span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">explicit filesystem_error(const std::string &amp; what_arg, system_error_type ec=0);</span></pre>
-<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Postcondition:</i> <code>
- strcmp(what(), <i>what_arg</i>.c_str()) == 0 &amp;&amp; system_error() == <i>ec</i></code></span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">system_error_type system_error() const;</span></pre>
-<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns: <code>ec</code></i></span></p>
-</blockquote>
-<h3><a name="Class-template-basic_filesystem_error">Class template <code>basic_filesystem_error</code></a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class Path&gt; class basic_filesystem_error : public <u><span style="background-color: #FFFFFF">filesystem</span>_error</u>
- {
- public:
- typedef Path path_type;
-
- explicit basic_filesystem_error(const std::string&amp; <u><span style="background-color: #FFFFFF">what_arg</span></u>, system_error_type ec=0);
- basic_filesystem_error(const std::string&amp; <u><span style="background-color: #FFFFFF">what_arg</span></u>, const path_type&amp; p1, system_error_type ec);
- basic_filesystem_error(const std::string&amp; <u><span style="background-color: #FFFFFF">what_arg</span></u>, const path_type&amp; p1, const path_type&amp; p2, system_error_type ec);
-
- const path_type&amp; path1() const;
- const path_type&amp; path2() const;
- };
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p>The class template <code>basic_filesystem_error</code> defines the type of
-objects thrown as exceptions to report file system errors from functions described in this
-clause.</p>
-<h4> <a name="basic_filesystem_error-constructors"> <code>basic_filesystem_error</code> constructors</a></h4>
-<pre>explicit basic_filesystem_error(const std::string&amp; <u><span style="background-color: #FFFFFF">what_arg</span></u>, system_error_type ec=0);</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="41%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%" bgcolor="#FFFFFF"><code>
- <span style="background-color: #FFFFFF">what</span>()</code></td>
- <td width="82%" bgcolor="#FFFFFF"><span style="background-color: #FFFFFF">
- <code><i>what_arg</i>.c_str()</code></span></td>
- </tr>
- <tr>
- <td width="18%"><code>system_error()</code></td>
- <td width="82%"><code>ec</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path1().empty()</code></td>
- <td width="82%"><code>true</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path2().empty()</code></td>
- <td width="82%"><code>true</code></td>
- </tr>
- </table>
-</blockquote>
-<pre>basic_filesystem_error(const std::string&amp; <span style="background-color: #FFFFFF">what_arg</span>, const path_type&amp; p1, system_error_type ec);</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="41%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code><span style="background-color: #FFFFFF">what</span>()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">
- <code><i>what_arg</i>.c_str()</code></span></td>
- </tr>
- <tr>
- <td width="18%"><code>system_error()</code></td>
- <td width="82%"><code>ec</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path1()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p1</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path2().empty()</code></td>
- <td width="82%"><code>true</code></td>
- </tr>
- </table>
-</blockquote>
-<pre>basic_filesystem_error(const std::string&amp; <span style="background-color: #FFFFFF">what_arg</span>, const path_type&amp; p1, const path_type&amp; p2, system_error_type ec);</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="41%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code><span style="background-color: #FFFFFF">what</span>()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">
- <u>
- <code><i>w</i></code></u><code><i>hat_arg</i>.c_str()</code></span></td>
- </tr>
- <tr>
- <td width="18%"><code>system_error()</code></td>
- <td width="82%"><code>ec</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path1()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p1</code></td>
- </tr>
- <tr>
- <td width="18%"><code>path2()</code></td>
- <td width="82%"><span style="background-color: #FFFFFF">Reference to stored copy of
- </span> <code>p2</code></td>
- </tr>
- </table>
-</blockquote>
-<h4> <a name="basic_filesystem_error-observers"> <code>basic_filesystem_error</code> observers</a></h4>
-<pre>const path_type&amp; path1() const;</pre>
-<blockquote>
- <p><i>Returns:</i> Reference to copy of <code>p1</code> stored by the
- constructor, or, if none, an empty path.</p>
-</blockquote>
-<pre>const path_type&amp; path2() const;</pre>
-<blockquote>
- <p><i>Returns:</i> Reference to copy of <code>p2</code> stored by the
- constructor, or, if none, an empty path.</p>
-</blockquote>
-<h3><a name="Class-template-basic_directory_entry">Class template <code>basic_directory_entry</code></a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class Path&gt; class basic_directory_entry
- {
- public:
- typedef Path path_type;
- typedef typename Path::string_type string_type;
-
- // constructors
- basic_directory_entry();
- explicit basic_directory_entry(const path_type&amp; p,
- <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
-
- // modifiers
- void assign(const path_type&amp; p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
- void replace_leaf(const string_type&amp; s, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());
-
- // observers
- const Path&amp; path() const;
- operator const Path&amp;() const;
-<span style="background-color: #FFFFFF">
- file_status status() const;
- file_status status(system_error_code&amp; ec) const;
- file_status symlink_status() const;
- file_status symlink_status(system_error_code&amp; ec) const;
-</span><span style="background-color: #FFFF00">
-</span> // comparisons
- bool operator&lt;(const basic_directory_entry&lt;Path&gt;&amp; rhs);
- bool operator==(const basic_directory_entry&lt;Path&gt;&amp; rhs);
- bool operator!=(const basic_directory_entry&lt;Path&gt;&amp; rhs);
- bool operator&gt;(const basic_directory_entry&lt;Path&gt;&amp; rhs);
- bool operator&lt;=(const basic_directory_entry&lt;Path&gt;&amp; rhs);
- bool operator&gt;=(const basic_directory_entry&lt;Path&gt;&amp; rhs);
-
- private:
- path_type m_path; // for exposition only
- mutable <span style="background-color: #FFFFFF">file_status</span> m_status; // for exposition only; stat()-like
- mutable <span style="background-color: #FFFFFF">file_status</span> m_symlink_status; // for exposition only; lstat()-like
- };
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p>A <code>basic_directory_entry</code> object stores a <code>basic_path object</code>,
-a <code>file_status</code> object for non-symbolic link status, and a <code>
-file_status</code> object for symbolic link status. The <code>file_status</code>
-objects act as value caches.</p>
-<blockquote>
-<p>[<i>Note:</i> Because <code>status()</code>on a pathname may be a very expensive operation,
-some operating systems provide status information as a byproduct of directory
-iteration. Caching such status information can result is significant time savings. Cached and
-non-cached results may differ in the presence of race conditions. <i>-- end note</i>]</p>
-<p><span style="background-color: #E0E0E0"><i>Actual cold-boot timing of iteration over
-a directory with 15,047 entries was six seconds for non-cached status queries
-versus one second for cached status queries. Windows XP, 3.0 GHz processor, with
-a moderately fast hard-drive. Similar speedup expected on Linux and BSD-derived
-Unix variants that provide status during directory iteration.</i></span></p>
-</blockquote>
-<h4> <a name="basic_directory_entry-constructors"> <code>basic_directory_entry </code>constructors</a></h4>
-<pre>basic_directory_entry();</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code>path().empty()</code></td>
- <td width="82%"><code>true</code></td>
- </tr>
- <tr>
- <td width="18%"><code>status()</code></td>
- <td width="82%"><code>file_status()</code></td>
- </tr>
- <tr>
- <td width="18%"><code>symlink_status()</code></td>
- <td width="82%"><code>file_status()</code></td>
- </tr>
- </table>
-</blockquote>
-<pre>explicit basic_directory_entry(const path_type&amp; p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code>path()</code></td>
- <td width="82%"><code>p</code></td>
- </tr>
- <tr>
- <td width="18%"><code>status()</code></td>
- <td width="82%"><code>st</code></td>
- </tr>
- <tr>
- <td width="18%"><code>symlink_status()</code></td>
- <td width="82%"><code>symlink_st</code></td>
- </tr>
- </table>
-</blockquote>
-<h4> <a name="basic_directory_entry-modifiers"> <code>basic_directory_entry </code>modifiers</a></h4>
-<pre>void assign(const path_type&amp; p, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="36%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code>path()</code></td>
- <td width="82%"><code>p</code></td>
- </tr>
- <tr>
- <td width="18%"><code>status()</code></td>
- <td width="82%"><code>st</code></td>
- </tr>
- <tr>
- <td width="18%"><code>symlink_status()</code></td>
- <td width="82%"><code>symlink_st</code></td>
- </tr>
- </table>
-</blockquote>
-<pre>void replace_leaf(const string_type&amp; s, <span style="background-color: #FFFFFF">file_status</span> st=file_status(), <span style="background-color: #FFFFFF">file_status</span> symlink_st=file_status());</pre>
-<blockquote>
- <p><i>Postconditions:</i></p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="43%">
- <tr>
- <td width="18%"><b>Expression</b></td>
- <td width="82%"><b>Value</b></td>
- </tr>
- <tr>
- <td width="18%"><code>path()</code></td>
- <td width="82%"><code>path().branch() / s</code></td>
- </tr>
- <tr>
- <td width="18%"><code>status()</code></td>
- <td width="82%"><code>st</code></td>
- </tr>
- <tr>
- <td width="18%"><code>symlink_status()</code></td>
- <td width="82%"><code>symlink_st</code></td>
- </tr>
- </table>
-</blockquote>
-<h4> <a name="basic_directory_entry-observers"> <code>basic_directory_entry</code> observers</a></h4>
-<pre>const Path&amp; path() const;
-operator const Path&amp;() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>m_path</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status status() const;</span></pre>
-<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
- <blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_status ) )
-{
- if ( status_known(m_symlink_status) &amp;&amp; !is_symlink(m_symlink_status) )
- { m_status = m_symlink_status; }
- else { m_status = status(m_path); }
-}</span></pre>
- </blockquote>
- <p><span style="background-color: #FFFFFF"><i>Throws:</i> See <code>status</code>
- function.</span></p>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_status</code></span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status status(system_error_code&amp; ec) const;</span></pre>
-<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
- <blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_status ) )
-{
- if ( status_known(m_symlink_status) &amp;&amp; !is_symlink(m_symlink_status) )
- { m_status = m_symlink_status; }
- else { m_status = status(m_path, ec); }
-}
-else ec = 0;</span></pre>
- </blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_status</code></span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status symlink_status() const;</span></pre>
-<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
- <blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_symlink_status ) )
-{
- m_symlink_status = symlink_status(m_path);
-}</span></pre>
- </blockquote>
- <p><span style="background-color: #FFFFFF"><i>Throws:</i> See <code>symlink_status</code>
- function.</span></p>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>
- m_symlink_status</code></span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">file_status symlink_status(system_error_code&amp; ec) const;</span></pre>
-<blockquote>
-<p><span style="font-style: italic; background-color: #FFFFFF">Effects:</span><span style="background-color: #FFFFFF">
-As if,</span></p>
- <blockquote>
- <pre><span style="background-color: #FFFFFF">if ( !status_known( m_symlink_status ) )
-{
- m_symlink_status = symlink_status(m_path, ec);
-}
-else ec = 0;</span></pre>
- </blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> <code>m_symlink_status</code></span></p>
-</blockquote>
-<h3><a name="Class-template-basic_directory_iterator">Class template <code>basic_directory_iterator</code></a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class Path&gt;
- class basic_directory_iterator :
- public iterator&lt;input_iterator_tag, basic_directory_entry&lt;Path&gt; &gt;
- {
- public:
- typedef Path path_type;
-
- // constructors
- basic_directory_iterator();
- explicit basic_directory_iterator(const Path&amp; dp);
- basic_directory_iterator(const Path&amp; dp, system_error_type&amp; ec);
- basic_directory_iterator(const basic_directory_iterator&amp; bdi);
- basic_directory_iterator&amp; operator=(const basic_directory_iterator&amp; bdi);
- ~basic_directory_iterator();
-
- // other members as required by
- // C++ Std, 24.1.1 Input iterators [lib.input.iterators]
- };
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p> <code>basic_directory_iterator</code> satisfies the requirements of an
-input iterator (C++ Std, 24.1.1, Input iterators [lib.input.iterators]).</p>
-<p>A <code>basic_directory_iterator</code> reads successive elements from the directory for
-which it was constructed, as if by calling <i>POSIX</i>
-<code>
-readdir_r()</code>. After a <code>basic_directory_iterator</code> is constructed, and every time
-<code>operator++</code> is called,
-it reads and stores a value of <code>basic_directory_entry&lt;Path&gt;</code>
-and possibly stores associated status values.
-<code>operator++</code> is not equality preserving; that is, <code>i == j</code> does not imply that
-<code>++i == ++j</code>. </p>
-<blockquote>
-<p>[<i>Note:</i> The practical consequence of not preserving equality is that directory iterators
-can be used only for single-pass algorithms. <i>--end note</i>]</p>
-</blockquote>
-<p>If the end of the directory elements is reached, the iterator becomes equal to
-the end iterator value. The constructor <code>basic_directory_iterator()</code>
-with no arguments always constructs an end iterator object, which is the only
-legitimate iterator to be used for the end condition. The result of <code>
-operator*</code> on an end iterator is not defined. For any other iterator value
-a <code>const basic_directory_entry&lt;Path&gt;&amp;</code> is returned. The result of
-<code>operator-&gt;</code> on an end iterator is not defined. For any other
-iterator value a <code>const basic_directory_entry&lt;Path&gt;*</code> is
-returned. </p>
-<p>Two end iterators are always equal. An end iterator is not equal to a non-end
-iterator.</p>
-<blockquote>
-<p><i><span style="background-color: #E0E0E0">The above wording is based on the
-Standard Library's istream_iterator wording. Commentary was shortened and
-moved into a note.</span></i></p>
-</blockquote>
-<p>The result of calling the <code>path()</code> member of the <code>
-basic_directory_entry</code> object obtained by dereferencing a <code>
-basic_directory_iterator</code> is a reference to a <code>basic_path</code>
-object composed of the directory argument from which the iterator was
-constructed with filename of the directory entry appended as if by <code>
-operator/=</code>. </p>
-<blockquote>
-<p>[<i><a name="Example-program">Example</a>: </i>This program accepts an
-optional command line argument, and if that argument is a directory pathname,
-iterates over the contents of the directory. For each directory entry, the name
-is output, and if the entry is for a regular file, the size of the file is
-output.</p>
- <blockquote>
- <pre>#include &lt;iostream&gt;
-#include &lt;filesystem&gt;
-
-using std::tr2::sys;
-using std::cout;
-
-int main(int argc, char* argv[])
-{
- std::string p(argc &lt;= 1 ? &quot;.&quot; : argv[1]);
-
- if (is_directory(p))
- {
- for (directory_iterator itr(p); itr!=directory_iterator(); ++itr)
- {
- cout &lt;&lt; itr-&gt;path().leaf() &lt;&lt; ' '; // display filename only
- if (is_regular(itr-&gt;status())) cout &lt;&lt; &quot; [&quot; &lt;&lt; file_size(itr-&gt;path()) &lt;&lt; ']';
- cout &lt;&lt; '\n';
- }
- }
- else cout &lt;&lt; (exists(p) : &quot;Found: &quot; : &quot;Not found: &quot;) &lt;&lt; p &lt;&lt; '\n';
-
- return 0;
-}</pre>
- </blockquote>
- <p><i>-- end example</i>]</p>
-</blockquote>
-<p>Directory iteration shall not yield directory entries for the current (<i>dot</i>)
-and parent (<i>dot dot</i>) directories.</p>
-<p>The order of directory entries obtained by dereferencing successive
-increments of a <code>basic_directory_iterator</code> is unspecified.</p>
-<blockquote>
-<p>[<i>Note:</i> Programs performing directory iteration may wish to test if the
-path obtained by dereferencing a directory iterator actually exists. It could be
-a
-symbolic link to a non-existent file. Programs recursively
-walking directory trees for purposes of removing and renaming entries may wish
-to avoid following symbolic links.</p>
-<p>If a file is removed from or added to a directory after the
-construction of a <code>basic_directory_iterator</code> for the directory, it is
-unspecified whether or not subsequent incrementing of the iterator will ever
-result in an iterator whose value is the removed or added directory entry. See
-<i>POSIX</i>
-<code>
-readdir_r()</code>. <i>
---end note</i>]</p>
-</blockquote>
-<h4><a name="basic_directory_iterator-constructors"><code>basic_directory_iterator</code> constructors</a></h4>
-
-<p><code>basic_directory_iterator();</code></p>
-
-<blockquote>
-
-<p><i>Effects:</i> Constructs the end iterator.</p>
-
-</blockquote>
-
-<p><code>explicit basic_directory_iterator(const Path&amp; dp);</code></p>
-
-<blockquote>
-
-<p><i>Effects:</i> Constructs a iterator representing the first
-entry in the directory resolved to by <code>dp</code>, otherwise, the end iterator.</p>
-
-<p>[<i>Note:</i> To iterate over the current directory, write <code>
-directory_iterator(&quot;.&quot;)</code> rather than <code>directory_iterator(&quot;&quot;)</code>.
-<i>-- end note</i>]</p>
-</blockquote>
-<pre><code>basic_directory_iterator(const Path&amp; dp, system_error_type&amp; ec );</code></pre>
-<blockquote>
-
-<p><i>Effects:</i> Constructs a iterator representing the first
-entry in the directory resolved to by <code>dp</code>, otherwise, the end iterator.
-If an error occurs while establishing the results, the iterator constructed
-represents the end iterator and <code>ec</code> is set to the error code
-reported by the operating system, otherwise to 0.</p>
-
-</blockquote>
-<h3><a name="Class-template-basic_recursive_directory_iterator">Class template <code>basic_recursive_directory_iterator</code></a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- template &lt;class Path&gt;
- class basic_recursive_directory_iterator :
- public iterator&lt;input_iterator_tag, basic_directory_entry&lt;Path&gt; &gt;
- {
- public:
- typedef Path path_type;
-
- // constructors
- basic_recursive_directory_iterator();
- explicit basic_recursive_directory_iterator(const Path&amp; dp);
- basic_recursive_directory_iterator(const basic_recursive_directory_iterator&amp; brdi);
- basic_recursive_directory_iterator&amp; operator=(const basic_recursive_directory_iterator&amp; brdi);
- ~basic_recursive_directory_iterator();
-
- // observers
- int level() const;
-
- // modifiers
- void pop();
- void no_push();
-
- // other members as required by
- // C++ Std, 24.1.1 Input iterators [lib.input.iterators]
-
- private:
- int m_level; // for exposition only
- };
-
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p>The behavior of a <code>basic_recursive_directory_iterator</code> is the same
-as a <code>basic_directory_iterator</code> unless otherwise specified.</p>
-<ul>
- <li>When an iterator is constructed, <code>m_level</code> is set to 0;</li>
- <li>When an iterator <code>it</code> is incremented, if <code>it-&gt;is_directory()</code>
- is true and <code>no_push()</code> had not been called subsequent to
- the most recent increment operation (or construction, if no increment has
- occurred), then&nbsp; <code>m_level</code> is incremented, the
- directory is visited, and its contents recursively iterated over.</li>
- <li>When an iterator reaches the end of the directory currently being iterated
- over, or when <code>pop()</code> is called, <code>m_level</code> is
- decremented, and iteration continues with the parent directory, until the
- directory specified in the constructor argument is reached.</li>
- <li><code>level()</code> returns <code>m_level</code>.</li>
- <li><code>level()</code>, <code>pop()</code>, and <code>no_push()</code> all
- require that the iterator not be the end iterator.</li>
-</ul>
-<blockquote>
- <p>[<i>Note:</i> One of the uses of <code>no_push()</code> is to prevent
- unwanted recursion into symlinked directories. This may be necessary to
- prevent loops on some operating systems. <i>--end note</i>]</p>
-</blockquote>
-<h3><a name="file_status">Class file_status</a></h3>
-<pre>namespace std
-{
- namespace tr2
- {
- namespace sys
- {
- class file_status
- {
- public:
- explicit file_status( file_type v = status_unknown );
-
- file_type type() const;
- void type( file_type v );
- };
- } // namespace sys
- } // namespace tr2
-} // namespace std</pre>
-<p>A <code>file_status</code> object stores information about the status of a
-file. The internal form of the stored information is unspecified.</p>
-<blockquote>
- <p><i>[Note: </i>The class may be extended in the future to store
- additional status information. <i>--end note]</i></p>
-</blockquote>
-<h4>Members</h4>
-<pre>explicit file_status( file_type v = status_unknown );</pre>
-<blockquote>
- <p><i>Effects:</i> Stores <code>v</code>.</p>
-</blockquote>
-<pre>file_type type() const;</pre>
-<blockquote>
- <p><i>Returns: </i>The stored <code>file_type</code>.</p>
-</blockquote>
-<pre>void type( file_type v );</pre>
-<blockquote>
- <p><i>Effects:</i> Stores <code>v</code>, replacing the previously stored
- value.</p>
-</blockquote>
-<h3><a name="Non-member-functions">Non-member operational functions</a></h3>
-<h4><a name="Status-functions">Status functions</a></h4>
-<pre>template &lt;class Path&gt; file_status status(const Path&amp; p, system_error_code&amp; ec);
-template &lt;class Path&gt; file_status symlink_status(const Path&amp; p, system_error_code&amp; ec);</pre>
-<blockquote>
- <p><i>Returns:</i></p>
- <blockquote>
- For <code>status,</code> determine the attributes
- of
- <code>p</code> as if by<i> POSIX </i> <code>
- stat()</code>,
- for <code>symlink_status</code> determine the attributes as if by <i>POSIX </i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/lstat.html">
- lstat()</a></code>.<blockquote>
- <p>[<i>Note:</i> For symbolic links, <code>stat()</code> continues
- pathname resolution using the contents of the symbolic link, <code>lstat()</code>
- does not. <i>--
- end note</i>]</p>
- </blockquote>
- <p>If the operating system reports an error during attribute determination:</p>
- <ul>
- <li>If the error indicating that <code>p</code> could not
- be resolved, as if by POSIX error codes ENOENT or ENOTDIR, set ec to 0 and return <code>
- file_status(not_found_flag)</code>.</li>
- </ul>
- <ul>
- <li>Otherwise, set ec to the error code reported by the operating system
- and return <code>
- file_status(status_unknown)</code>.</li>
- </ul>
- Otherwise:<ul>
- <li>If the attributes indicate a regular file, as if by <i>POSIX</i>&nbsp;S_ISREG(),
- return <code>
- file_status(regular_file)</code>.</li>
- <li>Else if the attributes indicate a directory, as if by <i>POSIX</i> S_ISDIR(),
- return <code>
- file_status(directory_file)</code>.</li>
- <li>Else if the attributes indicate a symbolic link, as if by <i>POSIX</i> S_ISLNK(),
- return <code>
- file_status(symlink_file)</code>. <i>[Note: </i>Only possible for <code>
- symlink_status</code>. <i>--end note]</i></li>
- <li>Else if the attributes indicate a block special file, as if by <i>POSIX</i> S_ISBLK(),
- return <code>
- file_status(block_file)</code>.</li>
- <li>Else if the attributes indicate a character special file, as if by <i>POSIX</i> S_ISCHR(),
- return <code>
- file_status(character_file)</code>.</li>
- <li>Else if the attributes indicate a fifo or pipe file, as if by <i>POSIX</i> S_ISFIFO(),
- return <code>
- file_status(fifo_file)</code>.</li>
- <li>Else if the attributes indicate a socket, as if by <i>POSIX</i> S_ISSOCK(),
- return <code>
- file_status(socket_file)</code>.</li>
- <li>Else return <code>
- file_status(type_unknown)</code>.</li>
- </ul>
- </blockquote>
-<p>[<i>Note:</i> <code>directory_file</code> implies <code>
-basic_directory_iterator</code> on the file would succeed, and <code>
-regular_file</code> implies appropriate <code>&lt;fstream&gt;</code> operations would succeed,
-assuming no hardware, permission, access, or race
-condition errors. For <code>regular_file,</code> the converse is not true; lack of
-<code>regular_file</code> does not necessarily imply <code>&lt;fstream&gt;</code> operations would
-fail on a directory.
-<i>-- end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path&gt; file_status status(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Effects:</i> <code>system_error_code ec;</code><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <code>file_status stat(status(p, ec));</code></p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <code>ec
- != 0</code></p>
- <p><i>Returns:</i> <code>stat</code></p>
-</blockquote>
-<pre>template &lt;class Path&gt; file_status symlink_status(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Effects:</i> <code>system_error_code ec;</code><br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- <code>file_status stat(symlink_status(p, ec));</code></p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <code>ec
- != 0</code></p>
- <p><i>Returns: </i><code>stat</code></p>
-</blockquote>
-<h4><a name="Predicate-functions">Predicate functions</a></h4>
-<pre><span style="background-color: #FFFFFF">bool status_known(file_status s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>s.type() != status_unknown</code></span></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">bool </span><a name="exists"><span style="background-color: #FFFFFF">exists</span></a><span style="background-color: #FFFFFF">(file_status</span><span style="background-color: #FFFFFF"> s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>status_known(s) &amp;&amp; s.type() != file_not_found</code></span></p>
-</blockquote>
-<pre>template &lt;class Path&gt; bool <a name="exists">exists</a>(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Returns:</i> <code>exists( status(p) )</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">bool </span><code><span style="background-color: #FFFFFF">is_regular</span></code><span style="background-color: #FFFFFF">(file_status</span><span style="background-color: #FFFFFF"> s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>s.type() == regular_file</code></span></p>
-</blockquote>
-<pre><code>template &lt;class Path&gt; bool is_regular(const Path&amp; p);</code></pre>
-<blockquote>
- <p><i>Returns:</i> <code>is_regular( status(p) )</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">bool </span><code><span style="background-color: #FFFFFF">is_directory</span></code><span style="background-color: #FFFFFF">(file_status</span><span style="background-color: #FFFFFF"> s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> </span>
- <code><span style="background-color: #FFFFFF">s.type() == directory_file</span></code></p>
-</blockquote>
-<pre><code>template &lt;class Path&gt; bool is_directory(const Path&amp; p);</code></pre>
-<blockquote>
- <p><i>Returns:</i> <code>is_directory( status(p) )</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="exists">is_symlink</a>(file_status s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> </span>
- <code><span style="background-color: #FFFFFF">s.type() == symlink_file</span></code></p>
-</blockquote>
-<pre><code>template &lt;class Path&gt; bool is_symlink(const Path&amp; p);</code></pre>
-<blockquote>
- <p><i>Returns:</i> <code>is_symlink( symlink_status(p) )</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">bool <a name="exists">is_other</a>(file_status s);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF">
- <code>return exists(s) &amp;&amp; !is_regular(s) &amp;&amp; !is_directory(s) &amp;&amp; !is_symlink(s)</code></span></p>
-</blockquote>
-<pre><code>template &lt;class Path&gt; bool is_other(const Path&amp; p);</code></pre>
-<blockquote>
- <p><i>Returns:</i> <code>is_other( status(p) )</code></p>
-</blockquote>
-<pre><code>template &lt;class Path&gt; bool <span style="background-color: #FFFFFF; text-decoration:underline">is_</span>empty(const Path&amp; p);</code></pre>
-<blockquote>
- <p><i>Effects:</i> Determines <code>file_status s</code>, as if by <code>
- status(p)</code>.</p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <code>!exist(s) ||
- is_other(s)</code>.</p>
- <p><i>Returns:</i> <code>is_directory(s)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?
- basic_directory_iterator&lt;Path&gt;(p) == basic_directory_iterator&lt;Path&gt;()<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : file_size(p) == 0;</code></p>
-</blockquote>
-<pre><code>template &lt;class Path1, class Path2&gt; bool <a name="equivalent">equivalent</a>(const Path1&amp; p1, const Path2&amp; p2);</code></pre>
-<blockquote>
- <p><i>Requires:</i> <code>Path1::external_string_type</code> and <code>
- Path2::external_string_type</code> are the same type. </p>
- <p><i>Effects:</i> Determines <code>file_status s1</code> and <code>s2</code>,
- as if by <code>status(p1)</code> and&nbsp; <code>status(p2)</code>,
- respectively.</p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path1&gt;</code><span style="background-color: #FFFFFF"> </span>
- if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp;
- is_other(s2))</code>.</p>
- <p><i>Returns:</i> <code>true</code>, if <code>sf1 == sf2</code> and <code>p1</code> and <code>p2</code>
- resolve to the same file system entity, else <code>false</code>.</p>
- <p>Two paths are considered to resolve to
- the same file system entity if two candidate entities reside on the same
- device at the same location. This is determined as if by the values of the <i>POSIX</i> <code>
- stat</code>
- structure<code>,</code> obtained as if by <code>
- stat()</code> for the two paths, having equal
- <code>st_dev</code> values and equal <code>st_ino</code> values.</p>
- <p>[<i>Note:</i> <i>POSIX</i> requires that <i>&quot;st_dev</i> must be unique
- within a Local Area Network&quot;. Conservative <i>POSIX</i> implementations may
- also wish to check for equal <code>st_size</code> and <code>st_mtime</code>
- values. <i>Windows</i> implementations may use <code>GetFileInformationByHandle()</code> as a surrogate for <code>
- stat()</code>, and consider &quot;same&quot; to be equal values for <code>
- dwVolumeSerialNumber</code>, <code>nFileIndexHigh</code>, <code>
- nFileIndexLow</code>, <code>nFileSizeHigh</code>, <code>nFileSizeLow</code>,
- <code>ftLastWriteTime.dwLowDateTime</code>, and <code>
- ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
-</blockquote>
-<h4><a name="Attribute-functions">Attribute functions</a></h4>
-<p>[<i>Note:</i> A strictly limited number of attribute functions are provided
-because few file system attributes are portable. Even the functions provided will be impossible to implement on some file
-systems. <i>--end note</i>.]</p>
-<pre>template &lt;class Path&gt; const Path&amp; <a name="initial_path">initial_path</a>();</pre>
-<blockquote>
- <p><i>Returns:</i> <code>current_path()</code> at the time of entry to <code>
- main()</code>.</p>
- <p>[<i>Note:</i> These semantics turn a dangerous global variable into a safer
- global constant. <i>--end note</i>]</p>
- <p>[<i>Note:</i> Full implementation requires runtime library support.
- Implementations which cannot provide runtime library support are encouraged to
- instead store the value of <code>current_path()</code> at the first call of
- <a name="initial_path"><code>initial_path</code></a><code>()</code>, and
- return this value for all subsequent calls. Programs using
- <a name="initial_path"><code>initial_path</code></a><code>()</code> are
- encouraged to call it immediately on entrance to <code>main()</code> so that
- they will work correctly with such partial implementations. <i>--end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path&gt; Path current_path();</pre>
-<blockquote>
- <p><i>Returns:</i> The current path, as if by <i>POSIX</i>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getcwd.html">
- <code>getcwd()</code></a>.</p>
- <p><i>Postcondition:</i> <code>current_path().is_complete()</code></p>
- <p>[<i>Note:</i> The current path as returned by many operating systems is a
- dangerous global variable. It may be changed unexpectedly by a third-party or
- system library functions, or by another thread. Although dangerous, the
- function is useful in dealing with other libraries.. For a safer alternative,
- see <code>initial_path()</code>. The <code>
- current_path()</code> name was chosen to emphasize that the return is a
- complete path, not just a single directory name. <i>-- </i><i>end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path&gt; <span style="background-color: #FFFFFF; ">uintmax_t</span> file_size(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Returns:</i> The size
- <span style="background-color: #FFFFFF; ">in bytes</span>
- of the file <code>p</code> resolves to, determined as if by the value of
- the <i>POSIX</i> <code>
- stat</code> structure member <code>st_size</code>
- obtained as if by <i>POSIX</i> <code>
- stat()</code>.</p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF"><a name="space">template</a> &lt;class Path&gt; space_info space(const Path&amp; p);</span></pre>
-<blockquote>
- <p><span style="background-color: #FFFFFF"><i>Returns:</i> A <code>space_info</code>
- object. The value of the <code>space_info</code> object is determined as if by
- using </span> <i><span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF"> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/statvfs.html" style="text-decoration: none">
- statvfs()</a></code> to obtain a <i>POSIX</i> struct <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/statvfs.h.html" style="text-decoration: none">
- statvfs</a></code>, and then multiplying its <code>f_blocks</code>, <code>
- f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code>
- member, and assigning the results to the <code>capacity</code>, <code>free</code>,
- and <code>available</code> members respectively. Any members for which the
- value cannot be determined shall be set to -1.</span></p>
-</blockquote>
-<pre>template &lt;class Path&gt; std::time_t last_write_time(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Returns:</i> The time of last data modification of <code>p</code>, determined as if by the
- value of the <i>POSIX</i> <code>
- stat</code> structure member <code>st_mtime</code>&nbsp; obtained
- as if by <i>POSIX</i> <code>
- stat()</code>.</p>
-</blockquote>
-<pre>template &lt;class Path&gt; void last_write_time(const Path&amp; p, const std::time_t new_time);</pre>
-<blockquote>
- <p><i>Effects:</i> Sets the time of last data modification of the file
- resolved to by <code>p</code>
- to <code>new_time</code>, as if by <i>POSIX</i> <code>
- stat()</code>
- followed by <i>POSIX</i>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/utime.html">
- <code>utime()</code></a>.</p>
- <p>[<i>Note:</i> The apparent postcondition <code>last_write_time(p) ==
- new_time</code> is not specified since it would not hold for many file systems
- due to coarse time mechanism granularity. <i>-- end note</i>]</p>
-</blockquote>
-<h4>Other o<a name="Operations-functions">perations functions</a></h4>
-<pre>template &lt;class Path&gt; bool create_directory(const Path&amp; dp);</pre>
-<blockquote>
- <p><i>Effects:</i> Attempts to create the directory <code>dp</code> resolves to,
- as if by<i> POSIX </i><code>
- mkdir()</code> with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. </p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <i>
- Effects</i> fails for any reason other than because the directory already exists.</p>
- <p><i>Returns:</i> True if a new directory was created, otherwise false.</p>
- <p><i>Postcondition:</i> <code>is_directory(dp)</code></p>
-</blockquote>
-<pre><span style="background-color: #FFFFFF">template &lt;class Path1, class Path2&gt;
- system_error_type create_hard_link(const Path1&amp; to_p, const Path2&amp; from_p, system_error_code&amp; ec);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Requires:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">Path1::external_string_type</span></code><span style="background-color: #FFFFFF"> and
- </span> <code>
- <span style="background-color: #FFFFFF">Path2::external_string_type</span></code><span style="background-color: #FFFFFF"> are the same type.</span></p>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF"> Establishes the postcondition, as if by
- </span> <i><span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/link.html">
- <span style="background-color: #FFFFFF">link()</span></a></code><span style="background-color: #FFFFFF">.</span></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> If the
- postcondition cannot be established, a system error code
- indicating the reason for the failure, otherwise 0.</span></p>
- <p><i><span style="background-color: #FFFFFF">Postcondition:</span></i></p>
- <ul>
- <li><span style="background-color: #FFFFFF">&nbsp;</span><code><span style="background-color: #FFFFFF">exists(to_p) &amp;&amp; exists(from_p) &amp;&amp; equivalent(to_p,
- from_p)</span></code></li>
- <li><span style="background-color: #FFFFFF">The contents of the file or directory
- </span> <code><span style="background-color: #FFFFFF">to_p</span></code><span style="background-color: #FFFFFF"> resolves to are unchanged.</span></li>
- </ul>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
- Some operating systems do not support hard links or support
- them only for regular files. Some operating systems limit the number of links per
- file.
- Some file systems that do not
- support
- hard links - the FAT system used on floppy discs, memory cards and flash
- drives,
- for example. Thus hard links should be avoided if wide portability is
- a concern. </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
- </blockquote>
-<pre><span style="background-color: #FFFFFF">template &lt;class Path1, class Path2&gt;
- void create_hard_link(const Path1&amp; to_p, const Path2&amp; from_p);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Requires:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">Path1::external_string_type</span></code><span style="background-color: #FFFFFF"> and
- </span> <code>
- <span style="background-color: #FFFFFF">Path2::external_string_type</span></code><span style="background-color: #FFFFFF"> are the same type.</span></p>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- As if <code>system_error_code ec( create_hard_link( to_p, from_p ) );</code></span></p>
- <p><span style="font-style: italic; background-color: #FFFFFF">Throws:</span><span style="background-color: #FFFFFF">
- </span> <code>basic_filesystem_error&lt;Path1, Path2&gt;</code><span style="background-color: #FFFFFF">
- if <code>ec</code> is not zero.</span></p>
- </blockquote>
-<pre><span style="background-color: #FFFFFF">template &lt;class Path1, class Path2&gt;
- system_error_type create_symlink(const Path1&amp; to_p, const Path2&amp; from_p, system_error_code&amp; ec);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Requires:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">Path1::external_string_type</span></code><span style="background-color: #FFFFFF"> and
- </span> <code>
- <span style="background-color: #FFFFFF">Path2::external_string_type</span></code><span style="background-color: #FFFFFF"> are the same type.</span></p>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF"> Establishes the postcondition, as if by
- </span> <i><span style="background-color: #FFFFFF">POSIX</span></i><span style="background-color: #FFFFFF">
- </span> <code>
- <span style="background-color: #FFFFFF">
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></span></code><span style="background-color: #FFFFFF">.</span></p>
- <p><i><span style="background-color: #FFFFFF">Returns:</span></i><span style="background-color: #FFFFFF"> If the
- postcondition cannot be established, a system error code
- indicating the reason for the failure, otherwise 0.</span></p>
- <p><span style="background-color: #FFFFFF"><i>Postcondition:</i> <code>from_p</code>
- resolves to a symbolic link file that contains an unspecified representation
- of <code>to_p</code>.</span></p>
- <p><span style="background-color: #FFFFFF">[</span><i><span style="background-color: #FFFFFF">Note:</span></i><span style="background-color: #FFFFFF">
- Some operating systems do not support symbolic links at all or support
- them only for regular files. Thus symbolic links should be avoided if code portability is
- a concern. </span> <i><span style="background-color: #FFFFFF">-- end note</span></i><span style="background-color: #FFFFFF">]</span></p>
- </blockquote>
-<pre><span style="background-color: #FFFFFF">template &lt;class Path1, class Path2&gt;
- void create_symlink(const Path1&amp; to_p, const Path2&amp; from_p);</span></pre>
-<blockquote>
- <p><i><span style="background-color: #FFFFFF">Requires:</span></i><span style="background-color: #FFFFFF">
- </span> <code><span style="background-color: #FFFFFF">Path1::external_string_type</span></code><span style="background-color: #FFFFFF"> and
- </span> <code>
- <span style="background-color: #FFFFFF">Path2::external_string_type</span></code><span style="background-color: #FFFFFF"> are the same type.</span></p>
- <p><i><span style="background-color: #FFFFFF">Effects:</span></i><span style="background-color: #FFFFFF">
- As if <code>system_error_code ec( create_symlink( to_p, from_p ) );</code></span></p>
- <p><span style="font-style: italic; background-color: #FFFFFF">Throws:</span><span style="background-color: #FFFFFF">
- </span> <code>basic_filesystem_error&lt;Path1, Path2&gt;</code><span style="background-color: #FFFFFF">
- if <code>ec</code> is not zero.</span></p>
- </blockquote>
-<pre>template &lt;class Path&gt; bool remove(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Precondition:</i> <code>!p.empty()</code></p>
- <p><i>Effects:</i>&nbsp; Attempts to delete the file <code>p</code> resolves
- to,
- as if by<i> POSIX </i><code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/link.html">
- remove()</a></code>.</p>
- <p><i>Returns:</i> The value of <code>exists(p)</code> prior to the
- establishment of the postcondition.</p>
- <p><i>Postcondition:</i> <code>!exists(p)</code></p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if:</p>
- <ul>
- <li><code>p.empty() || (exists(p) &amp;&amp; is_directory(p) &amp;&amp; !empty(p))</code>.</li>
- <li><i>Effects</i> fails for any reason other than because <code>p</code>
- does not resolve to an existing file.</li>
- </ul>
- <p>[<i>Note:</i> A symbolic link is itself removed, rather than what it
- resolves to being removed. <i>-- end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path1, class Path2&gt; void rename(const Path1&amp; from_p, const Path2&amp; to_p);</pre>
-<blockquote>
- <p><i>Requires:</i> <code>Path1::external_string_type</code> and <code>
- Path2::external_string_type</code> are the same type. </p>
- <p><i>Effects:</i> Renames <code>from_p</code> to <code>to_p</code>, as if by
- <i>POSIX</i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/rename.html">
- rename()</a></code>.</p>
- <p><i>Postconditions:</i> <code>!exists(from_p) &amp;&amp; exists(to_p)</code>, and
- the contents and attributes of the file originally named <code>from_p</code>
- are otherwise unchanged.</p>
- <p>[<i>Note:</i> If <code>from_p</code> and <code>to_p</code> resolve to the
- same file, no action is taken. Otherwise, if <code>to_p</code> resolves to an
- existing file, it is removed. A symbolic link is itself renamed, rather than
- the file it resolves to being renamed. <i>-- end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path1, class Path2&gt; void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp);</pre>
-<blockquote>
- <p><i>Requires:</i> <code>Path1::external_string_type</code> and <code>
- Path2::external_string_type</code> are the same type. </p>
- <p><i>Effects:</i> The contents and attributes of the file <code>from_fp</code>
- resolves to are copied to the file <code>to_fp</code> resolves to.</p>
- <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <code>
- from_fp.empty() || to_fp.empty() ||!exists(from_fp) || !is_regular(from_fp)
- || exists(to_fp)</code></p>
-</blockquote>
-<pre>template &lt;class Path&gt; Path complete(const Path&amp; p, const Path&amp; base=initial_path&lt;Path&gt;());</pre>
-<blockquote>
- <p><i>Effects:</i> Composes a complete path from <code>p</code> and <code>base</code>,
- using the following rules:</p>
- <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
- <tr>
- <td align="center">&nbsp;</td>
- <td align="center"><b><code>p.has_root_directory()</code></b></td>
- <td align="center"><b><code>!p.has_root_directory()</code></b></td>
- </tr>
- <tr>
- <td align="center"><b><code>p.has_root_name()</code></b></td>
- <td align="center"><code>p</code></td>
- <td align="center">precondition failure</td>
- </tr>
- <tr>
- <td align="center"><b><code>!p.has_root_name()</code></b></td>
- <td align="center"><code>base.root_name()<br>
- / p</code></td>
- <td align="center"><code>base / p</code></td>
- </tr>
- </table>
- <p><i>Returns:</i> The composed path.</p>
- <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>
- rp.is_complete()</code> is true.</p>
- <p><i>Throws:</i>
- <span style="background-color: #FFFFFF">If </span> <code>
- <span style="background-color: #FFFFFF">!(base.is_complete() &amp;&amp; (p.is_complete() || !p.has_root_name()))</span></code></p>
- <p>[<i><a name="complete_note">Note</a>:</i> When portable behavior is
- required, use <i>complete()</i>. When operating system dependent behavior is
- required, use <i>system_complete()</i>.</p>
- <p>Portable behavior is useful when dealing with paths created
- internally within a program, particularly if the program should exhibit the
- same behavior on all operating systems.</p>
- <p>Operating system dependent behavior is useful when dealing with
- paths supplied by user input, reported to program users, or when such behavior
- is expected by program users. <i>--
- end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path&gt; Path system_complete(const Path&amp; p);</pre>
-<blockquote>
- <p><i>Effects:</i> Composes a complete path from <code>p</code>, using the
- same rules used by the operating system to resolve a path passed as the
- filename argument to standard library open functions.</p>
- <p><i>Returns:</i> The composed path.</p>
- <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>
- rp.is_complete()</code> is true.</p>
- <p><i>Throws:</i> <span style="background-color: #FFFFFF">If <code>p.empty()</code>.</span></p>
- <p>[<i>Note:</i> For <i>POSIX</i>, <code>system_complete(p)</code> has the same semantics as
- <code>complete(p, current_path())</code>.</p>
- <p><a name="windows_effects">For <i>Windows</i></a>, <code>system_complete(p)</code> has the
- same semantics as <code>complete(ph, current_path())</code> if
- <code>p.is_complete() || !p.has_root_name()</code> or <code>p</code> and <code>base</code> have the same
- <code>root_name()</code>.
- Otherwise it acts like <code>complete(p, kinky)</code>, where <code>kinky</code>
- is the current directory for the <code>p.root_name()</code> drive. This will
- be the current directory of that drive the last time it was set, and thus may
- be <b>residue left over from a prior program</b> run by the command
- processor! Although these semantics are often useful, they are also very
- error-prone.</p>
- <p>See
- <a href="file:///C|/boost/site/libs/filesystem/doc/operations.htm#complete_note">
- <i>complete()</i> note</a> for usage suggestions. <i>-- end note</i>]</p>
-</blockquote>
-<pre>errno_type <a name="to_errno">to_errno</a>( system_error_type code );</pre>
-<blockquote>
-<p><i>Returns:</i> The value of the <code>errno</code> error number which
-corresponds to the operating system's error code <code>code</code>. The exact
-correspondence is implementation defined. Implementations are only required to
-support error codes reported by <code>basic_filesystem_error</code> exceptions
-thrown by functions defined in this clause.</p>
-</blockquote>
-<pre>void system_message( system_error_type ec, std::string &amp; target );
-void system_message( system_error_type ec, std::wstring &amp; target );</pre>
-<blockquote>
-<p><i>Effects:</i> Appends a message corresponding to <code>ec</code> to <code>
-target</code>.</p>
-<p>[<i>Note:</i> Implementations are encouraged to supply a localized message. <i>-- end note</i>]</p>
-</blockquote>
-<h4><a name="Convenience-functions">Convenience functions</a></h4>
-<pre>template &lt;class Path&gt; bool create_directories(const Path &amp; p);</pre>
-<blockquote>
- <p><i>Requires:</i> <code>p.empty() || <br>
- forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px )</code>
- </p>
- <p><i>Returns:</i> The value of <code>!exists(p)</code> prior to the
- establishment of the postcondition.</p>
- <p><i>Postcondition:</i> <code>is_directory(p)</code></p>
- <p><i>Throws:</i>&nbsp; <code>basic_filesystem_error&lt;Path&gt;</code> if<code>
- exists(p) &amp;&amp; !is_directory(p)</code></p>
-</blockquote>
-<pre>template &lt;class Path&gt; typename Path::string_type extension(const Path &amp; p);</pre>
-<blockquote>
- <p><i>Returns:</i> if <code>p.leaf()</code> contains a <i>dot</i>, returns the
- substring of <code>p.leaf()</code> starting at the rightmost <i>dot</i> and
- ending at the string's end. Otherwise, returns an empty string. </p>
- <p>[<i>Note:<b> </b></i>The <i>dot</i> is included in the return value so that
- it is possible to distinguish between no extension and an empty extension. </p>
- <p>Implementations are permitted but not required to define additional
- behavior for file systems which append additional elements to extensions, such
- as alternate data stream or partitioned dataset names. <i>-- end note</i>]</p>
-</blockquote>
-<pre>template &lt;class Path&gt; typename Path::string_type basename(const Path &amp; p);</pre>
-<blockquote>
- <p><i>Returns:</i> if <code>p.leaf()</code> contains a <i>dot</i>, returns the
- substring of <code>p.leaf()</code> starting at its beginning and ending at the
- last <i>dot</i> (the <i>dot</i> is not included). Otherwise, returns <code>
- p.leaf()</code>.</p>
-</blockquote>
-<pre>template &lt;class Path&gt;
- Path replace_extension(const Path &amp; p, const typename Path::string_type &amp; new_extension);</pre>
-<blockquote>
- <p><i>Postcondition:</i> <code>basename(<i>return_value</i>) == basename(p) &amp;&amp;
- extension(<i>return_value</i>) == new_extension</code> </p>
- <p>[<i>Note:</i> It follows from the semantics of <code>extension()</code>
- that <code>new_extension</code> should include <i>dot</i> to achieve
- reasonable results. <i>-- end note</i>]</p>
-</blockquote>
-<h3><a name="header-cerrno">Additions</a> to header <code>&lt;cerrno&gt;</code></h3>
-<p>The header &lt;cerrno&gt; shall include an additional symbolic constant macro for
-each of the values returned by the to_errno
-function. The macro names shall be as defined in <i>POSIX</i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/errno.h.html">
-errno.h</a>, with the additions below.</p>
-<blockquote>
-<p><i><span style="background-color: #E0E0E0">This codifies existing practice.
-The required names are only a sub-set of those defined by POSIX, and are usually already
-supplied in &lt;errno.h&gt; (as wrapped by &lt;cerrno&gt;) as shipped with POSIX and Windows compilers.
-These implementations require no changes to their underlying C headers to conform with the above
-requirement.</span></i></p>
-<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="33%">
- <tr>
- <td width="18%" align="center"><i><b>Name</b></i></td>
- <td width="82%" align="center"><i><b>Meaning</b></i></td>
- </tr>
- <tr>
- <td width="18%"><code>EBADHANDLE</code></td>
- <td width="82%">Bad operating system handle.</td>
- </tr>
- <tr>
- <td width="18%"><code>EOTHER</code></td>
- <td width="82%">Other error.</td>
- </tr>
-</table>
-</blockquote>
-<h3><a name="header-fstream">Additions</a> to header <code>&lt;fstream&gt;</code></h3>
-<blockquote>
-<p><span style="background-color: #E0E0E0; font-style:italic">These additions have been carefully
-specified to avoid breaking existing code in common operating environments such as
-</span> <i><span style="background-color: #E0E0E0">POSIX</span></i><span style="background-color: #E0E0E0; font-style:italic">,
-</span> <i>
-<span style="background-color: #E0E0E0">Windows</span></i><span style="background-color: #E0E0E0; font-style:italic">, and
-</span> <i><span style="background-color: #E0E0E0">OpenVMS.
-See </span><a href="#Suggestions-for-fstream">
-<span style="background-color: #E0E0E0">Suggestions for <code>&lt;fstream&gt;</code>
-implementations</span></a><span style="background-color: #E0E0E0"> for
-techniques to avoid breaking existing code in other environments, particularly
-on operating systems allowing slashes in filenames.</span></i></p>
-<p><span style="background-color: #FFFFFF">[<i>Note:</i> The
-&quot;do-the-right-thing&quot; rule from <a href="#Requirements-on-implementations">
-Requirements on implementations</a> does apply to header <code>&lt;fstream&gt;</code>.</span></p>
-<p><span style="background-color: #FFFFFF">The overloads
-below are specified as additions rather than replacements for existing
-functions. This preserves existing code (perhaps
-using a <a name="home-grown-path">home-grown path</a> class) that relies on an
-automatic conversion to <code>const char*</code>.<i> -- end note</i>]</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>In 27.8.1.1 Class template
-basic_filebuf [lib.filebuf] synopsis preceding paragraph 1, add the function:</i></span></p>
-<blockquote>
-<pre><span style="background-color: #FFFFFF">template &lt;class Path&gt; </span><span style="background-color: #FFFFFF">basic_filebuf</span><span style="background-color: #FFFFFF">&lt;charT,traits&gt;* </span><span style="background-color: #FFFFFF">open(const</span><span style="background-color: #FFFFFF"> Path&amp; p, </span><span style="background-color: #FFFFFF">ios_base::openmode</span><span style="background-color: #FFFFFF"> mode);</span></pre>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>In 27.8.1.3 Member functions [lib.filebuf.members],
-add the above to the signature preceding paragraph 2, and replace the
-sentence:</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF">It then opens a file, if possible,
-whose name is the NTBS s (“as if” by calling <code>std::fopen(s ,<i>modstr</i>
-))</code>.</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with:</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF">It then opens, if possible, the file
-that
-<code>p</code> or <code>path(s)</code> resolves to, “as if” by calling <code>std::fopen()</code> with a
-second argument of <i>modstr</i>.</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>In 27.8.1.5 Class template
-basic_ifstream [lib.ifstream] synopsis preceding paragraph 1, add the functions:</i></span></p>
-<blockquote>
- <pre><span style="background-color: #FFFFFF">template &lt;class Path&gt; explicit basic_ifstream(const Path&amp; p, ios_base::openmode mode = ios_base::in);
-template &lt;class Path&gt; void open(const Path&amp; p, ios_base::openmode mode = ios_base::in);</span></pre>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.6 basic_ifstream
-constructors [lib.ifstream.cons] </span></i>
-<span style="background-color: #FFFFFF"><i>add the above constructor to the signature preceding
-paragraph 2, and in paragraph 2 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode |
-ios_base::in)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode |
-ios_base::in)</code> or <code>rdbuf()-&gt;open(p, mode | ios_base::in)</code> as
-appropriate</span></p>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.7 Member functions [lib.ifstream.members]
-</span></i><span style="background-color: #FFFFFF"><i>add the above open
-function to the signature
-preceding paragraph 3, and in paragraph 3 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode |
-ios_base::in)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode |
-ios_base::in)</code> or <code>rdbuf()-&gt;open(p, mode | ios_base::in)</code> as
-appropriate</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>In 27.8.1.8 Class template
-basic_ofstream [lib.ofstream] synopsis preceding paragraph 1, add the
-
-functions:</i></span></p>
-<blockquote>
- <pre><span style="background-color: #FFFFFF">template &lt;class Path&gt; explicit basic_ofstream(const Path&amp; p, ios_base::openmode mode = ios_base::out);
-template &lt;class Path&gt; void open(const Path&amp; p, ios_base::openmode mode = ios_base::out);</span></pre>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.9 basic_ofstream
-constructors [lib.ofstream.cons] </span></i>
-<span style="background-color: #FFFFFF"><i>add the above constructor to the signature preceding
-paragraph 2, and in paragraph 2 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode |
-ios_base::out)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode |
-ios_base::out)</code> or <code>rdbuf()-&gt;open(p, mode | ios_base::out)</code> as
-appropriate</span></p>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.10 Member functions [lib.ofstream.members]
-</span></i><span style="background-color: #FFFFFF"><i>add the above open
-function to the signature
-preceding paragraph 3, and in paragraph 3 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode |
-ios_base::out)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode |
-ios_base::out)</code> or <code>rdbuf()-&gt;open(p, mode | ios_base::out)</code> as
-appropriate</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>In 27.8.1.11 Class template
-basic_fstream [lib.fstream] synopsis preceding paragraph 1, add the functions:</i></span></p>
-<blockquote>
- <pre><span style="background-color: #FFFFFF">template &lt;class Path&gt; explicit basic_fstream(const Path&amp; p, ios_base::openmode mode = ios_base::in|ios_base::out);
-template &lt;class Path&gt; void open(const Path&amp; p, ios_base::openmode mode = ios_base::in|ios_base::out);</span></pre>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.12 basic_fstream
-constructors [lib.fstream.cons] </span></i>
-<span style="background-color: #FFFFFF"><i>add the above constructor to the signature preceding
-paragraph 2, and in paragraph 2 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode)</code>
-or <code>rdbuf()-&gt;open(p, mode)</code> as appropriate</span></p>
-</blockquote>
-<p><i><span style="background-color: #FFFFFF">In 27.8.1.13 Member functions [lib.fstream.members]
-</span></i><span style="background-color: #FFFFFF"><i>add the above open
-function to the signature
-preceding paragraph 3, and in paragraph 3 replace</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(s, mode)</code></span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>with</i></span></p>
-<blockquote>
-<p><span style="background-color: #FFFFFF"><code>rdbuf()-&gt;open(path(s), mode)</code>
-or <code>rdbuf()-&gt;open(p, mode)</code> as appropriate</span></p>
-</blockquote>
-<p><span style="background-color: #FFFFFF"><i>End of proposed text.</i></span></p>
-<h2><a name="Path-decomposition-table">Path decomposition table</a></h2>
-<p>The table is generated by a program compiled with the Boost implementation.</p>
-<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i>
-implementations yield different results. The top value is the
-<i>POSIX</i> result and the bottom value is the <i>Windows</i> result. <br>
-&nbsp;<table border="1" cellspacing="0" cellpadding="5" width="1066">
-<p>
-<tr><td width="112"><b>Constructor<br>argument</b></td>
-<td width="160"><b>Elements found<br>by iteration</b></td>
-<td width="112"><b><code>string()</code></b></td>
-<td width="112"><code><b>file_<br>string()</b></td>
-<td width="72"><b><code>root_<br>path()<br>.string()</code></b></td>
-<td width="48"><b><code>root_<br>name()</code></b></td>
-<td width="88"><b><code>root_<br>directory()</code></b></td>
-<td width="96"><b><code>relative_<br>path()<br>.string()</code></b></td>
-<td width="72"><b><code>branch_<br>path()<br>.string()</code></b></td>
-<td width="72"><b><code>leaf()</code></b></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;&quot;</code></td>
-<td width="160"><code>&quot;&quot;</code></td>
-<td width="112"><code>&quot;&quot;</code></td>
-<td width="112"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;.&quot;</code></td>
-<td width="160"><code>&quot;.&quot;</code></td>
-<td width="112"><code>&quot;.&quot;</code></td>
-<td width="112"><code>&quot;.&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;.&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;..&quot;</code></td>
-<td width="160"><code>&quot;..&quot;</code></td>
-<td width="112"><code>&quot;..&quot;</code></td>
-<td width="112"><code>&quot;..&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;..&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;..&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/&quot;</code></td>
-<td width="160"><code>&quot;/&quot;</code></td>
-<td width="112"><code>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/&quot;<br>&quot;\&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/foo&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;/foo&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/foo&quot;<br>&quot;\foo&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/&quot;<br>&quot;foo\&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/foo/&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;/foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/foo/&quot;<br>&quot;\foo\&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;foo/&quot;</code></td>
-<td width="72"><code>&quot;/foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/bar&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/bar&quot;<br>&quot;foo\bar&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/bar&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/foo/bar&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;foo&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;/foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/foo/bar&quot;<br>&quot;\foo\bar&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;foo/bar&quot;</code></td>
-<td width="72"><code>&quot;/foo&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;///foo///&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;///foo///&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;///foo///&quot;<br>&quot;\foo\\\&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;foo///&quot;</code></td>
-<td width="72"><code>&quot;///foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;///foo///bar&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;foo&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;///foo///bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;///foo///bar&quot;<br>&quot;\foo\\\bar&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;foo///bar&quot;</code></td>
-<td width="72"><code>&quot;///foo&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/.&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;/.&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/.&quot;<br>&quot;\.&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;.&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;./&quot;</code></td>
-<td width="160"><code>&quot;.&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;./&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;./&quot;<br>&quot;.\&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;./&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;/..&quot;</code></td>
-<td width="160"><code>&quot;/&quot;,&quot;..&quot;</code></td>
-<td width="112"><code>&quot;/..&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;/..&quot;<br>&quot;\..&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;/&quot;</code></td>
-<td width="96"><code>&quot;..&quot;</code></td>
-<td width="72"><code>&quot;/&quot;</code></td>
-<td width="72"><code>&quot;..&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;../&quot;</code></td>
-<td width="160"><code>&quot;..&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;../&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;../&quot;<br>&quot;..\&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;../&quot;</code></td>
-<td width="72"><code>&quot;..&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/.&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;foo/.&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/.&quot;<br>&quot;foo\.&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/.&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/..&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;..&quot;</code></td>
-<td width="112"><code>&quot;foo/..&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/..&quot;<br>&quot;foo\..&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/..&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;..&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/./&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;.&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;foo/./&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/./&quot;<br>&quot;foo\.\&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/./&quot;</code></td>
-<td width="72"><code>&quot;foo/.&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/./bar&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;.&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;foo/./bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/./bar&quot;<br>&quot;foo\.\bar&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/./bar&quot;</code></td>
-<td width="72"><code>&quot;foo/.&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/..&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;..&quot;</code></td>
-<td width="112"><code>&quot;foo/..&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/..&quot;<br>&quot;foo\..&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/..&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-<td width="72"><code>&quot;..&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/../&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;..&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;foo/../&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/../&quot;<br>&quot;foo\..\&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/../&quot;</code></td>
-<td width="72"><code>&quot;foo/..&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;foo/../bar&quot;</code></td>
-<td width="160"><code>&quot;foo&quot;,&quot;..&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;foo/../bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;foo/../bar&quot;<br>&quot;foo\..\bar&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="48"><code>&quot;&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td width="96"><code>&quot;foo/../bar&quot;</code></td>
-<td width="72"><code>&quot;foo/..&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:&quot;</code></td>
-<td width="160"><code>&quot;c:&quot;</code></td>
-<td width="112"><code>&quot;c:&quot;</code></td>
-<td width="112"><code>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:&quot;<br>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;c:&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:&quot;,&quot;.&quot;<br>&quot;c:&quot;,&quot;/&quot;</code></td>
-<td width="112"><code>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code><span style="background-color: #99FF66">
-&quot;c:/&quot;<br>&quot;c:\&quot;</span></code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:/&quot;<br>&quot;&quot;</code></td>
-<td width="72"><code>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;.&quot;<br>&quot;/&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:foo&quot;<br>&quot;c:&quot;,&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:foo&quot;<br>&quot;foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:foo&quot;<br>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:/foo&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:&quot;,&quot;foo&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;c:/foo&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:/foo&quot;<br>&quot;c:\foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:/foo&quot;<br>&quot;foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:&quot;<br>&quot;c:/&quot;</code></td>
-<td width="72"><code>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:foo&quot;,&quot;.&quot;<br>&quot;c:&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;c:foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:foo/&quot;<br>&quot;c:foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:foo/&quot;<br>&quot;foo/&quot;</code></td>
-<td width="72"><code>&quot;c:foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:/foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:&quot;,&quot;foo&quot;,&quot;.&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td width="112"><code>&quot;c:/foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:/foo/&quot;<br>&quot;c:\foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:/foo/&quot;<br>&quot;foo/&quot;</code></td>
-<td width="72"><code>&quot;c:/foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:/foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:&quot;,&quot;foo&quot;,&quot;bar&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;,&quot;bar&quot;</code></td>
-<td width="112"><code>&quot;c:/foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:/foo/bar&quot;<br>&quot;c:\foo\bar&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:/foo/bar&quot;<br>&quot;foo/bar&quot;</code></td>
-<td width="72"><code>&quot;c:/foo&quot;</code></td>
-<td width="72"><code>&quot;bar&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;prn:&quot;</code></td>
-<td width="160"><code>&quot;prn:&quot;</code></td>
-<td width="112"><code>&quot;prn:&quot;</code></td>
-<td width="112"><code>&quot;prn:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;prn:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;prn:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;prn:&quot;<br>&quot;&quot;</code></td>
-<td width="72"><code>&quot;&quot;</code></td>
-<td width="72"><code>&quot;prn:&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:\&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:\&quot;<br>&quot;c:&quot;,&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:\&quot;<br>&quot;c:/&quot;</code></td>
-<td width="112"><code>&quot;c:\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:\&quot;<br>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:\&quot;<br>&quot;/&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:foo&quot;<br>&quot;c:&quot;,&quot;foo&quot;</code></td>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td width="112"><code>&quot;c:foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:foo&quot;<br>&quot;foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:foo&quot;<br>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:\foo&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:\foo&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:\foo&quot;<br>&quot;c:/foo&quot;</code></td>
-<td width="112"><code>&quot;c:\foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:\foo&quot;<br>&quot;foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:\foo&quot;<br>&quot;foo&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:foo\&quot;<br>&quot;c:&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:foo\&quot;<br>&quot;c:foo/&quot;</code></td>
-<td width="112"><code>&quot;c:foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td width="88"><code>&quot;&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:foo\&quot;<br>&quot;foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:foo\&quot;<br>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:\foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:\foo\&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:\foo\&quot;<br>&quot;c:/foo/&quot;</code></td>
-<td width="112"><code>&quot;c:\foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:\foo\&quot;<br>&quot;foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:\foo\&quot;<br>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:\foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:\foo&quot;,&quot;.&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;,&quot;.&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:\foo/&quot;<br>&quot;c:/foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:\foo/&quot;<br>&quot;c:\foo\&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:\foo/&quot;<br>&quot;foo/&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:\foo&quot;<br>&quot;c:/foo&quot;</code></td>
-<td width="72"><code>&quot;.&quot;</code></td>
-</tr>
-<tr>
-<td width="112"><code>&quot;c:/foo\bar&quot;</code></td>
-<td bgcolor="#99FF66" width="160"><code>&quot;c:&quot;,&quot;foo\bar&quot;<br>&quot;c:&quot;,&quot;/&quot;,&quot;foo&quot;,&quot;bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:/foo\bar&quot;<br>&quot;c:/foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="112"><code>&quot;c:/foo\bar&quot;<br>&quot;c:\foo\bar&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;&quot;<br>&quot;c:/&quot;</code></td>
-<td bgcolor="#99FF66" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" width="48"><code>
-&quot;&quot;<br>&quot;c:&quot;</code></td>
-<td bgcolor="#99FF66" width="88"><code>&quot;&quot;<br>&quot;/&quot;</code></td>
-<td bgcolor="#99FF66" width="96"><code>&quot;c:/foo\bar&quot;<br>&quot;foo/bar&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;c:&quot;<br>&quot;c:/foo&quot;</code></td>
-<td bgcolor="#99FF66" width="72"><code>&quot;foo\bar&quot;<br>&quot;bar&quot;</code></td>
-</tr>
-</table>
-<h2><a name="Suggestions-for-fstream">Suggestions for <code>&lt;fstream&gt;</code></a>
-implementations</h2>
-<p><span style="background-color: #FFFFFF">The change in semantics to functions
-taking <code>const char*</code> arguments can break existing code, but only on
-operating systems where implementations don't
-implicitly accept native format pathnames or
-operating systems that allow slashes in filenames. Thus on <i>POSIX</i>,
-<i>Windows,</i> and <i>OpenVMS</i>, for example, there is no problem if the
-implementation follows encouraged behavior.</span></p>
-<p><span style="background-color: #FFFFFF">For most of the Filesystem Library,
-there is no existing code, so the issue preserving existing code that uses
-slashes in filenames doesn't arise. New code simply must use basic_path
-constructors with <code>path_format_t</code> arguments of <code>native</code>.
-To preserve existing fstream code that uses slashes in filenames, an
-implementation may wish to provide a mechanism such as a macro to control
-selection of the old behavior.</span></p>
-<p><span style="background-color: #FFFFFF">Implementations are already required
-by the TR front-matter to provide a mechanism such as a macro to control
-selection of the old behavior (useful to guarantee protection of existing code)
-or new behavior (useful in new code, and code being ported from other systems)
-for headers. Because use of the rest of the Filesystem Library is independent of
-use of the <code>&lt;fstream&gt;</code> additions, affected implementations are
-encouraged to allow disabling the <code>&lt;fstream&gt;</code> additions separately
-from other TR features.</span></p>
-<p><span style="background-color: #FFFFFF">An rejected alternative was to supply
-new fstream classes in namespace <code>sys</code>, inheriting from the current
-classes, overriding the constructors and opens taking pathname arguments, and
-providing the additional overloads. In Lillehammer LWG members indicated lack of
-support for this alternative, feeling that costs outweigh benefits.</span></p>
-<h2><a name="Issues">Issues</a></h2>
-<h3>1. Return type of certain basic_path members returning strings. [Howard
-Hinnant]</h3>
-<p>For member functions described as returning &quot;<code>const string_type</code>&quot;
-or &quot;<code>const external_string_type</code>&quot;, implementations are permitted to
-return &quot;<code>const string_type&amp;</code>&quot; or&nbsp; &quot;<code>const
-external_string_type&amp;</code>&quot; respectively.</p>
-<p>This allows implementations to avoid unnecessary copies. Return-by-value is
-specified as
-<code>const</code> to ensure programs won't break if moved to a
-return-by-reference implementation.</p>
-<p>For example, the Boost implementation keeps the internal representation of a
-pathname in the portable format, so string() returns by reference and is inlined:</p>
-<blockquote>
- <pre>const string_type &amp; string() const { return m_path; }</pre>
-</blockquote>
-<p>Howard Hinnant comments: This may inhibit optimization if rvalue reference is
-accepted.&nbsp; Const-qualified return types can't be moved from.&nbsp; I'd
-rather see either the return type specified as
-<code>const string_type&amp;</code> or <code>string_type</code>.</p>
-<p>Beman Dawes comments: I can't make up my mind. Removing the const will bite
-users, but not very often. OTOH, excessive copying is a real concern, and if
-move semantics can alleviate that, I'm all for it. What does the LWG think?</p>
-<h3>2. Basic_path canonize() and normalize() removed. [Beman Dawes]</h3>
-<p>The Boost implementation has basic_path functions canonize() and normalize()
-which return cleaned up string representations of a pathname. They have been
-removed from the proposal as messy to specify and implement, not hugely useful,
-and possible to implement by users as non-member functions without any loss of
-functionality or efficiency. There was also a concern the proposal was getting a
-bit large.</p>
-<p>These functions can be added later as convenience functions if the LWG so
-desires..</p>
-<h3>3. Filename checking functions. [Beman Dawes]</h3>
-<p>Boost has a set of predicate functions that determine if a filename is valid
-for a particular operating or system. These can be used as building blocks for
-functions that determine if an entire pathname is valid for a particular
-operating or file system.</p>
-<p>Users can use these functions to ensure that pathnames are in fact portable
-to target operating or file systems, without having to actually test on the
-target systems.</p>
-<p>These functions are not included in the proposal because of lack of time, and
-uncertainty as to their fit with the Standard Library. They can be added later
-if the LWG so desires.</p>
-<h2><a name="Acknowledgements">Acknowledgements</a></h2>
-<p>This Filesystem Library is dedicated to my wife, Sonda, who provided the
-support necessary to see both a trial implementation and the proposal itself
-through to completion. She gave me the strength to continue after a difficult
-year of cancer treatment in the middle of it all.</p>
-<p>Many people contributed technical comments, ideas, and suggestions to the
-Boost Filesystem Library. See
-<a href="http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements">
-http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements>.</p>
-<p>Dietmar Kühl contributed the original Boost Filesystem Library
-directory_iterator design. Peter Dimov, Walter Landry, Rob Stewart, and Thomas
-Witt were particularly helpful in refining the library.</p>
-<p>The create_directories, extension, basename, and replace_extension functions
-were developed by Vladimir Prus.</p>
-<p>Howard Hinnant and John Maddock reviewed a draft of the proposal, and
-identified a number of mistakes or weaknesses, resulting in a more polished
-final document.</p>
-<h2><a name="References">References</a></h2>
-<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="16%" valign="top">[<a name="ISO_POSIX">ISO-POSIX</a>]</td>
- <td width="84%">ISO/IEC 9945:2003, IEEE&nbsp;Std&nbsp;1003.1-2001, and The Open Group
- Base Specifications, Issue 6. Also known as The Single Unix<font face="Times New Roman">®
- Specification, Version 3. Available from each of the organizations involved
- in its creation. For example, read online or download from
- <a href="
http://www.unix.org/single_unix_specification/">
- www.unix.org/single_unix_specification/</a>.</font> The ISO JTC1/SC22/WG15 -
- POSIX homepage is <a href="http://www.open-std.org/jtc1/sc22/WG15/">
- www.open-std.org/jtc1/sc22/WG15/</a></td>
- </tr>
- <tr>
- <td width="16%" valign="top">[Abrahams]</td>
- <td width="84%">Dave Abrahams, Error and Exception Handling,
- <a href="http://www.boost.org/more/error_handling.html">
- www.boost.org/more/error_handling.html</a></td>
- </tr>
-</table>
-<h2><a name="Revision-History">Revision History</a></h2>
-<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="11%" valign="top">
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1841.html">
- N1841</a></td>
- <td width="89%">
- <ul>
- <li>Initial version, August, 2005, pre-Tremblant mailing</li>
- </ul>
- </td>
- </tr>
- <tr>
- <td width="11%" valign="top" bgcolor="#FFFFFF">
- <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1889.html">
- N1889</a><br>
- Revision 1</td>
- <td width="89%" bgcolor="#FFFFFF">
- <ul>
- <li>Missing argument name <code>fmt</code> added to several <code>
- basic_path</code> members.</li>
- <li> <code>is_empty()</code> name discrepancy between synopsis and
- description corrected.</li>
- <li><code>file_size()</code> return type changed from <code>intmax_t</code>
- to <code>uintmax_t</code>.&nbsp; Wording slightly clarified.</li>
- <li><code>struct space_info</code> and non-member function <code>space()</code>
- added.</li>
- <li>A paragraph was added to <b><i>Important design decisions</i></b>
- mentioning the need for both portable and platform specific semantics.</li>
- </ul>
- </td>
- </tr>
- <tr>
- <td width="11%" valign="top" bgcolor="#FFFFFF">
- N1934<br>
- Revision 2</td>
- <td width="89%" bgcolor="#FFFFFF">
- <ul>
- <li>Changed native path identification from constructor argument to
- <code>&quot;//:&quot;</code> escape prefix. Rationale: simplifies basic_path
- constructor interfaces, easier use for platforms needing explicit native
- format identification.</li>
- <li>Introduced a new base class, filesystem_error, to<span style="background-color: #FFFFFF">
- allow users to catch a single exception type if desired, or to deal with
- the case where the templated type is unknown. Rename filesystem_error and
- wfilesystem_error accordingly.</span></li>
- <li><span style="background-color: #FFFFFF">Rewording
- basic_filesystem_error text to more closely follow the form of clause 19
- of the standard.</span></li>
- <li><span style="background-color: #FFFFFF">Removed dual specification of
- certain errors in both &quot;Reguires&quot; and &quot;Throws&quot; paragraphs. Since throwing
- an exception is well-defined behavior, the error condition does not result
- in undefined behavior as implied by &quot;Requires&quot;. (Suggested by Dave
- Abrahams)</span></li>
- <li><span style="background-color: #FFFFFF">Added a non-throwing version
- of create_hard_link().</span></li>
- <li><span style="background-color: #FFFFFF">Added two create_symlink()
- functions.</span></li>
- <li><span style="background-color: #FFFFFF">Added basic_path inserter and
- extractor. (Suggested by Vladimir Prus)</span></li>
- <li><span style="background-color: #FFFFFF">Added basic_path member and
- non-member swap() functions.</span></li>
- <li><span style="background-color: #FFFFFF">Aligned basic_path operator
- functions with std::basic_string practice. </span></li>
- <li><span style="background-color: #FFFFFF">Replaced status_flags with
- file_type enum and file_status class to improve encapsulation and allow
- for future expansion of file_status.</span></li>
- <li><span style="background-color: #FFFFFF">Added predicate functions
- overloaded on file_status (Suggested by Martin Adrian). This change,
- coupled with the introduction of file_status, clarifies the meaning of
- file types and related predicate operations, and eliminates the need for
- user bit manipulation, which was a source of user error.</span></li>
- <li><span style="background-color: #FFFFFF">Predicate function
- specification clarified accordingly.</span></li>
- <li><span style="background-color: #FFFFFF">Revised and explicitly
- documented policy for non-throwing versions of functions to increase
- consistency.</span></li>
- <li><span style="background-color: #FFFFFF">Added basic_directory_iterator
- constructor non-throwing overload (Suggested by Martin Adrian).</span></li>
- <li><span style="background-color: #FFFFFF">Changed symlink awareness to
- separately name functions to cut clutter caused by addition of
- non-throwing overloads.</span></li>
- </ul>
- </td>
- </tr>
- </table>
-<hr>
-<p>© Copyright Beman Dawes, 2002-2006</p>
-<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y-%m-%d" startspan -->2006-02-06<!--webbot bot="Timestamp" endspan i-checksum="12142" --></p>
-
-</body>
-
-</html>
\ No newline at end of file

Modified: branches/release/libs/filesystem/example/Jamfile.v2
==============================================================================
--- branches/release/libs/filesystem/example/Jamfile.v2 (original)
+++ branches/release/libs/filesystem/example/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
-# Boost System Library Build Jamfile
-
-# (C) Copyright Beman Dawes 2002, 2006
+# Boost Filesystem Library Example Jamfile
+
+# (C) Copyright Vladimir Prus 2003
 
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)

Modified: branches/release/libs/filesystem/example/mbpath.cpp
==============================================================================
--- branches/release/libs/filesystem/example/mbpath.cpp (original)
+++ branches/release/libs/filesystem/example/mbpath.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
 // Boost.Filesystem mbpath.hpp ---------------------------------------------//
 
-// Copyright Beman Dawes 2005
+// © Copyright Beman Dawes 2005
 
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -46,7 +46,7 @@
       boost::throw_exception<fs::basic_filesystem_error<mbpath> >(
         fs::basic_filesystem_error<mbpath>(
           "user::mbpath::to_external conversion error",
- ph, EINVAL ) );
+ ph, boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) );
     *to_next = '\0';
     return external_string_type( work.get() );
   }
@@ -64,7 +64,8 @@
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
         boost::throw_exception<fs::basic_filesystem_error<mbpath> >(
           fs::basic_filesystem_error<mbpath>(
- "user::mbpath::to_internal conversion error", EINVAL ) );
+ "user::mbpath::to_internal conversion error",
+ boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) );
       *to_next = L'\0';
       return internal_string_type( work.get() );
   }

Modified: branches/release/libs/filesystem/src/operations.cpp
==============================================================================
--- branches/release/libs/filesystem/src/operations.cpp (original)
+++ branches/release/libs/filesystem/src/operations.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -2,12 +2,11 @@
 
 // Copyright 2002-2005 Beman Dawes
 // Copyright 2001 Dietmar Kuehl
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
+// at http://www.boost.org/LICENSE_1_0.txt)
 
-// Distributed under the 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/
+// See library home page at http://www.boost.org/libs/filesystem
 
 //----------------------------------------------------------------------------//
 
@@ -24,9 +23,8 @@
 
 #if !(defined(__HP_aCC) && defined(_ILP32) && \
       !defined(_STATVFS_ACPP_PROBLEMS_FIXED))
-# define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
+#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
 #endif
-
 #define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX
       // 64-bit systems or on 32-bit systems which don't have files larger
       // than can be represented by a traditional POSIX/UNIX off_t type.
@@ -51,33 +49,38 @@
 #include <boost/detail/workaround.hpp>
 
 namespace fs = boost::filesystem;
+using boost::system::error_code;
+using boost::system::system_category;
 
 # if defined(BOOST_WINDOWS_API)
-# include "windows.h"
+# include <windows.h>
 # if defined(__BORLANDC__) || defined(__MWERKS__)
 # if defined(__BORLANDC__)
         using std::time_t;
 # endif
-# include "utime.h"
+# include <utime.h>
 # else
-# include "sys/utime.h"
+# include <sys/utime.h>
 # endif
 
 # else // BOOST_POSIX_API
 # include <sys/types.h>
-# ifndef __APPLE__
+# if !defined(__APPLE__) && !defined(__OpenBSD__)
 # include <sys/statvfs.h>
 # define BOOST_STATVFS statvfs
 # define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
 # else
+#ifdef __OpenBSD__
+# include <sys/param.h>
+#endif
 # include <sys/mount.h>
 # define BOOST_STATVFS statfs
 # define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>( vfs.f_bsize )
 # endif
-# include "dirent.h"
-# include "unistd.h"
-# include "fcntl.h"
-# include "utime.h"
+# include <dirent.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <utime.h>
 # include "limits.h"
 # endif
 
@@ -107,7 +110,7 @@
 
 namespace
 {
- static const fs::directory_iterator end_itr;
+ const fs::directory_iterator end_itr;
   bool is_empty_directory( const std::string & dir_path )
   {
     return fs::directory_iterator(fs::path(dir_path)) == end_itr;
@@ -128,7 +131,7 @@
   inline DWORD get_file_attributes( const wchar_t * ph )
     { return ::GetFileAttributesW( ph ); }
 
- static const fs::wdirectory_iterator wend_itr;
+ const fs::wdirectory_iterator wend_itr;
   bool is_empty_directory( const std::wstring & dir_path )
   {
     return fs::wdirectory_iterator(fs::wpath(dir_path)) == wend_itr;
@@ -151,6 +154,9 @@
   inline DWORD get_current_directory( DWORD sz, wchar_t * buf )
     { return ::GetCurrentDirectoryW( sz, buf ); }
 
+ inline bool set_current_directory( const wchar_t * buf )
+ { return ::SetCurrentDirectoryW( buf ) != 0 ; }
+
   inline bool get_free_disk_space( const std::wstring & ph,
     PULARGE_INTEGER avail, PULARGE_INTEGER total, PULARGE_INTEGER free )
     { return ::GetDiskFreeSpaceExW( ph.c_str(), avail, total, free ) != 0; }
@@ -181,24 +187,32 @@
 # endif // ifndef BOOST_FILESYSTEM_NARROW_ONLY
 
   template< class String >
- fs::file_status status_template( const String & ph, fs::system_error_type & ec )
+ fs::file_status status_template( const String & ph, error_code & ec )
   {
     DWORD attr( get_file_attributes( ph.c_str() ) );
     if ( attr == 0xFFFFFFFF )
     {
- ec = ::GetLastError();
- if ((ec == ERROR_FILE_NOT_FOUND)
- || (ec == ERROR_PATH_NOT_FOUND)
- || (ec == ERROR_INVALID_NAME) // "tools/jam/src/:sys:stat.h", "//foo"
- || (ec == ERROR_INVALID_PARAMETER) // ":sys:stat.h"
- || (ec == ERROR_BAD_NETPATH))
+ ec = error_code( ::GetLastError(), system_category );
+ if ((ec.value() == ERROR_FILE_NOT_FOUND)
+ || (ec.value() == ERROR_PATH_NOT_FOUND)
+ || (ec.value() == ERROR_INVALID_NAME) // "tools/jam/src/:sys:stat.h", "//foo"
+ || (ec.value() == ERROR_INVALID_PARAMETER) // ":sys:stat.h"
+ || (ec.value() == ERROR_BAD_PATHNAME) // "//nosuch" on Win64
+ || (ec.value() == ERROR_BAD_NETPATH)) // "//nosuch" on Win32
       {
- ec = 0; // these are not considered errors
+ ec = error_code(); // these are not considered errors;
+ // the status is considered not found
         return fs::file_status( fs::file_not_found );
       }
+ else if ((ec.value() == ERROR_SHARING_VIOLATION))
+ {
+ ec = error_code(); // these are not considered errors;
+ // the file exists but the type is not known
+ return fs::file_status( fs::type_unknown );
+ }
       return fs::file_status( fs::status_unknown );
     }
- ec = 0;
+ ec = error_code();;
     return (attr & FILE_ATTRIBUTE_DIRECTORY)
       ? fs::file_status( fs::directory_file )
       : fs::file_status( fs::regular_file );
@@ -214,8 +228,8 @@
   {
     WIN32_FILE_ATTRIBUTE_DATA fad;
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( ::GetLastError(), false );
- return std::make_pair( 0,
+ return std::make_pair( error_code( ::GetLastError(), system_category ), false );
+ return std::make_pair( error_code(),
       ( fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
         ? is_empty_directory( ph )
         :( !fad.nFileSizeHigh && !fad.nFileSizeLow ) );
@@ -281,21 +295,21 @@
     {
       if ( p1.handle != INVALID_HANDLE_VALUE
         || p2.handle != INVALID_HANDLE_VALUE )
- { return std::make_pair( 0, false ); }
+ { return std::make_pair( error_code(), false ); }
       assert( p1.handle == INVALID_HANDLE_VALUE
         && p2.handle == INVALID_HANDLE_VALUE );
- { return std::make_pair( error1, false ); }
+ { return std::make_pair( error_code( error1, system_category), false ); }
     }
     // at this point, both handles are known to be valid
     BY_HANDLE_FILE_INFORMATION info1, info2;
     if ( !::GetFileInformationByHandle( p1.handle, &info1 ) )
- { return std::make_pair( ::GetLastError(), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
     if ( !::GetFileInformationByHandle( p2.handle, &info2 ) )
- { return std::make_pair( ::GetLastError(), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
     // In theory, volume serial numbers are sufficient to distinguish between
     // devices, but in practice VSN's are sometimes duplicated, so last write
     // time and file size are also checked.
- return std::make_pair( 0,
+ return std::make_pair( error_code(),
         info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber
         && info1.nFileIndexHigh == info2.nFileIndexHigh
         && info1.nFileIndexLow == info2.nFileIndexLow
@@ -314,10 +328,10 @@
     WIN32_FILE_ATTRIBUTE_DATA fad;
     // by now, intmax_t is 64-bits on all Windows compilers
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( ::GetLastError(), 0 );
+ return std::make_pair( error_code( ::GetLastError(), system_category ), 0 );
     if ( (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=0 )
- return std::make_pair( ERROR_FILE_NOT_FOUND, 0 );
- return std::make_pair( 0,
+ return std::make_pair( error_code( ERROR_FILE_NOT_FOUND, system_category), 0 );
+ return std::make_pair( error_code(),
       (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
         << (sizeof(fad.nFileSizeLow)*8))
       + fad.nFileSizeLow );
@@ -335,7 +349,7 @@
     boost::filesystem::detail::space_pair result;
     if ( get_free_disk_space( ph, &avail, &total, &free ) )
     {
- result.first = 0;
+ result.first = error_code();
       result.second.capacity
         = (static_cast<boost::uintmax_t>(total.HighPart) << 32)
           + total.LowPart;
@@ -348,7 +362,7 @@
     }
     else
     {
- result.first = ::GetLastError();
+ result.first = error_code( ::GetLastError(), system_category );
       result.second.capacity = result.second.free
         = result.second.available = 0;
     }
@@ -359,7 +373,7 @@
     { return ::GetCurrentDirectoryA( sz, buf ); }
 
   template< class String >
- boost::filesystem::system_error_type
+ error_code
   get_current_path_template( String & ph )
   {
     DWORD sz;
@@ -369,9 +383,20 @@
     typedef typename String::value_type value_type;
     boost::scoped_array<value_type> buf( new value_type[sz] );
     if ( get_current_directory( sz, buf.get() ) == 0 )
- return ::GetLastError();
+ return error_code( ::GetLastError(), system_category );
     ph = buf.get();
- return 0;
+ return error_code();
+ }
+
+ inline bool set_current_directory( const char * buf )
+ { return ::SetCurrentDirectoryA( buf ) != 0; }
+
+ template< class String >
+ error_code
+ set_current_path_template( const String & ph )
+ {
+ return error_code( set_current_directory( ph.c_str() )
+ ? 0 : ::GetLastError(), system_category );
   }
 
   inline std::size_t get_full_path_name(
@@ -385,31 +410,31 @@
   const std::size_t buf_size( 128 );
 
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   get_full_path_name_template( const String & ph, String & target )
   {
     typename String::value_type buf[buf_size];
     typename String::value_type * pfn;
     std::size_t len = get_full_path_name( ph,
       buf_size , buf, &pfn );
- if ( len == 0 ) return ::GetLastError();
+ if ( len == 0 ) return error_code( ::GetLastError(), system_category );
     if ( len > buf_size )
     {
       typedef typename String::value_type value_type;
       boost::scoped_array<value_type> big_buf( new value_type[len] );
       if ( (len=get_full_path_name( ph, len , big_buf.get(), &pfn ))
- == 0 ) return ::GetLastError();
+ == 0 ) return error_code( ::GetLastError(), system_category );
       big_buf[len] = '\0';
       target = big_buf.get();
- return 0;
+ return error_code();
     }
     buf[len] = '\0';
     target = buf;
- return 0;
+ return error_code();
   }
 
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   get_file_write_time( const String & ph, FILETIME & last_write_time )
   {
     handle_wrapper hw(
@@ -417,13 +442,13 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return ::GetLastError();
- return ::GetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError();
+ return error_code( ::GetLastError(), system_category );
+ return error_code( ::GetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
+ ? 0 : ::GetLastError(), system_category );
   }
 
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   set_file_write_time( const String & ph, const FILETIME & last_write_time )
   {
     handle_wrapper hw(
@@ -431,9 +456,9 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return ::GetLastError();
- return ::SetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError();
+ return error_code( ::GetLastError(), system_category );
+ return error_code( ::SetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
+ ? 0 : ::GetLastError(), system_category );
   }
 
   // these constants come from inspecting some Microsoft sample code
@@ -468,13 +493,13 @@
   last_write_time_template( const String & ph )
   {
     FILETIME lwt;
- boost::filesystem::system_error_type result
- = get_file_write_time( ph, lwt );
- return std::make_pair( result, to_time_t( lwt ) );
+ error_code ec(
+ get_file_write_time( ph, lwt ) );
+ return std::make_pair( ec, to_time_t( lwt ) );
   }
 
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   last_write_time_template( const String & ph, const std::time_t new_time )
   {
     FILETIME lwt;
@@ -489,22 +514,22 @@
     { return ::DeleteFileA( ph.c_str() ) != 0; }
   
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   remove_template( const String & ph )
   {
- fs::system_error_type ec;
+ error_code ec;
     fs::file_status sf( fs::detail::status_api( ph, ec ) );
     if ( ec ) return ec;
     if ( fs::is_directory( sf ) )
     {
       if ( !remove_directory( ph ) )
- return ::GetLastError();
+ return error_code(::GetLastError(), system_category);
     }
     else
     {
- if ( !delete_file( ph ) ) return ::GetLastError();
+ if ( !delete_file( ph ) ) return error_code(::GetLastError(), system_category);
     }
- return 0;
+ return error_code();
   }
 
   inline bool create_directory( const std::string & dir )
@@ -514,13 +539,13 @@
   boost::filesystem::detail::query_pair
   create_directory_template( const String & dir_ph )
   {
- boost::filesystem::system_error_type error(0), dummy;
+ error_code error, dummy;
     if ( create_directory( dir_ph ) ) return std::make_pair( error, true );
- error = ::GetLastError();
+ error = error_code( ::GetLastError(), system_category );
     // an error here may simply mean the postcondition is already met
- if ( error == ERROR_ALREADY_EXISTS
+ if ( error.value() == ERROR_ALREADY_EXISTS
       && fs::is_directory( fs::detail::status_api( dir_ph, dummy ) ) )
- return std::make_pair( 0, false );
+ return std::make_pair( error_code(), false );
     return std::make_pair( error, false );
   }
 
@@ -532,12 +557,12 @@
   
 #if _WIN32_WINNT >= 0x500
   template<class String>
- boost::filesystem::system_error_type
+ error_code
   create_hard_link_template( const String & to_ph,
     const String & from_ph )
   {
- return fs::system_error_type( create_hard_link( to_ph.c_str(), from_ph.c_str() )
- ? 0 : ::GetLastError() );
+ return error_code( create_hard_link( to_ph.c_str(), from_ph.c_str() )
+ ? 0 : ::GetLastError(), system_category );
   }
 #endif
 
@@ -551,14 +576,17 @@
     namespace detail
     {
 
-#if defined(BOOST_WINDOWS_API)
- BOOST_FILESYSTEM_DECL system_error_type not_found_error = ERROR_PATH_NOT_FOUND;
-#else
- BOOST_FILESYSTEM_DECL system_error_type not_found_error = ENOENT;
-#endif
-
 // free functions ----------------------------------------------------------//
 
+ BOOST_FILESYSTEM_DECL error_code not_found_error()
+ {
+# ifdef BOOST_WINDOWS_API
+ return error_code(ERROR_PATH_NOT_FOUND, system_category);
+# else
+ return error_code(ENOENT, system_category);
+# endif
+ }
+
       BOOST_FILESYSTEM_DECL bool possible_large_file_size_support()
       {
 # ifdef BOOST_POSIX_API
@@ -572,13 +600,13 @@
 # ifdef BOOST_WINDOWS_API
 
       BOOST_FILESYSTEM_DECL fs::file_status
- status_api( const std::string & ph, fs::system_error_type & ec )
+ status_api( const std::string & ph, error_code & ec )
         { return status_template( ph, ec ); }
 
 # ifndef BOOST_FILESYSTEM_NARROW_ONLY
 
       BOOST_FILESYSTEM_DECL fs::file_status
- status_api( const std::wstring & ph, fs::system_error_type & ec )
+ status_api( const std::wstring & ph, error_code & ec )
         { return status_template( ph, ec ); }
 
       BOOST_FILESYSTEM_DECL bool symbolic_link_exists_api( const std::wstring & )
@@ -602,11 +630,16 @@
         { return space_template( ph ); }
 
       BOOST_FILESYSTEM_DECL
- boost::filesystem::system_error_type
+ error_code
       get_current_path_api( std::wstring & ph )
         { return get_current_path_template( ph ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL
+ error_code
+ set_current_path_api( const std::wstring & ph )
+ { return set_current_path_template( ph ); }
+
+ BOOST_FILESYSTEM_DECL error_code
         get_full_path_name_api( const std::wstring & ph, std::wstring & target )
          { return get_full_path_name_template( ph, target ); }
 
@@ -614,7 +647,7 @@
         last_write_time_api( const std::wstring & ph )
           { return last_write_time_template( ph ); }
  
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
         last_write_time_api( const std::wstring & ph, std::time_t new_value )
           { return last_write_time_template( ph, new_value ); }
 
@@ -623,32 +656,32 @@
         { return create_directory_template( ph ); }
 
 #if _WIN32_WINNT >= 0x500
- BOOST_FILESYSTEM_DECL fs::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       create_hard_link_api( const std::wstring & to_ph,
         const std::wstring & from_ph )
         { return create_hard_link_template( to_ph, from_ph ); }
 #endif
       
- BOOST_FILESYSTEM_DECL fs::system_error_type
- create_symlink_api( const std::wstring & to_ph,
- const std::wstring & from_ph )
- { return ERROR_NOT_SUPPORTED; }
+ BOOST_FILESYSTEM_DECL error_code
+ create_symlink_api( const std::wstring & /*to_ph*/,
+ const std::wstring & /*from_ph*/ )
+ { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::wstring & ph ) { return remove_template( ph ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       rename_api( const std::wstring & from, const std::wstring & to )
       {
- return ::MoveFileW( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError();
+ return error_code( ::MoveFileW( from.c_str(), to.c_str() )
+ ? 0 : ::GetLastError(), system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::wstring & from, const std::wstring & to )
       {
- return ::CopyFileW( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
- ? 0 : ::GetLastError();
+ return error_code( ::CopyFileW( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ ? 0 : ::GetLastError(), system_category );
       }
 
       BOOST_FILESYSTEM_DECL bool create_file_api( const std::wstring & ph,
@@ -709,7 +742,7 @@
         return narrow_short_form;
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_first( void *& handle, const std::wstring & dir,
         std::wstring & target, file_status & sf, file_status & symlink_sf )
       {
@@ -723,17 +756,17 @@
           == INVALID_HANDLE_VALUE )
         {
           handle = 0;
- return ::GetLastError() == ERROR_FILE_NOT_FOUND
- ? 0 : ::GetLastError();
+ return error_code( ::GetLastError() == ERROR_FILE_NOT_FOUND
+ ? 0 : ::GetLastError(), system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
           { sf.type( directory_file ); symlink_sf.type( directory_file ); }
         else { sf.type( regular_file ); symlink_sf.type( regular_file ); }
- return 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_increment( void *& handle, std::wstring & target,
         file_status & sf, file_status & symlink_sf )
       {
@@ -742,13 +775,13 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error == ERROR_NO_MORE_FILES ? 0 : error;
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
           { sf.type( directory_file ); symlink_sf.type( directory_file ); }
         else { sf.type( regular_file ); symlink_sf.type( regular_file ); }
- return 0;
+ return error_code();
       }
 
 # endif // ifndef BOOST_FILESYSTEM_NARROW_ONLY
@@ -775,11 +808,16 @@
         { return space_template( ph ); }
 
       BOOST_FILESYSTEM_DECL
- boost::filesystem::system_error_type
+ error_code
       get_current_path_api( std::string & ph )
         { return get_current_path_template( ph ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL
+ error_code
+ set_current_path_api( const std::string & ph )
+ { return set_current_path_template( ph ); }
+
+ BOOST_FILESYSTEM_DECL error_code
         get_full_path_name_api( const std::string & ph, std::string & target )
          { return get_full_path_name_template( ph, target ); }
 
@@ -787,7 +825,7 @@
         last_write_time_api( const std::string & ph )
           { return last_write_time_template( ph ); }
  
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
         last_write_time_api( const std::string & ph, std::time_t new_value )
           { return last_write_time_template( ph, new_value ); }
 
@@ -796,35 +834,37 @@
         { return create_directory_template( ph ); }
 
 #if _WIN32_WINNT >= 0x500
- BOOST_FILESYSTEM_DECL fs::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       create_hard_link_api( const std::string & to_ph,
         const std::string & from_ph )
- { return system_error_type( create_hard_link_template( to_ph, from_ph ) ); }
+ {
+ return create_hard_link_template( to_ph, from_ph );
+ }
 #endif
 
- BOOST_FILESYSTEM_DECL fs::system_error_type
- create_symlink_api( const std::string & to_ph,
- const std::string & from_ph )
- { return ERROR_NOT_SUPPORTED; }
+ BOOST_FILESYSTEM_DECL error_code
+ create_symlink_api( const std::string & /*to_ph*/,
+ const std::string & /*from_ph*/ )
+ { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::string & ph ) { return remove_template( ph ); }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       rename_api( const std::string & from, const std::string & to )
       {
- return ::MoveFileA( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError();
+ return error_code( ::MoveFileA( from.c_str(), to.c_str() )
+ ? 0 : ::GetLastError(), system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::string & from, const std::string & to )
       {
- return ::CopyFileA( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
- ? 0 : ::GetLastError();
+ return error_code( ::CopyFileA( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ ? 0 : ::GetLastError(), system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_first( void *& handle, const std::string & dir,
         std::string & target, file_status & sf, file_status & symlink_sf )
       // Note: an empty root directory has no "." or ".." entries, so this
@@ -842,29 +882,29 @@
           == INVALID_HANDLE_VALUE )
         {
           handle = 0;
- return ::GetLastError() == ERROR_FILE_NOT_FOUND
- ? 0 : ::GetLastError();
+ return error_code( ::GetLastError() == ERROR_FILE_NOT_FOUND
+ ? 0 : ::GetLastError(), system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
           { sf.type( directory_file ); symlink_sf.type( directory_file ); }
         else { sf.type( regular_file ); symlink_sf.type( regular_file ); }
- return 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_close( void *& handle )
       {
         if ( handle != 0 )
         {
           bool ok = ::FindClose( handle ) != 0;
           handle = 0;
- return ok ? 0 : ::GetLastError();
+ return error_code( ok ? 0 : ::GetLastError(), system_category );
         }
- return 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_increment( void *& handle, std::string & target,
         file_status & sf, file_status & symlink_sf )
       {
@@ -873,32 +913,32 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error == ERROR_NO_MORE_FILES ? 0 : error;
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
           { sf.type( directory_file ); symlink_sf.type( directory_file ); }
         else { sf.type( regular_file ); symlink_sf.type( regular_file ); }
- return 0;
+ return error_code();
       }
 
 # else // BOOST_POSIX_API
 
       BOOST_FILESYSTEM_DECL fs::file_status
- status_api( const std::string & ph, system_error_type & ec )
+ status_api( const std::string & ph, error_code & ec )
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
         {
           if ( errno == ENOENT || errno == ENOTDIR )
           {
- ec = 0;
+ ec = error_code();
             return fs::file_status( fs::file_not_found );
           }
- ec = errno;
+ ec = error_code( errno, system_category );
           return fs::file_status( fs::status_unknown );
         }
- ec = 0;
+ ec = error_code();
         if ( S_ISDIR( path_stat.st_mode ) )
           return fs::file_status( fs::directory_file );
         if ( S_ISREG( path_stat.st_mode ) )
@@ -915,20 +955,20 @@
       }
 
       BOOST_FILESYSTEM_DECL fs::file_status
- symlink_status_api( const std::string & ph, system_error_type & ec )
+ symlink_status_api( const std::string & ph, error_code & ec )
       {
         struct stat path_stat;
         if ( ::lstat( ph.c_str(), &path_stat ) != 0 )
         {
           if ( errno == ENOENT || errno == ENOTDIR )
           {
- ec = 0;
+ ec = error_code();
             return fs::file_status( fs::file_not_found );
           }
- ec = errno;
+ ec = error_code( errno, system_category );
           return fs::file_status( fs::status_unknown );
         }
- ec = 0;
+ ec = error_code();
         if ( S_ISREG( path_stat.st_mode ) )
           return fs::file_status( fs::regular_file );
         if ( S_ISDIR( path_stat.st_mode ) )
@@ -960,8 +1000,8 @@
       {
         struct stat path_stat;
         if ( (::stat( ph.c_str(), &path_stat )) != 0 )
- return std::make_pair( errno, false );
- return std::make_pair( 0, S_ISDIR( path_stat.st_mode )
+ return std::make_pair( error_code( errno, system_category ), false );
+ return std::make_pair( error_code(), S_ISDIR( path_stat.st_mode )
           ? is_empty_directory( ph )
           : path_stat.st_size == 0 );
       }
@@ -974,9 +1014,9 @@
         struct stat s1;
         int e1( ::stat( ph1.c_str(), &s1 ) );
         if ( e1 != 0 || e2 != 0 )
- return std::make_pair( e1 != 0 && e2 != 0 ? errno : 0, false );
+ return std::make_pair( error_code( e1 != 0 && e2 != 0 ? errno : 0, system_category ), false );
         // at this point, both stats are known to be valid
- return std::make_pair( 0,
+ return std::make_pair( error_code(),
             s1.st_dev == s2.st_dev
             && s1.st_ino == s2.st_ino
             // According to the POSIX stat specs, "The st_ino and st_dev fields
@@ -991,10 +1031,10 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( errno, 0 );
+ return std::make_pair( error_code( errno, system_category ), 0 );
         if ( !S_ISREG( path_stat.st_mode ) )
- return std::make_pair( EPERM, 0 );
- return std::make_pair( 0,
+ return std::make_pair( error_code( EPERM, system_category ), 0 );
+ return std::make_pair( error_code(),
           static_cast<boost::uintmax_t>(path_stat.st_size) );
       }
 
@@ -1005,13 +1045,13 @@
         space_pair result;
         if ( ::BOOST_STATVFS( ph.c_str(), &vfs ) != 0 )
         {
- result.first = errno;
+ result.first = error_code( errno, system_category );
           result.second.capacity = result.second.free
             = result.second.available = 0;
         }
         else
         {
- result.first = 0;
+ result.first = error_code();
           result.second.capacity
             = static_cast<boost::uintmax_t>(vfs.f_blocks) * BOOST_STATVFS_F_FRSIZE;
           result.second.free
@@ -1027,22 +1067,23 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( errno, 0 );
- return std::make_pair( 0, path_stat.st_mtime );
+ return std::make_pair( error_code( errno, system_category ), 0 );
+ return std::make_pair( error_code(), path_stat.st_mtime );
       }
 
- BOOST_FILESYSTEM_DECL fs::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       last_write_time_api( const std::string & ph, std::time_t new_value )
       {
         struct stat path_stat;
- if ( ::stat( ph.c_str(), &path_stat ) != 0 ) return errno;
+ if ( ::stat( ph.c_str(), &path_stat ) != 0 )
+ return error_code( errno, system_category );
         ::utimbuf buf;
         buf.actime = path_stat.st_atime; // utime() updates access time too:-(
         buf.modtime = new_value;
- return ::utime( ph.c_str(), &buf ) != 0 ? errno : 0;
+ return error_code( ::utime( ph.c_str(), &buf ) != 0 ? errno : 0, system_category );
       }
 
- BOOST_FILESYSTEM_DECL fs::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       get_current_path_api( std::string & ph )
       {
         for ( long path_max = 32;; path_max *=2 ) // loop 'til buffer large enough
@@ -1056,7 +1097,7 @@
 # if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
               && errno != 0
 # endif
- ) return errno;
+ ) return error_code( errno, system_category );
           }
           else
           {
@@ -1064,38 +1105,46 @@
             break;
           }
         }
- return 0;
+ return error_code();
+ }
+
+ BOOST_FILESYSTEM_DECL error_code
+ set_current_path_api( const std::string & ph )
+ {
+ return error_code( ::chdir( ph.c_str() )
+ ? errno : 0, system_category );
       }
 
       BOOST_FILESYSTEM_DECL fs::detail::query_pair
       create_directory_api( const std::string & ph )
       {
         if ( ::mkdir( ph.c_str(), S_IRWXU|S_IRWXG|S_IRWXO ) == 0 )
- { return std::make_pair( 0, true ); }
- system_error_type ec=errno, dummy;
+ { return std::make_pair( error_code(), true ); }
+ int ec=errno;
+ error_code dummy;
         if ( ec != EEXIST
           || !fs::is_directory( status_api( ph, dummy ) ) )
- { return std::make_pair( ec, false ); }
- return std::make_pair( 0, false );
+ { return std::make_pair( error_code( ec, system_category ), false ); }
+ return std::make_pair( error_code(), false );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       create_hard_link_api( const std::string & to_ph,
           const std::string & from_ph )
       {
- return ::link( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno;
+ return error_code( ::link( to_ph.c_str(), from_ph.c_str() ) == 0
+ ? 0 : errno, system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       create_symlink_api( const std::string & to_ph,
           const std::string & from_ph )
       {
- return ::symlink( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno;
+ return error_code( ::symlink( to_ph.c_str(), from_ph.c_str() ) == 0
+ ? 0 : errno, system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::string & ph )
       {
 # if defined(__QNXNTO__) || (defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)))
@@ -1117,23 +1166,23 @@
           // shall fail and set errno to EEXIST or ENOTEMPTY."
           // Linux uses ENOTEMPTY, Solaris uses EEXIST.
           if ( error == EEXIST ) error = ENOTEMPTY;
- return error;
+ return error_code( error, system_category );
         }
- return 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       rename_api( const std::string & from, const std::string & to )
       {
         // POSIX is too permissive so must check
- fs::system_error_type dummy;
+ error_code dummy;
         if ( fs::exists( status_api( to, dummy ) ) )
- return EEXIST;
- return std::rename( from.c_str(), to.c_str() ) != 0
- ? errno : 0;
+ return error_code( EEXIST, system_category );
+ return error_code( std::rename( from.c_str(), to.c_str() ) != 0
+ ? errno : 0, system_category );
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::string & from_file_ph,
         const std::string & to_file_ph )
       {
@@ -1150,7 +1199,7 @@
                                 from_stat.st_mode )) < 0 )
         {
           if ( infile >= 0 ) ::close( infile );
- return errno;
+ return error_code( errno, system_category );
         }
 
         ssize_t sz, sz_read=1, sz_write;
@@ -1175,13 +1224,12 @@
         if ( ::close( infile) < 0 ) sz_read = -1;
         if ( ::close( outfile) < 0 ) sz_read = -1;
 
- return sz_read < 0 ? errno : 0;
+ return error_code( sz_read < 0 ? errno : 0, system_category );
       }
-
+
       // this code is based on Stevens and Rago, Advanced Programming in the
       // UNIX envirnment, 2nd Ed., ISBN 0-201-43307-9, page 49
- fs::system_error_type
- path_max( std::size_t & result )
+ error_code path_max( std::size_t & result )
       {
 # ifdef PATH_MAX
         static std::size_t max = PATH_MAX;
@@ -1196,40 +1244,42 @@
           {
             if ( errno == 0 ) // indeterminate
               max = 4096; // guess
- else return errno;
+ else return error_code( errno, system_category );
           }
           else max = static_cast<std::size_t>( tmp + 1 ); // relative root
         }
         result = max;
- return 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_first( void *& handle, void *& buffer,
         const std::string & dir, std::string & target,
         file_status &, file_status & )
       {
- static const std::string dummy_first_name( "." );
- if ( (handle = ::opendir( dir.c_str() )) == 0 ) return errno;
- target = dummy_first_name;
+ if ( (handle = ::opendir( dir.c_str() )) == 0 )
+ return error_code( errno, system_category );
+ target = std::string( "." ); // string was static but caused trouble
+ // when iteration called from dtor, after
+ // static had already been destroyed
         std::size_t path_size;
- fs::system_error_type ec = path_max( path_size );
+ error_code ec = path_max( path_size );
         if ( ec ) return ec;
         dirent de;
         buffer = std::malloc( (sizeof(dirent) - sizeof(de.d_name))
           + path_size + 1 ); // + 1 for "/0"
- return buffer == 0 ? ENOMEM : 0;
+ return error_code();
       }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_close( void *& handle, void*& buffer )
       {
         std::free( buffer );
         buffer = 0;
- if ( handle == 0 ) return 0;
+ if ( handle == 0 ) return error_code();
         DIR * h( static_cast<DIR*>(handle) );
         handle = 0;
- return ::closedir( h ) == 0 ? 0 : errno;
+ return error_code( ::closedir( h ) == 0 ? 0 : errno, system_category );
       }
 
       // warning: the only dirent member updated is d_name
@@ -1242,7 +1292,7 @@
           && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
           && defined(_SC_THREAD_SAFE_FUNCTIONS) \
           && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0) \
- && (!defined(__HP_aCC) || (defined(__HP_aCC) && defined(_REENTRANT)))
+ && (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
           if ( ::sysconf( _SC_THREAD_SAFE_FUNCTIONS ) >= 0 )
             { return ::readdir_r( dirp, entry, result ); }
     # endif
@@ -1256,7 +1306,7 @@
           return 0;
         }
 
- BOOST_FILESYSTEM_DECL boost::filesystem::system_error_type
+ BOOST_FILESYSTEM_DECL error_code
       dir_itr_increment( void *& handle, void *& buffer,
         std::string & target, file_status & sf, file_status & symlink_sf )
       {
@@ -1265,16 +1315,16 @@
         dirent * result;
         int return_code;
         if ( (return_code = readdir_r_simulator( static_cast<DIR*>(handle),
- entry, &result )) != 0 ) return errno;
+ entry, &result )) != 0 ) return error_code( errno, system_category );
         if ( result == 0 ) return dir_itr_close( handle, buffer );
         target = entry->d_name;
 # ifdef BOOST_FILESYSTEM_STATUS_CACHE
- if ( entry->d_type == DT_UNKNOWN ) // filesystem does not supply d_type value
+ if ( entry->d_type == DT_UNKNOWN ) // filesystem does not supply d_type value
         {
           sf = symlink_sf = fs::file_status(fs::status_unknown);
         }
- else // filesystem supplies d_type value
- {
+ else // filesystem supplies d_type value
+ {
           if ( entry->d_type == DT_DIR )
             sf = symlink_sf = fs::file_status( fs::directory_file );
           else if ( entry->d_type == DT_REG )
@@ -1285,11 +1335,11 @@
             symlink_sf = fs::file_status( fs::symlink_file );
           }
           else sf = symlink_sf = fs::file_status( fs::status_unknown );
- }
+ }
 # else
         sf = symlink_sf = fs::file_status( fs::status_unknown );
 # endif
- return 0;
+ return error_code();
       }
 
 # endif

Modified: branches/release/libs/filesystem/src/path.cpp
==============================================================================
--- branches/release/libs/filesystem/src/path.cpp (original)
+++ branches/release/libs/filesystem/src/path.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,9 @@
 // path.cpp ----------------------------------------------------------------//
 
 // Copyright 2005 Beman Dawes
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
-// at http://www.boost.org/LICENSE_1_0.txt)
+
+// Distributed under the 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
 
@@ -21,7 +21,8 @@
 #include <boost/scoped_array.hpp>
 
 #include <locale>
-#include <cerrno>
+#include <boost/cerrno.hpp>
+#include <boost/system/error_code.hpp>
 
 namespace
 {
@@ -29,7 +30,6 @@
   // so a static at function scope is used to ensure that exceptions can be
   // caught. (A previous version was at namespace scope, so initialization
   // occurred before main(), preventing exceptions from being caught.)
-
   std::locale & loc()
   {
     // ISO C calls this "the locale-specific native environment":
@@ -66,10 +66,45 @@
 
     void wpath_traits::imbue( const std::locale & new_loc )
     {
- if ( locked ) boost::throw_exception( filesystem_wpath_error(
- "boost::filesystem::wpath_traits::imbue() after lockdown", 0 ) );
+ if ( locked ) boost::throw_exception(
+ wfilesystem_error(
+ "boost::filesystem::wpath_traits::imbue() after lockdown",
+ make_error_code( system::posix::not_supported ) ) );
       imbue( new_loc, std::nothrow );
     }
+
+ //namespace detail
+ //{
+ // BOOST_FILESYSTEM_DECL
+ // const char * what( const char * sys_err_what,
+ // const path & path1, const path & path2, std::string & target)
+ // {
+ // try
+ // {
+ // if ( target.empty() )
+ // {
+ // target = sys_err_what;
+ // if ( !path1.empty() )
+ // {
+ // target += ": \"";
+ // target += path1.file_string();
+ // target += "\"";
+ // }
+ // if ( !path2.empty() )
+ // {
+ // target += ", \"";
+ // target += path2.file_string();
+ // target += "\"";
+ // }
+ // }
+ // return target.c_str();
+ // }
+ // catch (...)
+ // {
+ // return sys_err_what;
+ // }
+ // }
+ //}
     
 # ifdef BOOST_POSIX_API
 
@@ -89,9 +124,9 @@
       if ( converter()->out(
         state, src.c_str(), src.c_str()+src.size(), from_next, work.get(),
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
- boost::throw_exception( boost::filesystem::filesystem_wpath_error(
+ boost::throw_exception( boost::filesystem::wfilesystem_error(
           "boost::filesystem::wpath::to_external conversion error",
- ph, EINVAL ) );
+ ph, system::error_code( system::posix::invalid_argument, system::system_category ) ) );
       *to_next = '\0';
       return external_string_type( work.get() );
     }
@@ -108,8 +143,9 @@
       if ( converter()->in(
         state, src.c_str(), src.c_str()+src.size(), from_next, work.get(),
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
- boost::throw_exception( boost::filesystem::filesystem_wpath_error(
- "boost::filesystem::wpath::to_internal conversion error", EINVAL ) );
+ boost::throw_exception( boost::filesystem::wfilesystem_error(
+ "boost::filesystem::wpath::to_internal conversion error",
+ system::error_code( system::posix::invalid_argument, system::system_category ) ) );
       *to_next = L'\0';
       return internal_string_type( work.get() );
     }

Modified: branches/release/libs/filesystem/src/portability.cpp
==============================================================================
--- branches/release/libs/filesystem/src/portability.cpp (original)
+++ branches/release/libs/filesystem/src/portability.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
 // portability.cpp ---------------------------------------------------------//
 
-// Copyright © 2002-2005 Beman Dawes
+// Copyright 2002-2005 Beman Dawes
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
 // at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/release/libs/filesystem/src/utf8_codecvt_facet.hpp
==============================================================================
--- branches/release/libs/filesystem/src/utf8_codecvt_facet.hpp (original)
+++ branches/release/libs/filesystem/src/utf8_codecvt_facet.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,8 @@
 // Copyright © 2001 Ronald Garcia, Indiana University (garcia_at_[hidden])
-// Andrew Lumsdaine, Indiana University (lums_at_[hidden]). 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.
+// Andrew Lumsdaine, Indiana University (lums_at_[hidden]).
+
+// Distributed under the Boost Software License, Version 1.0.
+// (See http://www.boost.org/LICENSE_1_0.txt)
 
 #ifndef BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP
 #define BOOST_FILESYSTEM_UTF8_CODECVT_FACET_HPP

Modified: branches/release/libs/filesystem/test/Jamfile.v2
==============================================================================
--- branches/release/libs/filesystem/test/Jamfile.v2 (original)
+++ branches/release/libs/filesystem/test/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,49 +1,48 @@
 # Boost Filesystem Library test Jamfile
 
-# (C) Copyright Beman Dawes 2002, 2006
-
+# (C) Copyright Beman Dawes 2002-2006
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
 
-# See library home page at http://www.boost.org/libs/filesystem
-
 project
- : requirements <library>/boost/filesystem//boost_filesystem
+ : requirements
+ <library>/boost/filesystem//boost_filesystem
       <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<asynch-exceptions>on
     ;
 
    test-suite "filesystem" :
        [ run path_test.cpp
          : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
- [ run path_test.cpp
- : : : <define>BOOST_FILESYSTEM_DYN_LINK
+ [ run path_test.cpp ../../system/build
+ : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
                : path_test_dll
        ]
        [ run operations_test.cpp
          : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
- [ run operations_test.cpp
- : : : <define>BOOST_FILESYSTEM_DYN_LINK
- : operations_test_dll
+ [ run operations_test.cpp ../../system/build
+ : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
+ : operations_test_dll
        ]
        [ run fstream_test.cpp
          : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
        [ run convenience_test.cpp
          : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
        [ run large_file_support_test.cpp
          : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
        [ run wide_test.cpp
           : : : <define>BOOST_FILESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
        ]
 
        [ compile ../example/mbcopy.cpp ]

Modified: branches/release/libs/filesystem/test/convenience_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/convenience_test.cpp (original)
+++ branches/release/libs/filesystem/test/convenience_test.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,6 +18,7 @@
 #include <boost/filesystem/convenience.hpp>
 namespace fs = boost::filesystem;
 using fs::path;
+namespace sys = boost::system;
 
 #include <boost/test/minimal.hpp>
 #include <boost/bind.hpp>
@@ -35,24 +36,25 @@
 namespace
 {
   template< typename F >
- bool throws_fs_error( F func, fs::errno_type ec = 0 )
+ bool throws_fs_error( F func )
   {
     try { func(); }
 
- catch ( const fs::filesystem_error & ex )
+ catch ( const fs::filesystem_error & )
     {
- if ( ec == 0
- || ec == fs::lookup_error_code(ex.system_error()) ) return true;
- std::cout
- << "exception reports " << fs::lookup_error_code(ex.system_error())
- << ", should be " << ec
- << "\n system_error() is " << ex.system_error()
- << std::endl;
- return false;
+ return true;
     }
     return false;
   }
+
+ void create_recursive_iterator( const fs::path & ph )
+ {
+ fs::recursive_directory_iterator it( ph );
+ }
 }
+
+// --------------------------------------------------------------------------//
+
 int test_main( int, char*[] )
 {
   path::default_name_check( fs::no_check ); // names below not valid on all O/S's
@@ -70,13 +72,13 @@
   BOOST_CHECK( fs::exists( "xx" ) );
   BOOST_CHECK( fs::is_directory( "xx" ) );
 
- BOOST_CHECK( fs::create_directories( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::create_directories( "xx/yy/zz" ) );
   BOOST_CHECK( fs::exists( "xx" ) );
- BOOST_CHECK( fs::exists( "xx/ww" ) );
- BOOST_CHECK( fs::exists( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::exists( "xx/yy" ) );
+ BOOST_CHECK( fs::exists( "xx/yy/zz" ) );
   BOOST_CHECK( fs::is_directory( "xx" ) );
- BOOST_CHECK( fs::is_directory( "xx/ww" ) );
- BOOST_CHECK( fs::is_directory( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::is_directory( "xx/yy" ) );
+ BOOST_CHECK( fs::is_directory( "xx/yy/zz" ) );
 
   path is_a_file( "xx/uu" );
   {
@@ -116,15 +118,81 @@
   // see the rationale in html docs for explanation why this works
   BOOST_CHECK( fs::change_extension("", ".png").string() == ".png" );
 
-// what() tests --------------------------------------------------------------//
+// recursive_directory_iterator tests ----------------------------------------//
+
+ sys::error_code ec;
+ fs::recursive_directory_iterator it( "/no-such-path", ec );
+ BOOST_CHECK( ec );
+ BOOST_CHECK( throws_fs_error(
+ boost::bind( create_recursive_iterator, "/no-such-path" ) ) );
+
+ fs::remove( "xx/uu" );
+
+#ifdef BOOST_WINDOWS_API
+ // These tests depends on ordering of directory entries, and that's guaranteed
+ // on Windows but not necessarily on other operating systems
+ {
+ std::ofstream f( "xx/yya" );
+ BOOST_CHECK( !!f );
+ }
+
+ for ( it = fs::recursive_directory_iterator( "xx" );
+ it != fs::recursive_directory_iterator(); ++it )
+ { std::cout << *it << '\n'; }
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ BOOST_CHECK( it.level() == 0 );
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yy/zz" );
+ BOOST_CHECK( it.level() == 1 );
+ it.pop();
+ BOOST_CHECK( it->path() == "xx/yya" );
+ BOOST_CHECK( it.level() == 0 );
+ it++;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yya" );
+ ++it;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ fs::remove( "xx/yya" );
+#endif
+
+ it = fs::recursive_directory_iterator( "xx/yy/zz" );
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ BOOST_CHECK( it.level() == 0 );
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yy/zz" );
+ BOOST_CHECK( it.level() == 1 );
+ it++;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ ++it;
+ it.pop();
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+
+
+ // nothrow wrong. see imp. Make sure failed basic_directory_iterator
+ // ctor creates the end iterator.
+
 
- try { throw fs::filesystem_path_error( "abc", "p1", "p2", 0 ); }
- catch ( const fs::filesystem_path_error & ex )
- {
-# if !defined( BOOST_MSVC ) || BOOST_MSVC >= 1300 // > VC++ 7.0
- BOOST_CHECK( fs::what(ex) == std::string( "abc: \"p1\", \"p2\"" ) );
-# endif
- }
 
 
   return 0;

Modified: branches/release/libs/filesystem/test/fstream_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/fstream_test.cpp (original)
+++ branches/release/libs/filesystem/test/fstream_test.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -37,6 +37,8 @@
 
 namespace
 {
+ bool cleanup = true;
+
   template< class Path >
   void test( const Path & p )
   {
@@ -141,12 +143,16 @@
       BOOST_CHECK( tfs.is_open() );
     }
 # endif
+
+ if ( cleanup ) fs::remove( p );
+
   } // test
 } // unnamed namespace
 
-int test_main( int, char*[] )
+int test_main( int argc, char*[] )
 {
-
+ if ( argc > 1 ) cleanup = false;
+
   // test fs::path
   std::cout << "path tests:\n";
   test( fs::path( "fstream_test_foo" ) );

Modified: branches/release/libs/filesystem/test/lpath.hpp
==============================================================================
--- branches/release/libs/filesystem/test/lpath.hpp (original)
+++ branches/release/libs/filesystem/test/lpath.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -34,7 +34,7 @@
     static size_t length(const char_type* s)
     { const char_type* b=s; for(;*s!=0L;++s){} return s-b; }
  
- static const char_type* find(const char_type* s, size_t n, const char_type& a)
+ static const char_type* find(const char_type* /*s*/, size_t /*n*/, const char_type& /*a*/)
     { return 0; }
 
     // copy semantics will do for wide_test

Modified: branches/release/libs/filesystem/test/operations_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/operations_test.cpp (original)
+++ branches/release/libs/filesystem/test/operations_test.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,9 @@
 // Boost operations_test.cpp -----------------------------------------------//
 
 // Copyright Beman Dawes 2002.
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
+
+// Distributed under the 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
 
@@ -16,14 +16,16 @@
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem/cerrno.hpp>
+#include <boost/cerrno.hpp>
 namespace fs = boost::filesystem;
 
 #include <boost/config.hpp>
 #include <boost/test/minimal.hpp>
-#include <boost/concept_check.hpp>
-#include <boost/bind.hpp>
-using boost::bind;
+//#include <boost/concept_check.hpp>
+
+using boost::system::error_code;
+using boost::system::system_category;
+using boost::system::system_error;
 
 #include <fstream>
 #include <iostream>
@@ -51,21 +53,29 @@
     using ::difftime; using ::time; using ::tm; using ::mktime; using ::system; }
 # endif
 
-#define CHECK_EXCEPTION(b,e) throws_fs_error(b,e,__LINE__)
+#ifdef BOOST_WINDOWS_API
+# include <windows.h>
+#endif
+
+#define CHECK_EXCEPTION(Functor,Expect) throws_fs_error(Functor,Expect,__LINE__)
 
 namespace
 {
+ typedef int errno_t;
+ std::string platform( BOOST_PLATFORM );
   bool report_throws;
   fs::directory_iterator end_itr;
 
+ unsigned short language_id; // 0 except for Windows
+
   const char * temp_dir_name = "temp_fs_test_dir";
 
   void create_file( const fs::path & ph, const std::string & contents )
   {
     std::ofstream f( ph.file_string().c_str() );
     if ( !f )
- throw fs::filesystem_path_error( "operations_test create_file",
- ph, errno );
+ throw fs::filesystem_error( "operations_test create_file",
+ ph, error_code(errno, system_category) );
     if ( !contents.empty() ) f << contents;
   }
 
@@ -73,34 +83,34 @@
   {
     std::ifstream f( ph.file_string().c_str() );
     if ( !f )
- throw fs::filesystem_path_error( "operations_test verify_file",
- ph, errno );
+ throw fs::filesystem_error( "operations_test verify_file",
+ ph, error_code(errno, system_category) );
     std::string contents;
     f >> contents;
     if ( contents != expected )
- throw fs::filesystem_path_error( "operations_test verify_file contents \""
- + contents + "\" != \"" + expected + "\"", ph, 0 );
+ throw fs::filesystem_error( "operations_test verify_file contents \""
+ + contents + "\" != \"" + expected + "\"", ph, error_code() );
   }
 
   template< typename F >
- bool throws_fs_error( F func, fs::errno_type ec, int line )
+ bool throws_fs_error( F func, errno_t en, int line )
   {
     try { func(); }
 
- catch ( const fs::filesystem_path_error & ex )
+ catch ( const fs::filesystem_error & ex )
     {
       if ( report_throws )
       {
         // use the what() convenience function to display exceptions
- std::cout << fs::what(ex) << "\n";
+ std::cout << "\n" << ex.what() << "\n";
       }
- if ( ec == 0
- || ec == fs::lookup_error_code(ex.system_error()) ) return true;
+ if ( en == 0
+ || en == ex.code().default_error_condition().value() ) return true;
       std::cout
         << "\nWarning: line " << line
- << " exception reports " << fs::lookup_error_code(ex.system_error())
- << ", should be " << ec
- << "\n system_error() is " << ex.system_error()
+ << " exception reports default_error_condition().value() " << ex.code().default_error_condition().value()
+ << ", should be " << en
+ << "\n value() is " << ex.code().value()
         << std::endl;
       return true;
     }
@@ -125,6 +135,125 @@
     fs::copy_file( a, a );
   }
 
+ void exception_tests()
+ {
+ bool exception_thrown;
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( std::runtime_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ BOOST_CHECK( std::strcmp( x.what(),
+ "boost::filesystem::create_directory" ) == 0 );
+ }
+ BOOST_CHECK( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( system_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ BOOST_CHECK( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified" ) == 0 );
+ }
+ BOOST_CHECK( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( fs::filesystem_error x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ {
+ bool ok ( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ BOOST_CHECK( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
+ }
+ }
+ BOOST_CHECK( exception_thrown );
+
+ exception_thrown = false;
+ try
+ {
+ fs::create_directory( "no-such-dir/foo/bar" );
+ }
+ catch ( const fs::filesystem_error & x )
+ {
+ exception_thrown = true;
+ if ( report_throws ) std::cout << x.what() << std::endl;
+ if ( platform == "Windows" && language_id == 0x0409 ) // English (United States)
+ {
+ bool ok ( std::strcmp( x.what(),
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ BOOST_CHECK( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
+ }
+ }
+ BOOST_CHECK( exception_thrown );
+ }
+
+ void bad_file_size()
+ {
+ fs::file_size( " No way, Jose" );
+ }
+
+ void bad_directory_size()
+ {
+ fs::file_size( fs::current_path() );
+ }
+
+ fs::path bad_create_directory_path;
+ void bad_create_directory()
+ {
+ fs::create_directory( bad_create_directory_path );
+ }
+
+ void bad_equivalent()
+ {
+ fs::equivalent( "no-such-path", "another-not-present-path" );
+ }
+
+ fs::path bad_remove_dir;
+ void bad_remove()
+ {
+ fs::remove( bad_remove_dir );
+ }
+
+ class renamer
+ {
+ public:
+ renamer( const fs::path & p1, const fs::path & p2 )
+ : from(p1), to(p2) {}
+ void operator()()
+ {
+ fs::rename( from, to );
+ }
+ private:
+ fs::path from;
+ fs::path to;
+ };
+
 } // unnamed namespace
 
 // test_main ---------------------------------------------------------------//
@@ -133,8 +262,6 @@
 {
   if ( argc > 1 && *argv[1]=='-' && *(argv[1]+1)=='t' ) report_throws = true;
 
- std::string platform( BOOST_PLATFORM );
-
   // The choice of platform is make at runtime rather than compile-time
   // so that compile errors for all platforms will be detected even though
   // only the current platform is runtime tested.
@@ -142,12 +269,19 @@
     platform = "POSIX";
 # elif defined( BOOST_WINDOWS_API )
     platform = "Windows";
+# if !defined(__MINGW32__) && !defined(__CYGWIN__)
+ language_id = ::GetUserDefaultUILanguage();
+# else
+ language_id = 0x0409; // Assume US English
+# endif
 # else
     platform = ( platform == "Win32" || platform == "Win64" || platform == "Cygwin" )
                ? "Windows"
                : "POSIX";
 # endif
- std::cout << "API is " << platform << '\n';
+ std::cout << "API is " << platform << std::endl;
+
+ exception_tests();
 
   std::cout << "\ninitial_path<path>().string() is\n \""
     << fs::initial_path<fs::path>().string()
@@ -239,35 +373,21 @@
   BOOST_CHECK( !fs::exists( dir ) );
 
   // the bound functions should throw, so CHECK_EXCEPTION() should return true
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::file_size), ng ), ENOENT ) );
+ BOOST_CHECK( CHECK_EXCEPTION( bad_file_size, ENOENT ) );
 
   // test path::exception members
   try { fs::file_size( ng ); } // will throw
 
- catch ( const fs::filesystem_path_error & ex )
+ catch ( const fs::filesystem_error & ex )
   {
     BOOST_CHECK( ex.path1().string() == " no-way, Jose" );
   }
-
- BOOST_CHECK( fs::create_directory( dir ) );
-
   // several functions give unreasonable results if uintmax_t isn't 64-bits
   std::cout << "sizeof(boost::uintmax_t) = " << sizeof(boost::uintmax_t) << '\n';
   BOOST_CHECK( sizeof( boost::uintmax_t ) >= 8 );
 
- // make some reasonable assuptions for testing purposes
- fs::space_info spi( fs::space( dir ) );
- BOOST_CHECK( spi.capacity > 1000000 );
- BOOST_CHECK( spi.free > 1000 );
- BOOST_CHECK( spi.capacity > spi.free );
- BOOST_CHECK( spi.free >= spi.available );
-
- // it is convenient to display space, but older VC++ versions choke
-# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0
- std::cout << " capacity = " << spi.capacity << '\n';
- std::cout << " free = " << spi.free << '\n';
- std::cout << "available = " << spi.available << '\n';
-# endif
+ // create a directory, then check it for consistency
+ BOOST_CHECK( fs::create_directory( dir ) );
 
   BOOST_CHECK( fs::exists( dir ) );
   BOOST_CHECK( BOOST_FS_IS_EMPTY( dir ) );
@@ -282,11 +402,41 @@
   BOOST_CHECK( !fs::is_other( stat ) );
   BOOST_CHECK( !fs::is_symlink( stat ) );
 
+ // set the current directory, then check it for consistency
+ fs::path original_dir = fs::current_path<fs::path>();
+ BOOST_CHECK( dir != original_dir );
+ fs::current_path( dir );
+ BOOST_CHECK( fs::current_path<fs::path>() == dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != original_dir );
+ fs::current_path( original_dir );
+ BOOST_CHECK( fs::current_path<fs::path>() == original_dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != dir );
+ // make sure the overloads work
+ fs::current_path( dir.string().c_str() );
+ BOOST_CHECK( fs::current_path<fs::path>() == dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != original_dir );
+ fs::current_path( original_dir.string() );
+ BOOST_CHECK( fs::current_path<fs::path>() == original_dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != dir );
+
+ // make some reasonable assuptions for testing purposes
+ fs::space_info spi( fs::space( dir ) );
+ BOOST_CHECK( spi.capacity > 1000000 );
+ BOOST_CHECK( spi.free > 1000 );
+ BOOST_CHECK( spi.capacity > spi.free );
+ BOOST_CHECK( spi.free >= spi.available );
+
+ // it is convenient to display space, but older VC++ versions choke
+# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0
+ std::cout << " capacity = " << spi.capacity << '\n';
+ std::cout << " free = " << spi.free << '\n';
+ std::cout << "available = " << spi.available << '\n';
+# endif
+
   if ( platform == "Windows" )
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::file_size), dir ),
- ENOENT ) );
+ BOOST_CHECK( CHECK_EXCEPTION( bad_directory_size, ENOENT ) );
   else
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::file_size), dir ), 0 ) );
+ BOOST_CHECK( CHECK_EXCEPTION( bad_directory_size, 0 ) );
   BOOST_CHECK( !fs::create_directory( dir ) );
 
   BOOST_CHECK( !fs::is_symlink( dir ) );
@@ -301,7 +451,7 @@
   BOOST_CHECK( fs::is_directory( d1 ) );
   BOOST_CHECK( BOOST_FS_IS_EMPTY( d1 ) );
 
- boost::function_requires< boost::InputIteratorConcept< fs::directory_iterator > >();
+// boost::function_requires< boost::InputIteratorConcept< fs::directory_iterator > >();
 
   bool dir_itr_exception(false);
   try { fs::directory_iterator it( "" ); }
@@ -316,10 +466,10 @@
   dir_itr_exception = false;
   try
   {
- fs::system_error_type ec(0);
+ error_code ec;
     fs::directory_iterator it( "nosuchdirectory", ec );
- BOOST_CHECK( ec != 0 );
- BOOST_CHECK( ec == fs::detail::not_found_error );
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec == fs::detail::not_found_error() );
   }
   catch ( const fs::filesystem_error & ) { dir_itr_exception = true; }
   BOOST_CHECK( !dir_itr_exception );
@@ -426,8 +576,8 @@
   BOOST_CHECK( fs::is_regular( file_ph ) );
   BOOST_CHECK( BOOST_FS_IS_EMPTY( file_ph ) );
   BOOST_CHECK( fs::file_size( file_ph ) == 0 );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::create_directory),
- file_ph ), EEXIST ) );
+ bad_create_directory_path = file_ph;
+ BOOST_CHECK( CHECK_EXCEPTION( bad_create_directory, EEXIST ) );
   stat = fs::status( file_ph );
   BOOST_CHECK( fs::status_known( stat ) );
   BOOST_CHECK( fs::exists( stat ) );
@@ -447,9 +597,7 @@
   verify_file( file_ph, "foobar1" );
 
   // equivalence tests
- fs::path ng2("does_not_exist2");
- BOOST_CHECK( CHECK_EXCEPTION(
- bind( BOOST_BND(fs::equivalent), ng, ng2 ), ENOENT ) );
+ BOOST_CHECK( CHECK_EXCEPTION( bad_equivalent, ENOENT ) );
   BOOST_CHECK( fs::equivalent( file_ph, dir / "f1" ) );
   BOOST_CHECK( fs::equivalent( dir, d1 / ".." ) );
   BOOST_CHECK( !fs::equivalent( file_ph, dir ) );
@@ -483,10 +631,10 @@
     BOOST_CHECK( fs::equivalent( from_ph, file_ph ) );
   }
 
- fs::system_error_type ec(0);
+ error_code ec;
   BOOST_CHECK( fs::create_hard_link( fs::path("doesnotexist"),
- fs::path("shouldnotwork"), ec ) != 0 );
- BOOST_CHECK( ec != 0 );
+ fs::path("shouldnotwork"), ec ) );
+ BOOST_CHECK( ec );
 
   // symbolic link tests
   from_ph = dir / "f4";
@@ -518,9 +666,9 @@
     BOOST_CHECK( fs::is_symlink( stat ) );
   }
 
- ec = 0;
- BOOST_CHECK( fs::create_symlink( "doesnotexist", "", ec ) != 0 );
- BOOST_CHECK( ec != 0 );
+ ec = error_code();
+ BOOST_CHECK( fs::create_symlink( "doesnotexist", "", ec ) );
+ BOOST_CHECK( ec );
 
   // there was an inital bug in directory_iterator that caused premature
   // close of an OS handle. This block will detect regression.
@@ -545,29 +693,30 @@
   // [case 1] make sure can't rename() a non-existent file
   BOOST_CHECK( !fs::exists( d1 / "f99" ) );
   BOOST_CHECK( !fs::exists( d1 / "f98" ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), d1 / "f99", d1 / "f98" ),
- ENOENT ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), fs::path(""), d1 / "f98" ),
- ENOENT ) );
+ renamer n1a( d1 / "f99", d1 / "f98" );
+ BOOST_CHECK( CHECK_EXCEPTION( n1a, ENOENT ) );
+ renamer n1b( fs::path(""), d1 / "f98" );
+ BOOST_CHECK( CHECK_EXCEPTION( n1b, ENOENT ) );
 
   // [case 2] rename() target.empty()
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), file_ph, "" ),
- ENOENT ) );
+ renamer n2( file_ph, "" );
+ BOOST_CHECK( CHECK_EXCEPTION( n2, ENOENT ) );
 
   // [case 3] make sure can't rename() to an existent file or directory
   BOOST_CHECK( fs::exists( dir / "f1" ) );
   BOOST_CHECK( fs::exists( d1 / "f2" ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename),
- dir / "f1", d1 / "f2" ), EEXIST ) );
+ renamer n3a( dir / "f1", d1 / "f2" );
+ BOOST_CHECK( CHECK_EXCEPTION( n3a, EEXIST ) );
   // several POSIX implementations (cygwin, openBSD) report ENOENT instead of EEXIST,
   // so we don't verify error type on the above test.
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), dir, d1 ), 0 ) );
+ renamer n3b( dir, d1 );
+ BOOST_CHECK( CHECK_EXCEPTION( n3b, 0 ) );
 
   // [case 4A] can't rename() file to a nonexistent parent directory
   BOOST_CHECK( !fs::is_directory( dir / "f1" ) );
   BOOST_CHECK( !fs::exists( dir / "d3/f3" ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), dir / "f1", dir / "d3/f3" ),
- ENOENT ) );
+ renamer n4a( dir / "f1", dir / "d3/f3" );
+ BOOST_CHECK( CHECK_EXCEPTION( n4a, ENOENT ) );
 
   // [case 4B] rename() file in same directory
   BOOST_CHECK( fs::exists( d1 / "f2" ) );
@@ -593,8 +742,8 @@
   BOOST_CHECK( fs::exists( d1 ) );
   BOOST_CHECK( !fs::exists( dir / "d3/d5" ) );
   BOOST_CHECK( !fs::exists( dir / "d3" ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::rename), d1, dir / "d3/d5" ),
- ENOENT ) );
+ renamer n5a( d1, dir / "d3/d5" );
+ BOOST_CHECK( CHECK_EXCEPTION( n5a, ENOENT ) );
 
   // [case 5B] rename() on directory
   fs::path d3( dir / "d3" );
@@ -643,7 +792,8 @@
   BOOST_CHECK( fs::exists( d1 ) );
   BOOST_CHECK( fs::is_directory( d1 ) );
   BOOST_CHECK( BOOST_FS_IS_EMPTY( d1 ) );
- BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::remove), dir ), ENOTEMPTY ) );
+ bad_remove_dir = dir;
+ BOOST_CHECK( CHECK_EXCEPTION( bad_remove, ENOTEMPTY ) );
   BOOST_CHECK( fs::remove( d1 ) );
   BOOST_CHECK( !fs::exists( d1 ) );
 

Modified: branches/release/libs/filesystem/test/path_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/path_test.cpp (original)
+++ branches/release/libs/filesystem/test/path_test.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -180,18 +180,23 @@
   void exception_tests()
   {
     const std::string str_1("string-1");
- try { throw fs::filesystem_error( str_1, 12345 ); }
+ boost::system::error_code ec( 12345, boost::system::system_category);
+ try { throw fs::filesystem_error( str_1, ec ); }
     catch ( const fs::filesystem_error & ex )
     {
- BOOST_CHECK( ex.what() == str_1 );
- BOOST_CHECK( ex.system_error() == 12345 );
+ //std::cout << ex.what() << "*" << std::endl;
+ //BOOST_CHECK( std::strcmp( ex.what(),
+ // "string-1: Unknown error" ) == 0 );
+ BOOST_CHECK( ex.code() == ec );
     }
 
- try { throw fs::filesystem_path_error( str_1, "p1", "p2", 12345 ); }
- catch ( const fs::filesystem_path_error & ex )
+ try { throw fs::filesystem_error( str_1, "p1", "p2", ec ); }
+ catch ( const fs::filesystem_error & ex )
     {
- BOOST_CHECK( ex.what() == str_1 );
- BOOST_CHECK( ex.system_error() == 12345 );
+ //std::cout << ex.what() << "*" << std::endl;
+ //BOOST_CHECK( std::strcmp( ex.what(),
+ // "string-1: Unknown error: \"p1\", \"p2\"" ) == 0 );
+ BOOST_CHECK( ex.code() == ec );
       BOOST_CHECK( ex.path1().string() == "p1" );
       BOOST_CHECK( ex.path2().string() == "p2" );
     }

Modified: branches/release/libs/filesystem/test/wide_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/wide_test.cpp (original)
+++ branches/release/libs/filesystem/test/wide_test.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -38,6 +38,8 @@
 
 namespace
 {
+ bool cleanup = true;
+
   template< class Path >
   void create_file( const Path & ph, const std::string & contents )
   {
@@ -49,7 +51,8 @@
 # endif
     if ( !f )
       throw fs::basic_filesystem_error<Path>( "wide_test create_file",
- ph, errno );
+ ph,
+ boost::system::error_code( errno, boost::system::errno_ecat ) );
     if ( !contents.empty() ) f << contents;
   }
 
@@ -89,6 +92,11 @@
       ++count;
     }
     BOOST_CHECK( count == 1 );
+ if ( cleanup )
+ {
+ fs::remove( dir / file );
+ fs::remove( dir );
+ }
   }
 
   // test boost::detail::utf8_codecvt_facet - even though it is not used by
@@ -113,9 +121,11 @@
 
 // test_main ---------------------------------------------------------------//
 
-int test_main( int argc, char * argv[] )
+int test_main( int argc, char * /*argv*/[] )
 {
 
+ if ( argc > 1 ) cleanup = false;
+
   // So that tests are run with known encoding, use Boost UTF-8 codecvt
   std::locale global_loc = std::locale();
   std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet );

Modified: branches/release/tools/bcp/add_path.cpp
==============================================================================
--- branches/release/tools/bcp/add_path.cpp (original)
+++ branches/release/tools/bcp/add_path.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -49,6 +49,8 @@
    //
    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:
    //
@@ -75,7 +77,7 @@
    //
    // if the file does not exist in cvs then don't do anything with it:
    //
- if(m_cvs_mode && (m_cvs_paths.find(p) == m_cvs_paths.end()))
+ 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:

Modified: branches/release/tools/bcp/bcp.hpp
==============================================================================
--- branches/release/tools/bcp/bcp.hpp (original)
+++ branches/release/tools/bcp/bcp.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -20,6 +20,7 @@
    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;

Modified: branches/release/tools/bcp/bcp.html
==============================================================================
--- branches/release/tools/bcp/bcp.html (original)
+++ branches/release/tools/bcp/bcp.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -3,7 +3,7 @@
    <head>
       <title>bcp</title>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="stylesheet" type="text/css" href="../../boost.css">
+ <link rel="stylesheet" type="text/css" href="../../doc/html/boostbook.css">
    </head>
    <body>
       <P>
@@ -16,7 +16,7 @@
                   <H1 align="center">The bcp utility</H1>
                </TD>
                <td width="50">
- <h3><a href="../../index.htm"><img height="45" width="43" alt="Boost.Regex Index" src="../../libs/regex/doc/uarrow.gif"
+ <h3><a href="../../index.htm"><img alt="Boost.Regex Index" src="../../doc/html/images/up.png"
                            border="0"></a></h3>
                </td>
             </TR>
@@ -81,8 +81,8 @@
       <P>Treats the module list as a list of (probably non-boost) files to scan for
          boost dependencies, the files listed in the module list are not copied (or
          listed), only the boost files upon which they depend.</P>
- <PRE>--cvs</PRE>
- <P>Only copy files under cvs version control.</P>
+ <PRE>--svn</PRE>
+ <P>Only copy files under svn version control.</P>
       <PRE>--unix-lines</PRE>
       <P>Make sure that all copied files use Unix style line endings.</P>
       <H4>module-list:&nbsp;</H4>
@@ -179,15 +179,15 @@
          <HR>
       <P></P>
       <P></P>
- <p>Revised&nbsp;
- <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
- 28 June 2004&nbsp;
- <!--webbot bot="Timestamp" endspan i-checksum="39359" -->
- </p>
- <P><I>© Copyright <a href="mailto:jm_at_[hidden]">John Maddock</a>&nbsp;2003-4</I></P>
+ <p>Last revised $Date$</p>
+ <P><I>© Copyright John Maddock&nbsp;2003-7</I></P>
       <P align="left"><I>Distributed under the Boost Software License, Version 1.0.
        (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
        </I></P>
    </body>
 </html>
 
+
+
+
+

Modified: branches/release/tools/bcp/bcp_imp.cpp
==============================================================================
--- branches/release/tools/bcp/bcp_imp.cpp (original)
+++ branches/release/tools/bcp/bcp_imp.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,7 +18,7 @@
 #include <string>
 
 bcp_implementation::bcp_implementation()
- : m_list_mode(false), m_list_summary_mode(false), m_license_mode(false), m_cvs_mode(false), m_unix_lines(false), m_scan_mode(false), m_bsl_convert_mode(false), m_bsl_summary_mode(false)
+ : 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)
 {
 }
 
@@ -46,6 +46,11 @@
    m_cvs_mode = true;
 }
 
+void bcp_implementation::enable_svn_mode()
+{
+ m_svn_mode = true;
+}
+
 void bcp_implementation::enable_scan_mode()
 {
    m_scan_mode = true;
@@ -124,8 +129,13 @@
    // 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
    //

Modified: branches/release/tools/bcp/bcp_imp.hpp
==============================================================================
--- branches/release/tools/bcp/bcp_imp.hpp (original)
+++ branches/release/tools/bcp/bcp_imp.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -51,6 +51,7 @@
    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();
@@ -64,6 +65,7 @@
 private:
    // internal helper functions:
    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_directory(const fs::path& p);
    void add_file(const fs::path& p);
@@ -83,6 +85,7 @@
    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

Modified: branches/release/tools/bcp/file_types.cpp
==============================================================================
--- branches/release/tools/bcp/file_types.cpp (original)
+++ branches/release/tools/bcp/file_types.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -39,7 +39,7 @@
 
 bool bcp_implementation::is_binary_file(const fs::path& p)
 {
- if(m_cvs_mode)
+ 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;

Modified: branches/release/tools/bcp/main.cpp
==============================================================================
--- branches/release/tools/bcp/main.cpp (original)
+++ branches/release/tools/bcp/main.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -107,6 +107,10 @@
       {
          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();

Modified: branches/release/tools/bcp/scan_cvs_path.cpp
==============================================================================
--- branches/release/tools/bcp/scan_cvs_path.cpp (original)
+++ branches/release/tools/bcp/scan_cvs_path.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,7 @@
 /*
  *
- * Copyright (c) 2003 Dr John Maddock
+ * 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)
@@ -16,6 +17,7 @@
 #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)
 {
@@ -61,3 +63,85 @@
       }
    }
 }
+
+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
+ }
+}

Modified: branches/release/tools/boostbook/doc/boostbook.xml
==============================================================================
--- branches/release/tools/boostbook/doc/boostbook.xml (original)
+++ branches/release/tools/boostbook/doc/boostbook.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
    Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
   
@@ -137,7 +137,7 @@
       <title>Manual setup for all systems</title>
     
       <para>This section describes how to manually configure Boost
- Boost version 2 (BBv2) for BoostBook. If you can use the
+ Boost version 2 (BBv@) for BoostBook. If you can use the
       automatic setup script, you should. All configuration will
       happen in the BBv2 user configuration file,
       <filename>user-config.jam</filename>. If you do not have a copy
@@ -212,13 +212,9 @@
         documentation for libraries that do not require Doxygen. To
         test this, change into the directory <filename
         class="directory">$BOOST_ROOT/libs/function/doc</filename> and
- run the command <code>bjam</code>: it should produce HTML
+ run the command <code>bjam --v2</code>: it should produce HTML
         documentation for the Boost.Function library in the
- <code>html</code> subdirectory. This documentation
- will look a little strange, because the BoostBook stylesheet is
- missing. You can copy the <code>boostbook.css</code> stylesheet from
- <filename class="directory">$BOOST_ROOT/doc/html</filename> to
- fix this problem.</para>
+ <code>html</code> subdirectory.</para>
       </section>
 
       <section id="boostbook.setup.doxygen">

Modified: branches/release/tools/boostbook/doc/reference.dtdxml
==============================================================================
--- branches/release/tools/boostbook/doc/reference.dtdxml (original)
+++ branches/release/tools/boostbook/doc/reference.dtdxml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -21,22 +21,18 @@
 <entity name="boost.class.content"
         type="param"
>
-<text-expanded>template?, inherit*, purpose?, description?,
- (static-constant|typedef|enum|
- copy-assignment|constructor|destructor|method-group|
- free-function-group|function|method|overloaded-function|
- overloaded-method|data-member|class|class-specialization|struct|
- struct-specialization|union|union-specialization)*</text-expanded>
-<text>template?, inherit*, purpose?, description?,
- (%boost.class.mix;)*</text>
+<text-expanded>template?, inherit*, purpose?, description?,
+ (access|%boost.class.mix;)*</text-expanded>
+<text>template?, inherit*, purpose?, description?,
+ (access|%boost.class.mix;)*</text>
 </entity>
 
 <entity name="boost.function.semantics"
         type="param"
>
-<text-expanded>purpose?, description?, requires?, effects?, postconditions?,
+<text-expanded>purpose?, description?, requires?, effects?, postconditions?,
          returns?, throws?, complexity?, notes?, rationale?</text-expanded>
-<text>purpose?, description?, requires?, effects?, postconditions?,
+<text>purpose?, description?, requires?, effects?, postconditions?,
          returns?, throws?, complexity?, notes?, rationale?</text>
 </entity>
 
@@ -98,21 +94,26 @@
                                 id CDATA #IMPLIED</text>
 </entity>
 
-<entity name="boost.class.mix"
+<entity name="boost.class.members"
         type="param"
>
 <text-expanded>static-constant|typedef|enum|
          copy-assignment|constructor|destructor|method-group|
- free-function-group|function|method|overloaded-function|
- overloaded-method|data-member|class|class-specialization|struct|
+ method|overloaded-method|data-member|class|class-specialization|struct|
          struct-specialization|union|union-specialization</text-expanded>
 <text>static-constant|typedef|enum|
          copy-assignment|constructor|destructor|method-group|
- free-function-group|function|method|overloaded-function|
- overloaded-method|data-member|class|class-specialization|struct|
+ |method|overloaded-method|data-member|class|class-specialization|struct|
          struct-specialization|union|union-specialization</text>
 </entity>
 
+<entity name="boost.class.mix"
+ type="param"
+>
+<text-expanded>free-function-group|function|overloaded-function|%boost.class.members;</text-expanded>
+<text>free-function-group|function|overloaded-function|%boost.class.members;</text>
+</entity>
+
 <entity name="boost.testsuite.tests"
         type="param"
>
@@ -196,14 +197,10 @@
 <entity name="boost.class-specialization.content"
         type="param"
>
-<text-expanded>template?, specialization?, inherit?, purpose?, description?,
- (static-constant|typedef|enum|
- copy-assignment|constructor|destructor|method-group|
- free-function-group|function|method|overloaded-function|
- overloaded-method|data-member|class|class-specialization|struct|
- struct-specialization|union|union-specialization)*</text-expanded>
-<text>template?, specialization?, inherit?, purpose?, description?,
- (%boost.class.mix;)*</text>
+<text-expanded>template?, specialization?, inherit?, purpose?, description?,
+ (access|%boost.class.mix;)*</text-expanded>
+<text>template?, specialization?, inherit?, purpose?, description?,
+ (access|%boost.class.mix;)*</text>
 </entity>
 
 <entity name="library.content"
@@ -223,6 +220,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -296,7 +294,7 @@
 </element>
 
 <attlist name="link-test">
-<attdecl>
+<attdecl>
      filename CDATA #REQUIRED
      name CDATA #IMPLIED</attdecl>
 <attribute name="filename"
@@ -329,7 +327,7 @@
 </element>
 
 <attlist name="link-fail-test">
-<attdecl>
+<attdecl>
      filename CDATA #REQUIRED
      name CDATA #IMPLIED</attdecl>
 <attribute name="filename"
@@ -494,7 +492,7 @@
 </element>
 
 <attlist name="destructor">
-<attdecl>
+<attdecl>
     specifiers CDATA #IMPLIED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -639,7 +637,7 @@
     </or-group>
   </sequence-group>
 </content-model-expanded>
-<content-model>
+<content-model>
   <sequence-group>
     <element-name name="title" occurrence="?"/>
     <element-name name="section" occurrence="*"/>
@@ -750,6 +748,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -819,10 +818,7 @@
 <purpose>Declares a base class of the enclosing class or struct</purpose>
 
 <description>
- <para>This element contains the name of the class inherited. The
- content model is free-form, as the inherited class may be an
- instantiation of a template and may have markup in it (e.g.,
- <sgmltag>classname</sgmltag> tags).</para>
+ <para>This element contains the type of the class inherited.</para>
 </description>
 </element>
 
@@ -837,7 +833,9 @@
 <attribute name="access"
            type="#REQUIRED"
            value="CDATA"
- default=""/>
+ default="">
+ <purpose>The access specifier ("public", "private", or "protected") of the inheritance.</purpose>
+</attribute>
 <attribute name="id"
            type="#IMPLIED"
            value="CDATA"
@@ -950,7 +948,7 @@
   behavior. Constructors, destructors, member functions, and free
   functions all use the same documentation method, although the
   top-level tags differ.</para>
-
+
   <para>The behavior of functions in BoostBook is documenting using a
   style similar to that of the C++ standard, with clauses describing
   the requirements, effects, postconditions, exception behavior, and
@@ -979,12 +977,12 @@
         so that any content is equivalent in both type and value to the
         content of &lt;code&gt;other&lt;/code&gt;, or empty if
         &lt;code&gt;other&lt;/code&gt; is
- empty.
+ empty.
       &lt;/simpara&gt;
     &lt;/effects&gt;
 
     &lt;throws&gt;
- &lt;simpara&gt;May fail with a
+ &lt;simpara&gt;May fail with a
         &lt;classname&gt;std::bad_alloc&lt;/classname&gt; exception or any
         exceptions arising from the copy constructor of the
         contained type.
@@ -1218,7 +1216,7 @@
 </element>
 
 <attlist name="constructor">
-<attdecl>
+<attdecl>
     specifiers CDATA #IMPLIED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -1274,7 +1272,7 @@
 
   <programlisting>&lt;library-reference&gt;
   &lt;header name="boost/any.hpp"&gt;
- &lt;namespace name="boost"&gt;
+ &lt;namespace name="boost"&gt;
       &lt;!-- C++ constructs in the boost namespace --&gt;
     &lt;/namespace&gt;
   &lt;/header&gt;
@@ -1496,7 +1494,7 @@
 </element>
 
 <attlist name="data-member">
-<attdecl>
+<attdecl>
     name CDATA #REQUIRED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -1558,6 +1556,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -1736,7 +1735,7 @@
 </element>
 
 <attlist name="requirement">
-<attdecl>
+<attdecl>
      name CDATA #REQUIRED</attdecl>
 <attribute name="name"
            type="#REQUIRED"
@@ -1859,7 +1858,7 @@
 </element>
 
 <attlist name="run-test">
-<attdecl>
+<attdecl>
      filename CDATA #REQUIRED
      name CDATA #IMPLIED</attdecl>
 <attribute name="filename"
@@ -1954,7 +1953,7 @@
 </element>
 
 <attlist name="copy-assignment">
-<attdecl>
+<attdecl>
     cv CDATA #IMPLIED
     specifiers CDATA #IMPLIED
     %boost.common.attrib;</attdecl>
@@ -2000,7 +1999,7 @@
 </element>
 
 <attlist name="run-fail-test">
-<attdecl>
+<attdecl>
      filename CDATA #REQUIRED
      name CDATA #IMPLIED</attdecl>
 <attribute name="filename"
@@ -2159,7 +2158,7 @@
 </element>
 
 <attlist name="parameter">
-<attdecl>
+<attdecl>
      name CDATA #IMPLIED</attdecl>
 <attribute name="name"
            type="#IMPLIED"
@@ -2255,7 +2254,7 @@
 </element>
 
 <attlist name="overloaded-function">
-<attdecl>
+<attdecl>
     name CDATA #REQUIRED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -2276,6 +2275,60 @@
            default=""/>
 </attlist>
 
+ <element name="access"
+ content-type="element">
+ <content-model-expanded>
+ <or-group occurrence="+">
+ <element-name name="static-constant"/>
+ <element-name name="typedef"/>
+ <element-name name="enum"/>
+ <element-name name="copy-assignment"/>
+ <element-name name="constructor"/>
+ <element-name name="destructor"/>
+ <element-name name="method-group"/>
+ <element-name name="method"/>
+ <element-name name="overloaded-method"/>
+ <element-name name="data-member"/>
+ <element-name name="class"/>
+ <element-name name="class-specialization"/>
+ <element-name name="struct"/>
+ <element-name name="struct-specialization"/>
+ <element-name name="union"/>
+ <element-name name="union-specialization"/>
+ </or-group>
+ </content-model-expanded>
+ <content-model>
+ <sequence-group occurrence="+">
+ <parament-name name="boost.class.members"/>
+ </sequence-group>
+ </content-model>
+ <purpose>Declares an access specification for class members</purpose>
+
+ <description>
+ <para>The access specifications of class members (public, private, or protected) may be determined by enclosing them in an &lt;access&gt; element.</para>
+ </description>
+ </element>
+
+ <attlist name="access">
+ <attdecl>
+ name CDATA #REQUIRED
+ %boost.common.attrib;</attdecl>
+ <attribute name="last-revision"
+ type="#IMPLIED"
+ value="CDATA"
+ default=""/>
+ <attribute name="name"
+ type="#REQUIRED"
+ value="CDATA"
+ default="">
+ <purpose>The name of the access specification, e.g. "public", "private", or "protected".</purpose>
+ </attribute>
+ <attribute name="id"
+ type="#IMPLIED"
+ value="CDATA"
+ default=""/>
+ </attlist>
+
 <element name="class"
          content-type="element">
 <content-model-expanded>
@@ -2285,6 +2338,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -2348,7 +2402,7 @@
   inheritance from the class <classname>std::bad_cast</classname>. It
   also defines the &lt;purpose&gt; element, which contains a short
   description of the use of the class.</para>
-
+
   <programlisting>&lt;class name="bad_any_cast"&gt;
   &lt;inherit access="public"&gt;&lt;classname&gt;std::bad_cast&lt;/classname&gt;&lt;/inherit&gt;
   &lt;purpose&gt;&lt;para&gt;The exception thrown in the event of a failed
@@ -2402,7 +2456,7 @@
 </element>
 
 <attlist name="librarycategorydef">
-<attdecl>
+<attdecl>
          name CDATA #REQUIRED
          %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -2524,7 +2578,7 @@
 </element>
 
 <attlist name="overloaded-method">
-<attdecl>
+<attdecl>
     name CDATA #REQUIRED
     %boost.common.attrib;</attdecl>
 <attribute name="last-revision"
@@ -2813,6 +2867,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -2874,6 +2929,7 @@
     <element-name name="purpose" occurrence="?"/>
     <element-name name="description" occurrence="?"/>
     <or-group occurrence="*">
+ <element-name name="access"/>
       <element-name name="static-constant"/>
       <element-name name="typedef"/>
       <element-name name="enum"/>
@@ -3224,5 +3280,4 @@
            value="CDATA"
            default=""/>
 </attlist>
-
 </dtd>

Modified: branches/release/tools/boostbook/doc/reference.xml
==============================================================================
--- branches/release/tools/boostbook/doc/reference.xml (original)
+++ branches/release/tools/boostbook/doc/reference.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,14 +1,7 @@
 <?xml version="1.0" standalone="yes"?>
-<!--
- 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)
- -->
-<chapter id="reference">
+<section id="reference">
   <title>Reference</title>
- <para>Elements:<itemizedlist spacing="compact"><listitem><simpara><link linkend="boostbook.dtd.boostbook">Element <sgmltag>boostbook</sgmltag> - Defines a BoostBook book</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.class">Element <sgmltag>class</sgmltag> - Declares a class or class template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.class-specialization">Element <sgmltag>class-specialization</sgmltag> - A specialization (partial or full) of a class template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.code">Element <sgmltag>code</sgmltag> - Mimics the <sgmltag>code</sgmltag> tag in HTML</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.compile-fail-test">Element <sgmltag>compile-fail-test</sgmltag> - A testcase that should fail to compile</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.compile-test">Element <sgmltag>compile-test</sgmltag> - A testcase that should
compile correctly</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.complexity">Element <sgmltag>complexity</sgmltag> - The time/space/etc. complexity of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.constructor">Element <sgmltag>constructor</sgmltag> - Declares a constructor of the enclosing class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.copy-assignment">Element <sgmltag>copy-assignment</sgmltag> - Declares a copy-assignment operator</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.data-member">Element <sgmltag>data-member</sgmltag> - Declares a data member of a class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.default">Element <sgmltag>default</sgmltag> - The default value of a function or template parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.description">Element <sgmltag>description</sgmltag> - Detailed descripti
on of a construct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.destructor">Element <sgmltag>destructor</sgmltag> - Declares a destructor for the enclosing class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.effects">Element <sgmltag>effects</sgmltag> - Declares the side effects of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.enum">Element <sgmltag>enum</sgmltag> - Declares an enumeration type</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.enumvalue">Element <sgmltag>enumvalue</sgmltag> - A single value of an enumeration</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.free-function-group">Element <sgmltag>free-function-group</sgmltag> - A set of functions that are grouped together under one name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.function">Element <sgmltag>function</sgmltag> - Declares a function</link></simpara></lis
titem><listitem><simpara><link linkend="boostbook.dtd.functionname">Element <sgmltag>functionname</sgmltag> - References a function with the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.header">Element <sgmltag>header</sgmltag> - Declares a C++ header with the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.if-fails">Element <sgmltag>if-fails</sgmltag> - What it means when a testcase fails</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.inherit">Element <sgmltag>inherit</sgmltag> - Declares a base class of the enclosing class or struct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.lib">Element <sgmltag>lib</sgmltag> - A library dependency</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.library">Element <sgmltag>library</sgmltag> - Top-level element for a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.library-refer
ence">Element <sgmltag>library-reference</sgmltag> - Declares the reference material for a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategory">Element <sgmltag>librarycategory</sgmltag> - Declares that the enclosing library is in this category</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategorydef">Element <sgmltag>librarycategorydef</sgmltag> - Defines a new library category</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategorylist">Element <sgmltag>librarycategorylist</sgmltag> - Categorized listing of libraries</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.libraryinfo">Element <sgmltag>libraryinfo</sgmltag> - Provides information about a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarylist">Element <sgmltag>librarylist</sgmltag> - Placeholder for an alphabetical list of libraries</link></simpara></listitem><listit
em><simpara><link linkend="boostbook.dtd.libraryname">Element <sgmltag>libraryname</sgmltag> - References a library of the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarypurpose">Element <sgmltag>librarypurpose</sgmltag> - Describes in one short sentence or phrase the purpose of a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.link-fail-test">Element <sgmltag>link-fail-test</sgmltag> - Declares a test that should compile but fail to link</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.link-test">Element <sgmltag>link-test</sgmltag> - Declares a test that should compile and link</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.method">Element <sgmltag>method</sgmltag> - Declares a method, i.e., a member function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.method-group">Element <sgmltag>method-group</sgmltag> - A set of methods that are grouped to
gether under one name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.namespace">Element <sgmltag>namespace</sgmltag> - Declares a namespace</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.notes">Element <sgmltag>notes</sgmltag> - Non-normative notes about a function's semantics</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.overloaded-function">Element <sgmltag>overloaded-function</sgmltag> - An overloaded function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.overloaded-method">Element <sgmltag>overloaded-method</sgmltag> - An overloaded method</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.parameter">Element <sgmltag>parameter</sgmltag> - A function parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.paramtype">Element <sgmltag>paramtype</sgmltag> - The type of a function parameter</link></simpara></listitem><listitem><simpara><link lin
kend="boostbook.dtd.postconditions">Element <sgmltag>postconditions</sgmltag> - Conditions that must hold after the function returns</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.precondition">Element <sgmltag>precondition</sgmltag> - Conditions that must be met prior to executing a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.programlisting">Element <sgmltag>programlisting</sgmltag> - A sample of program code</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.purpose">Element <sgmltag>purpose</sgmltag> - A short description of an entity's use</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.rationale">Element <sgmltag>rationale</sgmltag> - Describes the rationale for a particular function's design</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.requirement">Element <sgmltag>requirement</sgmltag> - A requirement/property in the Jamfile for a testcase</link></simpara
></listitem><listitem><simpara><link linkend="boostbook.dtd.requires">Element <sgmltag>requires</sgmltag> - Declares the requirements of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.returns">Element <sgmltag>returns</sgmltag> - Description of the return value of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.run-fail-test">Element <sgmltag>run-fail-test</sgmltag> - A testcase that should compile and link, but fail on execution</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.run-test">Element <sgmltag>run-test</sgmltag> - A testcase that should compile, link, and execute</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.signature">Element <sgmltag>signature</sgmltag> - One signature of an overloaded function or method</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.snippet">Element <sgmltag>snippet</sgmltag> - Pulls in a code snippet from a <sgmltag>pro
gramlisting</sgmltag> element</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.source">Element <sgmltag>source</sgmltag> - Defines source code for a test</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.specialization">Element <sgmltag>specialization</sgmltag> - Defines the specialization arguments for a class specialization</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.static-constant">Element <sgmltag>static-constant</sgmltag> - Declares a static constant, e.g., <code>const int foo = 5;</code>.</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.struct">Element <sgmltag>struct</sgmltag> - Declares a C++ struct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.struct-specialization">Element <sgmltag>struct-specialization</sgmltag> - A specialization (full or partial) of a struct template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template">Element <
sgmltag>template</sgmltag> - Declares the template parameters of a class or function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-arg">Element <sgmltag>template-arg</sgmltag> - A template argument in a specialization</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-nontype-parameter">Element <sgmltag>template-nontype-parameter</sgmltag> - A nontype template parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-type-parameter">Element <sgmltag>template-type-parameter</sgmltag> - Declares a template type parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-varargs">Element <sgmltag>template-varargs</sgmltag> - Declares a variable-length list of template parameters</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.testsuite">Element <sgmltag>testsuite</sgmltag> - Describes a library testsuite</link></simpara></listitem><listitem><simp
ara><link linkend="boostbook.dtd.throws">Element <sgmltag>throws</sgmltag> - Description of the exceptions thrown by a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.type">Element <sgmltag>type</sgmltag> - The type of an element or return type of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.typedef">Element <sgmltag>typedef</sgmltag> - Declares a typedef</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.union">Element <sgmltag>union</sgmltag> - Declares a C++ union or union template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.union-specialization">Element <sgmltag>union-specialization</sgmltag> - A specialization (full or partial) of a union template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.using-class">Element <sgmltag>using-class</sgmltag> - Injects the method and function names of a class into the local scope</link></simpara></listitem><lis
titem><simpara><link linkend="boostbook.dtd.using-namespace">Element <sgmltag>using-namespace</sgmltag> - Injects the declared names from a namespace into the local scope</link></simpara></listitem></itemizedlist></para>
+ <para>Elements:<itemizedlist spacing="compact"><listitem><simpara><link linkend="boostbook.dtd.access">Element <sgmltag>access</sgmltag> - Declares an access specification for class members</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.boostbook">Element <sgmltag>boostbook</sgmltag> - Defines a BoostBook book</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.class">Element <sgmltag>class</sgmltag> - Declares a class or class template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.class-specialization">Element <sgmltag>class-specialization</sgmltag> - A specialization (partial or full) of a class template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.code">Element <sgmltag>code</sgmltag> - Mimics the <sgmltag>code</sgmltag> tag in HTML</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.compile-fail-test">Element <sgmltag>compile-fail-test</sgmltag> - A testcase that should
fail to compile</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.compile-test">Element <sgmltag>compile-test</sgmltag> - A testcase that should compile correctly</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.complexity">Element <sgmltag>complexity</sgmltag> - The time/space/etc. complexity of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.constructor">Element <sgmltag>constructor</sgmltag> - Declares a constructor of the enclosing class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.copy-assignment">Element <sgmltag>copy-assignment</sgmltag> - Declares a copy-assignment operator</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.data-member">Element <sgmltag>data-member</sgmltag> - Declares a data member of a class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.default">Element <sgmltag>default</sgmltag> - The default value of a function
 or template parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.description">Element <sgmltag>description</sgmltag> - Detailed description of a construct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.destructor">Element <sgmltag>destructor</sgmltag> - Declares a destructor for the enclosing class</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.effects">Element <sgmltag>effects</sgmltag> - Declares the side effects of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.enum">Element <sgmltag>enum</sgmltag> - Declares an enumeration type</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.enumvalue">Element <sgmltag>enumvalue</sgmltag> - A single value of an enumeration</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.free-function-group">Element <sgmltag>free-function-group</sgmltag> - A set of functions that are grouped together under one
 name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.function">Element <sgmltag>function</sgmltag> - Declares a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.functionname">Element <sgmltag>functionname</sgmltag> - References a function with the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.header">Element <sgmltag>header</sgmltag> - Declares a C++ header with the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.if-fails">Element <sgmltag>if-fails</sgmltag> - What it means when a testcase fails</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.inherit">Element <sgmltag>inherit</sgmltag> - Declares a base class of the enclosing class or struct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.lib">Element <sgmltag>lib</sgmltag> - A library dependency</link></simpara></listitem><listitem><simpara><link linkend="boostbook.
dtd.library">Element <sgmltag>library</sgmltag> - Top-level element for a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.library-reference">Element <sgmltag>library-reference</sgmltag> - Declares the reference material for a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategory">Element <sgmltag>librarycategory</sgmltag> - Declares that the enclosing library is in this category</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategorydef">Element <sgmltag>librarycategorydef</sgmltag> - Defines a new library category</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarycategorylist">Element <sgmltag>librarycategorylist</sgmltag> - Categorized listing of libraries</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.libraryinfo">Element <sgmltag>libraryinfo</sgmltag> - Provides information about a library</link></simpara></listitem><listitem><simpa
ra><link linkend="boostbook.dtd.librarylist">Element <sgmltag>librarylist</sgmltag> - Placeholder for an alphabetical list of libraries</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.libraryname">Element <sgmltag>libraryname</sgmltag> - References a library of the given name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.librarypurpose">Element <sgmltag>librarypurpose</sgmltag> - Describes in one short sentence or phrase the purpose of a library</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.link-fail-test">Element <sgmltag>link-fail-test</sgmltag> - Declares a test that should compile but fail to link</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.link-test">Element <sgmltag>link-test</sgmltag> - Declares a test that should compile and link</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.method">Element <sgmltag>method</sgmltag> - Declares a method, i.e., a member functi
on</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.method-group">Element <sgmltag>method-group</sgmltag> - A set of methods that are grouped together under one name</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.namespace">Element <sgmltag>namespace</sgmltag> - Declares a namespace</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.notes">Element <sgmltag>notes</sgmltag> - Non-normative notes about a function's semantics</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.overloaded-function">Element <sgmltag>overloaded-function</sgmltag> - An overloaded function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.overloaded-method">Element <sgmltag>overloaded-method</sgmltag> - An overloaded method</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.parameter">Element <sgmltag>parameter</sgmltag> - A function parameter</link></simpara></listitem><listitem><simpa
ra><link linkend="boostbook.dtd.paramtype">Element <sgmltag>paramtype</sgmltag> - The type of a function parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.postconditions">Element <sgmltag>postconditions</sgmltag> - Conditions that must hold after the function returns</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.precondition">Element <sgmltag>precondition</sgmltag> - Conditions that must be met prior to executing a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.programlisting">Element <sgmltag>programlisting</sgmltag> - A sample of program code</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.purpose">Element <sgmltag>purpose</sgmltag> - A short description of an entity's use</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.rationale">Element <sgmltag>rationale</sgmltag> - Describes the rationale for a particular function's design</link></simpara></listitem>
<listitem><simpara><link linkend="boostbook.dtd.requirement">Element <sgmltag>requirement</sgmltag> - A requirement/property in the Jamfile for a testcase</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.requires">Element <sgmltag>requires</sgmltag> - Declares the requirements of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.returns">Element <sgmltag>returns</sgmltag> - Description of the return value of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.run-fail-test">Element <sgmltag>run-fail-test</sgmltag> - A testcase that should compile and link, but fail on execution</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.run-test">Element <sgmltag>run-test</sgmltag> - A testcase that should compile, link, and execute</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.signature">Element <sgmltag>signature</sgmltag> - One signature of an overloaded function or m
ethod</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.snippet">Element <sgmltag>snippet</sgmltag> - Pulls in a code snippet from a <sgmltag>programlisting</sgmltag> element</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.source">Element <sgmltag>source</sgmltag> - Defines source code for a test</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.specialization">Element <sgmltag>specialization</sgmltag> - Defines the specialization arguments for a class specialization</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.static-constant">Element <sgmltag>static-constant</sgmltag> - Declares a static constant, e.g., <code>const int foo = 5;</code>.</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.struct">Element <sgmltag>struct</sgmltag> - Declares a C++ struct</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.struct-specialization">Element <sgmltag>struct-special
ization</sgmltag> - A specialization (full or partial) of a struct template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template">Element <sgmltag>template</sgmltag> - Declares the template parameters of a class or function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-arg">Element <sgmltag>template-arg</sgmltag> - A template argument in a specialization</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-nontype-parameter">Element <sgmltag>template-nontype-parameter</sgmltag> - A nontype template parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-type-parameter">Element <sgmltag>template-type-parameter</sgmltag> - Declares a template type parameter</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.template-varargs">Element <sgmltag>template-varargs</sgmltag> - Declares a variable-length list of template parameters</link></simpara></listitem>
<listitem><simpara><link linkend="boostbook.dtd.testsuite">Element <sgmltag>testsuite</sgmltag> - Describes a library testsuite</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.throws">Element <sgmltag>throws</sgmltag> - Description of the exceptions thrown by a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.type">Element <sgmltag>type</sgmltag> - The type of an element or return type of a function</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.typedef">Element <sgmltag>typedef</sgmltag> - Declares a typedef</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.union">Element <sgmltag>union</sgmltag> - Declares a C++ union or union template</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.union-specialization">Element <sgmltag>union-specialization</sgmltag> - A specialization (full or partial) of a union template</link></simpara></listitem><listitem><simpara><link linkend=
"boostbook.dtd.using-class">Element <sgmltag>using-class</sgmltag> - Injects the method and function names of a class into the local scope</link></simpara></listitem><listitem><simpara><link linkend="boostbook.dtd.using-namespace">Element <sgmltag>using-namespace</sgmltag> - Injects the declared names from a namespace into the local scope</link></simpara></listitem></itemizedlist></para>
   <refentry id="boostbook.dtd.class-specialization">
     <refmeta>
       <refentrytitle>
@@ -20,7 +13,7 @@
       <refpurpose>A specialization (partial or full) of a class template</refpurpose>
     </refnamediv>
     <refsynopsisdiv>class-specialization ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dt
d.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">ove
rloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection>
       <title>Attributes</title>
@@ -36,7 +29,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -140,7 +133,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -176,7 +169,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -218,7 +211,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -258,7 +251,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -294,7 +287,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -339,7 +332,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -377,7 +370,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -413,7 +406,7 @@
   this:</para>
 
   <programlisting>&lt;library-reference&gt;
- &lt;header name=&quot;boost/any.hpp&quot;&gt;
+ &lt;header name="boost/any.hpp"&gt;
     &lt;!-- C++ constructs in this header --&gt;
   &lt;/header&gt;
 &lt;/library-reference&gt;</programlisting>
@@ -440,7 +433,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -480,7 +473,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -499,7 +492,7 @@
       <refpurpose>Declares a C++ union or union template</refpurpose>
     </refnamediv>
     <refsynopsisdiv>union ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbo
ok.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-meth
od">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection>
       <title>Attributes</title>
@@ -515,7 +508,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -535,13 +528,10 @@
       <refpurpose>Declares a base class of the enclosing class or struct</refpurpose>
     </refnamediv>
     <refsynopsisdiv>inherit ::=
- (ANY)
+ (<link linkend="boostbook.dtd.type">type</link>, <link linkend="boostbook.dtd.purpose">purpose</link>?)
 </refsynopsisdiv>
     <refsection><title>Description</title>
- <para>This element contains the name of the class inherited. The
- content model is free-form, as the inherited class may be an
- instantiation of a template and may have markup in it (e.g.,
- <sgmltag>classname</sgmltag> tags).</para>
+ <para>This element contains the type of the class inherited.</para>
 </refsection>
     <refsection>
       <title>Attributes</title>
@@ -557,8 +547,8 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
-<row><entry>access</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry/></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
+<row><entry>access</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The access specifier ("public", "private", or "protected") of the inheritance.</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -582,7 +572,7 @@
     <refsection><title>Description</title>
   <para>Variable-length template parameter lists are not allowed in
   C++, but because they are sometimes needed in documentation they are
- allowed in BoostBook. This element generally expands to &quot;...&quot; and
+ allowed in BoostBook. This element generally expands to "..." and
   can be used anywhere any other template parameter can be
   used.</para>
 </refsection>
@@ -600,7 +590,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -654,7 +644,7 @@
   behavior. Constructors, destructors, member functions, and free
   functions all use the same documentation method, although the
   top-level tags differ.</para>
-
+
   <para>The behavior of functions in BoostBook is documenting using a
   style similar to that of the C++ standard, with clauses describing
   the requirements, effects, postconditions, exception behavior, and
@@ -662,18 +652,18 @@
 
   <para>The following example illustrates some constructors and a
   destructor for <classname>boost::any</classname>. Note that one of
- the constructors takes a single parameter whose name is &quot;other&quot; and
+ the constructors takes a single parameter whose name is "other" and
   whose type, <code>const any&amp;</code> is contained in the
   &lt;paramtype&gt; element; any number of parameters may be specified
   in this way.</para>
 
- <programlisting>&lt;class name=&quot;any&quot;&gt;
+ <programlisting>&lt;class name="any"&gt;
   &lt;constructor&gt;
     &lt;postconditions&gt;&lt;para&gt;&lt;this-&gt;empty()&gt;&lt;/para&gt;&lt;/postconditions&gt;
   &lt;/constructor&gt;
 
   &lt;constructor&gt;
- &lt;parameter name=&quot;other&quot;&gt;
+ &lt;parameter name="other"&gt;
       &lt;paramtype&gt;const &lt;classname&gt;any&lt;/classname&gt;&amp;amp;&lt;/paramtype&gt;
     &lt;/parameter&gt;
 
@@ -683,12 +673,12 @@
         so that any content is equivalent in both type and value to the
         content of &lt;code&gt;other&lt;/code&gt;, or empty if
         &lt;code&gt;other&lt;/code&gt; is
- empty.
+ empty.
       &lt;/simpara&gt;
     &lt;/effects&gt;
 
     &lt;throws&gt;
- &lt;simpara&gt;May fail with a
+ &lt;simpara&gt;May fail with a
         &lt;classname&gt;std::bad_alloc&lt;/classname&gt; exception or any
         exceptions arising from the copy constructor of the
         contained type.
@@ -718,7 +708,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -755,7 +745,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -829,7 +819,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
@@ -905,7 +895,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -932,12 +922,12 @@
   element. As in C++, namespaces can be nested and contain other C++
   constructs, such as classes or functions. The <code>name</code>
   attribute of a &lt;namespace&gt; element gives the namespace name
- (e.g., &quot;boost&quot;). The <libraryname>Any</libraryname> library is
+ (e.g., "boost"). The <libraryname>Any</libraryname> library is
   defined entirely within namespace boost by:</para>
 
   <programlisting>&lt;library-reference&gt;
- &lt;header name=&quot;boost/any.hpp&quot;&gt;
- &lt;namespace name=&quot;boost&quot;&gt;
+ &lt;header name="boost/any.hpp"&gt;
+ &lt;namespace name="boost"&gt;
       &lt;!-- C++ constructs in the boost namespace --&gt;
     &lt;/namespace&gt;
   &lt;/header&gt;
@@ -957,7 +947,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1016,7 +1006,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1060,7 +1050,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1095,7 +1085,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1131,7 +1121,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1166,7 +1156,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1202,7 +1192,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1221,7 +1211,7 @@
       <refpurpose>A specialization (full or partial) of a union template</refpurpose>
     </refnamediv>
     <refsynopsisdiv>union-specialization ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dt
d.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">ove
rloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection>
       <title>Attributes</title>
@@ -1237,7 +1227,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1273,7 +1263,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1308,7 +1298,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1343,7 +1333,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1372,7 +1362,7 @@
   requirement gives the value of that feature. A requirement such as
   <code>&lt;includes&gt;foo.hpp</code> would be encoded as
   <code>&lt;requirement
- name=&quot;includes&quot;&gt;foo.hpp&lt;/requirement&gt;</code>.</para>
+ name="includes"&gt;foo.hpp&lt;/requirement&gt;</code>.</para>
 </refsection>
     <refsection>
       <title>Attributes</title>
@@ -1421,7 +1411,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1456,7 +1446,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1491,7 +1481,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1561,7 +1551,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1605,7 +1595,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -1676,7 +1666,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1745,7 +1735,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1780,7 +1770,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -1857,7 +1847,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>cv</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>cv-qualifiers for this method, e.g., const volatile</entry></row>
 <row><entry>specifiers</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The specifiers for this function, e.g., inline, static, etc.</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
@@ -1899,7 +1889,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -1908,6 +1898,44 @@
       </informaltable>
     </refsection>
   </refentry>
+ <refentry id="boostbook.dtd.access">
+ <refmeta>
+ <refentrytitle>
+ BoostBook element <sgmltag>access</sgmltag></refentrytitle>
+ <manvolnum>9</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname>access</refname>
+ <refpurpose>Declares an access specification for class members</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>access ::=
+ (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)+
+ </refsynopsisdiv>
+ <refsection><title>Description</title>
+ <para>The access specifications of class members (public, private, or protected) may be determined by enclosing them in an &lt;access&gt; element.</para>
+ </refsection>
+ <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>
+
+ <row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
+ <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the access specification, e.g. "public", "private", or "protected".</entry></row>
+ <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsection>
+ </refentry>
   <refentry id="boostbook.dtd.class">
     <refmeta>
       <refentrytitle>
@@ -1919,18 +1947,18 @@
       <refpurpose>Declares a class or class template</refpurpose>
     </refnamediv>
     <refsynopsisdiv>class ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbo
ok.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-meth
od">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection><title>Description</title>
   <para>C++ classes and class templates are described via the
- &lt;class&gt; element. Each class has a name (e.g., &quot;any&quot;) given by
+ &lt;class&gt; element. Each class has a name (e.g., "any") given by
   the <code>name</code> attribute, a purpose given by the
   &lt;purpose&gt; element, documentation, and a set of types,
   functions, base classes, and data members. Here is a minimal
   definition of the <classname>boost::any</classname> class:</para>
 
- <programlisting>&lt;namespace name=&quot;boost&quot;&gt;
- &lt;class name=&quot;any&quot;&gt;
+ <programlisting>&lt;namespace name="boost"&gt;
+ &lt;class name="any"&gt;
     &lt;purpose&gt;
       A class whose instances can hold instances of any type that satisfies
       ValueType requirements.
@@ -1955,9 +1983,9 @@
   inheritance from the class <classname>std::bad_cast</classname>. It
   also defines the &lt;purpose&gt; element, which contains a short
   description of the use of the class.</para>
-
- <programlisting>&lt;class name=&quot;bad_any_cast&quot;&gt;
- &lt;inherit access=&quot;public&quot;&gt;&lt;classname&gt;std::bad_cast&lt;/classname&gt;&lt;/inherit&gt;
+
+ <programlisting>&lt;class name="bad_any_cast"&gt;
+ &lt;inherit access="public"&gt;&lt;classname&gt;std::bad_cast&lt;/classname&gt;&lt;/inherit&gt;
   &lt;purpose&gt;&lt;para&gt;The exception thrown in the event of a failed
   &lt;functionname&gt;any_cast&lt;/functionname&gt; of an
   &lt;classname&gt;any&lt;/classname&gt; value.&lt;/para&gt;&lt;/purpose&gt;
@@ -1980,7 +2008,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2003,7 +2031,7 @@
   (#PCDATA)
 </refsynopsisdiv>
     <refsection><title>Description</title>
- <para>All library category definitions should be in <filename>doc/src/boost.xml</filename>, and the names of categories must be prefixed with &quot;<code>category:</code>&quot;.</para>
+ <para>All library category definitions should be in <filename>doc/src/boost.xml</filename>, and the names of categories must be prefixed with "<code>category:</code>".</para>
 </refsection>
     <refsection>
       <title>Attributes</title>
@@ -2019,7 +2047,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2055,7 +2083,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2090,7 +2118,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2131,7 +2159,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2200,7 +2228,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2235,7 +2263,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2270,7 +2298,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2306,7 +2334,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>dirname</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry/></row>
 <row><entry>url</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry/></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
@@ -2350,7 +2378,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2385,7 +2413,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2405,7 +2433,7 @@
       <refpurpose>A specialization (full or partial) of a struct template</refpurpose>
     </refnamediv>
     <refsynopsisdiv>struct-specialization ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dt
d.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.specialization">specialization</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>?, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">ove
rloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection>
       <title>Attributes</title>
@@ -2421,7 +2449,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2441,7 +2469,7 @@
       <refpurpose>Declares a C++ struct</refpurpose>
     </refnamediv>
     <refsynopsisdiv>struct ::=
- (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-method">overloaded-method</link>| <link linkend="boostbo
ok.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
+ (<link linkend="boostbook.dtd.template">template</link>?, <link linkend="boostbook.dtd.inherit">inherit</link>*, <link linkend="boostbook.dtd.purpose">purpose</link>?, <link linkend="boostbook.dtd.description">description</link>?, (<link linkend="boostbook.dtd.access">access</link>| <link linkend="boostbook.dtd.static-constant">static-constant</link>| <link linkend="boostbook.dtd.typedef">typedef</link>| <link linkend="boostbook.dtd.enum">enum</link>| <link linkend="boostbook.dtd.copy-assignment">copy-assignment</link>| <link linkend="boostbook.dtd.constructor">constructor</link>| <link linkend="boostbook.dtd.destructor">destructor</link>| <link linkend="boostbook.dtd.method-group">method-group</link>| <link linkend="boostbook.dtd.free-function-group">free-function-group</link>| <link linkend="boostbook.dtd.function">function</link>| <link linkend="boostbook.dtd.method">method</link>| <link linkend="boostbook.dtd.overloaded-function">overloaded-function</link>| <link linkend="boostbook.dtd.overloaded-meth
od">overloaded-method</link>| <link linkend="boostbook.dtd.data-member">data-member</link>| <link linkend="boostbook.dtd.class">class</link>| <link linkend="boostbook.dtd.class-specialization">class-specialization</link>| <link linkend="boostbook.dtd.struct">struct</link>| <link linkend="boostbook.dtd.struct-specialization">struct-specialization</link>| <link linkend="boostbook.dtd.union">union</link>| <link linkend="boostbook.dtd.union-specialization">union-specialization</link>)*)
 </refsynopsisdiv>
     <refsection>
       <title>Attributes</title>
@@ -2457,7 +2485,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2510,7 +2538,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2546,7 +2574,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2581,7 +2609,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2616,7 +2644,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2651,7 +2679,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2686,7 +2714,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2721,7 +2749,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>name</entry><entry>#REQUIRED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
@@ -2757,7 +2785,7 @@
           </thead>
           <tbody>
 
-<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep &quot;last revised&quot; information in sync with CVS changes</entry></row>
+<row><entry>last-revision</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to $Date$ to keep "last revised" information in sync with CVS changes</entry></row>
 <row><entry>id</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>A global identifier for this element</entry></row>
 <row><entry>xml:base</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Implementation detail used by XIncludes</entry></row>
 </tbody>
@@ -2765,4 +2793,4 @@
       </informaltable>
     </refsection>
   </refentry>
-</chapter>
+</section>

Modified: branches/release/tools/boostbook/dtd/boostbook.dtd
==============================================================================
--- branches/release/tools/boostbook/dtd/boostbook.dtd (original)
+++ branches/release/tools/boostbook/dtd/boostbook.dtd 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,15 +1,20 @@
 <!--
- BoostBook DTD version 1.0
+ 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_at_[hidden]>.
- All Rights Reserved.
+ Copyright (c) 2002 by Peter Simons <simons_at_[hidden]>
+ Copyright (c) 2003-2004 by Douglas Gregor <doug.gregor -at- gmail.com>
+ Copyright (c) 2007 by Frank Mori Hess <fmhess_at_[hidden]>
+
+ Distributed under the 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.0//EN"
- SYSTEM "http://cryp.to/boost-sandbox/libs/documentation/dtd/boostbook.dtd"
+ PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
+ SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
 
    $Revision$
    $Date$
@@ -37,7 +42,7 @@
 <!ENTITY % boost.common.attrib "%local.common.attrib;
                                 id CDATA #IMPLIED">
 
-<!ENTITY % boost.namespace.mix
+<!ENTITY % boost.namespace.mix
         "class|class-specialization|struct|struct-specialization|
          union|union-specialization|typedef|enum|
          free-function-group|function|overloaded-function|
@@ -46,23 +51,25 @@
 <!ENTITY % boost.template.mix
         "template-type-parameter|template-nontype-parameter|template-varargs">
 
-<!ENTITY % boost.class.mix
+<!ENTITY % boost.class.members
         "static-constant|typedef|enum|
          copy-assignment|constructor|destructor|method-group|
- free-function-group|function|method|overloaded-function|
- overloaded-method|data-member|class|class-specialization|struct|
+ 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;)*">
+ "template?, inherit*, purpose?, description?,
+ (%boost.class.mix;|access)*">
 
 <!ENTITY % boost.class-specialization.content
- "template?, specialization?, inherit?, purpose?, description?,
- (%boost.class.mix;)*">
+ "template?, specialization?, inherit?, purpose?, description?,
+ (%boost.class.mix;|access)*">
 
 <!ENTITY % boost.function.semantics
- "purpose?, description?, requires?, effects?, postconditions?,
+ "purpose?, description?, requires?, effects?, postconditions?,
          returns?, throws?, complexity?, notes?, rationale?">
 
 <!ENTITY % library.content
@@ -104,7 +111,7 @@
 <!ATTLIST librarycategorylist %boost.common.attrib;>
 
 <!ELEMENT librarycategorydef (#PCDATA)>
-<!ATTLIST librarycategorydef
+<!ATTLIST librarycategorydef
          name CDATA #REQUIRED
          %boost.common.attrib;>
 
@@ -148,6 +155,11 @@
     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;>
@@ -209,7 +221,7 @@
     %boost.common.attrib;>
 
 <!ELEMENT data-member (type, purpose?, description?)>
-<!ATTLIST data-member
+<!ATTLIST data-member
     name CDATA #REQUIRED
     specifiers CDATA #IMPLIED
     %boost.common.attrib;>
@@ -229,12 +241,12 @@
     %boost.common.attrib;>
 
 <!ELEMENT constructor (template?, parameter*, %boost.function.semantics;)>
-<!ATTLIST constructor
+<!ATTLIST constructor
     specifiers CDATA #IMPLIED
     %boost.common.attrib;>
 
 <!ELEMENT destructor (%boost.function.semantics;)>
-<!ATTLIST destructor
+<!ATTLIST destructor
     specifiers CDATA #IMPLIED
     %boost.common.attrib;>
 
@@ -252,12 +264,12 @@
     %boost.common.attrib;>
 
 <!ELEMENT overloaded-method (signature*, %boost.function.semantics;)>
-<!ATTLIST overloaded-method
+<!ATTLIST overloaded-method
     name CDATA #REQUIRED
     %boost.common.attrib;>
 
 <!ELEMENT overloaded-function (signature*, %boost.function.semantics;)>
-<!ATTLIST overloaded-function
+<!ATTLIST overloaded-function
     name CDATA #REQUIRED
     %boost.common.attrib;>
 
@@ -286,12 +298,12 @@
 <!ATTLIST rationale %boost.common.attrib;>
 
 <!ELEMENT functionname (#PCDATA)>
-<!ATTLIST functionname
+<!ATTLIST functionname
     alt CDATA #IMPLIED
     %boost.common.attrib;>
 
 <!ELEMENT enumname (#PCDATA)>
-<!ATTLIST enumname
+<!ATTLIST enumname
     alt CDATA #IMPLIED
     %boost.common.attrib;>
 
@@ -301,9 +313,9 @@
 <!ELEMENT headername (#PCDATA)>
 <!ATTLIST headername %boost.common.attrib;>
 
-<!ELEMENT copy-assignment
+<!ELEMENT copy-assignment
     (template?, type?, parameter*, %boost.function.semantics;)>
-<!ATTLIST copy-assignment
+<!ATTLIST copy-assignment
     cv CDATA #IMPLIED
     specifiers CDATA #IMPLIED
     %boost.common.attrib;>
@@ -330,7 +342,7 @@
      %boost.common.attrib;>
 
 <!--========== Boost Testsuite Extensions ==========-->
-<!ENTITY % boost.testsuite.tests
+<!ENTITY % boost.testsuite.tests
         "compile-test|link-test|run-test|
          compile-fail-test|link-fail-test|run-fail-test">
 <!ENTITY % boost.testsuite.test.content
@@ -345,12 +357,12 @@
      name CDATA #IMPLIED>
 
 <!ELEMENT link-test (%boost.testsuite.test.content;)>
-<!ATTLIST link-test
+<!ATTLIST link-test
      filename CDATA #REQUIRED
      name CDATA #IMPLIED>
 
 <!ELEMENT run-test (%boost.testsuite.test.content;)>
-<!ATTLIST run-test
+<!ATTLIST run-test
      filename CDATA #REQUIRED
      name CDATA #IMPLIED>
 
@@ -360,12 +372,12 @@
      name CDATA #IMPLIED>
 
 <!ELEMENT link-fail-test (%boost.testsuite.test.content;)>
-<!ATTLIST link-fail-test
+<!ATTLIST link-fail-test
      filename CDATA #REQUIRED
      name CDATA #IMPLIED>
 
 <!ELEMENT run-fail-test (%boost.testsuite.test.content;)>
-<!ATTLIST run-fail-test
+<!ATTLIST run-fail-test
      filename CDATA #REQUIRED
      name CDATA #IMPLIED>
 
@@ -378,13 +390,13 @@
 <!ELEMENT lib (#PCDATA)>
 
 <!ELEMENT requirement (#PCDATA)>
-<!ATTLIST requirement
+<!ATTLIST requirement
      name CDATA #REQUIRED>
 
 <!ELEMENT if-fails ANY>
 
 <!ELEMENT parameter (paramtype, default?, description?)>
-<!ATTLIST parameter
+<!ATTLIST parameter
      name CDATA #IMPLIED>
 
 <!ELEMENT programlisting ANY>
@@ -393,7 +405,7 @@
 
 <!--========== Customize the DocBook DTD ==========-->
 <!ENTITY % local.tech.char.class "|functionname|libraryname|enumname|code">
-<!ENTITY % local.para.class
+<!ENTITY % local.para.class
         "|using-namespace|using-class|librarylist|librarycategorylist">
 <!ENTITY % local.descobj.class "|libraryinfo">
 <!ENTITY % local.classname.attrib "alt CDATA #IMPLIED">
@@ -408,5 +420,5 @@
 <!--========== 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;

Modified: branches/release/tools/boostbook/setup_boostbook.py
==============================================================================
--- branches/release/tools/boostbook/setup_boostbook.py (original)
+++ branches/release/tools/boostbook/setup_boostbook.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 # 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)
@@ -10,10 +10,11 @@
 # right now it is used only be release scripts
 
 # User configuration
-DOCBOOK_XSL_VERSION = "1.67.2"
+DOCBOOK_XSL_VERSION = "1.73.2"
 DOCBOOK_DTD_VERSION = "4.2"
-FOP_VERSION = "0.20.5"
-FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop/"
+FOP_VERSION = "0.94"
+FOP_JDK_VERSION="1.4"
+FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop"
 SOURCEFORGE_MIRROR = "http://puzzle.dl.sourceforge.net"
 
 # No user configuration below this point-------------------------------------
@@ -40,7 +41,7 @@
     ( options, args ) = parser.parse_args( args )
     if options.tools is None:
         options.tools = os.getcwd()
-
+
 
     return options.tools
 
@@ -48,7 +49,7 @@
     return path.replace( "\\", "/" )
 
 def unzip( archive_path, result_dir ):
- z = zipfile.ZipFile( archive_path, 'r', zipfile.ZIP_DEFLATED )
+ 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 ) ) ):
@@ -56,11 +57,11 @@
         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' )
+ tar = tarfile.open( archive_path, 'r:gz' )
     for tarinfo in tar:
         tar.extract( tarinfo, result_dir )
     tar.close()
@@ -143,7 +144,7 @@
     except OSError, e:
         os.unlink( config_file )
         os.rename( config_file + ".tmp", config_file )
-
+
 
 def setup_docbook_xsl( tools_directory ):
     print "DocBook XSLT Stylesheets ..."
@@ -181,7 +182,7 @@
         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():
@@ -206,13 +207,13 @@
 
 def setup_fop( tools_directory ):
     print "FOP ..."
- FOP_TARBALL = os.path.join( tools_directory, "fop-%s-bin.tar.gz" % FOP_VERSION )
+ 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.sh"
+ fop_driver = "fop"
 
     FOP = to_posix( os.path.join( FOP_DIR, fop_driver ) )
 
@@ -240,7 +241,7 @@
         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/v2/user-config.jam" ) ):
- JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/user-config.jam" )
+ JAM_CONFIG_IN=os.path.join( os.environ[ "BOOST_ROOT" ], "tools/build/v2/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
@@ -251,7 +252,7 @@
     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()
@@ -264,7 +265,7 @@
         FOP = setup_fop( tools_directory )
 
     user_config = find_user_config()
-
+
     # Find the input jamfile to configure
 
     if user_config is None:
@@ -296,8 +297,8 @@
 def main():
     ( tools_directory ) = accept_args( sys.argv[ 1: ] )
     setup_boostbook( tools_directory )
-
+
 if __name__ == "__main__":
     main()
 
-
+

Modified: branches/release/tools/boostbook/setup_boostbook.sh
==============================================================================
--- branches/release/tools/boostbook/setup_boostbook.sh (original)
+++ branches/release/tools/boostbook/setup_boostbook.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,15 +1,16 @@
 #!/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
-DOCBOOK_XSL_VERSION=1.68.1
+DOCBOOK_XSL_VERSION=1.73.2
 DOCBOOK_DTD_VERSION=4.2
-FOP_VERSION=0.20.5
-FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xml/fop/
+FOP_VERSION=0.94
+FOP_JDK_VERSION=1.4
+FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop
 SOURCEFORGE_MIRROR=http://dl.sourceforge.net
 HTTP_GET_CMD="curl -O"
 
@@ -99,17 +100,17 @@
   HAVE_FOP="no"
 else
   echo "Searching for Java... $JAVA.";
- FOP_TARBALL="fop-$FOP_VERSION-bin.tar.gz"
+ 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.sh"
+ 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..."
+ 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 -
@@ -122,7 +123,7 @@
 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
+ cp $JAM_CONFIG_OUT user-config-backup.jam
   JAM_CONFIG_IN_TEMP="yes"
   echo -n "Updating Boost.Jam configuration in $JAM_CONFIG_OUT... "
 
@@ -130,7 +131,7 @@
   JAM_CONFIG_IN="$BOOST_ROOT/tools/build/v2/user-config.jam";
   JAM_CONFIG_IN_TEMP="no"
   echo -n "Writing Boost.Jam configuration to $JAM_CONFIG_OUT... "
-else
+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
@@ -139,8 +140,8 @@
 cat > setup_boostbook.awk <<EOF
 BEGIN { using_boostbook = 0; eaten=0 }
 
-/^\s*using boostbook/ {
- using_boostbook = 1;
+/^\s*using boostbook/ {
+ using_boostbook = 1;
   print "using boostbook";
   print " : $DOCBOOK_XSL_DIR";
   print " : $DOCBOOK_DTD_DIR";
@@ -156,7 +157,7 @@
 
 /^.*$/ { if (eaten == 0) print; eaten=0 }
 
-END {
+END {
   if (using_boostbook==0) {
     print "using boostbook";
     print " : $DOCBOOK_XSL_DIR";

Modified: branches/release/tools/boostbook/xsl/caramel/concept2docbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/caramel/concept2docbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/caramel/concept2docbook.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -59,7 +59,7 @@
               <copyright><xsl:copy-of select="document(concat('../concepts/', @file))/copyright/node()"/></copyright>
             </xsl:when>
           </xsl:choose>
- </xsl:for-each>
+ </xsl:for-each>
       </refentryinfo>
 -->
 
@@ -108,12 +108,12 @@
     <!-- 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: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>
 
@@ -130,12 +130,12 @@
 
     <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: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>
 
@@ -144,9 +144,9 @@
     <xsl:if test="definition">
       <refsect1>
       <title>Definitions</title>
- <xsl:for-each select="definition">
- <p><xsl:apply-templates/></p>
- </xsl:for-each>
+ <xsl:for-each select="definition">
+ <p><xsl:apply-templates/></p>
+ </xsl:for-each>
       </refsect1>
     </xsl:if>
 
@@ -202,8 +202,8 @@
                       <xsl:with-param name="notations" select="normalize-space($notations)"/>
                     </xsl:call-template>
                   </type>
-
- <xsl:comment/> must be
+
+ <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>
@@ -214,7 +214,7 @@
                     </xsl:call-template>
                   </xsl:for-each><xsl:comment/>.
                 </para>
-
+
                 <xsl:if test="description">
                   <xsl:for-each select="description">
                     <xsl:apply-templates/>
@@ -271,9 +271,9 @@
           </thead>
           <tbody>
             <xsl:apply-templates select="valid-expression">
- <xsl:with-param name="definition_list"
+ <xsl:with-param name="definition_list"
                 select="$definition_list"/>
- <xsl:with-param name="notations"
+ <xsl:with-param name="notations"
                 select="normalize-space($notations)"/>
               <xsl:with-param name="columns" select="$columns"/>
             </xsl:apply-templates>
@@ -282,53 +282,53 @@
       </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>
+ <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>
 
- </variablelist></listitem>
- </varlistentry>
+ <xsl:for-each select="precondition">
+ <varlistentry><term>Precondition</term><listitem><para>
+ <xsl:apply-templates/>
+ </para></listitem></varlistentry>
+ </xsl:for-each>
 
- </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>
@@ -337,9 +337,9 @@
     <xsl:if test="complexity">
       <refsect1>
       <title>Complexity</title>
- <xsl:for-each select="complexity">
- <para><xsl:apply-templates/></para>
- </xsl:for-each>
+ <xsl:for-each select="complexity">
+ <para><xsl:apply-templates/></para>
+ </xsl:for-each>
       </refsect1>
     </xsl:if>
 
@@ -347,14 +347,14 @@
       <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>
+ <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>
@@ -362,46 +362,44 @@
     <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>
+ <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" select="concept-ref | see-also | refines | refines-when-mutable | models-as-first-arg | models | models-when-mutable"/>
+ <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"/>
- <xsl:if test="string(@name|@concept) != string(../@name)">
- <xsl:if test="not(string(@name|@concept) = (preceding::*/@name | preceding::*/@concept | ancestor::*/@name | ancestor::*/@concept))">
- <listitem>
- <para>
- <xsl:call-template name="concept.link">
- <xsl:with-param name="name" select="@name|@concept"/>
- </xsl:call-template>
- </para>
- </listitem>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- </itemizedlist>
+ <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>
 
@@ -417,79 +415,79 @@
     <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: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: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: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: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: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>
@@ -504,35 +502,35 @@
 
     <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: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:value-of select="$definition_list"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
@@ -551,7 +549,7 @@
               <tgroup cols="2">
                 <tbody>
                   <xsl:apply-templates select="associated-type" mode="sgi">
- <xsl:with-param name="definition_list"
+ <xsl:with-param name="definition_list"
                       select="$definition_list"/>
                   </xsl:apply-templates>
                 </tbody>
@@ -561,7 +559,7 @@
           <xsl:when test="$boost.concept.layout='austern'">
             <itemizedlist>
               <xsl:apply-templates select="associated-type" mode="austern">
- <xsl:with-param name="definition_list"
+ <xsl:with-param name="definition_list"
                   select="$definition_list"/>
               </xsl:apply-templates>
             </itemizedlist>
@@ -588,7 +586,7 @@
                   </seg>
                 </seglistitem>
               </xsl:for-each>
- </segmentedlist>
+ </segmentedlist>
           </xsl:when>
         </xsl:choose>
       </refsect1>
@@ -600,11 +598,11 @@
 
     <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,' ')"/>
+ <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:with-param name="list" select="substring-after($list,' ')"/>
       </xsl:call-template>
     </xsl:if>
   </xsl:template>
@@ -629,7 +627,7 @@
     <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">
@@ -638,7 +636,7 @@
             </xsl:call-template>
           </xsl:with-param>
         </xsl:call-template>
-
+
         <xsl:for-each select="description">
           <xsl:apply-templates/>
         </xsl:for-each>
@@ -672,11 +670,11 @@
               <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"
+ <xsl:with-param name="definition_list"
                   select="$definition_list"/>
                 <xsl:with-param name="capitalize" select="position()=1"/>
               </xsl:call-template>
- </xsl:for-each>
+ </xsl:for-each>
           </simpara>
         </entry>
       </xsl:if>
@@ -732,7 +730,7 @@
         <xsl:for-each select="notation">
           <xsl:variable name="notation_name">
             <xsl:call-template name="comma-list">
- <xsl:with-param name="list"
+ <xsl:with-param name="list"
                 select="normalize-space(@variables)"/>
             </xsl:call-template>
           </xsl:variable>
@@ -755,7 +753,7 @@
           </varlistentry>
         </xsl:for-each>
       </variablelist>
- </refsect1>
+ </refsect1>
   </xsl:template>
 
   <xsl:template name="concept.link">
@@ -763,7 +761,7 @@
     <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">
@@ -785,7 +783,7 @@
           <xsl:with-param name="text" select="$text"/>
         </xsl:call-template>
       </xsl:otherwise>
- </xsl:choose>
+ </xsl:choose>
   </xsl:template>
 
   <xsl:template name="remove-whitespace">
@@ -796,7 +794,7 @@
       <xsl:when test="contains($normalized, ' ')">
         <xsl:value-of select="substring-before($normalized, ' ')"/>
         <xsl:call-template name="remove-whitespace">
- <xsl:with-param name="text"
+ <xsl:with-param name="text"
             select="substring-after($normalized, ' ')"/>
         </xsl:call-template>
       </xsl:when>

Modified: branches/release/tools/boostbook/xsl/chunk-common.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/chunk-common.xsl (original)
+++ branches/release/tools/boostbook/xsl/chunk-common.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?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)

Modified: branches/release/tools/boostbook/xsl/docbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/docbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/docbook.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,12 +1,13 @@
 <?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:include href="reference.xsl"/>
 
@@ -52,7 +53,7 @@
           <xsl:if test="not(title)">
             <title>
               <xsl:text>Reference</xsl:text>
- </title>
+ </title>
           </xsl:if>
 
           <xsl:if test="concept">
@@ -73,7 +74,7 @@
               </xsl:choose>
 
               <title>Concepts</title>
-
+
               <itemizedlist>
                 <xsl:for-each select="concept">
                   <listitem>
@@ -116,7 +117,7 @@
         </title>
 
         <xsl:apply-templates select="para|section" mode="annotation"/>
-
+
         <xsl:if test="macro">
           <xsl:call-template name="synopsis">
             <xsl:with-param name="text">
@@ -133,7 +134,7 @@
                      |descendant::typedef">
           <xsl:call-template name="synopsis">
             <xsl:with-param name="text">
- <xsl:apply-templates mode="synopsis"
+ <xsl:apply-templates mode="synopsis"
                 select="namespace|class|struct|union
                        |function|free-function-group
                        |overloaded-function|enum
@@ -262,7 +263,7 @@
         </xsl:if>
         <xsl:if test="not($highlight)">
           <xsl:value-of select="$text"/>
- </xsl:if>
+ </xsl:if>
       </xsl:when>
       <xsl:otherwise>
         <xsl:message>
@@ -290,7 +291,7 @@
       <refnamediv>
         <refname><xsl:value-of select="$refname"/></refname>
         <refpurpose>
- <xsl:apply-templates mode="annotation" select="$purpose"/>
+ <xsl:apply-templates mode="purpose" select="$purpose"/>
                 </refpurpose>
       </refnamediv>
       <refsynopsisdiv>
@@ -339,7 +340,7 @@
       <xsl:for-each select="./@*">
         <xsl:choose>
           <xsl:when test="local-name(.)='last-revision'">
- <xsl:attribute
+ <xsl:attribute
               name="rev:last-revision"
               namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
               <xsl:value-of select="."/>
@@ -385,7 +386,7 @@
         </xsl:attribute>
 
         <xsl:if test="@last-revision">
- <xsl:attribute
+ <xsl:attribute
             name="rev:last-revision"
             namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
             <xsl:value-of select="@last-revision"/>
@@ -443,7 +444,7 @@
   <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. -->
@@ -460,7 +461,7 @@
   <xsl:template match="part/part/partinfo|part/article/articleinfo">
     <chapterinfo><xsl:apply-templates/></chapterinfo>
   </xsl:template>
- <xsl:template match="part/part/chapter">
+ <xsl:template match="part/part/chapter|part/part/appendix">
     <section>
       <xsl:for-each select="./@*">
         <xsl:attribute name="{name(.)}">
@@ -470,7 +471,7 @@
       <xsl:apply-templates/>
     </section>
   </xsl:template>
- <xsl:template match="part/part/chapter/chapterinfo">
+ <xsl:template match="part/part/chapter/chapterinfo|part/part/appendix/appendixinfo">
     <sectioninfo><xsl:apply-templates/></sectioninfo>
   </xsl:template>
 </xsl:stylesheet>

Modified: branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -46,7 +46,7 @@
 
   <xsl:key name="compounds-by-kind" match="compounddef" use="@kind"/>
   <xsl:key name="compounds-by-id" match="compounddef" use="@id"/>
- <xsl:key name="inner-classes" match="compounddef[not(attribute::kind='namespace') and not(attribute::kind='file')]/innerclass" use="@refid"/>
+ <xsl:key name="members-by-id" match="memberdef" use="@id" />
 
   <xsl:strip-space elements="briefdescription detaileddescription"/>
 
@@ -184,8 +184,8 @@
     <xsl:param name="with-namespace-refs"/>
 
     <xsl:if test="contains(string(location/attribute::file),
- concat('/', $in-file)) and
- not (key('inner-classes', @id))">
+ concat('/', $in-file)) ">
+
       <!-- The short name of this class -->
       <xsl:variable name="name-with-spec">
         <xsl:call-template name="strip-qualifiers">
@@ -413,6 +413,16 @@
     </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"/>
@@ -448,6 +458,19 @@
           <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
         </macro>
       </xsl:when>
+
+ <xsl:when test="@kind='function'">
+ <xsl:call-template name="function" />
+ </xsl:when>
+
+ <xsl:when test="@kind='typedef'">
+ <xsl:call-template name="typedef" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>Cannot handle toplevel memberdef element with
+ kind=<xsl:value-of select="@kind"/></xsl:message>
+ </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 
@@ -666,6 +689,12 @@
       <xsl:when test="@kind='user-defined'">
         <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:message>
 Cannot handle sectiondef with kind=<xsl:value-of select="@kind"/>
@@ -1328,4 +1357,61 @@
     <xsl:apply-templates select="*|text()" mode="passthrough"/>
   </xsl:template>
 
+ <!--
+ Eric Niebler: 4-4-2007
+ Here is some half-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), then copy the PNG files into the images/
+ directory, and then build the docs with bjam. Commented
+ out until something better comes along.
+ <xsl:template match="formula" mode="passthrough">
+ <xsl:choose>
+ <xsl:when test="substring(*|text(), 1, 2) = '\['">
+ <equation>
+ <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('images/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('images/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>
+
\ No newline at end of file

Modified: branches/release/tools/boostbook/xsl/fo.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/fo.xsl (original)
+++ branches/release/tools/boostbook/xsl/fo.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,7 +14,7 @@
   <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="fop.extensions" select="1"/>
+ <xsl:param name="fop1.extensions" select="1"/>
   <xsl:param name="make.year.ranges" select="1"/>
   <xsl:param name="ulink.show" select="0"/>
 
@@ -119,4 +119,94 @@
   </fo:list-item>
 </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="//programlisting/phrase[@role='keyword']">
+ <fo:inline color="#0000AA"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='special']">
+ <fo:inline color="#707070"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='preprocessor']">
+ <fo:inline color="#402080"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='char']">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='comment']">
+ <fo:inline color="#800000"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='string']">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='number']">
+ <fo:inline color="teal"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='white_bkd']">
+ <fo:inline color="#FFFFFF"><xsl:apply-templates/></fo:inline>
+</xsl:template>
+<xsl:template match="//programlisting/phrase[@role='dk_grey_bkd']">
+ <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">1</xsl:attribute>
+</xsl:attribute-set>
+
+<!--
+Put a box around code blocks, also set the font size
+and keep the block together if we can:
+-->
+<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="keep-together">1</xsl:attribute>
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
+</xsl:attribute-set>
+
+<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>
+
+<xsl:attribute-set name="table.properties">
+ <xsl:attribute name="keep-together">1</xsl:attribute>
+</xsl:attribute-set>
+
+ <xsl:param name="table.frame.border.color">#DCDCDC</xsl:param>
+<xsl:param name="table.cell.border.color">#DCDCDC</xsl:param>
+
 </xsl:stylesheet>
+

Modified: branches/release/tools/boostbook/xsl/function.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/function.xsl (original)
+++ branches/release/tools/boostbook/xsl/function.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?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)
@@ -9,7 +9,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="1.0">
 
- <xsl:strip-space elements="requires effects postconditions returns throws
+ <xsl:strip-space elements="requires effects postconditions returns throws
                              complexity notes rationale purpose"/>
 
   <!-- When true, the stylesheet will emit compact definitions of
@@ -126,7 +126,7 @@
       </xsl:choose>
     </xsl:variable>
 
- <xsl:if test="not ($standalone) or
+ <xsl:if test="not ($standalone) or
                   (local-name(.)='signature' and (position() &gt; 1))
                   or $suppress-template">
       <xsl:text>&#10;</xsl:text>
@@ -136,7 +136,7 @@
     <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>
@@ -148,7 +148,7 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-
+
     <!-- Build a full parameter string (without line breaks) -->
     <xsl:variable name="param-string">
       <xsl:text>(</xsl:text>
@@ -168,21 +168,21 @@
     </xsl:variable>
 
     <!-- Build the full declaration text -->
- <xsl:variable name="decl-string"
+ <xsl:variable name="decl-string"
       select="concat($type, $function-name, $param-string, $postdeclarator)"/>
- <xsl:variable name="end-column"
+ <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
+ <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">
@@ -249,17 +249,17 @@
         <xsl:text>(</xsl:text>
         <xsl:call-template name="function-parameters">
           <xsl:with-param name="include-names" select="$include-names"/>
- <xsl:with-param name="indentation"
+ <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>
         <xsl:text>)</xsl:text>
 
         <xsl:call-template name="source-highlight">
           <xsl:with-param name="text" select="$postdeclarator"/>
         </xsl:call-template>
- <xsl:text>;</xsl:text>
+ <xsl:text>;</xsl:text>
       </xsl:when>
 
       <!-- This declaration will take multiple lines -->
@@ -320,11 +320,11 @@
         <xsl:text>(</xsl:text>
         <xsl:call-template name="function-parameters">
           <xsl:with-param name="include-names" select="$include-names"/>
- <xsl:with-param name="indentation"
- select="$indentation + $type-length
+ <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>
         <xsl:text>)</xsl:text>
         <xsl:call-template name="source-highlight">
           <xsl:with-param name="text" select="$postdeclarator"/>
@@ -332,7 +332,7 @@
         <xsl:text>;</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
- </xsl:template>
+ </xsl:template>
 
   <!-- Synopsis of function parameters, e.g., "(const T&, int x = 5)" -->
   <xsl:template name="function-parameters">
@@ -394,18 +394,18 @@
       </xsl:variable>
 
       <xsl:variable name="text" select="concat($type, $name, $default)"/>
-
- <xsl:variable name="end-column"
+
+ <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)
+ <xsl:when test="$first-on-line or ($end-column &lt; $max-columns)
                         or not($wrap)">
           <xsl:choose>
             <xsl:when test="$final">
               <xsl:value-of select="$prefix"/>
- <xsl:apply-templates
+ <xsl:apply-templates
                 select="$parameter/paramtype/*|$parameter/paramtype/text()"
                 mode="annotation">
                 <xsl:with-param name="highlight" select="true()"/>
@@ -423,7 +423,7 @@
             <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"
+ <xsl:with-param name="parameters"
               select="$parameters[position()!=1]"/>
             <xsl:with-param name="prefix" select="', '"/>
             <xsl:with-param name="column" select="$end-column"/>
@@ -441,7 +441,7 @@
           </xsl:call-template>
           <xsl:choose>
             <xsl:when test="$final">
- <xsl:apply-templates
+ <xsl:apply-templates
                 select="$parameter/paramtype/*|$parameter/paramtype/text()"
                 mode="annotation">
                 <xsl:with-param name="highlight" select="true()"/>
@@ -460,10 +460,10 @@
             <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"
+ <xsl:with-param name="parameters"
               select="$parameters[position()!=1]"/>
             <xsl:with-param name="prefix" select="', '"/>
- <xsl:with-param name="column"
+ <xsl:with-param name="column"
               select="1 + string-length($text) + $indentation"/>
             <xsl:with-param name="first-on-line" select="false()"/>
           </xsl:call-template>
@@ -479,7 +479,7 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ throws|complexity|notes|rationale) and
               ($boost.compact.function='1') and
               not (local-name(.)='method')"/>
 
@@ -524,7 +524,7 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ throws|complexity|notes|rationale) and
               ($boost.compact.function='1') and
               not (local-name(.)='overloaded-method')"/>
 
@@ -537,7 +537,7 @@
           <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>
@@ -566,7 +566,7 @@
             <xsl:with-param name="name" select="$name"/>
             <xsl:with-param name="link-to" select="$link-to"/>
           </xsl:call-template>
- </xsl:for-each>
+ </xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
         <xsl:for-each select="signature">
@@ -598,7 +598,7 @@
       </xsl:if>
       <xsl:text>&#10;</xsl:text>
       <xsl:call-template name="indent">
- <xsl:with-param name="indentation" select="$indentation"/>
+ <xsl:with-param name="indentation" select="$indentation"/>
       </xsl:call-template>
       <emphasis>
         <xsl:text>// </xsl:text>
@@ -634,8 +634,12 @@
             <xsl:with-param name="text" select="''"/>
           </xsl:call-template>
           <xsl:call-template name="monospaced">
- <xsl:with-param name="text" select="@name"/>
+ <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">
@@ -658,7 +662,9 @@
               <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" select="../@name"/>
+ <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>
@@ -668,7 +674,7 @@
       </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">
@@ -678,7 +684,9 @@
               <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" select="../@name"/>
+ <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>
@@ -698,7 +706,9 @@
               <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" select="../@name"/>
+ <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>
@@ -826,7 +836,7 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ throws|complexity|notes|rationale) and
               ($boost.compact.function='1') and
               not (local-name(.)='method')"/>
 
@@ -856,7 +866,7 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ throws|complexity|notes|rationale) and
               ($boost.compact.function='1')"/>
 
     <xsl:if test="not ($compact)">
@@ -891,8 +901,8 @@
             <xsl:with-param name="namespace-reference" select="true()"/>
           </xsl:call-template>
         </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
+ </xsl:call-template>
+ </xsl:if>
   </xsl:template>
 
   <xsl:template match="overloaded-function" mode="reference">
@@ -901,9 +911,9 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ 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">
@@ -911,7 +921,7 @@
             <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">
@@ -935,7 +945,7 @@
     <!-- True if we should compact this function -->
     <xsl:variable name="compact"
       select="not (para|description|requires|effects|postconditions|returns|
- throws|complexity|notes|rationale) and
+ throws|complexity|notes|rationale) and
               ($boost.compact.function='1')"/>
 
     <xsl:variable name="name" select="@name"/>
@@ -975,8 +985,8 @@
             <xsl:with-param name="namespace-reference" select="true()"/>
           </xsl:call-template>
         </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
+ </xsl:call-template>
+ </xsl:if>
   </xsl:template>
 
   <xsl:template match="overloaded-method" mode="reference">
@@ -985,12 +995,13 @@
     <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: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"/>
@@ -1025,7 +1036,7 @@
           <xsl:with-param name="text" select="string(@name)"/>
         </xsl:call-template>
       </emphasis>
- <xsl:apply-templates select="method|overloaded-method"
+ <xsl:apply-templates select="method|overloaded-method"
         mode="synopsis">
         <xsl:with-param name="indentation" select="$indentation"/>
       </xsl:apply-templates>
@@ -1044,7 +1055,9 @@
             <xsl:with-param name="text" select="''"/>
           </xsl:call-template>
           <xsl:call-template name="monospaced">
- <xsl:with-param name="text" select="../@name"/>
+ <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"/>
@@ -1057,7 +1070,7 @@
         </xsl:with-param>
       </xsl:call-template>
     </xsl:if>
- </xsl:template>
+ </xsl:template>
 
   <!-- Group free functions together under a category name (synopsis)-->
   <xsl:template match="free-function-group" mode="synopsis">
@@ -1105,5 +1118,5 @@
         </orderedlist>
       </xsl:with-param>
     </xsl:call-template>
- </xsl:template>
+ </xsl:template>
 </xsl:stylesheet>

Modified: branches/release/tools/boostbook/xsl/html.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/html.xsl (original)
+++ branches/release/tools/boostbook/xsl/html.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?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)
@@ -13,6 +13,8 @@
   <!-- 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"/>
 
   <xsl:import href="chunk-common.xsl"/>
   <xsl:import href="docbook-layout.xsl"/>
@@ -20,6 +22,7 @@
   <xsl:import href="admon.xsl"/>
   <xsl:import href="xref.xsl"/>
   <xsl:import href="relative-href.xsl"/>
+ <xsl:import href="callout.xsl"/>
 
   <xsl:param name="admon.style"/>
   <xsl:param name="admon.graphics">1</xsl:param>
@@ -36,8 +39,14 @@
   <xsl:param name="doc.standalone">false</xsl:param>
   <xsl:param name="chunker.output.indent">yes</xsl:param>
   <xsl:param name="toc.max.depth">2</xsl:param>
-
-<xsl:param name="admon.style">
+ <xsl:param name="callout.graphics.number.limit">15</xsl:param>
+ <xsl:param name = "admon.graphics.path"
+ select = "concat($boost.root, '/doc/html/images/')"/>
+ <xsl:param name = "navig.graphics.path"
+ select = "concat($boost.root, '/doc/html/images/')"/>
+
+
+ <xsl:param name="admon.style">
     <!-- Remove the style. Let the CSS do the styling -->
 </xsl:param>
 
@@ -69,22 +78,22 @@
     <xsl:param name="text"/>
 
     <!-- Remove the "$Date: " -->
- <xsl:variable name="text.noprefix"
+ <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"
+ <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"
+ <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"
+ <xsl:variable name="text.noday"
       select="substring-after($text.nomonth, ' ')"/>
 
     <!-- Get the time -->
@@ -116,27 +125,27 @@
     <xsl:param name="text"/>
 
     <!-- Remove the "$Date: " -->
- <xsl:variable name="text.noprefix"
+ <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"
+ <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"
+ <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"
+ <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"
+ <xsl:variable name="text.notime"
       select="substring-after($text.noday, ' ')"/>
 
     <!-- Get the timezone -->
@@ -163,7 +172,7 @@
                                  $time, ' ', $timezone)"/>
   </xsl:template>
 
-
+ <!-- Footer Copyright -->
   <xsl:template match="copyright" mode="boost.footer">
     <xsl:if test="position() &gt; 1">
       <br/>
@@ -186,23 +195,28 @@
     <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"
+ <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
+ <xsl:value-of
                 select="normalize-space($revision-node/attribute::rev:last-revision)"/>
             </xsl:variable>
             <xsl:if test="string-length($revision-text) &gt; 0">
- <small>
- <p>
+ <p>
+ <small>
                   <xsl:text>Last revised: </xsl:text>
                   <xsl:choose>
                     <xsl:when test="contains($revision-text, '/')">
@@ -216,16 +230,18 @@
                       </xsl:call-template>
                     </xsl:otherwise>
                   </xsl:choose>
- </p>
- </small>
+ </small>
+ </p>
             </xsl:if>
           </xsl:if>
         </td>
         <td align="right">
- <small>
- <xsl:apply-templates select="ancestor::*/*/copyright"
+ <div class = "copyright-footer">
+ <xsl:apply-templates select="ancestor::*/*/copyright"
+ mode="boost.footer"/>
+ <xsl:apply-templates select="ancestor::*/*/legalnotice"
               mode="boost.footer"/>
- </small>
+ </div>
         </td>
       </tr>
     </table>

Modified: branches/release/tools/boostbook/xsl/library.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/library.xsl (original)
+++ branches/release/tools/boostbook/xsl/library.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -120,7 +120,7 @@
 
   <xsl:template match="libraryinfo">
     <chapterinfo>
- <xsl:apply-templates select="author|copyright|legalnotice"/>
+ <xsl:apply-templates select="author|authorgroup/author|copyright|legalnotice"/>
     </chapterinfo>
   </xsl:template>
 

Modified: branches/release/tools/boostbook/xsl/lookup.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/lookup.xsl (original)
+++ branches/release/tools/boostbook/xsl/lookup.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?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)
@@ -14,7 +14,15 @@
   <!-- 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:choose>
+ <xsl:when test="ancestor::class-specialization|ancestor::struct-specialization|ancestor::union-specialization">
+ <xsl:value-of select="generate-id(.)"/>
+ <xsl:text>-bb</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$node" mode="generate.id"/>
+ </xsl:otherwise>
+ </xsl:choose>
   </xsl:template>
 
   <xsl:template match="*" mode="generate.id">
@@ -22,19 +30,102 @@
     <xsl:text>-bb</xsl:text>
   </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". -->
+ "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="contains($name, '::') and not(contains(substring-before($name, '::'), '&lt;'))">
- <xsl:call-template name="strip-qualifiers">
- <xsl:with-param name="name" select="substring-after($name, '::')"/>
+ <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:value-of select="$name"/>
+ <xsl:call-template name="strip-qualifiers-non-template">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
@@ -66,8 +157,10 @@
     <xsl:param name="depth" select="1"/>
 
     <!-- Determine the set of ancestor namespaces -->
- <xsl:variable name="ancestors"
- select="ancestor::namespace|ancestor::class|ancestor::struct|ancestor::union"/>
+ <xsl:variable name="ancestors"
+ select="ancestor::namespace|
+ ancestor::class|ancestor::struct|ancestor::union|
+ ancestor::class-specialization|ancestor::struct-specialization|ancestor::union-specialization"/>
 
     <xsl:choose>
       <xsl:when test="$depth &gt; count($ancestors)">
@@ -92,6 +185,29 @@
     <xsl:value-of select="@name"/>
   </xsl:template>
 
+ <xsl:template name="print-specialization-name">
+ <xsl:value-of select="@name"/>
+ <xsl:text>&lt;</xsl:text>
+ <xsl:value-of select="specialization/template-arg[position() = 1]/text()"/>
+ <xsl:for-each select="specialization/template-arg[position() &gt; 1]">
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="text()"/>
+ </xsl:for-each>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="struct-specialization" mode="print-name">
+ <xsl:call-template name="print-specialization-name"/>
+ </xsl:template>
+
+ <xsl:template match="class-specialization" mode="print-name">
+ <xsl:call-template name="print-specialization-name"/>
+ </xsl:template>
+
+ <xsl:template match="union-specialization" mode="print-name">
+ <xsl:call-template name="print-specialization-name"/>
+ </xsl:template>
+
   <xsl:template name="name-matches-node">
     <!-- The name we are looking for -->
     <xsl:param name="name"/>
@@ -155,23 +271,24 @@
             <xsl:with-param name="node" select="$node"/>
           </xsl:call-template>
         </xsl:variable>
-
+
         <!-- 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::class |
+ $context/ancestor::struct"/>
+
         <!-- The name of the current directive -->
         <xsl:variable name="this-context">
           <xsl:apply-templates select="$directives[$index]" mode="print-name"/>
         </xsl:variable>
-
+
         <!-- Check if we have a match -->
- <xsl:variable name="have-match"
+ <xsl:variable name="have-match"
           select="$fully-qualified-name = concat($prefix, $name)"/>
-
+
         <xsl:if test="$have-match">
           <xsl:choose>
             <xsl:when test="$mode='matches'">
@@ -189,7 +306,7 @@
             </xsl:when>
           </xsl:choose>
         </xsl:if>
-
+
         <xsl:if test="(not($index &gt; count($directives))) and
                       (not($have-match) or ($mode = 'matches'))">
           <xsl:variable name="first-branch">
@@ -207,7 +324,7 @@
               </xsl:call-template>
             </xsl:if>
           </xsl:variable>
-
+
           <xsl:choose>
             <xsl:when test="string($first-branch) != ''">
               <xsl:copy-of select="$first-branch"/>
@@ -221,12 +338,12 @@
                 <xsl:with-param name="node" select="$node"/>
                 <xsl:with-param name="mode" select="$mode"/>
                 <xsl:with-param name="index" select="$index + 1"/>
- <xsl:with-param name="prefix"
+ <xsl:with-param name="prefix"
                   select="concat($this-context, '::')"/>
               </xsl:call-template>
             </xsl:otherwise>
           </xsl:choose>
- </xsl:if>
+ </xsl:if>
       </xsl:when>
     </xsl:choose>
   </xsl:template>
@@ -255,19 +372,19 @@
 
   <xsl:template name="cxx-link-name">
     <!-- The actual lookup node -->
- <xsl:param name="lookup"/>
+ <xsl:param name="lookup"/>
 
     <!-- The type of name to lookup (e.g., class) -->
- <xsl:param name="type"/>
+ <xsl:param name="type"/>
 
     <!-- The name we are looking for -->
- <xsl:param name="name"/>
+ <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"/>
+ <xsl:param name="unqualified-name"/>
 
     <!-- The list of nodes that match the lookup node in both name and type -->
     <xsl:param name="nodes"/>

Modified: branches/release/tools/boostbook/xsl/navbar.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/navbar.xsl (original)
+++ branches/release/tools/boostbook/xsl/navbar.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -54,7 +54,7 @@
       <xsl:variable name = "home" select = "/*[1]"/>
       <xsl:variable name = "up" select = "parent::*"/>
 
- <table cellpadding = "2" width = "100%">
+ <table cellpadding = "2" width = "100%"><tr>
          <xsl:if test = "$nav.border = 'Boost'">
             <xsl:attribute name = "class">boost-head</xsl:attribute>
          </xsl:if>
@@ -77,7 +77,7 @@
                <xsl:call-template name = "header.navdata-vert"/>
             </xsl:when>
          </xsl:choose>
- </table>
+ </tr></table>
       <hr/>
       <xsl:choose>
          <xsl:when test = "$nav.flow = 'DocBook'">

Modified: branches/release/tools/boostbook/xsl/reference.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/reference.xsl (original)
+++ branches/release/tools/boostbook/xsl/reference.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?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)
@@ -21,7 +21,7 @@
   <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-->
@@ -32,7 +32,7 @@
       <xsl:with-param name="text" select="concat('namespace ',@name)"/>
     </xsl:call-template>
     <xsl:text> {</xsl:text>
-
+
     <!-- Emit namespace types -->
     <xsl:apply-templates select="class|class-specialization|
                                  struct|struct-specialization|
@@ -40,19 +40,19 @@
                                  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"
+ <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">
@@ -82,14 +82,14 @@
 
   <!-- Emit namespace reference -->
   <xsl:template match="namespace" mode="reference">
- <xsl:apply-templates select="namespace|typedef|free-function-group"
+ <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"
+ overloaded-function|data-member|typedef"
       mode="namespace-reference"/>
   </xsl:template>
 

Modified: branches/release/tools/boostbook/xsl/template.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/template.xsl (original)
+++ branches/release/tools/boostbook/xsl/template.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -404,7 +404,7 @@
 
       <xsl:choose>
         <xsl:when test="$highlight">
- <xsl:apply-templates select="$parameter/default/*" mode="highlight"/>
+ <xsl:apply-templates select="$parameter/default/*|$parameter/default/text()" mode="highlight"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="$def"/>

Modified: branches/release/tools/boostbook/xsl/type.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/type.xsl (original)
+++ branches/release/tools/boostbook/xsl/type.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
    Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
-
+ Copyright (c) 2007 Frank Mori Hess <fmhess_at_[hidden]>
+
    Distributed under the Boost Software License, Version 1.0.
    (See accompanying file LICENSE_1_0.txt or copy at
    http://www.boost.org/LICENSE_1_0.txt)
@@ -20,6 +21,11 @@
        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-name">
       <xsl:with-param name="node" select="."/>
@@ -27,6 +33,13 @@
     </xsl:call-template>
   </xsl:template>
 
+ <xsl:template match="typedef" mode="generate.id">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="separator" select="'.'"/>
+ </xsl:call-template>
+ </xsl:template>
+
   <xsl:template match="enum" mode="generate.id">
     <xsl:call-template name="fully-qualified-name">
       <xsl:with-param name="node" select="."/>
@@ -48,7 +61,7 @@
   <xsl:template name="type.display.name">
     <xsl:choose>
       <xsl:when test="contains(local-name(.), 'class')">
- <xsl:text>Class </xsl:text>
+ <xsl:text>Class </xsl:text>
       </xsl:when>
       <xsl:when test="contains(local-name(.), 'struct')">
         <xsl:text>Struct </xsl:text>
@@ -73,7 +86,7 @@
         <xsl:value-of select="@name"/>
         <xsl:apply-templates select="specialization"/>
       </xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template>
   </xsl:template>
 
   <!-- Determine the class key for the given node -->
@@ -86,7 +99,7 @@
       <xsl:otherwise>
         <xsl:value-of select="local-name($node)"/>
       </xsl:otherwise>
- </xsl:choose>
+ </xsl:choose>
   </xsl:template>
 
   <!-- Emit class synopsis -->
@@ -94,7 +107,7 @@
                        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">
@@ -123,7 +136,7 @@
     </xsl:variable>
 
     <xsl:choose>
- <xsl:when test="(string-length($full-decl-string) +
+ <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"/>
@@ -158,11 +171,11 @@
             <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"/>
@@ -193,10 +206,38 @@
 
   <!-- 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">
@@ -216,21 +257,21 @@
       <!-- 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: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: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: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:with-param name="indentation" select="$indentation"/>
         </xsl:call-template>
         <xsl:call-template name="highlight-keyword">
           <xsl:with-param name="keyword" select="'typedef'"/>
@@ -259,32 +300,39 @@
             <xsl:value-of select="@type"/>
           </xsl:when>
           <xsl:otherwise>
- <xsl:apply-templates select="type/*|type/text()"
+ <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:call-template>
             -->
           </xsl:otherwise>
         </xsl:choose>
 
         <xsl:choose>
           <xsl:when test="$max-type-length &gt; 0">
- <xsl:value-of select="substring($type-padding, 1,
+ <xsl:value-of select="substring($type-padding, 1,
                                             $max-type-length - $type-length)"/>
             <xsl:text> </xsl:text>
- <xsl:value-of select="substring(concat(@name, ';', $name-padding),
+ <xsl:value-of select="substring(concat(@name, ';', $name-padding),
                                             1, $max-name-length)"/>
           </xsl:when>
           <xsl:otherwise>
- <xsl:value-of select="concat(' ',@name,';')"/>
+ <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:text>;</xsl:text>
           </xsl:otherwise>
         </xsl:choose>
 
- <xsl:if test="purpose">
+ <xsl:if test="$compact and purpose">
           <xsl:text> </xsl:text>
           <xsl:call-template name="highlight-comment">
             <xsl:with-param name="text">
@@ -301,21 +349,89 @@
     <xsl:param name="indentation"/>
     <xsl:param name="max-type-length" select="0"/>
     <xsl:param name="max-name-length" select="0"/>
-
- <!-- 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="indentation" select="$indentation"/>
- <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>
+ <!-- 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="true()"/>
+ <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:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
   </xsl:template>
 
- <!-- TBD: Implement this -->
- <xsl:template match="typedef" mode="reference"/>
+ <!-- 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="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">
@@ -331,10 +447,10 @@
 
     <xsl:call-template name="source-highlight">
       <xsl:with-param name="text">
- <xsl:apply-templates select="type/*|type/text()"/>
+ <xsl:apply-templates select="type/*|type/text()"/>
       </xsl:with-param>
     </xsl:call-template>
-
+
     <xsl:if test="not(@name = '')">
       <xsl:text> </xsl:text>
       <xsl:value-of select="@name"/>
@@ -367,7 +483,7 @@
 
   <xsl:template name="print.base.classes.multi">
     <xsl:param name="indentation"/>
-
+
     <xsl:variable name="n" select="count(inherit)"/>
     <xsl:for-each select="inherit">
       <!-- Indentation -->
@@ -448,20 +564,20 @@
     </xsl:variable>
 
     <xsl:choose>
- <xsl:when test="$single-line-candidate and
+ <xsl:when test="$single-line-candidate and
                       (string-length($single-line) + $indentation + 3
                         &lt; $max-columns)">
+ <xsl:text> : </xsl:text>
         <xsl:call-template name="print.base.classes.single"/>
         <xsl:text> {</xsl:text>
       </xsl:when>
       <xsl:when test="$single-line-candidate and
- (string-length($single-line) + $base-indentation + 5
+ (string-length($single-line) + $base-indentation + 2
                         &lt; $max-columns)">
- <xsl:text>&#10;</xsl:text>
+ <xsl:text> :&#10;</xsl:text>
         <xsl:call-template name="indent">
- <xsl:with-param name="indentation" select="$base-indentation"/>
+ <xsl:with-param name="indentation" select="$base-indentation + 2"/>
         </xsl:call-template>
- <xsl:text> : </xsl:text>
         <xsl:call-template name="print.base.classes.single"/>
         <xsl:text>&#10;</xsl:text>
         <xsl:call-template name="indent">
@@ -487,7 +603,6 @@
   <xsl:template match="inherit">
     <xsl:choose>
       <xsl:when test="position()=1">
- <xsl:text> : </xsl:text>
       </xsl:when>
       <xsl:otherwise>
         <xsl:text>, </xsl:text>
@@ -549,7 +664,7 @@
               <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:call-template>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
@@ -557,7 +672,7 @@
         <xsl:value-of select="$max-length"/>
       </xsl:otherwise>
     </xsl:choose>
- </xsl:template>
+ </xsl:template>
 
   <xsl:template match="constructor" mode="synopsis">
     <xsl:param name="indentation"/>
@@ -565,7 +680,9 @@
       <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" select="../@name"/>
+ <xsl:with-param name="constructor-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
 
@@ -575,7 +692,9 @@
       <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" select="../@name"/>
+ <xsl:with-param name="copy-assign-for">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
 
@@ -585,7 +704,128 @@
       <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" select="../@name"/>
+ <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"/>
+
+ <!-- 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>
+ <emphasis>
+ <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>
+ </emphasis>
+
+ <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: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: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>
+
+ <!-- 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:apply-templates select="data-member" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation + 2"/>
+ </xsl:apply-templates>
+ </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:text>:</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="access" mode="synopsis">
+ <xsl:param name="indentation" select="0"/>
+ <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:call-template>
   </xsl:template>
 
@@ -629,7 +869,7 @@
       </xsl:apply-templates>
     </xsl:if>
     <xsl:text>&#10;</xsl:text>
-
+
     <!-- Class name -->
     <xsl:call-template name="indent">
       <xsl:with-param name="indentation" select="$indentation"/>
@@ -640,13 +880,13 @@
     <xsl:text> </xsl:text>
     <xsl:value-of select="@name"/>
     <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)
+ <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>
@@ -657,87 +897,28 @@
       </xsl:otherwise>
     </xsl:choose>
 
- <!-- Public designator -->
+ <!-- Default public designator for members not inside explicit <access> elements -->
     <xsl:if test="contains(local-name(.), 'class')">
- <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="'public'"/>
- </xsl:call-template>
- <xsl:text>:</xsl:text>
- </xsl:if>
-
- <!-- 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" select="'// types'"/>
- </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: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: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: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: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>
-
- <!-- Construct/Copy/Destruct -->
- <xsl:call-template name="construct-copy-destruct-synopsis">
- <xsl:with-param name="indentation" select="$indentation + 2"/>
+
+ <xsl:call-template name="class-members-synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
     </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:apply-templates select="data-member" mode="synopsis">
- <xsl:with-param name="indentation" select="$indentation + 2"/>
+
+ <xsl:apply-templates select="access" mode="synopsis">
+ <xsl:with-param name="indentation" select="$indentation"/>
     </xsl:apply-templates>
-
+
     <!-- Closing brace -->
     <xsl:text>&#10;</xsl:text>
     <xsl:call-template name="indent">
@@ -757,6 +938,65 @@
     </xsl:call-template>
   </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="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"/>
+
+ <!-- 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|
@@ -769,7 +1009,6 @@
         <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">
@@ -801,25 +1040,24 @@
           <xsl:apply-templates select="para" mode="annotation"/>
         </xsl:if>
         <xsl:apply-templates select="description"/>
-
- <xsl:call-template name="construct-copy-destruct-reference"/>
- <xsl:apply-templates
- select="method-group|method|overloaded-method"
- mode="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
+ <xsl:if test="local-name(.)='class' and
                       ../class-specialization[@name=$name]">
           <refsect2>
             <title>Specializations</title>
             <itemizedlist>
- <xsl:apply-templates
+ <xsl:apply-templates
                 select="../class-specialization[@name=$name]"
                 mode="specialization-list"/>
             </itemizedlist>
@@ -859,7 +1097,7 @@
                       ancestor::union|ancestor::union-specialization">
 
     <!-- Spacing -->
- <xsl:if
+ <xsl:if
       test="not(local-name(preceding-sibling::*[position()=1])=local-name(.))">
       <xsl:text>&#10;</xsl:text>
     </xsl:if>
@@ -908,9 +1146,9 @@
     <xsl:param name="indentation"/>
 
     <!-- Spacing -->
- <xsl:if
+ <xsl:if
       test="(not (local-name(preceding-sibling::*[position()=1])=local-name(.))
- and (position() &gt; 1)) or
+ and (position() &gt; 1)) or
             not (para or description or not ($boost.compact.enum=1))">
       <xsl:text>&#10;</xsl:text>
     </xsl:if>
@@ -967,7 +1205,7 @@
         </xsl:call-template>
 
         <xsl:text> </xsl:text>
-
+
         <xsl:call-template name="anchor">
           <xsl:with-param name="to">
             <xsl:call-template name="generate.id">
@@ -1022,9 +1260,11 @@
             <xsl:apply-templates select="para" mode="annotation"/>
           </xsl:if>
           <xsl:apply-templates select="description"/>
- <variablelist spacing="compact">
- <xsl:apply-templates select="enumvalue" mode="reference"/>
- </variablelist>
+ <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>
@@ -1038,7 +1278,7 @@
       <xsl:text>&#10;</xsl:text>
     </xsl:if>
 
- <xsl:text>&#10;</xsl:text>
+ <xsl:text>&#10;</xsl:text>
 
     <xsl:call-template name="highlight-keyword">
       <xsl:with-param name="keyword" select="'enum'"/>
@@ -1053,12 +1293,12 @@
       <xsl:with-param name="indentation" select="4 + string-length($header)"/>
     </xsl:call-template>
 
- <xsl:text> };</xsl:text>
+ <xsl:text> };</xsl:text>
   </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
+ 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">
@@ -1078,7 +1318,7 @@
 
     <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"/>
@@ -1102,8 +1342,8 @@
             <xsl:value-of select="$end"/>
           </xsl:when>
           <xsl:otherwise>
- <xsl:value-of select="$indentation
- + string-length($result)
+ <xsl:value-of select="$indentation
+ + string-length($result)
                                 - string-length($prefix)"/>
           </xsl:otherwise>
         </xsl:choose>
@@ -1142,7 +1382,7 @@
            print it. -->
       <xsl:if test="$value/default">
         <xsl:text> = </xsl:text>
- <xsl:apply-templates
+ <xsl:apply-templates
           select="$value/default/*|$value/default/text()"/>
       </xsl:if>
 

Modified: branches/release/tools/boostbook/xsl/utility.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/utility.xsl (original)
+++ branches/release/tools/boostbook/xsl/utility.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,25 +1,51 @@
 <?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)
   -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY nbsp "&#160;">
-]>
 <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>&nbsp;</xsl:text>
+ <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:value-of 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)/@name[last()]"/>
+ </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>

Modified: branches/release/tools/build/v2/build-system.jam
==============================================================================
--- branches/release/tools/build/v2/build-system.jam (original)
+++ branches/release/tools/build/v2/build-system.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -41,6 +41,15 @@
     return $(r:P) ;
 }
 
+# Returns the property set with the
+# free features from the currently processed
+# build request.
+rule command-line-free-features ( )
+{
+ return $(.command-line-free-features) ;
+}
+
+
 
 # Check if we can load 'test-config.jam'. If we can, load it and
 # ignore user configs.
@@ -126,6 +135,8 @@
 
 local user-config-path = [ MATCH ^--user-config=(.*) : $(argv) ] ;
 
+user-config-path ?= [ os.environ BOOST_BUILD_USER_CONFIG ] ;
+
 if $(user-config-path)
 {
     if $(debug-config)
@@ -397,6 +408,7 @@
 
 for local p in $(expanded)
 {
+ .command-line-free-features = [ property-set.create [ $(p).free ] ] ;
     for local t in $(targets)
     {
         local g = [ $(t).generate $(p) ] ;

Modified: branches/release/tools/build/v2/build/feature.jam
==============================================================================
--- branches/release/tools/build/v2/build/feature.jam (original)
+++ branches/release/tools/build/v2/build/feature.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -647,7 +647,10 @@
     {
         if $(p:G) = $(feature)
         {
- result += $(p:G=) ;
+ #~ Use MATCH instead if :G= to get the value, in order to preserve
+ #~ the value intact instead of having bjam treat it as a decompossible
+ #~ path.
+ result += [ MATCH ">(.*)" : $(p) ] ;
         }
     }
     return $(result) ;

Modified: branches/release/tools/build/v2/build/modifiers.jam
==============================================================================
--- branches/release/tools/build/v2/build/modifiers.jam (original)
+++ branches/release/tools/build/v2/build/modifiers.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,7 +14,7 @@
 import errors ;
 import type ;
 import "class" : new ;
-import generators : generator ;
+import generators ;
 import property ;
 import virtual-target ;
 import numbers ;
@@ -25,17 +25,23 @@
 # Base generator for creating targets that are modifications of existing
 # targets.
 #
-rule modifier (
- id
- composing ?
- : source-types *
- : target-types-and-names +
- : requirements *
- )
+class modifier : generator
 {
- generator.__init__ $(id) $(composing) : $(source-types) : $(target-types-and-names) : $(requirements) ;
+ rule __init__ (
+ id
+ composing ?
+ : source-types *
+ : target-types-and-names +
+ : requirements *
+ )
+ {
+ generator.__init__ $(id) $(composing)
+ : $(source-types)
+ : $(target-types-and-names)
+ : $(requirements) ;
     
- self.targets-in-progress = ;
+ self.targets-in-progress = ;
+ }
     
     # Wraps the generation of the target to call before and after rules to
     # affect the real target.
@@ -47,16 +53,21 @@
         if ! $(current-target) in $(self.targets-in-progress)
         {
             # Before modifications...
- local project_ = [ modify-project-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
- local name_ = [ modify-name-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
- local property-set_ = [ modify-properties-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
- local sources_ = [ modify-sources-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
- local multiple_ = [ modify-multiple-before
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ local project_ =
+ [ modify-project-before
+ $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ local name_ =
+ [ modify-name-before
+ $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ local property-set_ =
+ [ modify-properties-before
+ $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ local sources_ =
+ [ modify-sources-before
+ $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ local multiple_ =
+ [ modify-multiple-before
+ $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
             project = $(project_) ;
             name = $(name_) ;
             property-set = $(property-set_) ;
@@ -64,16 +75,23 @@
             multiple = $(multiple_) ;
             
             # Generate the real target...
- local target-type-p = [ property.select <main-target-type> : [ $(property-set).raw ] ] ;
+ local target-type-p =
+ [ property.select <main-target-type> : [ $(property-set).raw ] ] ;
             self.targets-in-progress += $(current-target) ;
             result =
- [ generators.construct $(project) $(name) : $(target-type-p:G=) $(multiple) :
- $(property-set) : $(sources) ] ;
+ [ generators.construct $(project) $(name)
+ : $(target-type-p:G=) $(multiple)
+ : $(property-set)
+ : $(sources) ] ;
             self.targets-in-progress = $(self.targets-in-progress[1--2]) ;
             
             # After modifications...
- result = [ modify-target-after $(result) :
- $(project) $(name) : $(property-set) : $(sources) : $(multiple) ] ;
+ result =
+ [ modify-target-after $(result)
+ : $(project) $(name)
+ : $(property-set)
+ : $(sources)
+ : $(multiple) ] ;
         }
         return $(result) ;
     }
@@ -135,17 +153,19 @@
         return $(result) ;
     }
 }
-class modifier : generator ;
 
 # A modifier that changes the name of a target, after it's generated, given
 # a regular expression to slpit the name, and a set of token to insert
 # between the split tokens of the name. This also exposes the target for other
 # uses with a symlink to the original name (optionally).
 #
-rule name-modifier ( )
+class name-modifier : modifier
 {
- # Apply ourselves to EXE targets, for now.
- modifier.__init__ name.modifier : : EXE LIB : <name-modify>yes ;
+ rule __init__ ( )
+ {
+ # Apply ourselves to EXE targets, for now.
+ modifier.__init__ name.modifier : : EXE LIB : <name-modify>yes ;
+ }
     
     # Modifies the name, by cloning the target with the new name.
     #
@@ -203,7 +223,6 @@
         return <name-modify>yes ;
     }
 }
-class name-modifier : modifier ;
 feature.feature name-modifier : : free ;
 feature.feature name-modify : no yes : incidental optional ;
 generators.register [ new name-modifier ] ;

Modified: branches/release/tools/build/v2/build/project.jam
==============================================================================
--- branches/release/tools/build/v2/build/project.jam (original)
+++ branches/release/tools/build/v2/build/project.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -726,7 +726,7 @@
           && $($(id).jamfile-module) != $(project-module)
         {
             errors.user-error
- "Attempt to redeclare already existing project id" ;
+ "Attempt to redeclare already existing project id '$(id)'" ;
         }
         $(id).jamfile-module = $(project-module) ;
     }
@@ -882,7 +882,12 @@
         
         if $(global-build-dir)
         {
- if [ $(attributes).get location ] = [ $(attributes).get project-root ]
+ local 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) && $(location) = [ $(attributes).get project-root ]
             {
                 # This is Jamroot.
                 if $(id)

Modified: branches/release/tools/build/v2/build/property.jam
==============================================================================
--- branches/release/tools/build/v2/build/property.jam (original)
+++ branches/release/tools/build/v2/build/property.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -455,19 +455,29 @@
         local m = [ MATCH ^@(.+) : $(p:G=) ] ;
         if $(m)
         {
- if ! [ MATCH ".*([.]).*" : $(m) ]
+ local v ;
+ if [ MATCH "^([^%]*)%([^%]+)$" : $(m) ]
             {
- # This is unqualified rule name. The user might want
- # to set flags on this rule name, and toolset.flag
- # auto-qualifies the rule name. Need to do the same
- # here so set flag setting work.
- # We can arrange for toolset.flag to *not* auto-qualify
- # the argument, but then two rules defined in two Jamfiles
- # will conflict.
- m = $(context-module).$(m) ;
+ # Rule is already in indirect format
+ v = $(m) ;
             }
-
- local v = [ indirect.make $(m) : $(context-module) ] ;
+ else
+ {
+ if ! [ MATCH ".*([.]).*" : $(m) ]
+ {
+ # This is unqualified rule name. The user might want
+ # to set flags on this rule name, and toolset.flag
+ # auto-qualifies the rule name. Need to do the same
+ # here so set flag setting work.
+ # We can arrange for toolset.flag to *not* auto-qualify
+ # the argument, but then two rules defined in two Jamfiles
+ # will conflict.
+ m = $(context-module).$(m) ;
+ }
+
+ v = [ indirect.make $(m) : $(context-module) ] ;
+ }
+
             v = @$(v) ;
             result += $(v:G=$(p:G)) ;
         }

Modified: branches/release/tools/build/v2/build/targets.jam
==============================================================================
--- branches/release/tools/build/v2/build/targets.jam (original)
+++ branches/release/tools/build/v2/build/targets.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -506,21 +506,7 @@
             [ RULENAMES project-rules ] ] ;
         IMPORT $(parent-module) : $(user-rules) : $(this-module) : $(user-rules) ;
         EXPORT $(this-module) : $(user-rules) ;
- }
-
-
- # Intern the constants from this project into the specified module.
- #
- rule intern-constants (
- target-module # The module to intern into.
- )
- {
- for local c in $(self.constants)
- {
- modules.poke $(target-module) : $(c) : $(self.constant.$(c)) ;
- }
- }
-
+ }
 }
 
 
@@ -835,13 +821,6 @@
     }
 }
 
-
-if "--quiet" in [ modules.peek : ARGV ]
-{
- .quiet = true ;
-}
-
-
 # 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.
@@ -1057,6 +1036,7 @@
     import set sequence errors ;
     import "class" : new ;
     import property feature ;
+ import build-system ;
         
     rule __init__ ( name : project
         : sources * : requirements * :
@@ -1185,12 +1165,21 @@
             local fn = [ full-name ] ;
             ECHO [ targets.indent ] "Building target '$(fn)'" ;
             targets.increase-indent ;
- ECHO [ targets.indent ] "Build request: " [ $(property-set).raw ] ;
+ ECHO [ targets.indent ] "Build request: " [ $(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 ] ;
         }
                 
         if ! $(self.generated.$(property-set))
         {
+ # Apply free features form the command line. If user
+ # said
+ # define=FOO
+ # he most likely want this define to be set for all compiles.
+ property-set = [ $(property-set).refine
+ [ build-system.command-line-free-features ] ] ;
             local rproperties = [ targets.common-properties $(property-set)
               $(self.requirements) ] ;
             
@@ -1268,6 +1257,21 @@
             }
             else
             {
+ if $(rproperties[1]) = "@error"
+ {
+ ECHO [ targets.indent ]
+ "Skipping build of: " [ full-name ] " cannot compute common properties" ;
+ }
+ else if [ $(rproperties).get <build> ] = no
+ {
+ ECHO [ targets.indent ]
+ "Skipping build of: " [ full-name ] " <build>no in common properties" ;
+ }
+ else
+ {
+ ECHO [ targets.indent ] "Skipping build of: " [ full-name ] " unknown reason" ;
+ }
+
                 # We're here either because there's error computing
                 # properties, or there's <build>no in properties.
                 # In the latter case we don't want any diagnostic.

Modified: branches/release/tools/build/v2/build/toolset.jam
==============================================================================
--- branches/release/tools/build/v2/build/toolset.jam (original)
+++ branches/release/tools/build/v2/build/toolset.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,6 +18,15 @@
 
 .flag-no = 1 ;
 
+.ignore-requirements = ;
+
+# This is used only for testing, to make sure
+# we don't 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 'toolset-module' and then calls its 'init'
 # rule with trailing arguments
@@ -351,15 +360,6 @@
     }
 }
 
-.toolsets += $(toolset) ;
-
-# Registers a new toolset
-rule register ( toolset )
-{
- feature.extend toolset : $(toolset) ;
- .toolsets += $(toolset) ;
-}
-
 # 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
@@ -480,7 +480,10 @@
 # indirect conditional.
 rule add-requirements ( requirements * )
 {
- .requirements += $(requirements) ;
+ if ! $(.ignore-requirements)
+ {
+ .requirements += $(requirements) ;
+ }
 }
 
 local rule __test__ ( )

Modified: branches/release/tools/build/v2/build/version.jam
==============================================================================
--- branches/release/tools/build/v2/build/version.jam (original)
+++ branches/release/tools/build/v2/build/version.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -4,7 +4,7 @@
 
 rule boost-build ( )
 {
- return "V2 (Milestone 11)" ;
+ return "V2 (Milestone 12)" ;
 }
 rule jam ( )
 {

Modified: branches/release/tools/build/v2/changes.txt
==============================================================================
--- branches/release/tools/build/v2/changes.txt (original)
+++ branches/release/tools/build/v2/changes.txt 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,13 +1,22 @@
-Copyright 2004, 2006 Vladimir Prus
+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 12 (in development)
+Milestone 13 (in development)
 
 Changes in this release:
 
+The following bugs were fixed:
+
+ - gcc suport 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 or --toolset=xxxx options, and for default toolset
+ toolset=xxxx request, and for default toolset
       configuration as a fallback.
     - Support for precompiled headers for gcc toolset,
       and improvements for msvc.
@@ -22,21 +31,38 @@
     - 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' features not working for Darwin.
- - The intel toolset not working on Windows.
+ - 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 evaluates in usage requirements.
+ - 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)
 

Modified: branches/release/tools/build/v2/doc/src/faq.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/faq.xml (original)
+++ branches/release/tools/build/v2/doc/src/faq.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -331,18 +331,16 @@
     <para>It is desirable to declare standard libraries available on a
       given system. Putting target declaration in Jamfile is not really
       good, since locations of the libraries can vary. The solution is
- to put the following to site-config.jam.</para>
+ to declare the targets in site-config.jam:</para>
 <programlisting>
-import project ;
-project.initialize $(__name__) ;
 project site-config ;
 lib zlib : : &lt;name&gt;z ;
 </programlisting>
 
- <para>The second line allows this module to act as project. The
- third line gives id to this project &#x2014; it really has no location
- and cannot be used otherwise. The fourth line just declares a
- target. Now, one can write:
+ <para>Recall that both <filename>site-config.jam</filename> and
+ <filename>user-config.jam</filename> are projects, and everything
+ you can do in a Jamfile you can do in those files. So, you declare
+ a project id and a target. Now, one can write:
 <programlisting>
 exe hello : hello.cpp /site-config//zlib ;
 </programlisting>

Modified: branches/release/tools/build/v2/doc/src/reference.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/reference.xml (original)
+++ branches/release/tools/build/v2/doc/src/reference.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -316,7 +316,8 @@
         </para></listitem>
       </varlistentry>
 
- <varlistentry>
+ <varlistentry id="bbv2.reference.glob-tree">
+ <indexterm><primary>glob-tree</primary></indexterm>
         <term><literal>glob-tree</literal></term>
         
         <listitem><para>The <code>glob-tree</code> is similar to the
@@ -947,11 +948,20 @@
           <para>The module is initialized using the following
           syntax:</para>
           <programlisting>
-using acc ;</programlisting>
+using acc : &toolset_ops; ;</programlisting>
+
+ &using_repeation;
+
+
+ <para>
+ If the command is not specified, the <command>aCC</command>
+ binary will be searched in <envar>PATH</envar>.</para>
 
- <para>There are no configuration options. The
- compiler will always be invoked as <command>aCC</command> and should
- be in <envar>PATH</envar>.</para>
+ &option_list_intro;
+ <variablelist>
+ <xi:include href="fragments.xml#xpointer(id('common_options')/*)"
+ parse="xml"/>
+ </variablelist>
        
         </section>
 

Modified: branches/release/tools/build/v2/doc/src/tasks.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/tasks.xml (original)
+++ branches/release/tools/build/v2/doc/src/tasks.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,8 +18,7 @@
   <section id="bbv2.tasks.programs">
     <title>Programs</title>
 
- <indexterm><primary>Builtin
- rules</primary><secondary>exe</secondary></indexterm>
+ <indexterm><primary>exe</primary></indexterm>
       <para>Programs are created using the <code>exe</code> rule, which
         follows the <link linkend="bbv2.main-target-rule-syntax">common
           syntax</link>. For example:
@@ -302,6 +301,7 @@
 
       <bridgehead>Preserving Directory Hierarchy</bridgehead>
 
+ <indexterm><primary>install-source-root</primary></indexterm>
       <para>By default, the <code>install</code> rules will stip paths from
       it's sources. So, if sources include <filename>a/b/c.hpp</filename>,
       the <filename>a/b</filename> part will be ignored. To make the
@@ -319,6 +319,10 @@
 
       the a file named <filename>/tmp/b/c.h</filename> will be created.
       </para>
+
+ <para>The <link linkend="bbv2.reference.glob-tree">glob-tree</link> rule
+ can be used to find all files below a given directory, making
+ it easy to install entire directory tree.</para>
             
       <bridgehead>Installing into Several Directories</bridgehead>
 

Modified: branches/release/tools/build/v2/doc/src/tutorial.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/tutorial.xml (original)
+++ branches/release/tools/build/v2/doc/src/tutorial.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -429,9 +429,9 @@
       <para>If you want all applications in some project to link
       to a certain library, you can avoid having to specify it directly the sources of every
       target by using the
- <varname>&lt;source&gt;</varname> property. For example, if <filename>/boost/filesystem//fs</filename>
+ <varname>&lt;library&gt;</varname> property. For example, if <filename>/boost/filesystem//fs</filename>
       should be linked to all applications in your project, you can add
- <code>&lt;source&gt;/boost/filesystem//fs</code> to the project's requirements, like this:</para>
+ <code>&lt;library&gt;/boost/filesystem//fs</code> to the project's requirements, like this:</para>
 
       <programlisting>
 project

Modified: branches/release/tools/build/v2/example/generator/soap.jam
==============================================================================
--- branches/release/tools/build/v2/example/generator/soap.jam (original)
+++ branches/release/tools/build/v2/example/generator/soap.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -58,7 +58,8 @@
                     t2 = [ new file-target $(name)_server : CPP : $(project)
                       : $(a) ] ;
                 }
- return $(t) $(t2) ;
+ return [ virtual-target.register $(t) ]
+ [ virtual-target.register $(t2) ] ;
             }
         }
     }

Modified: branches/release/tools/build/v2/index.html
==============================================================================
--- branches/release/tools/build/v2/index.html (original)
+++ branches/release/tools/build/v2/index.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,32 +18,34 @@
   margin-left: 1em ;
   border: medium outset ;
   padding: 0em 1em ;
- background-color: #ffffee ;
+ background-color: #adbed2;
+ border-color: #000000;
+ border-width: 1;
   width: 40% ;
   float: right ;
   clear: right }
-
+}
+
 div.sidebar p.rubric {
   font-family: sans-serif ;
   font-size: medium }
 </style>
 
- <title>Boost Build System V2</title>
+ <title>Boost.Build V2</title>
   </head>
 
   <body bgcolor="#FFFFFF" text="#000000">
- <img src="../../../boost.png" alt="boost.png (6897 bytes)" align="center"
- width="277" height="86"> <!-- sf logo -->
-
+
+ <p align="center"><img src="boost_build.png" width="396" height="60" alt="Boost.Build V2"></img>
 
     <div class="contents sidebar topic" id="index">
       <p>
         <b>Quick access</b>
         <ul>
         <li>Download: <a href=
- "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m11.zip">[zip]
+ "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m12.zip">[zip]
           </a>, <a href=
- "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m11.tar.bz2">[tar.bz2]
+ "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m12.tar.bz2">[tar.bz2]
           </a>
         <li>Nightly build: [zip],
           <a href="http://boost.org/boost-build2/boost-build.tar.bz2">[tar.bz2]</a>
@@ -71,91 +73,81 @@
     </p>
    </div>
      
-
- <h1>Boost Build System V2</h1>
+<!-- <h1>Boost.Build V2</h1> -->
 
 
- <h2><a name="synopsis">Synopsis</a></h2>
+ <h2>Overview</h2>
 
- <p>Boost.Build is a system for large project software construction, which
- is simple to use and powerfull. Boost.Build V2 is an onging project to
- rewrite Boost.Build, improving design and making it more extensible. The
- distinguishing features are:</p>
+ <p>Boost.Build is an easy way to build C++ projects, everywhere. You
+ name you executables and libraries and list their sources. Boost.Build
+ takes care about compiling your sources with right options, creating
+ static and shared libraries, making executables, and other chores --
+ whether you're using gcc, msvc, or a dozen more supported C++
+ compilers -- on Windows, OSX, Linux and commercial UNIX systems.
 
+ <p>Some of the most important features:
     <ul>
- <li><b>Simple and high level target description language</b>. In most
- cases name of target and list of sources is enough.</li>
+ <li><b>Simple and high level build description</b>. In most
+ cases a name of target and list of sources is all you need.</li>
 
- <li><b>Variant builds</b>. You can build with your choice of basic
- variants (e.g. debug, release, profile...), toolsets (e.g. gcc and
- msvc) and specific properties (e.g. inlining off) from a single command
- invocation.</li>
-
- <li><b>Portability</b>. ``Feature Normalization'' allows to fine-tune
- targets independently from the toolset used, and modular toolset
- descriptions are employed to generate actual build instructions.</li>
-
- <li><b>Multi-project builds</b>. Several projects can be combined and
- built together, with dependencies correctly tracked. Typically, the
- setting (like include paths and defines) needed to use other project
- will be handled automatically.</li>
-
- <li><b>Extensibility</b>. New file types and tools can be easily
- added</li>
+ <li><b>Portability</b>. Most important build properties have symbolic
+ names that work everywhere. Why memorize compiler flags necessary
+ for multi-threaded 64-bit shared library, if Boost.Build can do it for you?
+
+ <li><b>Variant builds</b>. When you build the same project
+ twice with different properties, all produced files are placed
+ in different directories, so you can build with 2 versions of
+ gcc, or both debug and release variants in one invocation.</li>
+
+ <li><b>Global dependencies</b>. No matter what directory you build
+ in, Boost.Build will always check all dependencies in your entire
+ project, preventing inconsistent binaries. And it's easy to
+ use one Boost.Build project in other, again with full dependency
+ tracking.
+
+ <li><b>Usage requirements</b>. A target can specify properties,
+ like include paths and preprocessor defines, that are necessary to use
+ it. Those properties will be automatically applied whenever the target
+ is used.</li>
+
+ <li><b>Standalone</b>. Boost.Build's only dependency is a C compiler,
+ so it's easy to setup. You can even include all of Boost.Build in your
+ project. Boost.Build does not use depend on C++ Boost in any way.</li>
     </ul>
 
- <h2>Documentation</h2>
+ <h2>Status and future</h2>
 
- <p>The user manual, which includes installation instructions, tutorial
- and initial reference is available <a href=
- "../../../doc/html/bbv2.html">here</a>.</p>
-
- <h2><a name="status">Status</a></h2>
-
-<!--
- <p><font size=4 color=blue>Boost.Build V2 is project in development, and for building
- C++ Boost you should use V1, see the
- instructions.
- </font></p>
--->
-
- <p>Enough of the core functionality is implemented to allow practical use
- on medium-size projects. Several compilers and tools are supported, the
- full list is available here.
- The list of features
- still to be implemented is outlined in the <a href=
- "doc/development_plan.html">development plan</a>.</p>
-
- <h2 id="download">Downloading</h2>
-
- <p>The most up-to-date sources are available in <tt>tools/build</tt>
- directory of Boost CVS. Please see the
- <a href="http://www.boost.org/more/getting_started.html#CVS">Boost CVS Repository
- </a> section of the Boost getting started docs.</p>
-
- <p>Boost.Build releases are also available. There's <a href=
- "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m11.zip">zip
- archive</a>, and <a href=
- "http://prdownloads.sourceforge.net/boost/boost-build-2.0-m11.tar.bz2">tar.bz2
- archive</a> of the current release. Older releases are available from the
- <a href=
- "http://sourceforge.net/project/showfiles.php?group_id=7586">SourceForce
- download page</a>.</p>
-
- <p>The installation is described in the
- <a href="../../../doc/html/bbv2/installation.html">user
- manual</a>.</p>
+ <p>Boost.Build is ready to use today, and new features are being actively
+ developed.
 
- <h2>Feedback</h2>
+ <p>The current version of 2.0 Milestone 12, which added support for
+ precompiled headers on gcc, and added 3 new C++ compilers
+ (full changelog).
+
+ <p>Milestone 13 is planned as bugfix release. Milestone 14 will
+ focus on improving user documentation. Milestone 15 will see most
+ of Boost.Build reimplemented in Python, to make extending
+ Boost.Build even easier for end users (see PythonPort).
+ The specific issues planned for each release can be found on the
+ roadmap.
+
+
+
+ <h2>Feedback and contributing</h2>
 
     <p>Should you have any questions or comments, we'd be glad to hear them.
     Post everything to the mailing list.</p>
 
- <p>If you'd like to help with development, there's a separate <a href=
- "hacking.txt">guidelines document</a>.</p>
+ <p>Bugs and feature requests can be entered at our
+ bug tracker.
+
+ <p>If you'd like to help with development, just pick a bug
+ in the tracker that you'd like to fix, or feel free to implement
+ any feature you like. There's a separate
+ guidelines document for working on code.</p>
     <hr>
 
- <p>&copy; Copyright David Abrahams and Vladimir Prus 2002-2006.
+ <p>&copy; Copyright David Abrahams and Vladimir Prus 2002-2007.
     Permission to copy, use, modify, sell and distribute this document is
     granted provided this copyright notice appears in all copies. This
     document is provided "as is" without express or implied warranty, and
@@ -163,10 +155,17 @@
 
     <p>Revised
     <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan
- -->Jul 20, 2006
+ -->Oct 4, 2007
     <!--webbot bot="Timestamp" endspan i-checksum="13972"
                                             -->
     </p>
+
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+</script>
+<script type="text/javascript">
+_uacct = "UA-2917240-2";
+urchinTracker();
+</script>
   </body>
 </html>
 

Modified: branches/release/tools/build/v2/kernel/errors.jam
==============================================================================
--- branches/release/tools/build/v2/kernel/errors.jam (original)
+++ branches/release/tools/build/v2/kernel/errors.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -208,7 +208,7 @@
     while $(bt) && ! $(result)
     {
         local m = [ MATCH ^(.+)\\.$ : $(bt[3]) ] ;
- local user-modules = ([Jj]amfile(.jam|.v2|)|user-config.jam|site-config.jam|project-root.jam) ;
+ local user-modules = ([Jj]amroot(.jam|.v2|)|([Jj]amfile(.jam|.v2|)|user-config.jam|site-config.jam|project-root.jam) ;
         
         if [ MATCH $(user-modules) : $(bt[1]:D=) ]
         {

Modified: branches/release/tools/build/v2/nightly.sh
==============================================================================
--- branches/release/tools/build/v2/nightly.sh (original)
+++ branches/release/tools/build/v2/nightly.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,7 +18,7 @@
 cd /tmp
 rm -rf boost-build
 echo "Checking out sources"
-cvs -d :ext:vladimir_prus_at_[hidden]:/cvsroot/boost co -P -d boost-build boost/tools > /tmp/boost_build_checkout_log
+svn co http://svn.boost.org/svn/boost/trunk/tools boost-build > /tmp/boost_build_checkout_log
 mv /tmp/boost_build_checkout_log boost-build/checkout-log
 cd boost-build/build/v2
 echo "Building packages and uploading docs"

Modified: branches/release/tools/build/v2/release_procedure.txt
==============================================================================
--- branches/release/tools/build/v2/release_procedure.txt (original)
+++ branches/release/tools/build/v2/release_procedure.txt 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,18 +14,22 @@
    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"
- strings in docs are correct.
+ string in index.html is correct.
 
-1. Make sure you don't have any local modification, and tag the CVS tree with
- Milestone_X tag. Be sure to tag both Boost.Build and Boost.Jam sources.
+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
 
- cvs -d :ext:<your_user_name>@boost.cvs.sourceforge.net:/cvsroot/boost co -r
- Milestone_X -P -d boost-build boost/tools
-
- Note: it turns out that anonymous CVS access uses some backup server, which
- is not up-to-date.
+ svn co https://svn.boost.org/svn/boost/branches/build/Milestone_X boost-build
 
 3. Go to "boost-build/build/v2" directory.
 

Modified: branches/release/tools/build/v2/roll.sh
==============================================================================
--- branches/release/tools/build/v2/roll.sh (original)
+++ branches/release/tools/build/v2/roll.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,28 +7,33 @@
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
 set -e
-# Do some renames/rearrangments
 
+# Do some renames/rearrangments
 cp -r ../v2 ../boost-build
 # Grab jam_src
 cp -r ../../jam/src ../boost-build/jam_src
 cd ../boost-build
 
+# Capture the version
+revision=`svnversion ..`
+echo "SVN Revision $revision" >> timestamp.txt
+date >> timestamp.txt
+
 # This one is not fully finished
 rm -rf example/versioned
 
 # Remove unnecessary top-level files
-find . -maxdepth 1 -type f | egrep -v "roll.sh|bootstrap.jam|build-system.jam|boost_build_v2.html|boost.png|index.html|hacking.txt|site-config.jam|user-config.jam" | xargs rm -f
+find . -maxdepth 1 -type f | egrep -v "timestamp.txt|roll.sh|bootstrap.jam|build-system.jam|boost_build_v2.html|boost_build.png|index.html|hacking.txt|site-config.jam|user-config.jam" | xargs rm -f
 
 # Prepare some more files.
 echo -e "boost-build kernel ;\n" > boost-build.jam
 
 # Build the documentation
 touch doc/project-root.jam
-export BOOST_BUILD_PATH=/home/ghost/Work/boost-rc/tools/build/v2
+export BOOST_BUILD_PATH=`pwd`
 cd doc
-/home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2
-/home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2 pdf
+/home/ghost/Work/Boost/boost-svn/tools/jam/src/bin.linuxx86/bjam --v2
+/home/ghost/Work/Boost/boost-svn/tools/jam/src/bin.linuxx86/bjam --v2 pdf
 cp `find bin -name "*.pdf"` ../..
 mv ../../standalone.pdf ../../userman.pdf
 rm -rf bin
@@ -43,15 +48,14 @@
 perl -pi -e 's%../../../doc/html/bbv2.installation.html%doc/html/bbv2.installation.html%' index.html
 
 # Make packages
-find . -name CVS | xargs rm -rf
+find . -name ".svn" | xargs rm -rf
 rm roll.sh
 chmod a+x jam_src/build.bat
-date >> timestamp.txt
 cd .. && zip -r boost-build.zip boost-build && tar --bzip2 -cf boost-build.tar.bz2 boost-build
 cd boost-build
 
 chmod -R u+w *
 # Upload docs to sourceforge
 perl -pi -e 's%<!-- sf logo -->%SourceForge.net Logo%' index.html doc/*.html
-scp -r doc example *.html hacking.txt vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2
+scp -r doc example boost_build.png *.html hacking.txt vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2
 scp ../userman.pdf vladimir_prus_at_[hidden]:/home/groups/b/bo/boost/htdocs/boost-build2/doc

Modified: branches/release/tools/build/v2/test/BoostBuild.py
==============================================================================
--- branches/release/tools/build/v2/test/BoostBuild.py (original)
+++ branches/release/tools/build/v2/test/BoostBuild.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,6 +18,40 @@
 import time
 import tempfile
 import sys
+import traceback
+import math
+from StringIO import StringIO
+
+annotation_func = None
+
+annotations = []
+
+def print_annotation(name, value):
+ """Writes some named bit of information about test
+ run.
+ """
+ print name + " {{{"
+ print value
+ print "}}}"
+
+
+def flush_annotations():
+ global annotations
+ for ann in annotations:
+ print_annotation(ann[0], ann[1])
+ annotations = []
+
+defer_annotations = 0
+
+def set_defer_annotations(n):
+ global defer_annotations
+ defer_annotations = n
+
+def annotation(name, value):
+ """Records an annotation about test run."""
+ annotations.append((name, value))
+ if not defer_annotations:
+ flush_annotations()
 
 def get_toolset():
     toolset = None;
@@ -38,29 +72,36 @@
 def prepare_suffix_map(toolset):
     global windows, suffixes
     suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'}
+ suffixes['.implib'] = '.no_implib_files_on_this_platform'
     if windows:
         suffixes = {}
         if toolset in ["gcc"]:
             suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw...
             suffixes['.obj'] = '.o'
+ suffixes['.implib'] = '.lib'
     if os.__dict__.has_key('uname') and os.uname()[0] == 'Darwin':
         suffixes['.dll'] = '.dylib'
 
 def re_remove(sequence,regex):
     me = re.compile(regex)
     result = filter( lambda x: me.match(x), sequence )
+ if 0 == len(result):
+ raise ValueError()
     for r in result:
         sequence.remove(r)
 
 def glob_remove(sequence,pattern):
     result = fnmatch.filter(sequence,pattern)
+ if 0 == len(result):
+ raise ValueError()
     for r in result:
         sequence.remove(r)
 
 lib_prefix = 1
+dll_prefix = 1
 if windows:
- lib_prefix = 0
-
+ #~ lib_prefix = 0
+ dll_prefix = 0
     
     
 #
@@ -78,7 +119,7 @@
         if os.WIFEXITED(self.status):
             return os.WEXITSTATUS(self.status)
         else:
- return None
+ return -1
 elif os.name == 'nt':
     def _failed(self, status = 0):
         return not self.status is None and self.status != status
@@ -184,6 +225,7 @@
         program_list.append('-sBOOST_BUILD_PATH=' + boost_build_path)
         if verbosity:
             program_list += verbosity
+ program_list += ["--ignore-toolset-requirements"]
         if arguments:
             program_list += arguments.split(" ")
 
@@ -255,7 +297,10 @@
 
     def copy(self, src, dst):
         self.wait_for_time_change()
- self.write(dst, self.read(src))
+ try:
+ self.write(dst, self.read(src))
+ except:
+ self.fail_test(1)
 
     def copy_preserving_timestamp(self, src, dst):
         src_name = self.native_file_name(src)
@@ -279,8 +324,10 @@
         for name in names:
             n = self.native_file_name(name)
             n = glob.glob(n)
+ if n: n = n[0]
+ if not n:
+ n = self.glob_file(string.replace(name, "$toolset", self.toolset+"*"))
             if n:
- n = n[0]
                 if os.path.isdir(n):
                     shutil.rmtree(n, ignore_errors=0)
                 else:
@@ -299,11 +346,8 @@
         self.write(name, content)
                                                         
     def dump_stdio(self):
- print "STDOUT ============"
- print self.stdout()
- print "STDERR ============"
- print self.stderr()
- print "END ==============="
+ annotation("STDOUT", self.stdout())
+ annotation("STDERR", self.stderr())
                     
     #
     # FIXME: Large portion copied from TestSCons.py, should be moved?
@@ -344,20 +388,19 @@
             if status != 0:
                 expect = " (expected %d)" % status
 
- print '"%s" returned %d%s' % (
- kw['program'], _status(self), expect)
+ annotation("failed command", '"%s" returned %d%s' % (
+ kw['program'], _status(self), expect))
 
+ annotation("reason", "error returned by bjam")
             self.fail_test(1)
 
         if not stdout is None and not match(self.stdout(), stdout):
- print "Expected STDOUT =========="
- print stdout
- print "Actual STDOUT ============"
- print self.stdout()
+ annotation("reason", "Unexpected stdout")
+ annotation("Expected STDOUT", stdout)
+ annotation("Actual STDOUT", self.stdout())
             stderr = self.stderr()
             if stderr:
- print "STDERR ==================="
- print stderr
+ annotation("STDERR", stderr)
             self.maybe_do_diff(self.stdout(), stdout)
             self.fail_test(1, dump_stdio = 0)
 
@@ -367,12 +410,10 @@
         actual_stderr = re.sub(intel_workaround, "", self.stderr())
 
         if not stderr is None and not match(actual_stderr, stderr):
- print "STDOUT ==================="
- print self.stdout()
- print "Expected STDERR =========="
- print stderr
- print "Actual STDERR ============"
- print actual_stderr
+ annotation("reason", "Unexpected stderr")
+ annotation("Expected STDERR", stderr)
+ annotation("Actual STDERR", self.stderr())
+ annotation("STDOUT", self.stdout())
             self.maybe_do_diff(actual_stderr, stderr)
             self.fail_test(1, dump_stdio = 0)
 
@@ -382,12 +423,33 @@
         self.unexpected_difference = copy.deepcopy(self.difference)
 
         self.last_build_time = time.time()
+
+ def glob_file(self, 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):
- return open(glob.glob(self.native_file_name(name))[0], "rb").read()
+ try:
+ if self.toolset:
+ name = string.replace(name, "$toolset", self.toolset+"*")
+ name = self.glob_file(name)
+ return open(name, "rU").read()
+ except:
+ annotation("reason", "Could not open '%s'" % name)
+ self.fail_test(1)
+ return ''
 
     def read_and_strip(self, name):
- lines = open(glob.glob(self.native_file_name(name))[0], "rb").readlines()
+ lines = open(self.glob_file(name), "rb").readlines()
         result = string.join(map(string.rstrip, lines), "\n")
         if lines and lines[-1][-1] == '\n':
             return result + '\n'
@@ -397,8 +459,9 @@
     def fail_test(self, condition, dump_stdio = 1, *args):
         # If test failed, print the difference
         if condition and hasattr(self, 'difference'):
- print '-------- all changes caused by last build command ----------'
- self.difference.pprint()
+ f = StringIO()
+ self.difference.pprint(f)
+ annotation("changes causes by the last build command", f.getvalue())
             
         if condition and dump_stdio:
             self.dump_stdio()
@@ -413,8 +476,11 @@
             elif os.path.exists(path):
                 raise "The path " + path + " already exists and is not directory";
             shutil.copytree(self.workdir, path)
-
- TestCmd.TestCmd.fail_test(self, condition, *args)
+
+ if condition:
+ at = TestCmd.caller(traceback.extract_stack(), 0)
+ annotation("stacktrace", at)
+ sys.exit(1)
         
     # A number of methods below check expectations with actual difference
     # between directory trees before and after build.
@@ -447,7 +513,7 @@
     def expect_modification(self, names):
         for name in self.adjust_names(names):
                 try:
- self.unexpected_difference.modified_files.remove(name)
+ glob_remove(self.unexpected_difference.modified_files,name)
                 except:
                         print "File %s not modified as expected" % (name,)
                         self.fail_test(1)
@@ -475,7 +541,8 @@
                     filesets.pop()
 
             if not filesets:
- print "File %s not touched as expected" % (name,)
+ annotation("reason",
+ "File %s not touched as expected" % (name,))
                 self.fail_test(1)
 
 
@@ -491,17 +558,21 @@
     def expect_nothing(self, names):
         for name in self.adjust_names(names):
             if name in self.difference.added_files:
- print "File %s is added, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is added, but no action was expected" % (name,))
                 self.fail_test(1)
             if name in self.difference.removed_files:
- print "File %s is removed, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is removed, but no action was expected" % (name,))
                 self.fail_test(1)
                 pass
             if name in self.difference.modified_files:
- print "File %s is modified, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is modified, but no action was expected" % (name,))
                 self.fail_test(1)
             if name in self.difference.touched_files:
- print "File %s is touched, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is touched, but no action was expected" % (name,))
                 self.fail_test(1)
 
     def expect_nothing_more(self):
@@ -556,7 +627,7 @@
                 result = self.read(name)
             else:
                 result = string.replace(self.read_and_strip(name), "\\", "/")
- except IOError:
+ except (IOError, IndexError):
             print "Note: could not open file", name
             self.fail_test(1)
         return result
@@ -598,7 +669,7 @@
             open(a, "w").write(actual)
             print "DIFFERENCE"
             if os.system("diff -u " + e + " " + a):
- print "Unable to compute difference"
+ print "Unable to compute difference: diff -u %s %s" % (e,a)
             os.unlink(e)
             os.unlink(a)
         else:
@@ -637,11 +708,19 @@
         pos = string.rfind(name, ".")
         if pos != -1:
             suffix = name[pos:]
- if suffix in [".lib", ".dll"]:
+ if suffix == ".lib":
                 (head, tail) = os.path.split(name)
                 if lib_prefix:
                     tail = "lib" + tail
                     result = os.path.join(head, tail)
+ elif suffix == ".dll":
+ (head, tail) = os.path.split(name)
+ if dll_prefix:
+ tail = "lib" + tail
+ result = os.path.join(head, tail)
+ # If we try to use this name in Jamfile, we better
+ # convert \ to /, as otherwise we'd have to quote \.
+ result = string.replace(result, "\\", "/")
         return result
                 
     def adjust_suffix(self, name):
@@ -678,8 +757,17 @@
     # Wait while time is no longer equal to the time last "run_build_system"
     # call finished.
     def wait_for_time_change(self):
- while int(time.time()) < int(self.last_build_time) + 1:
- time.sleep(0.1)
+ while 1:
+ f = time.time();
+ # In fact, I'm not sure why "+ 2" as opposed to "+ 1" is
+ # needed but empirically, "+ 1" sometimes causes 'touch'
+ # and other functions not to bump file time enough for
+ # rebuild to happen.
+ if math.floor(f) < math.floor(self.last_build_time) + 2:
+ time.sleep(0.1)
+ else:
+ break
+
 
             
 class List:

Modified: branches/release/tools/build/v2/test/TestCmd.py
==============================================================================
--- branches/release/tools/build/v2/test/TestCmd.py (original)
+++ branches/release/tools/build/v2/test/TestCmd.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -81,7 +81,7 @@
 
 sys.exitfunc = _clean
 
-def _caller(tblist, skip):
+def caller(tblist, skip):
     string = ""
     arr = []
     for file, line, name, text in tblist:
@@ -120,7 +120,7 @@
             desc = " [" + self.description + "]"
             sep = "\n\t"
 
- at = _caller(traceback.extract_stack(), skip)
+ at = caller(traceback.extract_stack(), skip)
 
     sys.stderr.write("FAILED test" + of + desc + sep + at + """
 in directory: """ + os.getcwd() )
@@ -149,7 +149,7 @@
             desc = " [" + self.description + "]"
             sep = "\n\t"
 
- at = _caller(traceback.extract_stack(), skip)
+ at = caller(traceback.extract_stack(), skip)
     sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
 
     sys.exit(2)

Modified: branches/release/tools/build/v2/test/boostbook.py
==============================================================================
--- branches/release/tools/build/v2/test/boostbook.py (original)
+++ branches/release/tools/build/v2/test/boostbook.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,17 +5,19 @@
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
 from BoostBuild import Tester, List
+import string
 
 # Create a temporary working directory
 t = Tester()
 
 t.set_tree("boostbook")
 # For some reason, the messages are sent to stderr.
-t.run_build_system(stderr="""Writing boost/A.html for refentry(boost.A)
+t.run_build_system()
+t.fail_test(string.find(t.stdout(), """Writing boost/A.html for refentry(boost.A)
 Writing library/reference.html for section(library.reference)
 Writing index.html for chapter(library)
-Writing HTML.manifest
-""")
+Writing docs_HTML.manifest
+""") == -1)
 t.expect_addition(["html/boost/A.html", "html/index.html"])
 
 t.cleanup()

Modified: branches/release/tools/build/v2/test/boostbook/Jamroot
==============================================================================
--- branches/release/tools/build/v2/test/boostbook/Jamroot (original)
+++ branches/release/tools/build/v2/test/boostbook/Jamroot 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,3 +1,3 @@
 
-boostbook docs : docs.xml ;
+boostbook docs : docs.xml autodoc ;
 doxygen autodoc : [ glob *.hpp ] ;

Modified: branches/release/tools/build/v2/test/boostbook/docs.xml
==============================================================================
--- branches/release/tools/build/v2/test/boostbook/docs.xml (original)
+++ branches/release/tools/build/v2/test/boostbook/docs.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -32,5 +32,5 @@
     
   </section>
    
- <xi:include href="autodoc.boostbook"/>
+ <xi:include href="autodoc.xml"/>
 </library>

Modified: branches/release/tools/build/v2/test/build_dir.py
==============================================================================
--- branches/release/tools/build/v2/test/build_dir.py (original)
+++ branches/release/tools/build/v2/test/build_dir.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -88,7 +88,9 @@
 t.expect_addition(["build/foo/bin.v2/$toolset/debug/a.exe",
                    "build/foo/bin.v2/sub/$toolset/debug/b.exe"])
 
-# Try building in subdir
+# Try building in subdir. We expect that the entire build
+# tree with be in 'sub/build'. Today, I'm 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"])

Modified: branches/release/tools/build/v2/test/gcc_runtime.py
==============================================================================
--- branches/release/tools/build/v2/test/gcc_runtime.py (original)
+++ branches/release/tools/build/v2/test/gcc_runtime.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -26,7 +26,7 @@
 
 t.run_build_system("runtime-link=static", status=1)
 t.fail_test(string.find(t.stdout(),
- "on gcc, DLL can't be build with <runtime-link>static") == -1)
+ "On gcc, DLL can't be build with '<runtime-link>static'") == -1)
 
 t.run_build_system("link=static runtime-link=static")
 t.expect_addition("bin/$toolset/debug/link-static/runtime-link-static/hello.lib")

Modified: branches/release/tools/build/v2/test/library_chain.py
==============================================================================
--- branches/release/tools/build/v2/test/library_chain.py (original)
+++ branches/release/tools/build/v2/test/library_chain.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -126,7 +126,8 @@
 t.expect_addition("a/dist/a.dll")
 
 if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc':
- file = t.adjust_names(["a/dist/a.lib"])[0]
+ # This is windows import library -- we know the exact name.
+ file = "a/dist/a.lib"
 else:
     file = t.adjust_names(["a/dist/a.dll"])[0]
 

Modified: branches/release/tools/build/v2/test/project_glob.py
==============================================================================
--- branches/release/tools/build/v2/test/project_glob.py (original)
+++ branches/release/tools/build/v2/test/project_glob.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -143,5 +143,38 @@
 t.run_build_system(subdir="d1")
 t.expect_addition("d1/bin/$toolset/debug/a.exe")
 
+# Regression test: glob excludes used to be broken
+# when building from a subdirectory.
+t.rm(".")
+
+t.write("Jamroot", """
+build-project p ;
+""")
+
+t.write("p/p.c", """
+int main()
+{
+ return 0;
+}
+
+
+""")
+
+t.write("p/p_x.c", """
+int main()
+{
+ return 0;
+}
+
+""")
+
+t.write("p/Jamfile", """
+exe p :
+ [ glob *.c : p_x.c ]
+ ;
+""")
+
+t.run_build_system(subdir="p")
+t.expect_addition("p/bin/$toolset/debug/p.exe")
 
 t.cleanup()

Modified: branches/release/tools/build/v2/test/railsys/program/Jamfile
==============================================================================
--- branches/release/tools/build/v2/test/railsys/program/Jamfile (original)
+++ branches/release/tools/build/v2/test/railsys/program/Jamfile 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,6 +14,7 @@
 #
 # 02/21/02! Jürgen Hunold
 #
+# $Id$
 #
 # ================================================================
 

Modified: branches/release/tools/build/v2/test/rebuilds.py
==============================================================================
--- branches/release/tools/build/v2/test/rebuilds.py (original)
+++ branches/release/tools/build/v2/test/rebuilds.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -35,6 +35,7 @@
 t.expect_addition('bar')
 t.expect_nothing_more()
 
+t.wait_for_time_change()
 t.run_build_system('-ffile.jam foo')
 t.expect_touch('bar')
 t.expect_addition('foo')
@@ -46,7 +47,7 @@
 
 t.touch('bar')
 t.run_build_system('-ffile.jam')
-t.expect_touch(['foo', 'aux1', 'aux2', 'bar'])
+t.expect_touch(['foo', 'aux1', 'aux2'])
 t.expect_nothing_more()
 
 t.cleanup()

Modified: branches/release/tools/build/v2/test/regression.py
==============================================================================
--- branches/release/tools/build/v2/test/regression.py (original)
+++ branches/release/tools/build/v2/test/regression.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -74,7 +74,7 @@
 
 # Make sure args are handled.
 t.expect_content("bin/r.test/$toolset/debug/r.output",
- "foo\nbar\n\nEXIT STATUS: 0\n",True)
+ "foo\nbar\n*\nEXIT STATUS: 0*\n",True)
 
 # Test that input file is handled as well.
 t.write("r.cpp", """

Modified: branches/release/tools/build/v2/test/remove_requirement.py
==============================================================================
--- branches/release/tools/build/v2/test/remove_requirement.py (original)
+++ branches/release/tools/build/v2/test/remove_requirement.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -80,7 +80,7 @@
 
 t.rm(".")
 
-# No test that path requirements can be removed as well.
+# Now test that path requirements can be removed as well.
 t.write("Jamroot", """
 build-project sub ;
 
@@ -109,7 +109,7 @@
 
 t.run_build_system()
 
-t.expect_addition("bin/$toolset/debug/hello.exe")
+t.expect_addition("sub/bin/$toolset/debug/hello.exe")
 
 t.cleanup()
 

Modified: branches/release/tools/build/v2/test/searched_lib.py
==============================================================================
--- branches/release/tools/build/v2/test/searched_lib.py (original)
+++ branches/release/tools/build/v2/test/searched_lib.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -30,7 +30,7 @@
 # change dll to lib.
 #
 if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc':
- t.copy("lib/bin/$toolset/debug/test_lib.lib", "lib/test_lib.lib")
+ 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")

Modified: branches/release/tools/build/v2/test/test-config-example.jam
==============================================================================
--- branches/release/tools/build/v2/test/test-config-example.jam (original)
+++ branches/release/tools/build/v2/test/test-config-example.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -9,11 +9,11 @@
 # while site-config.jam and user-config.jam will be ignored.
 
 using gcc ;
-using borland ;
 
 using boostbook
      : /home/ghost/Store/docbook/xsl
      : /home/ghost/Store/docbook/dtd
- : /home/ghost/Work/boost-rc/tools/boostbook
+ : /home/ghost/Work/Boost/boost-svn/tools/boostbook
      ;
 using doxygen ;
+using qt4 : /usr/share/qt4 ;

Modified: branches/release/tools/build/v2/test/test_all.py
==============================================================================
--- branches/release/tools/build/v2/test/test_all.py (original)
+++ branches/release/tools/build/v2/test/test_all.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,6 +7,7 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 
 import os, sys, string
+import BoostBuild
 from BoostBuild import get_toolset
 
 # clear environment for testing
@@ -21,6 +22,8 @@
     except:
         pass
 
+BoostBuild.set_defer_annotations(1)
+
 def run_tests(critical_tests, other_tests):
     """Runs first critical tests and then other_tests.
 
@@ -34,6 +37,7 @@
 
     invocation_dir = os.getcwd()
 
+ pass_count = 0
     failures_count = 0
     for i in all_tests:
         print ("%-25s : " %(i)),
@@ -49,13 +53,22 @@
             # Restore the current directory, which might be changed by the
             # test
             os.chdir(invocation_dir)
+ BoostBuild.flush_annotations();
             continue
         print "PASSED"
+ BoostBuild.flush_annotations();
+ pass_count = pass_count + 1
         sys.stdout.flush() # makes testing under emacs more entertaining.
         
     # Erase the file on success
     if failures_count == 0:
         open('test_results.txt', 'w')
+
+ print """
+ === Test summary ===
+ PASS: %d
+ FAIL: %d
+ """ % (pass_count, failures_count)
         
 
 def last_failed_test():
@@ -150,6 +163,7 @@
           "example_libraries",
           "example_make",
           "remove_requirement",
+ "free_features_request",
           ]
 
 if os.name == 'posix':
@@ -162,8 +176,10 @@
     if string.find(os.uname()[0], "CYGWIN") == -1:
         tests.append("library_order")
 
-if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0:
+if string.find(get_toolset(), 'gcc') == 0:
     tests.append("gcc_runtime")
+
+if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0:
     tests.append("pch")
 
 if "--extras" in sys.argv:

Modified: branches/release/tools/build/v2/test/tree.py
==============================================================================
--- branches/release/tools/build/v2/test/tree.py (original)
+++ branches/release/tools/build/v2/test/tree.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -31,11 +31,11 @@
         self.modified_files = filter(not_dir, self.modified_files)
         self.touched_files = filter(not_dir, self.touched_files)
 
- def pprint(self):
- print "Added files :", self.added_files
- print "Removed files :", self.removed_files
- print "Modified files:", self.modified_files
- print "Touched files :", self.touched_files
+ def pprint(self, f=None):
+ print >> f, "Added files :", self.added_files
+ print >> f,"Removed files :", self.removed_files
+ print >> f, "Modified files:", self.modified_files
+ print >> f, "Touched files :", self.touched_files
 
     def empty(self):
         return (len(self.added_files) == 0 and len(self.removed_files) == 0)\

Modified: branches/release/tools/build/v2/tools/acc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/acc.jam (original)
+++ branches/release/tools/build/v2/tools/acc.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -12,16 +12,23 @@
 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 ;
-feature.subfeature toolset acc : version ;
 
 # Configures the acc toolset.
-rule init ( version ? : path * )
+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) ;
 }
 
 
@@ -76,22 +83,22 @@
 
 actions acc.link bind NEEDLIBS
 {
- aCC $(LINKFLAGS) +DD64 -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS)
+ $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
 }
 
 actions acc.link.dll bind NEEDLIBS
 {
- aCC -b $(LINKFLAGS) +DD64 -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS)
+ $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
 }
 
 actions acc.compile.c
 {
- aCC -Ae +DD64 -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+ $(CONFIG_COMMAND) -Ae -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
 }
 
 actions acc.compile.c++
 {
- aCC -AA +DD64 -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
+ $(CONFIG_COMMAND) -AA -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS)
 }
 
 actions updated together piecemeal acc.archive

Modified: branches/release/tools/build/v2/tools/boostbook.jam
==============================================================================
--- branches/release/tools/build/v2/tools/boostbook.jam (original)
+++ branches/release/tools/build/v2/tools/boostbook.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
 # Copyright 2003, 2004, 2005 Dave Abrahams
 # Copyright 2003, 2004, 2005 Douglas Gregor
-# Copyright 2005, 2006 Rene Rivera
+# 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 http://www.boost.org/LICENSE_1_0.txt)
@@ -28,8 +28,13 @@
 
 import xsltproc : xslt xslt-dir ;
 
-feature.feature format : html onehtml man pdf ps docbook fo tests
- : incidental implicit composite ;
+# Make this module into a project.
+project.initialize $(__name__) ;
+project boostbook ;
+
+
+feature.feature format : html xhtml htmlhelp onehtml man pdf ps docbook fo tests
+ : incidental implicit composite propagated ;
 
 type.register DTDXML : dtdxml ;
 type.register XML : xml ;
@@ -40,6 +45,8 @@
 type.register PS : ps ;
 type.register XSLT : xsl : XML ;
 type.register HTMLDIR ;
+type.register XHTMLDIR ;
+type.register HTMLHELP ;
 type.register MANPAGES ;
 type.register TESTS : tests ;
 # Artificial target type, used to require invocation of top-level
@@ -120,6 +127,8 @@
     generators.register-standard boostbook.boostbook-to-tests : XML : TESTS ;
     generators.register-standard boostbook.docbook-to-onehtml : DOCBOOK : HTML ;
     generators.register-standard boostbook.docbook-to-htmldir : DOCBOOK : HTMLDIR ;
+ generators.register-standard boostbook.docbook-to-xhtmldir : DOCBOOK : XHTMLDIR ;
+ generators.register-standard boostbook.docbook-to-htmlhelp : DOCBOOK : HTMLHELP ;
     generators.register-standard boostbook.docbook-to-manpages : DOCBOOK : MANPAGES ;
     generators.register-standard boostbook.docbook-to-fo : DOCBOOK : FO ;
     
@@ -172,6 +181,18 @@
   xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : html ;
 }
 
+rule docbook-to-xhtmldir ( target : source : properties * )
+{
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/xhtml.xsl ] ;
+ xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : xhtml ;
+}
+
+rule docbook-to-htmlhelp ( target : source : properties * )
+{
+ local stylesheet = [ path.native $(.boostbook-xsl-dir)/html-help.xsl ] ;
+ xslt-dir $(target) : $(source) $(stylesheet) : $(properties) : htmlhelp ;
+}
+
 rule docbook-to-manpages ( target : source : properties * )
 {
   local stylesheet = [ path.native $(.boostbook-xsl-dir)/manpages.xsl ] ;
@@ -190,7 +211,11 @@
 
   # BoostBook DTD catalog entry
   local boostbook-dtd-dir = [ boostbook.dtd-dir ] ;
-
+ if $(boostbook-dtd-dir)
+ {
+ boostbook-dtd-dir = [ regex.replace $(boostbook-dtd-dir) " " "%20" ] ;
+ }
+
   print.text
     "<?xml version=\"1.0\"?>"
     "<!DOCTYPE catalog "
@@ -200,7 +225,7 @@
     " <rewriteURI uriStartString=\"http://www.boost.org/tools/boostbook/dtd/\" rewritePrefix=\"file://$(boostbook-dtd-dir)/\"/>"
     : true ;
 
- local docbook-xsl-dir = [ boostbook.docbook-xsl-dir ] ;
+ local docbook-xsl-dir = [ boostbook.docbook-xsl-dir ] ;
   if ! $(docbook-xsl-dir)
   {
     ECHO "BoostBook warning: no DocBook XSL directory specified." ;
@@ -213,10 +238,11 @@
   }
   else
   {
+ docbook-xsl-dir = [ regex.replace $(docbook-xsl-dir) " " "%20" ] ;
     print.text " <rewriteURI uriStartString=\"http://docbook.sourceforge.net/release/xsl/current/\" rewritePrefix=\"file://$(docbook-xsl-dir)/\"/>" ;
   }
 
- local docbook-dtd-dir = [ boostbook.docbook-dtd-dir ] ;
+ local docbook-dtd-dir = [ boostbook.docbook-dtd-dir ] ;
   if ! $(docbook-dtd-dir)
   {
     ECHO "BoostBook warning: no DocBook DTD directory specified." ;
@@ -229,17 +255,49 @@
   }
   else
   {
+ docbook-dtd-dir = [ regex.replace $(docbook-dtd-dir) " " "%20" ] ;
     print.text " <rewriteURI uriStartString=\"http://www.oasis-open.org/docbook/xml/4.2/\" rewritePrefix=\"file://$(docbook-dtd-dir)/\"/>" ;
   }
 
   print.text "</catalog>" ;
 }
 
+rule xml-catalog ( )
+{
+ if ! $(.xml-catalog)
+ {
+ # The target is created as part of the root project. But ideally
+ # it would be created as part of the boostbook project. This is not
+ # current possible as such global projects don't inherit things like
+ # the build directory.
+
+ # 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 ] ;
+ }
+ .xml-catalog = [ new file-target boostbook_catalog
+ : XML
+ : [ project.target $(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-generator : generator
 {
     import feature ;
     import virtual-target ;
     import generators ;
+ import boostbook ;
       
     
     rule __init__ ( * : * )
@@ -249,21 +307,13 @@
     
     rule run ( project name ? : property-set : sources * : multiple ? )
     {
- # Generate the catalog
- local catalog = [ new file-target catalog
- : XML
- : $(project)
- : [ new action
- : boostbook.generate-xml-catalog
- : $(property-set) ] ] ;
-
- # catalog = [ virtual-target.register $(catalog) ] ;
+ # Generate the catalog, but only once...
+ local global-catalog = [ boostbook.xml-catalog ] ;
+ local catalog = $(global-catalog[1]) ;
+ local catalog-file = $(global-catalog[2]) ;
        
         # Add the catalog to the property set
- local catalog-path = [ $(catalog).path ] ;
- property-set = [ $(property-set).add-raw <catalog>$(catalog-path)/catalog.xml ] ;
-
- # local targets = $(catalog) ;
+ property-set = [ $(property-set).add-raw <catalog>$(catalog-file) ] ;
 
         local type = none ;
         local manifest ;
@@ -275,6 +325,15 @@
                 type = HTMLDIR ;
                 manifest = HTML.manifest ;
             }
+ case xhtml :
+ {
+ type = XHTMLDIR ;
+ manifest = HTML.manifest ;
+ }
+ case htmlhelp :
+ {
+ type = HTMLHELP ;
+ }
             
             case onehtml : type = HTML ;
             
@@ -300,8 +359,11 @@
             $(base-target).depends $(catalog) ;
             
             # Generate HTML/PDF/PS from DOCBOOK.
- local target = [ generators.construct $(project) $(manifest)
- : $(type) : $(property-set) : $(base-target) ] ;
+ local target = [ generators.construct $(project) $(name)_$(manifest)
+ : $(type)
+ : [ $(property-set).add-raw
+ <xsl:param>manifest=$(name)_$(manifest) ]
+ : $(base-target) ] ;
             local name = [ $(property-set).get <name> ] ;
             name ?= $(format) ;
             $(target[2]).set-path $(name) ;
@@ -393,3 +455,5 @@
                  : $(properties) <xsl:param>boost.root=$(boost_root)
                  ;
 }
+
+

Modified: branches/release/tools/build/v2/tools/borland.jam
==============================================================================
--- branches/release/tools/build/v2/tools/borland.jam (original)
+++ branches/release/tools/build/v2/tools/borland.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,7 +14,7 @@
 import type ;
 import common ;
 
-toolset.register borland ;
+feature.extend toolset : borland ;
 
 rule init ( version ? : command * : options * )
 {

Modified: branches/release/tools/build/v2/tools/builtin.jam
==============================================================================
--- branches/release/tools/build/v2/tools/builtin.jam (original)
+++ branches/release/tools/build/v2/tools/builtin.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -333,31 +333,22 @@
     rule __init__ ( name
         : project
         : shared ?
- : real-name ?
         : search *
         : action
     )
     {
         abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
- : $(action) ;
+ : $(action) : ;
         
         self.shared = $(shared) ;
- self.real-name = $(real-name) ;
- self.real-name ?= $(name) ;
         self.search = $(search) ;
     }
-
-
+
     rule shared ( )
     {
         return $(self.shared) ;
     }
-
- rule real-name ( )
- {
- return $(self.real-name) ;
- }
-
+
     rule search ( )
     {
         return $(self.search) ;
@@ -578,8 +569,9 @@
             local search = [ feature.get-values <search> : $(properties) ] ;
 
             a = [ new null-action $(property-set) ] ;
- local t = [ new searched-lib-target $(name) : $(project) : $(shared)
- : [ feature.get-values <name> : $(properties) ]
+ local lib-name = [ feature.get-values <name> : $(properties) ] ;
+ lib-name ?= $(name) ;
+ local t = [ new searched-lib-target $(lib-name) : $(project) : $(shared)
                             : $(search)
                             : $(a)
                       ] ;
@@ -809,7 +801,7 @@
         {
             if [ type.is-derived [ $(s).type ] SEARCHED_LIB ]
             {
- local name = [ $(s).real-name ] ;
+ local name = [ $(s).name ] ;
                 if [ $(s).shared ]
                 {
                     fsa += $(name) ;

Modified: branches/release/tools/build/v2/tools/common.jam
==============================================================================
--- branches/release/tools/build/v2/tools/common.jam (original)
+++ branches/release/tools/build/v2/tools/common.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -250,6 +250,7 @@
                 ECHO "warning: toolset $(toolset) initialization: can't find tool $(tool)" ;
                 ECHO "warning: initialized from" [ errors.nearest-user-location ] ;
             }
+ command = $(tool) ;
         }
     }
     else
@@ -268,10 +269,7 @@
             command = $(user-provided-command) ;
         }
     }
- if ! $(command)
- {
- command = $(user-provided-command) ;
- }
+
     return $(command) ;
 }
 
@@ -378,6 +376,11 @@
 # - 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 ('true') says it's OK to set flags for another
     # module,
     toolset.flags $(toolset) CONFIG_COMMAND $(condition) : $(command) : unchecked ;

Modified: branches/release/tools/build/v2/tools/darwin.jam
==============================================================================
--- branches/release/tools/build/v2/tools/darwin.jam (original)
+++ branches/release/tools/build/v2/tools/darwin.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -13,7 +13,7 @@
 import common ;
 import generators ;
 
-toolset.register darwin ;
+feature.extend toolset : darwin ;
 import gcc ;
 toolset.inherit-generators darwin : gcc ;
 
@@ -39,7 +39,7 @@
     local gccversion = [ SHELL "$(command) -dumpversion" ] ;
     if $(gccversion) < "4.0.0"
     {
- flags darwin.compile.c++ OPTIONS : -fcoalesce-templates ;
+ flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
     }
 
     gcc.init-link-flags darwin darwin $(condition) ;

Modified: branches/release/tools/build/v2/tools/doxproc.py
==============================================================================
--- branches/release/tools/build/v2/tools/doxproc.py (original)
+++ branches/release/tools/build/v2/tools/doxproc.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -70,11 +70,7 @@
 
 class Doxygen2BoostBook:
     
- def __init__( self,
- #~ id=None,
- #~ title='',
- #~ last_revision=None,
- **kwargs ):
+ def __init__( self, **kwargs ):
         ##
         self.args = kwargs
         self.args.setdefault('id','')
@@ -83,6 +79,7 @@
         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>
@@ -102,6 +99,7 @@
             '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()
@@ -109,24 +107,31 @@
             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 = {}
- self.generated = False
+ #~ 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'])
@@ -142,14 +147,21 @@
                     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 (self.idmap.has_key(node.getAttribute('linkend'))):
+ #~ 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 self.idmap.has_key(node.getAttribute('id')):
+ #~ 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:
@@ -174,23 +186,33 @@
         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
- name = '_translate'
+ names = [ ]
         for c in context:
             if c:
                 if not isinstance(c,xml.dom.Node):
- name += '_'+c
+ suffix = '_'+c.replace('-','_')
                 else:
- name += '_'+c.nodeName
+ suffix = '_'+c.nodeName.replace('-','_')
                     node = c
- name = name.replace('-','_')
- #~ print '_translateNode:', name
- if node and hasattr(self,name):
- return getattr(self,name)(node,**kwargs)
- else:
- return None
+ 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:
@@ -200,10 +222,13 @@
             else:
                 child = n.cloneNode(False)
                 if hasattr(child,'data'):
- child.data = child.data.strip()
+ 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:
@@ -211,6 +236,8 @@
         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 = []
@@ -220,11 +247,23 @@
                 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'):
@@ -248,12 +287,16 @@
                                 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')
@@ -272,11 +315,16 @@
                     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 ):
- #~ print '--| _translate_compounddef_namespace:', node.getAttribute('id')
         namespace = {
             'id' : node.getAttribute('id'),
             'kind' : 'namespace',
@@ -296,11 +344,18 @@
             #~ 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 ):
- #~ print '--| _translate_compounddef_struct:', node.getAttribute('id')
         result = None
         includes = self._getChild('includes',root=node)
         if includes:
@@ -321,11 +376,13 @@
                 '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 not self.symbols.has_key(name):
@@ -339,47 +396,104 @@
                 }
         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 self._getChildData('type',root=param) in (
- 'class','typename'):
+ 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)))
- defval = self._getChild('defval',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:
- templateParam.appendChild(self._createText('default',
- self._getChildData('ref',root=defval.firstChild)))
+ 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:
@@ -387,28 +501,44 @@
                 self._translateNode(n,n.getAttribute('kind'),target=members,**kwargs)
         return members
     
- def _translate_sectiondef_public_type( self, sectiondef, target=None, **kwargs ):
- return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs)
-
- def _translate_sectiondef_public_attrib( self, sectiondef, target=None, **kwargs):
- return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs)
-
+ #~ 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:
+ #~ <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))
@@ -416,20 +546,35 @@
             id=memberdef.getAttribute('id'),
             name=self._getChildData('name',root=memberdef)))
         typedef_type = typedef.appendChild(self._createNode('type'))
- self._translateChildren(self._getChild('type',root=memberdef),target=typedef_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 ):
- ## The current BoostBook to Docbook translator doesn't respect method
- ## Ids. Nor does it assign any useable IDs to the individial methods.
- # self._setID(memberdef.getAttribute('id'),
- # scope+'::'+self._getChildData('name',root=memberdef))
- ## Hence instead of registering an ID for the method we point it at the
- ## containing class.
- self._setID(memberdef.getAttribute('id'),scope)
- method = target.appendChild(self._createNode('method',
+ 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=self._getChildData('name',root=memberdef),
+ name=name,
             cv=' '.join([
                 if_attribute(memberdef,'const','const','').strip()
                 ]),
@@ -439,32 +584,62 @@
                 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 = target.appendChild(self._createNode('type'))
- self._translateChildren(resultType,target=methodType)
+ 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 ):
- self._translateDescription(description,target=target,**kwargs)
- return self._translateDescription(description,target=target,tag='purpose',**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))
@@ -472,8 +647,17 @@
             id=memberdef.getAttribute('id'),
             name=self._getChildData('name',root=memberdef)))
         data_member_type = data_member.appendChild(self._createNode('type'))
- self._translateChildren(self._getChild('type',root=memberdef),target=data_member_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))
@@ -484,6 +668,17 @@
             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))
@@ -496,30 +691,68 @@
                 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._translateChildren(self._getChild('type',root=param),target=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
@@ -540,9 +773,11 @@
         return None
     
     def _getChildData( self, tag, **kwargs ):
- child = self._getChild(tag,**kwargs)
- if child:
- text = self._getChild('#text',root=child)
+ 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 ''
@@ -569,10 +804,11 @@
     def _createNode( self, tag, **kwargs ):
         result = self.boostbook.createElement(tag)
         for k in kwargs.keys():
- if k == 'id':
- result.setAttribute('id',kwargs[k])
- else:
- result.setAttribute(k,kwargs[k])
+ 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 ):

Modified: branches/release/tools/build/v2/tools/doxygen.jam
==============================================================================
--- branches/release/tools/build/v2/tools/doxygen.jam (original)
+++ branches/release/tools/build/v2/tools/doxygen.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -33,6 +33,10 @@
 import xsltproc ;
 import make ;
 import os ;
+import toolset : flags ;
+import alias ;
+import common ;
+import modules ;
 
 # Use to specify extra configuration paramters. These get translated
 # into a doxyfile which configures the building of the docs.
@@ -44,17 +48,29 @@
 # 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 ;
+
 # Doxygen configuration input file.
 type.register DOXYFILE : doxyfile ;
 
 # Doxygen XML multi-file output.
-type.register DOXYGEN_XML_MULTIFILE : : XML ;
+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 : dir : HTML ;
+type.register DOXYGEN_HTML_MULTIFILE : html-dir : HTML ;
 
 # Redirection HTML file to HTML multifile directory.
 type.register DOXYGEN_HTML : : HTML ;
@@ -125,13 +141,24 @@
             .doxygen = $(name) ;
         }
         .doxygen ?= doxygen ;
+
+ .doxproc = [ modules.binding $(__name__) ] ;
+ .doxproc = $(.doxproc:D)/doxproc.py ;
 
- generators.register-composing doxygen.headers-to-doxyfile : H HPP CPP : DOXYFILE ;
- generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_XML_MULTIFILE ;
- generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : BOOSTBOOK ;
- generators.register-standard 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-composing doxygen.headers-to-doxyfile
+ : H HPP CPP : 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-standard doxygen.xml-to-boostbook
+ : DOXYGEN_XML : BOOSTBOOK : <doxygen.processor>xsltproc ;
+ generators.register-standard 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 ;
 
         IMPORT $(__name__) : doxygen : : doxygen ;
     }
@@ -150,7 +177,13 @@
 # action must deal with this behavior.
 actions doxygen-action
 {
- "$(NAME:E=doxygen)" $(>) && echo "Stamped" > "$(<)"
+ $(RM) "$(*.XML)" & "$(NAME:E=doxygen)" $(>) && echo "Stamped" > "$(<)"
+}
+
+# Runs the Python doxproc XML processor.
+actions doxproc
+{
+ python "$(DOXPROC)" "--xmldir=$(>)" "--output=$(<)" "$(OPTIONS)" "--id=$(ID)" "--title=$(TITLE)"
 }
 
 # Generates a doxygen configuration file (doxyfile) given a set of C++
@@ -159,12 +192,24 @@
 rule headers-to-doxyfile ( target : sources * : properties * )
 {
     local text "# Generated by Boost.Build version 2" ;
+
+ local output-dir ;
 
     # Translate <doxygen:param> into command line flags.
     for local param in [ feature.get-values <doxygen:param> : $(properties) ]
     {
         local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
         text += "$(namevalue[1]) = $(namevalue[2])" ;
+ if $(namevalue[1]) = OUTPUT_DIRECTORY
+ {
+ output-dir = "$(namevalue[2])" ;
+ }
+ }
+
+ if ! $(output-dir)
+ {
+ output-dir = [ on $(target) return $(LOCATE) ] ;
+ text += "OUTPUT_DIRECTORY = $(output-dir)" ;
     }
 
     local headers = "" ;
@@ -188,6 +233,15 @@
 {
     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 ]
+ ]
+ ;
 }
 
 # The rules below require Boost.Book stylesheets, so we need
@@ -218,9 +272,12 @@
     local collect-xsl-dir = [ path.native
         [ path.join [ boostbook.xsl-dir ] doxygen collect ]
         ] ;
- local collect-path = [ path.join [ path.pwd ] xml ] ;
- local real-source = [ path.native xml/index.xml ] ;
- NOTFILE $(real-source) ;
+ local source-path
+ = [ path.make [ on $(source) return $(LOCATE) ] ] ;
+ local collect-path
+ = [ path.join [ path.pwd ] $(source-path) $(source:B) ] ;
+ local real-source
+ = [ path.native [ path.join [ path.native $(collect-path) ] index.xml ] ] ;
     xsltproc.xslt $(target) : $(real-source) $(collect-xsl-dir:S=.xsl)
         : <xsl:param>doxygen.xml.path=$(collect-path)
         ;
@@ -248,6 +305,19 @@
     xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ;
 }
 
+flags doxygen.xml-dir-to-boostbook OPTIONS <doxygen.doxproc.index>yes : --enable-index ;
+flags doxygen.xml-dir-to-boostbook ID <doxygen.doxproc.id> ;
+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 * )
 {
@@ -273,7 +343,7 @@
 }
 
 # User-level rule to generate BoostBook XML from a set of headers via Doxygen.
-rule doxygen ( target : sources * : requirements * : default-build * )
+rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * )
 {
     local project = [ project.current ] ;
 
@@ -325,24 +395,65 @@
     else
     {
         # Build a BoostBook XML file from the sources.
- local doxyfile = [
- new typed-target $(target) : $(project) : BOOSTBOOK
- : [ targets.main-target-sources $(sources) : $(target) ]
+ local location-xml = [ feature.get-values <location> : $(requirements) ] ;
+ requirements = [ property.change $(requirements) : <location> ] ;
+ local target-xml = $(target:B=$(target:B)-xml) ;
+
+ ## The doxygen configuration file.
+ targets.main-target-alternative
+ [ new typed-target $(target-xml:S=.tag) : $(project) : DOXYFILE
+ : [ targets.main-target-sources $(sources) : $(target-xml:S=.tag) ]
                 : [ targets.main-target-requirements $(requirements)
                     <doxygen:param>GENERATE_HTML=NO
                     <doxygen:param>GENERATE_XML=YES
+ <doxygen:param>XML_OUTPUT=$(target-xml)
+ : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ ] ;
+ $(project).mark-target-as-explicit $(target-xml:S=.tag) ;
+
+ ## The Doxygen XML directory of the processed source files.
+ targets.main-target-alternative
+ [ new typed-target $(target-xml:S=.dir) : $(project) : DOXYGEN_XML_MULTIFILE
+ : $(target-xml:S=.tag)
+ : [ targets.main-target-requirements $(requirements)
+ : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ ] ;
+ $(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.main-target-alternative
+ [ new typed-target $(target-xml) : $(project) : BOOSTBOOK
+ : $(target-xml:S=.dir)
+ : [ targets.main-target-requirements $(requirements)
                     : $(project) ]
                 : [ targets.main-target-default-build $(default-build) : $(project) ]
             ] ;
- targets.main-target-alternative $(doxyfile) ;
+ $(project).mark-target-as-explicit $(target-xml) ;
 
         targets.main-target-alternative
             [ new install-target-class $(target:S=.xml) : $(project)
- : [ $(doxyfile).name ]
+ : $(target-xml)
+ : [ targets.main-target-requirements $(requirements)
+ <location>$(location-xml:E=.)
+ <name>$(target:S=.xml)
+ : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ ] ;
+ $(project).mark-target-as-explicit $(target:S=.xml) ;
+
+ targets.main-target-alternative
+ [ new alias-target-class $(target) : $(project)
+ :
                 : [ targets.main-target-requirements $(requirements)
- <location>.
                     : $(project) ]
                 : [ targets.main-target-default-build $(default-build) : $(project) ]
+ : [ targets.main-target-usage-requirements $(usage-requirements)
+ <dependency>$(target:S=.xml)
+ : $(project) ]
             ] ;
     }
 }

Modified: branches/release/tools/build/v2/tools/fortran.jam
==============================================================================
--- branches/release/tools/build/v2/tools/fortran.jam (original)
+++ branches/release/tools/build/v2/tools/fortran.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -9,12 +9,17 @@
 #
 
 import "class" : new ;
+import feature : feature ;
 
 import type ;
 import generators ;
 import common ;
 
-type.register FORTRAN : f ;
+type.register FORTRAN : f F for f77 ;
+type.register FORTRAN90 : f90 F90 ;
+
+feature fortran : : free ;
+feature fortran90 : : free ;
 
 class fortran-compiling-generator : generator
 {
@@ -30,7 +35,21 @@
     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 ;

Modified: branches/release/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/gcc.jam (original)
+++ branches/release/tools/build/v2/tools/gcc.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -3,6 +3,8 @@
 # Copyright 2002-2003 Vladimir Prus.
 # Copyright (c) 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
@@ -38,14 +40,35 @@
 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 choosen, so that mingw
+# is in line with msvc naming conventions. For
+# cygwin the cygwin naming convention has been choosen.
 
 # 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 : a ;
+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-suffix IMPORT_LIB : <toolset>gcc <target-os>windows : a ;
+type.set-generated-target-prefix IMPORT_LIB : <toolset>gcc <target-os>cygwin : lib ;
 
 import rc ;
 
@@ -115,6 +138,10 @@
         {
             linker = osf ;
         }
+ else if [ os.name ] = HPUX
+ {
+ linker = hpux ;
+ }
         else
         {
             linker = gnu ;
@@ -310,7 +337,7 @@
     # to implement and will increase target path length even more.
     flags gcc.compile OPTIONS <link>shared : -fPIC ;
 }
-if [ os.name ] != NT && [ os.name ] != OSF
+if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
 {
     # OSF does have an option called -soname but it doesn't seem to work as
     # expected, therefore it has been disabled.
@@ -478,9 +505,16 @@
 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
-flags gcc.link OPTIONS <runtime-link>static : -static ;
+# 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 or sun
@@ -500,6 +534,50 @@
         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 $(condition)/<runtime-link>shared
+ : -Wl,-Bstatic : unchecked ;
+ flags $(toolset).link FINDLIBS-SA-PFX $(condition)/<runtime-link>shared
+ : -Wl,-Bdynamic : unchecked ;
+
+ # On windows allow mixing of static and dynamic libs with static runtime
+ flags $(toolset).link FINDLIBS-ST-PFX $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bstatic : unchecked ;
+ flags $(toolset).link FINDLIBS-SA-PFX $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bdynamic : unchecked ;
+ flags $(toolset).link OPTIONS $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bstatic : unchecked ;
         }
     case darwin :
         {
@@ -542,6 +620,15 @@
         flags $(toolset).link OPTIONS $(condition)/<link>shared : -mimpure-text
           : unchecked ;
         }
+
+ case hpux :
+ {
+ flags $(toolset).link OPTIONS $(condition)/<debug-symbols>off : -Wl,-s
+ : unchecked ;
+ flags $(toolset).link OPTIONS $(condition)/<link>shared : -fPIC
+ : unchecked ;
+ }
+
     case * :
         {
             errors.user-error
@@ -565,7 +652,8 @@
 
 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)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(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)
+
 }
 
 # Default value. Mostly for the sake of intel-linux
@@ -629,7 +717,7 @@
 # Differ 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)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(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)
 }
 
 # Set up threading support. It's somewhat contrived, so perform it at the end,
@@ -667,10 +755,6 @@
         {
         # gcc on IRIX does not support multi-threading, don't set anything here.
         }
- case HP_UX :
- {
- # gcc on HP-UX does not support multi-threading, don't set anything here
- }
     case Darwin :
         {
         # Darwin has no threading options, don't set anything here.

Modified: branches/release/tools/build/v2/tools/intel-win.jam
==============================================================================
--- branches/release/tools/build/v2/tools/intel-win.jam (original)
+++ branches/release/tools/build/v2/tools/intel-win.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -37,7 +37,7 @@
     local condition = [ common.check-init-parameters intel-win
         : version $(version) : compatibility $(compatibility) ] ;
     
- command = [ common.get-invocation-command intel-win : icc.exe :
+ command = [ common.get-invocation-command intel-win : icl.exe :
         $(command) ] ;
     
     common.handle-options intel-win : $(condition) : $(command) : $(options) ;
@@ -150,6 +150,9 @@
           $(compatibility) ;
     }
     
+ # Depending on the settings, running of tests require some runtime DLLs.
+ flags intel-win RUN_PATH $(condition) : $(root) ;
+
     msvc.configure-version-specific intel-win : $(extract-version[1]) : $(condition) ;
 }
 

Modified: branches/release/tools/build/v2/tools/intel.jam
==============================================================================
--- branches/release/tools/build/v2/tools/intel.jam (original)
+++ branches/release/tools/build/v2/tools/intel.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -16,7 +16,7 @@
 
 rule init ( * : * )
 {
- if [ os.name ] = LINUX
+ if [ os.name ] = LINUX || [ os.name ] = MACOSX
     {
         toolset.using intel-linux :
           $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;

Modified: branches/release/tools/build/v2/tools/mpi.jam
==============================================================================
--- branches/release/tools/build/v2/tools/mpi.jam (original)
+++ branches/release/tools/build/v2/tools/mpi.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -58,6 +58,7 @@
 import common ;
 import feature : feature ;
 import generators ;
+import os ;
 import project ;
 import property ;
 import testing ;
@@ -223,13 +224,44 @@
 # Initialize the MPI module.
 rule init ( mpicxx ? : options * : mpirun-with-options * )
 {
- if ! $(options)
+ if ! $(options) && $(.debug-configuration)
   {
- if $(.debug-configuration)
+ ECHO "===============MPI Auto-configuration===============" ;
+ }
+
+ if ! $(mpicxx) && [ os.on-windows ]
+ {
+ # Try to auto-configure to the Microsoft Compute Cluster Pack
+ local cluster_pack_path_native = "C:\\Program Files\\Microsoft Compute Cluster Pack" ;
+ local cluster_pack_path = [ path.make $(cluster_pack_path_native) ] ;
+ if [ GLOB $(cluster_pack_path_native)\\Include : mpi.h ]
     {
- ECHO "===============MPI Auto-configuration===============" ;
+ if $(.debug-configuration)
+ {
+ ECHO "Found Microsoft Compute Cluster Pack: $(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 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) ] ;
 
@@ -323,8 +355,6 @@
                                 : $(link_flags) ] ;
           ECHO "MPI link flags: $(match[2])" ;
         }
- echo "MPI build features: " ;
- ECHO $(options) ;
       }
     }
     else
@@ -345,17 +375,32 @@
       ECHO "You will need to manually configure MPI support." ;
     }
  
- if $(.debug-configuration)
- {
- ECHO "====================================================" ;
- }
   }
 
   # Find mpirun (or its equivalent) and its flags
- .mpirun =
- [ common.get-invocation-command mpi : mpirun : $(mpirun-with-options[1]) ] ;
- .mpirun_flags = $(mpirun-with-options[2-]) ;
- .mpirun_flags ?= -np ;
+ 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)
   {
@@ -450,7 +495,7 @@
     {
       result += [ testing.make-test
         run-mpi : $(sources) /boost/mpi//boost_mpi
- : $(requirements) <mpi:processes>$(processes) : $(name)-$(processes) ] ;
+ : $(requirements) <toolset>msvc:<link>static <mpi:processes>$(processes) : $(name)-$(processes) ] ;
     }
     return $(result) ;
 }

Modified: branches/release/tools/build/v2/tools/msvc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/msvc.jam (original)
+++ branches/release/tools/build/v2/tools/msvc.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -299,12 +299,15 @@
                 if ! $(below-8.0)
                 {
                     cpu = i386 amd64 ia64 ;
- setup-option = x86 x86_amd64 x86_iPF ;
+ # Whereas http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx
+ # say about x86_ipf, that seem to be doc bug,
+ # and x86_ia64 is right one.
+ setup-option = x86 x86_amd64 x86_ia64 ;
                     
                     # Use a native x64 compiler if possible
                     if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_IDENTIFIER ] ]
                     {
- setup-option = x86 amd64 x86_IPF ;
+ setup-option = x86 amd64 x86_ia64 ;
                     }
                 }
             }
@@ -835,7 +838,7 @@
     actions archive
     {
         if exist "$(<[1])" DEL "$(<[1])"
- $(.LD) $(AROPTIONS) /out:"$(<[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)")"
+ $(.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
@@ -843,7 +846,7 @@
     actions archive
     {
         $(RM) "$(<[1])"
- $(.LD) $(AROPTIONS) /out:"$(<[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)")"
+ $(.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")"
     }
 }
         
@@ -863,7 +866,7 @@
 {
     actions link bind DEF_FILE
     {
- $(.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:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.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%
         if exist "$(<[1]).manifest" (
             $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
@@ -872,7 +875,7 @@
 
     actions link.dll bind DEF_FILE
     {
- $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]: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:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]: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%
         if exist "$(<[1]).manifest" (
             $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
@@ -883,7 +886,7 @@
 {
     actions link bind DEF_FILE
     {
- $(.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:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.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 test -e "$(<[1]).manifest"; then
             $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);1"
         fi
@@ -891,7 +894,7 @@
 
     actions link.dll bind DEF_FILE
     {
- $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]: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:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]: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 test -e "$(<[1]).manifest"; then
             $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
         fi

Modified: branches/release/tools/build/v2/tools/python.jam
==============================================================================
--- branches/release/tools/build/v2/tools/python.jam (original)
+++ branches/release/tools/build/v2/tools/python.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -901,6 +901,27 @@
     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)
@@ -909,7 +930,9 @@
             # the system libs is a mystery, but if we don't do it, on
             # cygwin, -lpythonX.Y never appears in the command line
             # (although it does on linux).
- : $(usage-requirements) <library-path>$(libraries) <dll-path>$(dll-path) <library>python.lib
+ : $(usage-requirements)
+ <testing.launcher>$(set-PYTHONPATH)
+ <library-path>$(libraries) <dll-path>$(dll-path) <library>python.lib
           ;
     }
 
@@ -989,7 +1012,11 @@
 rule python-extension ( name : sources * : requirements * : default-build * :
                         usage-requirements * )
 {
- requirements += <use>/python//python_for_extensions <suppress-import-lib>true ;
+ if [ configured ]
+ {
+ requirements += <use>/python//python_for_extensions ;
+ }
+ requirements += <suppress-import-lib>true ;
 
     local project = [ project.current ] ;
 

Modified: branches/release/tools/build/v2/tools/qcc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/qcc.jam (original)
+++ branches/release/tools/build/v2/tools/qcc.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -58,7 +58,7 @@
 
 
 # Declare flags for compilation
-flags qcc.compile OPTIONS <debug-symbols>on : -g ;
+flags qcc.compile OPTIONS <debug-symbols>on : -gstabs+ ;
 
 # Declare flags and action for compilation
 flags qcc.compile OPTIONS <optimization>off : -O0 ;
@@ -85,7 +85,7 @@
 
 actions compile.c++
 {
- "$(CONFIG_COMMAND)" -Wc,-ftemplate-depth-128 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -Wc,-ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
 actions compile.c
@@ -148,7 +148,7 @@
 
 # Declare flags for linking
 # First, the common flags
-flags qcc.link OPTIONS <debug-symbols>on : -g ;
+flags qcc.link OPTIONS <debug-symbols>on : -gstabs+ ;
 flags qcc.link OPTIONS <profiling>on : -p ;
 flags qcc.link OPTIONS <linkflags> ;
 flags qcc.link LINKPATH <library-path> ;

Modified: branches/release/tools/build/v2/tools/qt4.jam
==============================================================================
--- branches/release/tools/build/v2/tools/qt4.jam (original)
+++ branches/release/tools/build/v2/tools/qt4.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -91,6 +91,12 @@
         .initialized = true ;
         .prefix = $(prefix) ;
 
+ #~ Setup prefixes for include, binaries and libs.
+ #~ TODO: Implement overrides in "init" parameter list.
+ .incprefix = $(.prefix)/include ;
+ .libprefix = $(.prefix)/lib ;
+ .binprefix = $(.prefix)/bin ;
+
         # Generates cpp files from header files using "moc" tool
         generators.register-standard qt4.moc : H : CPP(moc_%) : <allow>qt4 ;
         
@@ -130,9 +136,9 @@
         # Use pre-built Qt
         {
             local usage-requirements =
- <include>$(.prefix)/include
- <library-path>$(.prefix)/lib
- <dll-path>$(.prefix)/lib
+ <include>$(.incprefix)
+ <library-path>$(.libprefix)
+ <dll-path>$(.libprefix)
                 <threading>multi
                 <allow>qt4
                 ;
@@ -179,7 +185,7 @@
                 : # usage-requirements
                   <define>QT_CORE_LIB
                   <define>QT_NO_DEBUG
- <include>$(.prefix)/include/QtCore
+ <include>$(.incprefix)/QtCore
                   $(usage-requirements)
                 ;
             lib QtCore : $(main)
@@ -189,7 +195,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_CORE_LIB
- <include>$(.prefix)/include/QtCore
+ <include>$(.incprefix)/QtCore
                   $(usage-requirements)
                 ;
             
@@ -199,8 +205,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_GUI_LIB
- <include>$(.prefix)/include/QtGui
- <user-interface>gui
+ <include>$(.incprefix)/QtGui
                 ;
             
             lib QtGui : QtCore
@@ -210,8 +215,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_GUI_LIB
- <include>$(.prefix)/include/QtGui
- <user-interface>gui
+ <include>$(.incprefix)/QtGui
                 ;
             
             lib QtNetwork : QtCore
@@ -220,7 +224,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_NETWORK_LIB
- <include>$(.prefix)/include/QtNetwork
+ <include>$(.incprefix)/QtNetwork
                 ;
             lib QtNetwork : QtCore
                 : # requirements
@@ -229,7 +233,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_NETWORK_LIB
- <include>$(.prefix)/include/QtNetwork
+ <include>$(.incprefix)/QtNetwork
                 ;
             
             lib QtSql : QtCore
@@ -238,7 +242,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_SQL_LIB
- <include>$(.prefix)/include/QtSql
+ <include>$(.incprefix)/QtSql
                 ;
             lib QtSql : QtCore
                 : # requirements
@@ -247,7 +251,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_SQL_LIB
- <include>$(.prefix)/include/QtSql
+ <include>$(.incprefix)/QtSql
                 ;
             
             lib QtXml : QtCore
@@ -256,7 +260,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_XML_LIB
- <include>$(.prefix)/include/QtXml
+ <include>$(.incprefix)/QtXml
                 ;
             lib QtXml : QtCore
                 : # requirements
@@ -265,7 +269,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_XML_LIB
- <include>$(.prefix)/include/QtXml
+ <include>$(.incprefix)/QtXml
                 ;
             
             lib Qt3Support : QtGui QtNetwork QtXml QtSql
@@ -276,7 +280,7 @@
                 : # usage-requirements
                   <define>QT_QT3SUPPORT_LIB
                   <define>QT3_SUPPORT
- <include>$(.prefix)/include/Qt3Support
+ <include>$(.incprefix)/Qt3Support
                 ;
  
             lib Qt3Support : QtGui QtNetwork QtXml QtSql
@@ -288,7 +292,7 @@
                 : # usage-requirements
                   <define>QT_QT3SUPPORT_LIB
                   <define>QT3_SUPPORT
- <include>$(.prefix)/include/Qt3Support
+ <include>$(.incprefix)/Qt3Support
                 ;
 
             # Dummy target to enable "<qt3support>off" and "<library>/qt//Qt3Support" at the same time.
@@ -302,7 +306,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_OPENGL_LIB
- <include>$(.prefix)/include/QtOpenGL
+ <include>$(.incprefix)/QtOpenGL
                 ;
             lib QtOpenGL : QtGui
                 : # requirements
@@ -311,7 +315,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_OPENGL_LIB
- <include>$(.prefix)/include/QtOpenGL
+ <include>$(.incprefix)/QtOpenGL
                 ;
             
             # SVG-Support (Qt 4.1)
@@ -321,7 +325,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_SVG_LIB
- <include>$(.prefix)/include/QtSvg
+ <include>$(.incprefix)/QtSvg
                 ;
             lib QtSvg : QtXml QtOpenGL
                 : # requirements
@@ -330,7 +334,7 @@
                 : # default-build
                 : # usage-requirements
                   <define>QT_SVG_LIB
- <include>$(.prefix)/include/QtSvg
+ <include>$(.incprefix)/QtSvg
                 ;
             
             # Test-Support (Qt 4.1)
@@ -339,7 +343,7 @@
                   <name>QtTest$(suffix_version)
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtTest
+ <include>$(.incprefix)/QtTest
                 ;
             lib QtTest : QtCore
                 : # requirements
@@ -347,7 +351,7 @@
                   <variant>debug
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtTest
+ <include>$(.incprefix)/QtTest
                 ;
             
             # AssistantClient Support
@@ -356,7 +360,7 @@
                   <name>QtAssistantClient$(suffix_version)
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtAssistant
+ <include>$(.incprefix)/QtAssistant
                 ;
             lib QtAssistantClient : QtGui
                 : # requirements
@@ -364,7 +368,7 @@
                   <variant>debug
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtAssistant
+ <include>$(.incprefix)/QtAssistant
                 ;
             
             # Qt designer library
@@ -373,7 +377,7 @@
                   <name>QtDesigner$(suffix_version)
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtDesigner
+ <include>$(.incprefix)/QtDesigner
                 ;
 
             lib QtDesigner : QtGui QtXml
@@ -382,7 +386,7 @@
                   <variant>debug
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtDesigner
+ <include>$(.incprefix)/QtDesigner
                 ;
 
             # Support for dynamic Widgets (Qt 4.1)
@@ -391,7 +395,7 @@
                   <name>QtUiTools
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtUiTools
+ <include>$(.incprefix)/QtUiTools
                 ;
             lib QtUiTools : QtGui QtXml
                 : # requirements
@@ -399,7 +403,7 @@
                   <variant>debug
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtUiTools
+ <include>$(.incprefix)/QtUiTools
                 ;
 
             # DBus-Support (Qt 4.2)
@@ -408,7 +412,7 @@
                   <name>QtDBus$(suffix_version)
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtDBus
+ <include>$(.incprefix)/QtDBus
                 ;
             lib QtDBus : QtXml
                 : # requirements
@@ -416,7 +420,7 @@
                   <variant>debug
                 : # default-build
                 : # usage-requirements
- <include>$(.prefix)/include/QtDBus
+ <include>$(.incprefix)/QtDBus
                 ;
         }
     }
@@ -560,7 +564,7 @@
 # Qt4-moc has its c++-parser, so pass INCLUDES and DEFINES.
 actions moc
 {
- $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) -f $(>) -o $(<)
+ $(.binprefix)/moc -I$(INCLUDES) -D$(DEFINES) -f $(>) -o $(<)
 }
 
 # When moccing files for include only, we don't need -f,
@@ -568,18 +572,18 @@
 # and we'll get duplicated symbols.
 actions moc.inc
 {
- $(.prefix)/bin/moc -I$(INCLUDES) -D$(DEFINES) $(>) -o $(<)
+ $(.binprefix)/moc -I$(INCLUDES) -D$(DEFINES) $(>) -o $(<)
 }
 
 
 # Generates source files from resource files
 actions rcc
 {
- $(.prefix)/bin/rcc $(>) -name $(>:B) -o $(<)
+ $(.binprefix)/rcc $(>) -name $(>:B) -o $(<)
 }
 
 # Generates user-interface source from .ui files
 actions uic-h
 {
- $(.prefix)/bin/uic $(>) -o $(<)
+ $(.binprefix)/uic $(>) -o $(<)
 }

Modified: branches/release/tools/build/v2/tools/quickbook.jam
==============================================================================
--- branches/release/tools/build/v2/tools/quickbook.jam (original)
+++ branches/release/tools/build/v2/tools/quickbook.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -252,8 +252,8 @@
 {
     rule pattern ( )
     {
- return "\\[include[ \t]+([^]]+)\\]"
- "\\[include:[a-zA-Z0-9_]+[ \t]+([^]]+)\\]" ;
+ return "\\[[ \t]*include[ \t]+([^]]+)\\]"
+ "\\[[ \t]*include:[a-zA-Z0-9_]+[ \t]+([^]]+)\\]" ;
     }
 }
 
@@ -286,6 +286,7 @@
 # <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> ;
 
 rule quickbook-to-boostbook ( target : source : properties * )
 {
@@ -296,7 +297,7 @@
 
 actions quickbook-to-boostbook
 {
- $(QB-COMMAND) --output-file=$(1) $(2)
+ "$(QB-COMMAND)" -I"$(INCLUDES)" --output-file=$(1) $(2)
 }
 
 # Declare a main target to convert a quickbook source into a boostbook

Modified: branches/release/tools/build/v2/tools/stlport.jam
==============================================================================
--- branches/release/tools/build/v2/tools/stlport.jam (original)
+++ branches/release/tools/build/v2/tools/stlport.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -10,7 +10,7 @@
 # The subfeature value 'hostios' means to use host compiler's iostreams.
 #
 # The specific version of stlport is selected by features:
-# The <link> feature selects between static and shared library
+# 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
@@ -124,7 +124,7 @@
             # STLport host IO streams no longer supported. So we always
             # need libraries.
             
- # name: stlport(stl)?[dg]?.M.R
+ # name: stlport(stl)?[dg]?(_static)?.M.R
             local name = stlport ;
             if [ feature.get-values <runtime-debugging> : $(raw) ] = "on"
             {
@@ -136,6 +136,12 @@
                     case * : name += d ;
                 }
             }
+
+ if [ feature.get-values <runtime-link> : $(raw) ] = "static"
+ {
+ name += _static ;
+ }
+
             name += .$(self.version.5) ;
             name = $(name:J=) ;
             
@@ -217,7 +223,7 @@
                 <define>_STLP_DEBUG=1
                 <define>_STLP_DEBUG_UNINITIALIZED=1 ;
         }
- if [ $(rproperties).get <runtime-debugging> ] = "on"
+ if [ $(rproperties).get <runtime-link> ] = "shared"
         {
             usage-requirements +=
                 <define>_STLP_USE_DYNAMIC_LIB=1 ;
@@ -247,21 +253,6 @@
             }
         }
         
- #~ Allow setting up to use STLport by only using the library target
- #~ /stlport//stlport.
- #~ TODO: Make it possible to use /stlport//stlport/<version>5.0 to select
- #~ a specific configured version.
- if $(self.version)
- {
- usage-requirements +=
- <stdlib>stlport-$(self.version) ;
- }
- else
- {
- usage-requirements +=
- <stdlib>stlport ;
- }
-
         return [ property-set.create $(usage-requirements) ] ;
     }
 }

Modified: branches/release/tools/build/v2/tools/sun.jam
==============================================================================
--- branches/release/tools/build/v2/tools/sun.jam (original)
+++ branches/release/tools/build/v2/tools/sun.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -54,6 +54,23 @@
 
 flags sun.compile.c++ OPTIONS <inlining>off : +d ;
 
+# 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> ;

Modified: branches/release/tools/build/v2/tools/types/lib.jam
==============================================================================
--- branches/release/tools/build/v2/tools/types/lib.jam (original)
+++ branches/release/tools/build/v2/tools/types/lib.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -26,3 +26,7 @@
 type SHARED_LIB : so : LIB ;
 
 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 : : "" ;

Modified: branches/release/tools/build/v2/tools/xsltproc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/xsltproc.jam (original)
+++ branches/release/tools/build/v2/tools/xsltproc.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -47,12 +47,12 @@
   for local param in [ feature.get-values <xsl:param> : $(properties) ]
   {
     local namevalue = [ regex.split $(param) "=" ] ;
- flags += --stringparam $(namevalue[1]) $(namevalue[2]) ;
+ flags += --stringparam $(namevalue[1]) \"$(namevalue[2])\" ;
   }
   # Translate <xsl:path>
   for local path in [ feature.get-values <xsl:path> : $(properties) ]
   {
- flags += --path $(path:G=) ;
+ flags += --path \"$(path:G=)\" ;
   }
         
   # Take care of implicit dependencies
@@ -70,7 +70,7 @@
 
   for local dir in $(implicit-target-directories)
   {
- flags += --path $(dir) ;
+ flags += --path \"$(dir)\" ;
   }
 
   return $(flags) ;

Modified: branches/release/tools/build/v2/user-config.jam
==============================================================================
--- branches/release/tools/build/v2/user-config.jam (original)
+++ branches/release/tools/build/v2/user-config.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,19 +1,43 @@
 # Copyright 2003, 2005 Douglas Gregor
 # Copyright 2004 John Maddock
-# Copyright 2002, 2003, 2004 Vladimir Prus
+# 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 Boost.Build installation. Please read
-# the user manual to find out where to put it.
+# This file is used to configure your Boost.Build installation.
+# You can modify this file in place, or you can place it it
+# permanent location so that it's not overwritten should you
+# get new version of Boost.Build. See:
+#
+# http://boost.org/boost-build2/doc/html/bbv2/reference.html#bbv2.reference.init
+#
+# for documentation about permanent location.
+
+# 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 paremeters
+# are separated by semicolons.
+# Important syntax notes:
+#
+# - Both ':' and ';' must be separated from other tokens by whitespace
+# - The '\' symbol is quote character, so when specifying Windows paths
+# it's recommended to use '/' instead, or use '\\'.
+#
+# More details about syntax can be found at:
+#
+# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language
+#
 
-# Toolset declarations are most important in this file. They tell Boost.Build
-# what compilers are available and where to look for them. The first toolset
-# will become "default" one.
-# Some important libraries can also be configured.
-# Uncomment relevant parts to suite your local configuration and preferences.
 
-import toolset : using ;
 
 # GCC configuration
 

Modified: branches/release/tools/build/v2/util/path.jam
==============================================================================
--- branches/release/tools/build/v2/util/path.jam (original)
+++ branches/release/tools/build/v2/util/path.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -243,7 +243,9 @@
     }
 
     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) ] ] ;
@@ -380,7 +382,14 @@
                 errors.error $(child) is not a subdir of $(parent) ;
             }
         }
- return [ join $(split2) ] ;
+ if $(split2)
+ {
+ return [ join $(split2) ] ;
+ }
+ else
+ {
+ return "." ;
+ }
     }
 }
 

Modified: branches/release/tools/inspect/build/Jamfile.v2
==============================================================================
--- branches/release/tools/inspect/build/Jamfile.v2 (original)
+++ branches/release/tools/inspect/build/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,10 @@
 # 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

Modified: branches/release/tools/inspect/index.html
==============================================================================
--- branches/release/tools/inspect/index.html (original)
+++ branches/release/tools/inspect/index.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -38,7 +38,7 @@
   <li>tab_check.hpp and <a href="tab_check.cpp">
   tab_check.cpp</a></li>
 </ul>
-<p>A Jamfile is provided to build the program.</p>
+<p>A Jamfile is provided to build the program.</p>
 <hr>
 <p>Revised
 <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->29 December, 2003<!--webbot bot="Timestamp" endspan i-checksum="38523" --></p>
@@ -51,4 +51,4 @@
 
 </body>
 
-</html>
+</html>
\ No newline at end of file

Modified: branches/release/tools/inspect/inspect.cpp
==============================================================================
--- branches/release/tools/inspect/inspect.cpp (original)
+++ branches/release/tools/inspect/inspect.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -84,6 +84,25 @@
   typedef std::vector< error_msg > error_msg_vector;
   error_msg_vector msgs;
 
+// get info (as a string) if inspect_root is svn working copy --------------//
+
+ string info( const fs::path & inspect_root )
+ {
+ string rev;
+ string repos;
+ fs::path entries( inspect_root / ".svn" / "entries" );
+ fs::ifstream entries_file( entries );
+ if ( entries_file )
+ {
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev );
+ std::getline( entries_file, rev ); // revision number as a string
+ std::getline( entries_file, repos ); // repository as a string
+ }
+ return repos + " at revision " + rev;
+ }
+
 // visit_predicate (determines which directories are visited) --------------//
 
   typedef bool(*pred_type)(const path&);
@@ -107,6 +126,8 @@
       && local.find("doc/xml") != 0
       // ignore some web files
       && leaf != ".htaccess"
+ // ignore svn files:
+ && leaf != ".svn"
       ;
   }
 
@@ -502,6 +523,7 @@
       register_signature( ".xml" );
       register_signature( ".xsd" );
       register_signature( ".xsl" );
+ register_signature( ".qbk" );
     }
 
     hypertext_inspector::hypertext_inspector()
@@ -626,6 +648,7 @@
 
   string inspector_keys;
   fs::initial_path();
+
 
   {
 
@@ -678,8 +701,7 @@
         "\n"
         "An inspection program <http://www.boost.org/tools/inspect/index.html>\n"
         "checks each file in the current Boost CVS for various problems,\n"
- "generating this as output. Problems detected include tabs in files,\n"
- "missing copyrights, broken URL's, and similar misdemeanors.\n"
+ "generating an HTML page as output.\n"
         "\n"
       ;
 
@@ -706,21 +728,24 @@
       // we should not use a table, of course [gps]
       "<table>\n"
       "<tr>\n"
- "<td><img src=\"../boost.png\" alt=\"Boost logo\" />"
+ "<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"
+ //"&nbsp;&nbsp;/ " << validator_link( "validate me" ) << " /\n"
       "</td>\n"
       "</tr>\n"
       "</table>\n"
 
- "<p>An <a href=\"http://www.boost.org/tools/inspect/index.html\">inspection\n"
- "program</a> checks each file in the current Boost CVS for various problems,\n"
- "generating this web page as output. Problems detected include tabs in files,\n"
- "missing copyrights, broken URL's, and similar misdemeanors.</p>\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"
       ;
+ std::cout
+ << "<p>The files checked were from "
+ << info( fs::initial_path() )
+ << ".</p>\n";
+
 
     std::cout
       << "<h2>Totals</h2>\n<pre>"
@@ -733,7 +758,7 @@
         itr != inspectors.end(); ++itr )
   {
     const string line_break (
- display_text == display_format? "\n" : "<br />\n"); // gps
+ display_text == display_format? "\n" : "<br>\n"); // gps
 
     inspector_keys += static_cast<string>(" ")
         + itr->inspector->name()

Modified: branches/release/tools/inspect/link_check.cpp
==============================================================================
--- branches/release/tools/inspect/link_check.cpp (original)
+++ branches/release/tools/inspect/link_check.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -52,7 +52,11 @@
       const path & full_path, // example: c:/foo/boost/filesystem/path.hpp
       const string & contents ) // contents of file to be inspected
     {
- if (contents.find( "boostinspect:" "nolink" ) != string::npos) return;
+ if (contents.find( "boostinspect:" "nounlinked" ) != string::npos)
+ m_paths[ relative_to( full_path, fs::initial_path() ) ] |= m_nounlinked_errors;
+
+ bool no_link_errors =
+ (contents.find( "boostinspect:" "nolink" ) != string::npos);
 
       string::const_iterator start( contents.begin() );
       string::const_iterator end( contents.end() );
@@ -64,7 +68,7 @@
         // what[0] contains the whole string iterators.
         // what[1] contains the URL iterators.
         do_url( string( what[1].first, what[1].second ),
- library_name, full_path );
+ library_name, full_path, no_link_errors );
 
         start = what[0].second; // update search position
         flags |= boost::match_prev_avail; // update flags
@@ -75,7 +79,8 @@
 // do_url ------------------------------------------------------------------//
 
     void link_check::do_url( const string & url, const string & library_name,
- const path & source_path ) // precondition: source_path.is_complete()
+ const path & source_path, bool no_link_errors )
+ // precondition: source_path.is_complete()
     {
       if ( url[0] == '#'
         || url.find( "mailto:" ) == 0
@@ -88,13 +93,15 @@
 
       if ( url.find( "file:" ) == 0 )
       {
- ++m_invalid_errors;
- error( library_name, source_path, string(name()) + " invalid URL (hardwired file): " + url );
+ if(!no_link_errors) {
+ ++m_invalid_errors;
+ error( library_name, source_path, string(name()) + " invalid URL (hardwired file): " + url );
+ }
         return;
       }
 
       // detect characters banned by RFC2396:
- if ( url.find_first_of( " <>\"{}|\\^[]'" ) != string::npos )
+ if ( !no_link_errors && url.find_first_of( " <>\"{}|\\^[]'" ) != string::npos )
       {
         ++m_invalid_errors;
         error( library_name, source_path, string(name()) + " invalid character in URL: " + url );
@@ -107,7 +114,7 @@
       {
         plain_url.erase( pos );
         // detect characters banned by RFC2396 in bookmark:
- if ( url.find( '#', pos+1 ) != string::npos )
+ if ( !no_link_errors && url.find( '#', pos+1 ) != string::npos )
         {
           ++m_bookmark_errors;
           error( library_name, source_path, string(name()) + " invalid bookmark: " + url );
@@ -123,8 +130,10 @@
       try { target_path = source_path.branch_path() /= path( plain_url, fs::no_check ); }
       catch ( const fs::filesystem_error & )
       {
- ++m_invalid_errors;
- error( library_name, source_path, string(name()) + " invalid URL: " + url );
+ if(!no_link_errors) {
+ ++m_invalid_errors;
+ error( library_name, source_path, string(name()) + " invalid URL: " + url );
+ }
         return;
       }
 
@@ -142,7 +151,7 @@
       itr->second |= m_linked_to;
 
       // if target isn't present, the link is broken
- if ( (itr->second & m_present) == 0 )
+ if ( !no_link_errors && (itr->second & m_present) == 0 )
       {
         ++m_broken_errors;
         error( library_name, source_path, string(name()) + " broken link: " + url );
@@ -158,6 +167,7 @@
      {
 // 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)
          // because they may be redirectors, it is OK if these are unlinked:

Modified: branches/release/tools/inspect/link_check.hpp
==============================================================================
--- branches/release/tools/inspect/link_check.hpp (original)
+++ branches/release/tools/inspect/link_check.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -19,6 +19,7 @@
   {
     const int m_linked_to = 1;
     const int m_present = 2;
+ const int m_nounlinked_errors = 4;
 
     class link_check : public hypertext_inspector
     {
@@ -30,8 +31,8 @@
       typedef std::map< string, int > m_path_map;
       m_path_map m_paths; // first() is relative initial_path()
 
- void do_url( const string & url,
- const string & library_name, const path & full_source_path );
+ void do_url( const string & url, const string & library_name,
+ const path & full_source_path, bool no_link_errors );
     public:
 
       link_check();

Modified: branches/release/tools/jam/build_dist.bat
==============================================================================
--- branches/release/tools/jam/build_dist.bat (original)
+++ branches/release/tools/jam/build_dist.bat 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,15 +1,36 @@
 @ECHO OFF
 
-REM ~ Copyright 2006 Rene Rivera.
+REM ~ Copyright 2006-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
+REM ~ Make stage for building.
+rd /S /Q stage
+md stage
+cd stage
 
-cd doc
-del /F /S /Q html
-bjam --v2
-del /F /S /Q ..\src\images ..\src\jam ..\src\*.html ..\src\*.png ..\src\*.css ..\src\LICENSE*.txt
-xcopy /S /I /Y html ..\src
+REM ~ Copy sources to stage.
 cd ..\src
+xcopy *.bat ..\stage\
+xcopy *.jam ..\stage\
+xcopy *.sh ..\stage\
+xcopy *.com ..\stage\
+xcopy *.c ..\stage\
+xcopy *.h ..\stage\
+xcopy *.y ..\stage\
+xcopy *.yy ..\stage\
+xcopy Jambase ..\stage\
+xcopy /S /I /Y modules ..\stage\modules
+xcopy /S /I /Y boehm_gc ..\stage\boehm_gc
+cd ..\stage
+call .\build.bat
+
+REM ~ Build docs, and copy result to stage.
+cd ..\doc
+rd /S /Q html
+..\stage\bin.ntx86\bjam --v2
+xcopy /S /I /Y html ..\stage
+cd ..\stage
+
+REM ~ Build distribution archives.
 call .\build.bat --- dist

Modified: branches/release/tools/jam/build_dist.sh
==============================================================================
--- branches/release/tools/jam/build_dist.sh (original)
+++ branches/release/tools/jam/build_dist.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,13 +1,27 @@
 #!/bin/sh
 
-#~ Copyright 2002-2005 Rene Rivera.
+#~ Copyright 2006-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)
 
-cd doc
-rm -Rf html
-bjam --v2
-rm -Rf ../src/images ../src/jam ../src/*.html ../src/*.png ../src/*.css ../src/LICENSE*.txt
-cp -R html/* ../src
+#~ Make stage for building.
+rm -rf stage
+mkdir stage
+cd stage
+
+#~ Copy sources to stage.
 cd ../src
-. ./build.sh --- dist
+cp -R *.bat *.jam *.sh *.com *.c *.h *.y *.yy Jambase modules boehm_gc ../stage
+find ../stage -name '.svn' -type d -exec rm -rf '{}' ';'
+cd ../stage
+./build.sh
+
+#~ Build docs, and copy result to stage.
+cd ../doc
+rm -Rf html
+../stage/bin.*/bjam --v2
+cp -R html/* ../stage
+cd ../stage
+
+#~ Build distribution archives.
+sh ./build.sh --- dist

Modified: branches/release/tools/jam/doc/bjam.qbk
==============================================================================
--- branches/release/tools/jam/doc/bjam.qbk (original)
+++ branches/release/tools/jam/doc/bjam.qbk 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,8 +1,8 @@
 [article Boost.Jam
     [quickbook 1.3]
- [version: 3.1.14]
+ [version: 3.1.16]
     [authors [Rivera, Rene], [Abrahams, David], [Prus, Vladimir]]
- [copyright 2003 2004 2005 2006 Rene Rivera, David Abrahams, Vladimir Prus]
+ [copyright 2003 2004 2005 2006 2007 Rene Rivera, David Abrahams, Vladimir Prus]
     [category tool-build]
     [id jam]
     [dirname jam]
@@ -21,7 +21,7 @@
 
 [/ Shortcuts ]
 
-[def :version: 3.1.14]
+[def :version: 3.1.16]
 
 [/ Images ]
 
@@ -35,6 +35,15 @@
 [def :Boost: [@http://www.boost.org Boost]]
 [def :Perforce_Jam: [@http://www.perforce.com/jam/jam.html Perforce Jam]]
 
+[/ Templates ]
+
+[template literal[text]'''<literallayout>'''[text]'''</literallayout>''']
+[template list[items]'''<itemizedlist>'''[items]'''</itemizedlist>''']
+[template orderedlist[items]'''<orderedlist>'''[items]'''</orderedlist>''']
+[template li[text]'''<listitem>'''[text]'''</listitem>''']
+[template lines[items]'''<simplelist type='vert' columns='1'>'''[items]'''</simplelist>''']
+[template line[text]'''<member>'''[text]'''</member>''']
+
 [section:intro Introduction]
 
 Boost.Jam (BJam) 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:.
@@ -111,176 +120,297 @@
 
 [table Supported Toolsets
 
-[[Script] [Platform] [Toolset] [Detection]]
+[[Script] [Platform] [Toolset] [Detection and Notes]]
 
 [ [=build.bat=] [Windows NT, 2000, and XP]
- [ [@http://www.borland.com/bcppbuilder/freecompiler =borland=]\n
- [@http://www.borland.com/ Borland] C++Builder (BCC 5.5)]
- [ * Common install location: "=C:\Borland\BCC55="\n
- * =BCC32.EXE= in =PATH=
-] ]
+ [[lines
+ [line [@http://www.borland.com/bcppbuilder/freecompiler =borland=]]
+ [line [@http://www.borland.com/ Borland] C++Builder (BCC 5.5)]
+ ]]
+ [[list
+ [li Common install location: "=C:\Borland\BCC55="]
+ [li =BCC32.EXE= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.comeaucomputing.com/ =como=]\n
- Comeau Computing C/C++]
- [
-] ]
+ [[lines
+ [line [@http://www.comeaucomputing.com/ =como=]]
+ [line Comeau Computing C/C++]
+ ]]
+ []
+]
 
 [ [] []
- [ [@http://gcc.gnu.org/ =gcc=]\n
- GNU GCC]
- [
-] ]
+ [[lines
+ [line [@http://gcc.gnu.org/ =gcc=]]
+ [line GNU GCC]
+ ]]
+ []
+]
 
 [ [] []
- [ [@http://gcc.gnu.org/ =gcc-nocygwin=]\n
- GNU GCC]
- [
-] ]
+ [[lines
+ [line [@http://gcc.gnu.org/ =gcc-nocygwin=]]
+ [line GNU GCC]
+ ]]
+ []
+]
 
 [ [] []
- [ [@http://www.intel.com/software/products/compilers/c60 =intel-win32=]\n
- Intel C++ Compiler for Windows]
- [ * =ICL.EXE= in =PATH=
-] ]
+ [[lines
+ [line [@http://www.intel.com/software/products/compilers/c60 =intel-win32=]]
+ [line Intel C++ Compiler for Windows]
+ ]]
+ [[list
+ [li =ICL.EXE= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.metrowerks.com/ =metrowerks=]\n
- MetroWerks CodeWarrior C/C++ 7.x, 8.x, 9.x]
- [ * =CWFolder= variable configured
- * =MWCC.EXE= in =PATH=
-] ]
+ [[lines
+ [line [@http://www.metrowerks.com/ =metrowerks=]]
+ [line MetroWerks CodeWarrior C/C++ 7.x, 8.x, 9.x]
+ ]]
+ [[list
+ [li =CWFolder= variable configured]
+ [li =MWCC.EXE= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.mingw.org/ =mingw=]\n
- GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration]
- [ * Common install location: "=C:\MinGW="
-] ]
+ [[lines
+ [line [@http://www.mingw.org/ =mingw=]]
+ [line GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration]
+ ]]
+ [[list
+ [li Common install location: "=C:\MinGW="]
+ ]]
+]
 
 [ [] []
- [ [@http://msdn.microsoft.com/visualc/ =msvc=]\n
- Microsoft Visual C++ 6.x]
- [ * =VCVARS32.BAT= already configured\n
- * =%MSVCDir%= is present in environment\n
- * Common install locations: "=%ProgramFiles%\Microsoft Visual Studio=", "=%ProgramFiles%\Microsoft Visual C++="\n
- * =CL.EXE= in =PATH=\n
- * =VCVARS32.BAT= in =PATH=
-] ]
+ [[lines
+ [line [@http://msdn.microsoft.com/visualc/ =msvc=]]
+ [line Microsoft Visual C++ 6.x]
+ ]]
+ [[list
+ [li =VCVARS32.BAT= already configured]
+ [li =%MSVCDir%= is present in environment]
+ [li Common install locations: "=%ProgramFiles%\Microsoft Visual Studio=", "=%ProgramFiles%\Microsoft Visual C++="]
+ [li =CL.EXE= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://msdn.microsoft.com/visualc/ =vc7=]\n
- Microsoft Visual C++ 7.x]
- [ * =VCVARS32.BAT= or =VSVARS32.BAT= already configured
- * =%VS71COMNTOOLS%= is present in environment\n
- * =%VCINSTALLDIR%= is present in environment\n
- * Common install locations: "=%ProgramFiles%\Microsoft Visual Studio .NET=", "=%ProgramFiles%\Microsoft Visual Studio .NET 2003="\n
- * =CL.EXE= in =PATH=\n
- * =VCVARS32.BAT= in =PATH=
-] ]
+ [[lines
+ [line [@http://msdn.microsoft.com/visualc/ =vc7=]]
+ [line Microsoft Visual C++ 7.x]
+ ]]
+ [[list
+ [li =VCVARS32.BAT= or =VSVARS32.BAT= already configured]
+ [li =%VS71COMNTOOLS%= is present in environment]
+ [li =%VCINSTALLDIR%= is present in environment]
+ [li Common install locations: "=%ProgramFiles%\Microsoft Visual Studio .NET=", "=%ProgramFiles%\Microsoft Visual Studio .NET 2003="]
+ [li =CL.EXE= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://msdn.microsoft.com/visualc/ =vc8=]\n
- Microsoft Visual C++ 8.x]
- [ * =VCVARS32.BAT= or =VSVARS32.BAT= already configured\n
- * =%VS80COMNTOOLS%= is present in environment\n
- * Common install location: "=%ProgramFiles%\Microsoft Visual Studio 8="\n
- * =CL.EXE= in =PATH=\n
- * =VCVARS32.BAT= in =PATH=
-] ]
+ [[lines
+ [line [@http://msdn.microsoft.com/visualc/ =vc8=]]
+ [line Microsoft Visual C++ 8.x]
+ ]]
+ [Detection:
+ [list
+ [li =VCVARSALL.BAT= already configured]
+ [li =%VS80COMNTOOLS%= is present in environment]
+ [li Common install location: "=%ProgramFiles%\Microsoft Visual Studio 8="]
+ [li =CL.EXE= in =PATH=]
+ ]
+
+ Notes:
+ [list
+ [li If =VCVARSALL.BAT= is called to set up the toolset, it is passed all the extra arguments, see below for what those arguments are. This can be used to build, for example, a Win64 specific version of =bjam=. Consult the VisualStudio documentation for what the possible argument values to the =VCVARSALL.BAT= are.]
+ ]
+ ]
+]
 
 [ [=build.sh=] [Unix, Linux, Cygwin, etc.]
- [ [@http://www.hp.com/go/c++ =acc=]\n
- HP-UX aCC]
- [ * =aCC= in =PATH=\n
- * =uname= is "HP-UX"
-] ]
+ [[lines
+ [line [@http://www.hp.com/go/c++ =acc=]]
+ [line HP-UX aCC]
+ ]]
+ [[list
+ [li =aCC= in =PATH=]
+ [li =uname= is "HP-UX"]
+ ]]
+]
 
 [ [] []
- [ [@http://www.comeaucomputing.com/ =como=]\n
- Comeau Computing C/C++]
- [ * como in =PATH=
-] ]
+ [[lines
+ [line [@http://www.comeaucomputing.com/ =como=]]
+ [line Comeau Computing C/C++]
+ ]]
+ [[list
+ [li como in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://gcc.gnu.org/ =gcc=]\n
- GNU GCC]
- [ * gcc in =PATH=
-] ]
+ [[lines
+ [line [@http://gcc.gnu.org/ =gcc=]]
+ [line GNU GCC]
+ ]]
+ [[list
+ [li gcc in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.intel.com/software/products/compilers/c60l/ =intel-linux=]\n
- Intel C++ for Linux]
- [ * =icc= in =PATH=\n
- * Common install locations: "=/opt/intel/cc/9.0=", "=/opt/intel_cc_80=", "=/opt/intel/compiler70=", "=/opt/intel/compiler60=", "=/opt/intel/compiler50="
-] ]
+ [[lines
+ [line [@http://www.intel.com/software/products/compilers/c60l/ =intel-linux=]]
+ [line Intel C++ for Linux]
+ ]]
+ [[list
+ [li =icc= in =PATH=]
+ [li Common install locations: "=/opt/intel/cc/9.0=", "=/opt/intel_cc_80=", "=/opt/intel/compiler70=", "=/opt/intel/compiler60=", "=/opt/intel/compiler50="]
+ ]]
+]
 
 [ [] []
- [ =kcc=\n
- Intel KAI C++]
- [ * =KCC= in =PATH=
-] ]
+ [[lines
+ [line =kcc=]
+ [line Intel KAI C++]
+ ]]
+ [[list
+ [li =KCC= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.borland.com/bcppbuilder/freecompiler =kylix=]\n
- [@http://www.borland.com/ Borland] C++Builder]
- [ * bc++ in PATH
-] ]
+ [[lines
+ [line [@http://www.borland.com/bcppbuilder/freecompiler =kylix=]]
+ [line [@http://www.borland.com/ Borland] C++Builder]
+ ]]
+ [[list
+ [li bc++ in PATH]
+ ]]
+]
 
 [ [] []
- [ [@http://www.sgi.com/developers/devtools/languages/mipspro.html =mipspro=]\n
- SGI MIPSpro C]
- [ * =uname= is "=IRIX=" or "=IRIX64="
-] ]
+ [[lines
+ [line [@http://www.sgi.com/developers/devtools/languages/mipspro.html =mipspro=]]
+ [line SGI MIPSpro C]
+ ]]
+ [[list
+ [li =uname= is "=IRIX=" or "=IRIX64="]
+ ]]
+]
 
 [ [] []
- [ =sunpro=\n
- Sun Workshop 6 C++]
- [ * Standard install location: "=/opt/SUNWspro="
-] ]
+ [[lines
+ [line =sunpro=]
+ [line Sun Workshop 6 C++]
+ ]]
+ [[list
+ [li Standard install location: "=/opt/SUNWspro="]
+ ]]
+]
 
 [ [] []
- [ =qcc=\n
- [@http://www.qnx.com/ QNX Neutrino]]
- [ * =uname= is "=QNX=" and =qcc= in =PATH=
-] ]
+ [[lines
+ [line =qcc=]
+ [line [@http://www.qnx.com/ QNX Neutrino]]
+ ]]
+ [[list
+ [li =uname= is "=QNX=" and =qcc= in =PATH=]
+ ]]
+]
 
 [ [] []
- [ [@http://www.tru64unix.compaq.com/cplus/ =true64cxx=]\n
- Compaq C++ Compiler for True64 UNIX]
- [ * =uname= is "=OSF1="
-] ]
+ [[lines
+ [line [@http://www.tru64unix.compaq.com/cplus/ =true64cxx=]]
+ [line Compaq C++ Compiler for True64 UNIX]
+ ]]
+ [[list
+ [li =uname= is "=OSF1="]
+ ]]
+]
 
 [ [] []
- [ [@http://www-3.ibm.com/software/ad/vacpp/ =vacpp=]\n
- IBM VisualAge C++]
- [ * =xlc= in =PATH=
-] ]
+ [[lines
+ [line [@http://www-3.ibm.com/software/ad/vacpp/ =vacpp=]]
+ [line IBM VisualAge C++]
+ ]]
+ [[list
+ [li =xlc= in =PATH=]
+ ]]
+]
 
 [ [] [MacOS X]
- [ [@http://developer.apple.com/tools/compilers.html =darwin=]\n
- Apple MacOS X GCC]
- [ * =uname= is "=Darwin="
-] ]
+ [[lines
+ [line [@http://developer.apple.com/tools/compilers.html =darwin=]]
+ [line Apple MacOS X GCC]
+ ]]
+ [[list
+ [li =uname= is "=Darwin="]
+ ]]
+]
 
 [ [] [Windows NT, 2000, and XP]
- [ [@http://www.mingw.org/ =mingw=]\n
- GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration with the MSYS shell]
- [ * Common install location: "=/mingw="
-] ]
+ [[lines
+ [line [@http://www.mingw.org/ =mingw=]]
+ [line GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration with the MSYS shell]
+ ]]
+ [[list
+ [li Common install location: "=/mingw="]
+ ]]
+]
 
 ]
 
 The built executables are placed in a subdirectory specific to your platform. For example, in Linux running on an Intel x86 compatible chip, the executables are placed in: "=bin.linuxx86=". The =bjam[.exe]= executable can be used to invoke Boost.Build.
 
-The build scripts support additional invocation arguments for use by developers of Boost.Jam. The extra arguments come after the toolset, and can take the form of "=--option=" or targets for the =build.jam= script:
+The build scripts support additional invocation arguments for use by developers of Boost.Jam and for additional setup of the toolset. The extra arguments come after the toolset:
+
+* Arguments not in the form of an option, before option arguments, are used for extra setup to toolset configuration scripts.
+* Arguments of the form "=--option=", which are passed to the =build.jam= build script.
+* Arguments not in the form of an option, after the options, which are targets for the =build.jam= script.
 
 [pre
-/build/ \[/toolset/\] \[--/option/+ /target/*\]
+/build/ \[/toolset/\] \[/setup/\*\] \[--/option/+ /target/\*\]
 ]
 
-There is currently only one available option, "=--debug=", which builds debugging versions of the executable. When built they are placed in their own directory "=bin./platform/.debug=". To specify targets without options, one can suply a special ignore option "=---=".
+The arguments immediately after the toolset are passed directly to the setup script of the toolset, if available and if it needs to be invoked. This allows one to configure the toolset ass needed to do non-default builds of =bjam=. For example to build a Win64 version with =vc8=. See the toolset descriptiona above for when particular toolsets support this.
 
-Currently there are two targets supported: =dist=, and =clean=. Respectively they: generate packages (compressed archives) as appropriate for distribution in the platform, or remove all the built executables and objects.
+The arguments starting with the "=--option=" forms are passed to the =build.jam= script and are used to further customize what gets built. Options and targets supported by the =build.jam= script:
+
+[variablelist
+ [[[^---]]
+ [Empty option when one wants to only specify a target.]]
+ [[[^--release]]
+ [The default, builds the optimized executable.]]
+ [[[^--debug]]
+ [Builds debugging versions of the executable. When built they are placed in their own directory "=bin./platform/.debug=".]]
+ [[[^--grammar]]
+ [Normally the Jam language grammar parsing files are not regenerated. This forces building of the grammar, although it may not force the regeneration of the grammar parser. If the parser is out of date it will be regenerated and subsequently built.]]
+ [[[^--with-python=/path/]]
+ [Enables Python integration, given a path to the Python libraries.]]
+ [[[^--gc]]
+ [Enables use of the Boehm Garbage Collector. The build will look for the Boehm-GC source in a "boehm_gc" subdirectory from the =bjam= sources.]]
+ [[[^--duma]]
+ [Enables use of the DUMA (Detect Uintended Memory Access) debugging memory allocator. The build expects to find the DUMA source files in a "duma" subdirectory from the =bjam= sources.]]
+ [[[^--toolset-root=/path/]]
+ [Indicates where the toolset used to build is located. This option is passed in by the bootstrap (=build.bat= or =build.sh=) script.]]
+ [[[^--show-locate-target]]
+ [For information, prints out where it will put the built executable.]]
+ [[[^--noassert]]
+ [Disable debug assertions, even if building the debug version of the executable.]]
+ [[[^dist]]
+ [Generate packages (compressed archives) as appropriate for distribution in the platform, if possible.]]
+ [[[^clean]]
+ [Remove all the built executables and objects.]]
+]
 
 [endsect]
 
@@ -303,21 +433,23 @@
   
   [ [[^-d'''&nbsp;'''/n/]]
     [
- Enable cummulative debugging levels from 1 to n. Values are:\n
+ Enable cummulative debugging levels from 1 to n. Values are:
     
- 1 - Show the actions taken for building targets, as they are executed (the default).\n
- 2 - Show "quiet" actions and display all action text, as they are executed.\n
- 3 - Show dependency analysis, and target/source timestamps/paths.\n
- 4 - Show arguments and timming of shell invocations.\n
- 5 - Show rule invocations and variable expansions.\n
- 6 - Show directory/header file/archive scans, and attempts at binding to targets.\n
- 7 - Show variable settings.\n
- 8 - Show variable fetches, variable expansions, and evaluation of '"if"' expressions.\n
- 9 - Show variable manipulation, scanner tokens, and memory usage.\n
- 10 - Show profile information for rules, both timing and memory.\n
- 11 - Show parsing progress of Jamfiles.\n
- 12 - Show graph of target dependencies.\n
- 13 - Show change target status (fate).
+ [orderedlist
+ [li Show the actions taken for building targets, as they are executed (the default).]
+ [li Show "quiet" actions and display all action text, as they are executed.]
+ [li Show dependency analysis, and target/source timestamps/paths.]
+ [li Show arguments and timming of shell invocations.]
+ [li Show rule invocations and variable expansions.]
+ [li Show directory/header file/archive scans, and attempts at binding to targets.]
+ [li Show variable settings.]
+ [li Show variable fetches, variable expansions, and evaluation of '"if"' expressions.]
+ [li Show variable manipulation, scanner tokens, and memory usage.]
+ [li Show profile information for rules, both timing and memory.]
+ [li Show parsing progress of Jamfiles.]
+ [li Show graph of target dependencies.]
+ [li Show change target status (fate).]
+ ]
     ] ]
   
   [ [[^-d'''&nbsp;'''+/n/]]
@@ -618,14 +750,20 @@
 
 [section Dependency Building]
 
+[section =DEPENDS= ]
+
 [pre
-DEPENDS /targets1/ : /targets2/ ;
+rule DEPENDS ( /targets1/ * : /targets2/ * )
 ]
 
 Builds a direct dependency: makes each of /targets1/ depend on each of /targets2/. Generally, /targets1/ will be rebuilt if /targets2/ are themselves rebuilt are or are newer than /targets1/.
 
+[endsect]
+
+[section =INCLUDES= ]
+
 [pre
-INCLUDES /targets1/ : /targets2/ ;
+rule INCLUDES ( /targets1/ * : /targets2/ * )
 ]
 
 Builds a sibling dependency: makes any target that depends on any of /targets1/ also depend on each of /targets2/. This reflects the dependencies that arise when one source file includes another: the object built from the source file depends both on the original and included source file, but the two sources files don't depend on each other. For example:
@@ -639,60 +777,96 @@
 
 [endsect]
 
+[endsect]
+
 [section Modifying Binding]
 
 The six rules =ALWAYS=, =LEAVES=, =NOCARE=, =NOTFILE=, =NOUPDATE=, and =TEMPORARY= modify the dependency graph so that =bjam= treats the targets differently during its target binding phase. See Binding above. Normally, =bjam= updates a target if it is missing, if its filesystem modification time is older than any of its dependencies (recursively), or if any of its dependencies are being updated. This basic behavior can be changed by invoking the following rules:
 
+[section =ALWAYS= ]
+
 [pre
-ALWAYS /targets/ ;
+rule ALWAYS ( /targets/ * )
 ]
 
 Causes /targets/ to be rebuilt regardless of whether they are up-to-date (they must still be in the dependency graph). This is used for the clean and uninstall targets, as they have no dependencies and would otherwise appear never to need building. It is best applied to targets that are also =NOTFILE= targets, but it can also be used to force a real file to be updated as well.
 
+[endsect]
+
+[section =LEAVES= ]
+
 [pre
-LEAVES /targets/ ;
+rule LEAVES ( /targets/ * )
 ]
 
 Makes each of /targets/ depend only on its leaf sources, and not on any intermediate targets. This makes it immune to its dependencies being updated, as the "leaf" dependencies are those without their own dependencies and without updating actions. This allows a target to be updated only if original source files change.
 
+[endsect]
+
+[section =NOCARE= ]
+
 [pre
-NOCARE /targets/ ;
+rule NOCARE ( /targets/ * )
 ]
 
 Causes =bjam= to ignore /targets/ that neither can be found nor have updating actions to build them. Normally for such targets =bjam= issues a warning and then skips other targets that depend on these missing targets. The =HdrRule= in =Jambase= uses =NOCARE= on the header file names found during header file scanning, to let =bjam= know that the included files may not exist. For example, if an `#include` is within an `#ifdef`, the included file may not actually be around.
 
 [warning For targets with build actions: if their build actions exit with a nonzero return code, dependent targets will still be built.]
 
+[endsect]
+
+[section =NOTFILE= ]
+
 [pre
-NOTFILE /targets/ ;
+rule NOTFILE ( /targets/ * )
 ]
 
 Marks /targets/ as pseudotargets and not real files. No timestamp is checked, and so the actions on such a target are only executed if the target's dependencies are updated, or if the target is also marked with =ALWAYS=. The default =bjam= target "=all=" is a pseudotarget. In =Jambase=, =NOTFILE= is used to define several addition convenient pseudotargets.
 
+[endsect]
+
+[section =NOUPDATE= ]
+
 [pre
-NOUPDATE /targets/ ;
+rule NOUPDATE ( /targets/ * )
 ]
 
 Causes the timestamps on /targets/ to be ignored. This has two effects: first, once the target has been created it will never be updated; second, manually updating target will not cause other targets to be updated. In =Jambase=, for example, this rule is applied to directories by the =MkDir= rule, because =MkDir= only cares that the target directory exists, not when it has last been updated.
 
+[endsect]
+
+[section =TEMPORARY= ]
+
 [pre
-TEMPORARY /targets/ ;
+rule TEMPORARY ( /targets/ * )
 ]
 
 Marks /targets/ as temporary, allowing them to be removed after other targets that depend upon them have been updated. If a =TEMPORARY= target is missing, =bjam= uses the timestamp of the target's parent. =Jambase= uses =TEMPORARY= to mark object files that are archived in a library after they are built, so that they can be deleted after they are archived.
 
+[endsect]
+
+[section =FAIL_EXPECTED= ]
+
 [pre
-FAIL_EXPECTED /targets/ ;
+rule FAIL_EXPECTED ( /targets/ * )
 ]
 
 For handling targets whose build actions are expected to fail (e.g. when testing that assertions or compile-time type checkin work properly), Boost Jam supplies the =FAIL_EXPECTED= rule in the same style as =NOCARE=, et. al. During target updating, the return code of the build actions for arguments to =FAIL_EXPECTED= is inverted: if it fails, building of dependent targets continues as though it succeeded. If it succeeds, dependent targets are skipped.
 
+[endsect]
+
+[section =RMOLD= ]
+
 [pre
-RMOLD /targets/ ;
+rule RMOLD ( /targets/ * )
 ]
 
 =BJam= removes any target files that may exist on disk when the rule used to build those targets fails. However, targets whose dependencies fail to build are not removed by default. The =RMOLD= rule causes its arguments to be removed if any of their dependencies fail to build.
 
+[endsect]
+
+[section =ISFILE= ]
+
 [pre
 rule ISFILE ( /targets/ * )
 ]
@@ -703,16 +877,24 @@
 
 [endsect]
 
+[endsect]
+
 [section Utility]
 
 The two rules =ECHO= and =EXIT= are utility rules, used only in =bjam='s parsing phase.
 
+[section =ECHO= ]
+
 [pre
-ECHO /args/ ;
+rule ECHO ( /args/ * )
 ]
 
 Blurts out the message /args/ to stdout.
 
+[endsect]
+
+[section =EXIT= ]
+
 [pre
 rule EXIT ( /message/ * : /result-value/ ? )
 ]
@@ -721,30 +903,46 @@
 
 "=Echo=", "=echo=", "=Exit=", and "=exit=" are accepted as aliases for =ECHO= and =EXIT=, since it is hard to tell that these are built-in rules and not part of the language, like "=include=".
 
+[endsect]
+
+[section =GLOB= ]
+
 The =GLOB= rule does filename globbing.
 
 [pre
-GLOB /directories/ : /patterns/ : /downcase-opt/
+rule GLOB ( /directories/ * : /patterns/ * : /downcase-opt/ ? )
 ]
 
 Using the same wildcards as for the patterns in the switch statement. It is invoked by being used as an argument to a rule invocation inside of "=[ ]=". For example: "[^FILES = \[ GLOB dir1 dir2 : *.c *.h \]]" sets =FILES= to the list of C source and header files in =dir1= and =dir2=. The resulting filenames are the full pathnames, including the directory, but the pattern is applied only to the file name without the directory.
 
 If /downcase-opt/ is supplied, filenames are converted to all-lowercase before matching against the pattern; you can use this to do case-insensitive matching using lowercase patterns. The paths returned will still have mixed case if the OS supplies them. On Windows NT and Cygwin, filenames are always downcased before matching.
 
+[endsect]
+
+[section =MATCH= ]
+
 The =MATCH= rule does pattern matching.
 
 [pre
-MATCH /regexps/ : /list/
+rule MATCH ( /regexps/ + : /list/ * )
 ]
 
 Matches the =egrep=(1) style regular expressions /regexps/ against the strings in /list/. The result is the concatenation of matching =()= subexpressions for each string in /list/, and for each regular expression in /regexps/. Only useful within the "=[ ]=" construct, to change the result into a list.
 
+[endsect]
+
+[section =BACKTRACE= ]
+
 [pre
 rule BACKTRACE ( )
 ]
 
 Returns a list of quadruples: /filename/ /line/ /module/ /rulename/..., describing each shallower level of the call stack. This rule can be used to generate useful diagnostic messages from Jam rules.
 
+[endsect]
+
+[section =UPDATE= ]
+
 [pre
 rule UPDATE ( /targets/ * )
 ]
@@ -761,6 +959,10 @@
 UPDATE $(previous-updates) a-new-target ;
 ]
 
+[endsect]
+
+[section =W32_GETREG= ]
+
 [pre
 rule W32_GETREG ( /path/ : /data/ ? )
 ]
@@ -780,6 +982,44 @@
   \[ W32_GETREG HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\MicrosoftSDK\\\\Directories : "Install Dir" \] ;
 ]
 
+[endsect]
+
+[section =W32_GETREGNAMES= ]
+
+[pre
+rule W32_GETREGNAMES ( /path/ : /result-type/ )
+]
+
+Defined only for win32 platform. It reads the registry of Windows. '/path/' is the location of the information, and '/result-type/' is either '=subkeys=' or '=values='. For more information on '/path/' format and constraints, please see =W32_GETREG=.
+
+Depending on '/result-type/', the rule returns one of the following:
+
+[variablelist
+ [[=subkeys=] [Names of all direct subkeys of '/path/'.]]
+ [[=values=] [Names of values contained in registry key given by '/path/'. The "default" value of the key appears in the returned list only if its value has been set in the registry.]]
+]
+
+If '/result-type/' is not recognized, or requested data cannot be retrieved, the rule returns an empty list.
+Example:
+
+[pre
+local key = "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths" ;
+local subkeys = \[ W32_GETREGNAMES "$(key)" : subkeys \] ;
+for local subkey in $(subkeys)
+{
+ local values = \[ W32_GETREGNAMES "$(key)\\\\$(subkey)" : values \] ;
+ for local value in $(values)
+ {
+ local data = \[ W32_GETREG "$(key)\\\\$(subkey)" : "$(value)" \] ;
+ ECHO "Registry path: " $(key)\\\\$(subkey) ":" $(value) "=" $(data) ;
+ }
+}
+]
+
+[endsect]
+
+[section =SHELL= ]
+
 [pre
 rule SHELL ( /command/ : * )
 ]
@@ -800,6 +1040,8 @@
 
 [endsect]
 
+[endsect]
+
 [section Flow-of-Control]
 
 =BJam= has several simple flow-of-control statements:
@@ -1439,12 +1681,8 @@
 
 [section Bugs, Limitations]
 
-The =-j= flag can cause =bjam= to get confused when single actions update more than one target at a time. =bjam= may proceed as if the targets were built even though they are still under construction.
-
 For parallel building to be successful, the dependencies among files must be properly spelled out, as targets tend to get built in a quickest-first ordering. Also, beware of un-parallelizable commands that drop fixed-named files into the current directory, like =yacc(1)= does.
 
-With the =-j= flag, errors from failed commands can get staggeringly mixed up.
-
 A poorly set =$(JAMSHELL)= is likely to result in silent failure.
 
 [endsect]
@@ -1500,3 +1738,8 @@
 [endsect]
 
 [endsect]
+
+
+[section History]
+[include history.qbk]
+[endsect]
\ No newline at end of file

Modified: branches/release/tools/jam/doc/build.jam
==============================================================================
--- branches/release/tools/jam/doc/build.jam (original)
+++ branches/release/tools/jam/doc/build.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -13,12 +13,12 @@
     :
     ../../../LICENSE_1_0.txt
     ../../../boost.png
- ../../../doc/html/boostbook.css
+ ../../../doc/src/boostbook.css
     ;
 
 stage html/images
     :
- [ path.glob ../../../doc/html/images : *.png ]
+ [ path.glob ../../../doc/src/images : *.png ]
     ;
 
 boostbook standalone
@@ -31,6 +31,8 @@
         <dependency>html/images
         <xsl:param>boost.root=.
         <xsl:param>nav.layout=none
+ <xsl:param>admon.graphics.path=images/
+ <xsl:param>navig.graphics.path=images/
     ;
 
 # Copyright Rene Rivera 2005-2006. Use, modification, and distribution are

Modified: branches/release/tools/jam/src/Jambase
==============================================================================
--- branches/release/tools/jam/src/Jambase (original)
+++ branches/release/tools/jam/src/Jambase 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -79,7 +79,7 @@
     # Add the given directory to the path so we can find the build
     # system. If dir is empty, has no effect.
     #
- BOOST_BUILD_PATH = $(BOOST_BUILD_PATH) $(dir:R=$(.boost-build-file:D)) ;
+ 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 Boost.Build, in particular the

Modified: branches/release/tools/jam/src/boost-jam.spec
==============================================================================
--- branches/release/tools/jam/src/boost-jam.spec (original)
+++ branches/release/tools/jam/src/boost-jam.spec 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,64 +1,64 @@
-Name: boost-jam
-Version: 3.1.14
-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_at_[hidden]>
-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
+Name: boost-jam
+Version: 3.1.16
+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_at_[hidden]>
+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

Modified: branches/release/tools/jam/src/build.bat
==============================================================================
--- branches/release/tools/jam/src/build.bat (original)
+++ branches/release/tools/jam/src/build.bat 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
 @ECHO OFF
 
-REM ~ Copyright 2002-2005 Rene Rivera.
+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)
 
@@ -10,6 +10,7 @@
 REM NOTE: The "setlocal & endlocal" construct is used to reset the errorlevel to 0.
 REM NOTE: The "set _error_=" construct is used to set the errorlevel to 1
 
+
 :Error_Print
 REM Output an error message and set the errorlevel to indicate failure.
 setlocal
@@ -25,6 +26,7 @@
 endlocal
 goto :eof
 
+
 :Test_Path
 REM Tests for the given file(executable) presence in the directories in the PATH
 REM environment variable. Additionaly sets FOUND_PATH to the path of the
@@ -36,8 +38,9 @@
 if not errorlevel 1 set FOUND_PATH=%~dp$PATH:1
 goto :eof
 
+
 :Test_Option
-REM Tests wether the given string is in the form of an option: "-*"
+REM Tests wether the given string is in the form of an option: "--*"
 setlocal & endlocal
 setlocal
 set test=%1
@@ -45,10 +48,16 @@
 set test=%test:"###=%
 set test=%test:###"=%
 set test=%test:###=%
-if not [-] == [%test:~0,1%] set _error_=
+if not [-] == [%test:~1,1%] set _error_=
 endlocal
 goto :eof
 
+
+:Call_If_Exists
+if EXIST %1 call %*
+goto :eof
+
+
 :Guess_Toolset
 REM Try and guess the toolset to bootstrap the build with...
 REM Sets BOOST_JAM_TOOLSET to the first found toolset.
@@ -63,7 +72,7 @@
     set "BOOST_JAM_TOOLSET_ROOT=%VS80COMNTOOLS%..\..\VC\"
     goto :eof)
 setlocal & endlocal
-if EXIST "%ProgramFiles%\Microsoft Visual Studio 8\VC\bin\VCVARS32.BAT" (
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 8\VC\VCVARSALL.BAT" (
     set "BOOST_JAM_TOOLSET=vc8"
     set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 8\VC\"
     goto :eof)
@@ -152,6 +161,7 @@
 call :Error_Print "Could not find a suitable toolset."
 goto :eof
 
+
 :Guess_Yacc
 REM Tries to find bison or yacc in common places so we can build the grammar.
 setlocal & endlocal
@@ -172,8 +182,10 @@
 call :Error_Print "Could not find Yacc to build the Jam grammar."
 goto :eof
 
+
 :Start
 set BOOST_JAM_TOOLSET=
+set BOOST_JAM_ARGS=
 
 REM If no arguments guess the toolset;
 REM or if first argument is an option guess the toolset;
@@ -195,6 +207,7 @@
 )
 if errorlevel 1 goto Finish
 
+
 :Setup_Toolset
 REM Setup the toolset command and options. This bit of code
 REM needs to be flexible enough to handle both when
@@ -204,127 +217,125 @@
 REM because in BAT variables are subsituted only once during a single
 REM command. A complete "if ... ( commands ) else ( commands )"
 REM is a single command, even though it's in multiple lines here.
-if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
- if NOT "_%CWFolder%_" == "__" (
- set "BOOST_JAM_TOOLSET_ROOT=%CWFolder%\"
- ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- set "PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools;%PATH%"
- )
- set "BOOST_JAM_CC=mwcc -runtime ss -cwd include -DNT -lkernel32.lib -ladvapi32.lib -luser32.lib"
- set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
- set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
- set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
- set "_known_=1"
+:Setup_Args
+if "_%1_" == "__" goto Config_Toolset
+call :Test_Option "%1"
+if errorlevel 1 (
+ set BOOST_JAM_ARGS=%BOOST_JAM_ARGS% %1
+ shift
+ goto Setup_Args
 )
-if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
- if NOT "_%MSVCDir%_" == "__" (
- set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
- ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
- if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" (
- call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_msvc_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+:Config_Toolset
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_metrowerks_" goto :Skip_METROWERKS
+if NOT "_%CWFolder%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%CWFolder%\"
+ )
+set "PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks Tools\Command Line Tools;%PATH%"
+set "BOOST_JAM_CC=mwcc -runtime ss -cwd include -DNT -lkernel32.lib -ladvapi32.lib -luser32.lib"
+set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
+set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
+set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
+set "_known_=1"
+:Skip_METROWERKS
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_msvc_" goto :Skip_MSVC
+if NOT "_%MSVCDir%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
+ )
+call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT"
+if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
+ )
+set "BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_MSVC
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc7_" goto :Skip_VC7
+if NOT "_%VS71COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%VS71COMNTOOLS%..\..\VC7\"
+ )
+if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT"
+if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if "_%VCINSTALLDIR%_" == "__" (
         set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
- )
- set "BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib"
- set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
- set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
- set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
- if NOT "_%MSVCDir%_" == "__" (
- set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
         ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
- if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" (
- call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_vc7_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+set "BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_VC7
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc8_" goto :Skip_VC8
+if NOT "_%VS80COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%VS80COMNTOOLS%..\..\VC\"
+ )
+if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
+if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if "_%VCINSTALLDIR%_" == "__" (
         set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
- )
- set "BOOST_JAM_CC=cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib"
- set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
- set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
- set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
- if NOT "_%MSVCDir%_" == "__" (
- set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
         ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
- if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" (
- call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
- )
- set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
- set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
- set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
- set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
- if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- call :Test_Path bcc32.exe ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
- if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- if not errorlevel 1 (
- set "BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\"
- ) ) )
-if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- set "PATH=%BOOST_JAM_TOOLSET_ROOT%Bin;%PATH%"
- )
- set "BOOST_JAM_CC=bcc32 -WC -w- -q "-I%BOOST_JAM_TOOLSET_ROOT%Include" "-L%BOOST_JAM_TOOLSET_ROOT%Lib" /DNT -nbootstrap"
- set "BOOST_JAM_OPT_JAM=-ejam0"
- set "BOOST_JAM_OPT_MKJAMBASE=-emkjambasejam0"
- set "BOOST_JAM_OPT_YYACC=-eyyacc0"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_como_" (
- set "BOOST_JAM_CC=como -DNT"
- set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
- set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
- set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_gcc_" (
- set "BOOST_JAM_CC=gcc -DNT"
- set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
- set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
- set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_gcc-nocygwin_" (
- set "BOOST_JAM_CC=gcc -DNT -mno-cygwin"
- set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
- set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
- set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_intel-win32_" (
- set "BOOST_JAM_CC=icl -DNT /nologo kernel32.lib advapi32.lib user32.lib"
- set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
- set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
- set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
- set "_known_=1"
-)
-if "_%BOOST_JAM_TOOLSET%_" == "_mingw_" (
- if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
- set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
- )
- set "BOOST_JAM_CC=gcc -DNT"
- set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
- set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
- set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
- set "_known_=1"
-)
+set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_VC8
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto :Skip_BORLAND
+if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ call :Test_Path bcc32.exe )
+if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if not errorlevel 1 (
+ set "BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\"
+ ) )
+if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%Bin;%PATH%"
+ )
+set "BOOST_JAM_CC=bcc32 -WC -w- -q -I%BOOST_JAM_TOOLSET_ROOT%Include -L%BOOST_JAM_TOOLSET_ROOT%Lib /DNT -nbootstrap"
+set "BOOST_JAM_OPT_JAM=-ejam0"
+set "BOOST_JAM_OPT_MKJAMBASE=-emkjambasejam0"
+set "BOOST_JAM_OPT_YYACC=-eyyacc0"
+set "_known_=1"
+:Skip_BORLAND
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_como_" goto :Skip_COMO
+set "BOOST_JAM_CC=como -DNT"
+set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
+set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
+set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
+set "_known_=1"
+:Skip_COMO
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_gcc_" goto :Skip_GCC
+set "BOOST_JAM_CC=gcc -DNT"
+set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
+set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
+set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
+set "_known_=1"
+:Skip_GCC
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_gcc-nocygwin_" goto :Skip_GCC_NOCYGWIN
+set "BOOST_JAM_CC=gcc -DNT -mno-cygwin"
+set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
+set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
+set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
+set "_known_=1"
+:Skip_GCC_NOCYGWIN
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_intel-win32_" goto :Skip_INTEL_WIN32
+set "BOOST_JAM_CC=icl -DNT /nologo kernel32.lib advapi32.lib user32.lib"
+set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
+set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
+set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
+set "_known_=1"
+:Skip_INTEL_WIN32
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_mingw_" goto :Skip_MINGW
+if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
+ )
+set "BOOST_JAM_CC=gcc -DNT"
+set "BOOST_JAM_OPT_JAM=-o bootstrap\jam0.exe"
+set "BOOST_JAM_OPT_MKJAMBASE=-o bootstrap\mkjambase0.exe"
+set "BOOST_JAM_OPT_YYACC=-o bootstrap\yyacc0.exe"
+set "_known_=1"
+:Skip_MINGW
+setlocal & endlocal
 if "_%_known_%_" == "__" (
     call :Error_Print "Unknown toolset: %BOOST_JAM_TOOLSET%"
 )
@@ -339,7 +350,7 @@
 set BJAM_SOURCES=
 set BJAM_SOURCES=%BJAM_SOURCES% command.c compile.c debug.c execnt.c expand.c filent.c glob.c hash.c
 set BJAM_SOURCES=%BJAM_SOURCES% hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c
-set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c parse.c pathunix.c regexp.c
+set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c output.c parse.c pathunix.c regexp.c
 set BJAM_SOURCES=%BJAM_SOURCES% rules.c scan.c search.c subst.c timestamp.c variable.c modules.c
 set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c
 set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c

Modified: branches/release/tools/jam/src/build.jam
==============================================================================
--- branches/release/tools/jam/src/build.jam (original)
+++ branches/release/tools/jam/src/build.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,18 +1,19 @@
-#~ Copyright 2002-2005 Rene Rivera.
+#~ Copyright 2002-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)
 
 # Platform related specifics.
-if $(NT) { rule .path { return "$(<:J=\\)" ; } }
-else if $(OS2) { rule .path { return "$(<:J=\\)" ; } }
+if $(NT) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
+else if $(OS2) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
 else if $(VMS) { rule .path { return "[.$(<:J=/)]" ; } }
 else if $(MAC) { rule .path { return ":$(<:J=\:)" ; } }
 else { rule .path { return "$(<:J=/)" ; } }
 if $(VMS) { . = "_" ; }
 else { . = "." ; }
+./ ?= "" ;
 
 # Info about what we are building.
-_VERSION_ = 3 1 14 ;
+_VERSION_ = 3 1 16 ;
 NAME = boost-jam ;
 VERSION = $(_VERSION_:J=$(.)) ;
 RELEASE = 1 ;
@@ -54,13 +55,15 @@
         {
             --python-lib ?=
                 [ GLOB [ .path $(python-location) libs ] : "python$(v).lib" ]
- [ GLOB $(python-location) $(Path) $(PATH) $(path) : "python$(v).dll" ]
+ [ GLOB $(python-location) [ .path $(python-location) libs ]
+ $(Path) $(PATH) $(path) : "python$(v).dll" ]
                 ;
             if ! $(--python-lib[2])
             {
                 --python-lib = ;
             }
         }
+ --python-lib = $(--python-lib[1]) ;
     }
     else if $(OS) = MACOSX
     {
@@ -84,6 +87,26 @@
     }
 }
 
+# Boehm GC?
+if --gc in $(ARGV)
+{
+ --boehm-gc = true ;
+}
+if $(--boehm-gc)
+{
+ --extra-include += [ .path [ PWD ] "boehm_gc" "include" ] ;
+}
+
+# Duma?
+if --duma in $(ARGV)
+{
+ --duma = true ;
+}
+if $(--duma)
+{
+ --extra-include += [ .path [ PWD ] "duma" ] ;
+}
+
 # An explicit root for the toolset? (trim spaces)
 toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
 {
@@ -119,14 +142,14 @@
     : -Ae
     [ opt --release : -s -O3 ]
     [ opt --debug : -g -pg ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Borland C++ 5.5.x
 toolset borland bcc32 : -e -n : /D
     : -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
     [ opt --release : -O2 -vi -w-inl ]
     [ opt --debug : -v -Od -vi- ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : $(--python-lib[1]) ;
 ## Generic Unix cc
 if ! $(CC) { CC = cc ; }
@@ -134,63 +157,63 @@
     : $(CFLAGS)
     [ opt --release : -s -O ]
     [ opt --debug : -g ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Comeau C/C++ 4.x
 toolset como como : "-o " : -D
     : --c
     [ opt --release : --inlining ]
     [ opt --debug : --no_inlining ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## MacOSX Darwin, using GCC 2.9.x, 3.x
 toolset darwin cc : "-o " : -D
     :
     [ opt --release : -Wl,-x -O3 -finline-functions ]
     [ opt --debug : -g -O0 -fno-inline -pg ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## GCC 2.x, 3.x, 4.x
 toolset gcc gcc : "-o " : -D
- : -pedantic
+ : -pedantic -fno-strict-aliasing
     [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
     [ opt --debug : -g -O0 -fno-inline ]
- -I$(--python-include) -Wno-long-long
+ -I$(--python-include) -I$(--extra-include) -Wno-long-long
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
 toolset gcc-nocygwin gcc : "-o " : -D
     : -s -O3 -mno-cygwin
     [ opt --release : -finline-functions ]
     [ opt --debug : -s -O3 -fno-inline -pg ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Intel C/C++ for Linux
 toolset intel-linux icc : "-o " : -D
     :
     [ opt --release : -Xlinker -s -O3 ]
     [ opt --debug : -g -O0 -p ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Intel C/C++ for Win32
 toolset intel-win32 icl : /Fe : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## KCC ?
 toolset kcc KCC : "-o " : -D
     :
     [ opt --release : -s +K2 ]
     [ opt --debug : -g +K0 ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Borland Kylix
 toolset kylix bc++ : -o : -D
     : -tC -q
     [ opt --release : -O2 -vi -w-inl ]
     [ opt --debug : -v -Od -vi- ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Metrowerks CodeWarrior 8.x
 {
@@ -201,7 +224,7 @@
         : -c -lang c -subsystem console -cwd include
         [ opt --release : -runtime ss -opt full -inline all ]
         [ opt --debug : -runtime ssd -opt none -inline off ]
- -I$(--python-include) ;
+ -I$(--python-include) -I$(--extra-include) ;
     toolset metrowerks $(mwcc) .link : "-o " :
         : -subsystem console -lkernel32.lib -ladvapi32.lib -luser32.lib
         [ opt --release : -runtime ss ]
@@ -213,64 +236,86 @@
     :
     [ opt --release : -s -O3 -finline-functions ]
     [ opt --debug : -g -O0 -fno-inline -pg ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : $(--python-lib[2]) ;
 ## MIPS Pro
 toolset mipspro cc : "-o " : -D
     :
     [ opt --release : -s -O3 -g0 -INLINE:none ]
     [ opt --debug : -g -O0 -INLINE ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Microsoft Visual Studio C++ 6.x
-toolset msvc cl : /Fe : -D
+toolset msvc cl : /Fe /Fe /Fd /Fo : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## QNX 6.x GCC 3.x/2.95.3
 toolset qcc qcc : "-o " : -D
     : -Wc,-pedantic
     [ opt --release : [ opt --symbols : -g ] -O3 -Wc,-finline-functions ]
     [ opt --debug : -g -O0 -Wc,-fno-inline ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
+ : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+## Qlogic Pathscale 2.4
+toolset pathscale pathcc : "-o " : -D
+ :
+ [ opt --release : -s -Ofast -O3 ]
+ [ opt --debug : -g ]
+ -I$(--python-include) -I$(--extra-include)
+ : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+## Portland Group Pgi 6.2
+toolset pgi pgcc : "-o " : -D
+ :
+ [ opt --release : -s -O3 ]
+ [ opt --debug : -g ]
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Sun Workshop 6 C++
+toolset sun cc : "-o " : -D
+ :
+ [ opt --release : -s -fast -xO4 ]
+ [ opt --debug : -g ]
+ -xarch=generic
+ -I$(--python-include) -I$(--extra-include)
+ : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+## Sun Workshop 6 C++ (old alias)
 toolset sunpro cc : "-o " : -D
     :
     [ opt --release : -s -fast -xO4 ]
     [ opt --debug : -g ]
     -xarch=generic
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## Compaq Alpha CXX
 toolset tru64cxx cc : "-o " : -D
     :
     [ opt --release : -s -O5 -inline speed ]
     [ opt --debug : -g -O0 -pg ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
 ## IBM VisualAge C++
 toolset vacpp xlc : "-o " : -D
     :
     [ opt --release : -s -O3 -qstrict -qinline ]
     [ opt --debug : -g -qNOOPTimize -qnoinline -pg ]
- -I$(--python-include)
- : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+ -I$(--python-include) -I$(--extra-include)
+ : -L$(--python-lib[1]) -l$(--python-lib[2]) -bmaxdata:0x40000000 ;
 ## Microsoft Visual C++ .NET 7.x
-toolset vc7 cl : /Fe : -D
+toolset vc7 cl : /Fe /Fe /Fd /Fo : -D
     : /nologo
     [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## Microsoft Visual C++ 2005
-toolset vc8 cl : /Fe : -D
+toolset vc8 cl : /Fe /Fe /Fd /Fo : -D
     : /nologo
     [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
     [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
- -I$(--python-include)
+ -I$(--python-include) -I$(--extra-include)
     : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
 ## VMS/OpenVMS DEC C
 toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
@@ -308,8 +353,16 @@
 --cc = $(tool.$(toolset).cc) ;
 if $(tool.$(toolset).opt.out[2])
 {
- --bin = $(tool.$(toolset).opt.out[1]) ;
- --dir = $(tool.$(toolset).opt.out[2]) ;
+ if $(tool.$(toolset).opt.out[1]) = $(tool.$(toolset).opt.out[2])
+ {
+ --out = $(tool.$(toolset).opt.out[1]) ;
+ --dir = $(tool.$(toolset).opt.out[3-]) ;
+ }
+ else
+ {
+ --bin = $(tool.$(toolset).opt.out[1]) ;
+ --dir = $(tool.$(toolset).opt.out[2-]) ;
+ }
 }
 else
 {
@@ -324,8 +377,16 @@
     --link = $(tool.$(toolset).link.cc) ;
     if $(tool.$(toolset).link.opt.out[2])
     {
- --link-bin = $(tool.$(toolset).link.opt.out[1]) ;
- --link-dir = $(tool.$(toolset).link.opt.out[2]) ;
+ if $(tool.$(toolset).link.opt.out[1]) = $(tool.$(toolset).link.opt.out[2])
+ {
+ --link-out = $(tool.$(toolset).link.opt.out[1]) ;
+ --link-dir = $(tool.$(toolset).link.opt.out[3-]) ;
+ }
+ else
+ {
+ --link-bin = $(tool.$(toolset).link.opt.out[1]) ;
+ --link-dir = $(tool.$(toolset).link.opt.out[2-]) ;
+ }
     }
     else
     {
@@ -378,8 +439,8 @@
     command.c compile.c debug.c expand.c glob.c
     hash.c hcache.c headers.c hdrmacro.c
     jam.c jambase.c jamgram.c
- lists.c make.c make1.c newstr.c
- option.c parse.c regexp.c rules.c
+ lists.c make.c make1.c mem.c newstr.c
+ option.c output.c parse.c regexp.c rules.c
     scan.c search.c subst.c w32_getreg.c
     timestamp.c variable.c modules.c strings.c filesys.c
     builtins.c pwd.c class.c native.c modules/set.c
@@ -418,6 +479,7 @@
 --defs += OPT_GRAPH_DEBUG_EXT ;
 --defs += OPT_SEMAPHORE ;
 --defs += OPT_AT_FILES ;
+--defs += OPT_DEBUG_PROFILE ;
 
 # Bug fixes
 --defs += OPT_FIX_TARGET_VARIABLES_EXT ;
@@ -426,6 +488,21 @@
 # Improvements
 --defs += OPT_IMPROVED_PATIENCE_EXT ;
 
+# Use Boehm GC memory allocator?
+if $(--boehm-gc)
+{
+ --defs += OPT_BOEHM_GC ;
+ if $(debug)
+ {
+ --defs += GC_DEBUG ;
+ }
+}
+
+if $(--duma)
+{
+ --defs += OPT_DUMA ;
+}
+
 if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs)
 {
     --defs += NT ;
@@ -441,6 +518,10 @@
     --defs += HAVE_PYTHON ;
 }
 
+if $(debug)
+{
+ --defs += BJAM_NEWSTR_NO_ALLOCATE ;
+}
 
 
 # The basic symbolic targets...
@@ -526,16 +607,16 @@
     return $(exe) ;
 }
 if ! $(--def[2]) { actions [COMPILE] {
- "$(--cc)" $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>)
+ "$(--cc)" $(--bin)$(<:D=) $(--dir)$(<:D)$(./) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>)
 } }
 else { actions [COMPILE] {
- "$(--cc)" $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def[1])$(--defs:J=$(--def[2]))$(--def[3]) $(--flags) "$(--libs)" $(>)
+ "$(--cc)" $(--bin)$(<:D=) $(--dir)$(<:D)$(./) $(--out)$(<) $(--def[1])$(--defs:J=$(--def[2]))$(--def[3]) $(--flags) "$(--libs)" $(>)
 } }
 if $(VMS) { actions [COMPILE.LINK] {
- "$(--link)" $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ")
+ "$(--link)" $(--link-bin)$(<:D=) $(--link-dir)$(<:D)$(./) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ")
 } }
 else { actions [COMPILE.LINK] {
- "$(--link)" $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>)
+ "$(--link)" $(--link-bin)$(<:D=) $(--link-dir)$(<:D)$(./) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>)
 } }
 
 rule .link
@@ -739,18 +820,19 @@
     build.jam build.bat build.sh build_vms.com
     Jambase
     jamgram.y jamgram.yy
- [ .path debian changelog ]
- [ .path debian control ]
- [ .path debian copyright ]
- [ .path debian jam.man.sgml ]
- [ .path debian rules ]
     [ .path modules set.c ]
     [ .path modules path.c ]
     [ .path modules regex.c ]
     [ .path modules property-set.c ]
     [ .path modules sequence.c ]
     [ .path modules order.c ]
- boost-jam.spec
+ [ GLOB [ .path boehm_gc ] : * ]
+ [ GLOB [ .path boehm_gc include ] : * ]
+ [ GLOB [ .path boehm_gc include private ] : * ]
+ [ GLOB [ .path boehm_gc cord ] : * ]
+ [ GLOB [ .path boehm_gc Mac_files ] : * ]
+ [ GLOB [ .path boehm_gc tests ] : * ]
+ [ GLOB [ .path boehm_gc doc ] : * ]
     ;
 dist.bin =
     bjam
@@ -784,9 +866,19 @@
 }
 if $(UNIX)
 {
+ tar ?= [ GLOB $(PATH) : star bsdtar tar ] ;
+ tar = $(tar[1]) ;
+ switch $(tar:D=:S=)
+ {
+ case star : tar += -c artype=pax -D -d -to-stdout ;
+ case * : tar += -c -f - ;
+ }
     actions [PACK] {
- tar zcf "$(<)" "$(>)"
+ "$(tar)" "$(>)" | gzip -c9 > "$(<)"
     }
+ #~ actions [PACK] {
+ #~ tar cf "$(<:S=.tar)" "$(>)"
+ #~ }
     actions [ZIP] {
     gzip -c9 "$(>)" > "$(<)"
     }
@@ -814,16 +906,21 @@
 rule .package ( dst-dir : src-files + )
 {
     local dst-files ;
+ local src-files-actual ;
     for local src-path in $(src-files)
     {
- local src-subdir = $(src-path:D) ;
- local src-file = $(src-path) ;
- while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; }
- if $(src-subdir) = ".."
+ if ! [ GLOB $(src-path:P) : $(src-path:B) ] || [ CHECK_IF_FILE $(src-path) ]
         {
- src-file = $(src-file:D=) ;
+ local src-subdir = $(src-path:D) ;
+ local src-file = $(src-path) ;
+ while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; }
+ if $(src-subdir) = ".."
+ {
+ src-file = $(src-file:D=) ;
+ }
+ dst-files += $(src-file:R=$(dst-dir)) ;
+ src-files-actual += $(src-path) ;
         }
- dst-files += $(src-file:R=$(dst-dir)) ;
     }
     
     local pack = ;
@@ -834,7 +931,7 @@
     DEPENDS $(pack) : $(dst-files) ;
     
     local dst-files-queue = $(dst-files) ;
- for local src-path in $(src-files)
+ for local src-path in $(src-files-actual)
     {
         local dst-file = $(dst-files-queue[1]) ;
         dst-files-queue = $(dst-files-queue[2-]) ;
@@ -897,6 +994,6 @@
     .package $(NAME)-$(VERSION)-$(RELEASE)-$(platform) : $(dist.bin) ;
     if $(rpm-tool)
     {
- .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).tgz ;
+ #~ .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).tgz ;
     }
 }

Modified: branches/release/tools/jam/src/build.sh
==============================================================================
--- branches/release/tools/jam/src/build.sh (original)
+++ branches/release/tools/jam/src/build.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -30,7 +30,7 @@
     echo "###"
     echo "### Toolsets supported by this script are:"
     echo "### acc, como, darwin, gcc, intel-linux, kcc, kylix, mipspro,"
- echo "### mingw(msys), qcc, sunpro, tru64cxx, vacpp"
+ echo "### mingw(msys), pathscale, pgi, qcc, sun, sunpro, tru64cxx, vacpp"
     echo "###"
     echo "### A special toolset; cc, is available which is used as a fallback"
     echo "### when a more specific toolset is not found and the cc command is"
@@ -86,6 +86,8 @@
     elif test -r /opt/intel/compiler50/ia32/bin/iccvars.sh ; then
         BOOST_JAM_TOOLSET=intel-linux
         BOOST_JAM_TOOLSET_ROOT=/opt/intel/compiler50/ia32/
+ elif test_path pgcc ; then BOOST_JAM_TOOLSET=pgi
+ elif test_path pathcc ; then BOOST_JAM_TOOLSET=pathscale
     elif test_path xlc ; then BOOST_JAM_TOOLSET=vacpp
     elif test_path como ; then BOOST_JAM_TOOLSET=como
     elif test_path KCC ; then BOOST_JAM_TOOLSET=kcc
@@ -183,7 +185,15 @@
     BOOST_JAM_CC=cc
     ;;
     
- sunpro)
+ pathscale)
+ BOOST_JAM_CC=pathcc
+ ;;
+
+ pgi)
+ BOOST_JAM_CC=pgcc
+ ;;
+
+ sun*)
     if test -z "${BOOST_JAM_TOOLSET_ROOT}" -a -r /opt/SUNWspro/bin/cc ; then
         BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
     fi
@@ -226,14 +236,22 @@
 YYACC_SOURCES="yyacc.c"
 MKJAMBASE_SOURCES="mkjambase.c"
 BJAM_SOURCES="\
- command.c compile.c debug.c execunix.c expand.c fileunix.c glob.c hash.c\
+ command.c compile.c debug.c expand.c glob.c hash.c\
  hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c\
- newstr.c option.c parse.c pathunix.c pathvms.c regexp.c\
+ newstr.c option.c output.c parse.c pathunix.c pathvms.c regexp.c\
  rules.c scan.c search.c subst.c timestamp.c variable.c modules.c\
  strings.c filesys.c builtins.c pwd.c class.c native.c w32_getreg.c\
  modules/set.c modules/path.c modules/regex.c modules/property-set.c\
- modules/sequence.c modules/order.c\
- execnt.c filent.c"
+ modules/sequence.c modules/order.c"
+case $BOOST_JAM_TOOLSET in
+ mingw)
+ BJAM_SOURCES="${BJAM_SOURCES} execnt.c filent.c"
+ ;;
+
+ *)
+ BJAM_SOURCES="${BJAM_SOURCES} execunix.c fileunix.c"
+ ;;
+esac
 
 BJAM_UPDATE=
 if test "$1" = "--update" -o "$2" = "--update" -o "$3" = "--update" -o "$4" = "--update" ; then

Modified: branches/release/tools/jam/src/builtins.c
==============================================================================
--- branches/release/tools/jam/src/builtins.c (original)
+++ branches/release/tools/jam/src/builtins.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,7 +5,6 @@
  */
 
 # include "jam.h"
-# include "debug.h"
 
 # include "lists.h"
 # include "parse.h"
@@ -24,6 +23,7 @@
 # include "compile.h"
 # include "native.h"
 # include "variable.h"
+# include "timestamp.h"
 # include <ctype.h>
 
 /*
@@ -54,11 +54,11 @@
 
 # if defined( OS_NT ) || defined( OS_CYGWIN )
 LIST* builtin_system_registry( PARSE *parse, FRAME *frame );
+LIST* builtin_system_registry_names( PARSE *parse, FRAME *frame );
 # endif
 
 int glob( char *s, char *c );
 
-void lol_build( LOL* lol, char** elements );
 void backtrace( FRAME *frame );
 void backtrace_line( FRAME *frame );
 void print_source_line( PARSE* p );
@@ -328,6 +328,12 @@
           bind_builtin( "W32_GETREG",
               builtin_system_registry, 0, args );
       }
+
+ {
+ char * args[] = { "key_path", ":", "result-type", 0 };
+ bind_builtin( "W32_GETREGNAMES",
+ builtin_system_registry_names, 0, args );
+ }
 # endif
 
       {
@@ -1328,8 +1334,15 @@
         if (arg)
             string_append(in, "/");
     }
-
 
+ /* Convert \ into /. On windows, paths using / and \ are equivalent,
+ and we want this function to obtain canonic representation. */
+ for (current = in->value, end = in->value + in->size;
+ current < end; ++current)
+ if (*current == '\\')
+ *current = '/';
+
+
     end = in->value + in->size - 1;
     current = end;
     
@@ -1656,6 +1669,7 @@
 
     frame_free( inner );
 
+ Py_INCREF(Py_None);
     return Py_None;
 }
 
@@ -1677,7 +1691,11 @@
         return NULL;
     
     if (!PyCallable_Check(func))
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Non-callable object passed to bjam.import_rule");
         return NULL;
+ }
     
     m = bindmodule(module);
     r = bindrule(rule, m);
@@ -1686,9 +1704,104 @@
     Py_INCREF(func);
 
     r->python_function = func;
+
+ 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;
+
+ 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_new(bindlist, PyString_AsString(next));
+ }
+
+ new_rule_actions(root_module(), name, newstr(body), bindlist, flags);
+
+ 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;
+
+ if (!PyArg_ParseTuple(args, "s", &name))
+ return NULL;
+
+ enter_module(root_module());
+ value = var_get(name);
+ exit_module(root_module());
+
+ result = PyList_New(list_length(value));
+ for (i = 0; value; value = list_next(value), ++i)
+ PyList_SetItem(result, i, PyString_FromString(value->string));
+
+ 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* file;
+ int line;
+ char buf[32];
+ get_source_line( f->procedure, &file, &line );
+ sprintf( buf, "%d", line );
+
+ /* PyTuple_SetItem steals reference. */
+ PyTuple_SetItem(tuple, 0, PyString_FromString(file));
+ PyTuple_SetItem(tuple, 1, PyString_FromString(buf));
+ PyTuple_SetItem(tuple, 2, PyString_FromString(f->module->name));
+ PyTuple_SetItem(tuple, 3, PyString_FromString(f->rulename));
+
+ PyList_Append(result, tuple);
+ Py_DECREF(tuple);
+ }
+ return result;
+}
+
 #endif
 
 #ifdef HAVE_POPEN

Modified: branches/release/tools/jam/src/builtins.h
==============================================================================
--- branches/release/tools/jam/src/builtins.h (original)
+++ branches/release/tools/jam/src/builtins.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -14,6 +14,12 @@
  */
 
 void load_builtins();
+void init_set();
+void init_path();
+void init_regex();
+void init_property_set();
+void init_sequence();
+void init_order();
 
 LIST *builtin_calc( PARSE *parse, FRAME *args );
 LIST *builtin_depends( PARSE *parse, FRAME *args );

Modified: branches/release/tools/jam/src/command.c
==============================================================================
--- branches/release/tools/jam/src/command.c (original)
+++ branches/release/tools/jam/src/command.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -20,7 +20,6 @@
 # include "parse.h"
 # include "variable.h"
 # include "rules.h"
-# include "debug.h"
 
 # include "command.h"
 # include <limits.h>
@@ -37,15 +36,12 @@
         LIST *sources,
         LIST *shell )
 {
- CMD *cmd = (CMD *)malloc( sizeof( CMD ) );
+ CMD *cmd = (CMD *)BJAM_MALLOC( sizeof( CMD ) );
     /* lift line-length limitation entirely when JAMSHELL is just "%" */
     int no_limit = ( shell && !strcmp(shell->string,"%") && !list_next(shell) );
     int max_line = MAXLINE;
     int allocated = -1;
 
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( CMD ) );
-
     cmd->rule = rule;
     cmd->shell = shell;
     cmd->next = 0;
@@ -57,12 +53,9 @@
 
     do
     {
- free(cmd->buf); /* free any buffer from previous iteration */
+ BJAM_FREE(cmd->buf); /* free any buffer from previous iteration */
         
- cmd->buf = (char*)malloc(max_line + 1);
-
- if ( DEBUG_PROFILE )
- profile_memory( max_line + 1 );
+ cmd->buf = (char*)BJAM_MALLOC_ATOMIC(max_line + 1);
         
         if (cmd->buf == 0)
             break;
@@ -106,6 +99,6 @@
 {
         lol_free( &cmd->args );
         list_free( cmd->shell );
- free( cmd->buf );
- free( (char *)cmd );
+ BJAM_FREE( cmd->buf );
+ BJAM_FREE( (char *)cmd );
 }

Modified: branches/release/tools/jam/src/compile.c
==============================================================================
--- branches/release/tools/jam/src/compile.c (original)
+++ branches/release/tools/jam/src/compile.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -11,7 +11,6 @@
  */
 
 # include "jam.h"
-# include "debug.h"
 
 # include "lists.h"
 # include "parse.h"
@@ -95,6 +94,8 @@
 void print_source_line( PARSE* p );
 
 
+struct frame *frame_before_python_call;
+
 void frame_init( FRAME* frame )
 {
     frame->prev = 0;
@@ -267,7 +268,7 @@
         
         if ( parse->num )
         {
- s = addsettings( s, 0, parse->string, L0 );
+ s = addsettings( s, VAR_SET, parse->string, L0 );
             pushsettings( s );
         }
 
@@ -493,7 +494,7 @@
     /* Initial value is ns */
 
     for( l = nt; l; l = list_next( l ) )
- s = addsettings( s, 0, l->string, list_copy( (LIST*)0, ns ) );
+ s = addsettings( s, VAR_SET, l->string, list_copy( (LIST*)0, ns ) );
 
     list_free( ns );
     list_free( nt );
@@ -784,7 +785,7 @@
                         }
                     }
                 
- locals = addsettings( locals, 0, name, value );
+ locals = addsettings( locals, VAR_SET, name, value );
                     type_check( type_name, value, frame, rule, arg_name );
                     type_name = 0;
                 }
@@ -828,6 +829,7 @@
         PyTuple_SetItem(arguments, i, arg);
     }
 
+ frame_before_python_call = frame;
     py_result = PyObject_CallObject(r->python_function, arguments);
     Py_DECREF(arguments);
     if (py_result != NULL) {
@@ -897,6 +899,15 @@
     
     return result;
 }
+
+module_t* python_module()
+{
+ static module_t* python = 0;
+ if ( !python )
+ python = bindmodule("__python__");
+ return python;
+}
+
 #endif
 
 /*
@@ -938,7 +949,41 @@
 #ifdef HAVE_PYTHON
     if (rule->python_function)
     {
- return call_python_function(rule, frame);
+ /* The below messing with modules is due to the
+ way modules are implemented in jam.
+ Suppose we're in module M1 now. The global
+ variable map actually holds 'M1' variables,
+ and M1->variables hold global variables.
+
+ If we call Python right away, and then Python
+ call back Jam, and jam does:
+
+ module M1 { }
+
+ then jam will try to swap current global
+ variables with M1->variables. The result will
+ be that global variables map will hold
+ global variables, and any variables settings
+ we do will go to global module, not M1.
+
+ By restoring basic state, where global
+ variable map hold global variable, we make
+ sure any fugure 'module M1' will work OK. */
+
+ LIST *result;
+ module_t *m = python_module();
+
+ frame->module = m;
+
+ exit_module( prev_module );
+ enter_module( m );
+
+ result = call_python_function(rule, frame);
+
+ exit_module( m );
+ enter_module ( prev_module );
+
+ return result;
     }
 #endif
 
@@ -1007,15 +1052,31 @@
 
         /* The action is associated with this instance of this rule */
 
- action = (ACTION *)malloc( sizeof( ACTION ) );
+ action = (ACTION *)BJAM_MALLOC( sizeof( ACTION ) );
         memset( (char *)action, '\0', sizeof( *action ) );
 
- if ( DEBUG_PROFILE )
- profile_memory( 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 ) );
+
+ /* Make targets[1,N-1] depend on targets[0], to describe the multply
+ generated targets for the rule. Do it with includes, to reflect
+ non-build dependency. */
+ if ( action->targets )
+ {
+ TARGET * t0 = action->targets->target;
+ for ( t = action->targets->next; t; t = t->next )
+ {
+ TARGET * tn = t->target;
+ if ( !tn->includes )
+ {
+ tn->includes = copytarget( tn );
+ tn->includes->original_target = tn;
+ }
+ tn = tn->includes;
+ tn->depends = targetentry( tn->depends, t0 );
+ }
+ }
 
         /* Append this action to the actions of each target */
 
@@ -1116,6 +1177,26 @@
 }
 
 /*
+ * assign_var_mode() - convert ASSIGN_XXX compilation flag into
+ * corresponding VAR_XXX variable set flag.
+ */
+static int assign_var_mode(int parsenum, const char **tracetext)
+{
+ const char *trace;
+ int setflag;
+ switch( parsenum )
+ {
+ case ASSIGN_SET: setflag = VAR_SET; trace = "="; break;
+ case ASSIGN_APPEND: setflag = VAR_APPEND; trace = "+="; break;
+ case ASSIGN_DEFAULT: setflag = VAR_DEFAULT; trace = "?="; break;
+ default: setflag = VAR_SET; trace = ""; break;
+ }
+ if (tracetext)
+ *tracetext = trace ;
+ return setflag;
+}
+
+/*
  * compile_set() - compile the "set variable" statement
  *
  * parse->left variable names
@@ -1131,16 +1212,8 @@
     LIST *nt = parse_evaluate( parse->left, frame );
     LIST *ns = parse_evaluate( parse->right, frame );
     LIST *l;
- int setflag;
- char *trace;
-
- switch( parse->num )
- {
- case ASSIGN_SET: setflag = VAR_SET; trace = "="; break;
- case ASSIGN_APPEND: setflag = VAR_APPEND; trace = "+="; break;
- case ASSIGN_DEFAULT: setflag = VAR_DEFAULT; trace = "?="; break;
- default: setflag = VAR_SET; trace = ""; break;
- }
+ const char *trace;
+ int setflag = assign_var_mode( parse->num, &trace );
 
     if( DEBUG_COMPILE )
     {
@@ -1232,7 +1305,8 @@
     LIST *ns = parse_evaluate( parse->third, frame );
     LIST *targets = parse_evaluate( parse->right, frame );
     LIST *ts;
- int append = parse->num == ASSIGN_APPEND;
+ const char *trace;
+ int setflag = assign_var_mode( parse->num, &trace );
 
     if( DEBUG_COMPILE )
     {
@@ -1240,7 +1314,7 @@
         list_print( nt );
         printf( " on " );
         list_print( targets );
- printf( " %s ", append ? "+=" : "=" );
+ printf( " %s ", trace );
         list_print( ns );
         printf( "\n" );
     }
@@ -1255,7 +1329,7 @@
         LIST *l;
 
         for( l = nt; l; l = list_next( l ) )
- t->settings = addsettings( t->settings, append,
+ t->settings = addsettings( t->settings, setflag,
                 l->string, list_copy( (LIST*)0, ns ) );
     }
 

Modified: branches/release/tools/jam/src/debug.c
==============================================================================
--- branches/release/tools/jam/src/debug.c (original)
+++ branches/release/tools/jam/src/debug.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,7 +5,6 @@
 */
 
 # include "jam.h"
-# include "debug.h"
 
 # include "hash.h"
 
@@ -100,14 +99,21 @@
 {
     profile_info* p = (profile_info*)p_;
     unsigned long mem_each = (p->memory/(p->num_entries ? p->num_entries : 1));
- double q = p->net; q /= (p->num_entries ? p->num_entries : 1);
+ double cumulative = p->cumulative;
+ double net = p->net;
+ double q = p->net;
+ q /= (p->num_entries ? p->num_entries : 1);
+ cumulative /= CLOCKS_PER_SEC;
+ net /= CLOCKS_PER_SEC;
+ q /= CLOCKS_PER_SEC;
     if (!ignored)
     {
         profile_total.cumulative += p->net;
         profile_total.memory += p->memory;
     }
- printf("%10d %10d %10d %12.6f %10d %10d %s\n",
- p->num_entries, p->cumulative, p->net, q,
+ printf("%10d %12.6f %12.6f %12.8f %10d %10d %s\n",
+ p->num_entries,
+ cumulative,net,q,
         p->memory, mem_each,
         p->name);
 }
@@ -116,7 +122,7 @@
 {
     if ( profile_hash )
     {
- printf("%10s %10s %10s %12s %10s %10s %s\n",
+ printf("%10s %12s %12s %12s %10s %10s %s\n",
             "--count--", "--gross--", "--net--", "--each--",
             "--mem--", "--each--",
             "--name--");

Modified: branches/release/tools/jam/src/execcmd.h
==============================================================================
--- branches/release/tools/jam/src/execcmd.h (original)
+++ branches/release/tools/jam/src/execcmd.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -19,9 +19,11 @@
 
 void execcmd(
         char *string,
- void (*func)( void *closure, int status, timing_info* ),
+ void (*func)( void *closure, int status, timing_info*, char *, char * ),
         void *closure,
- LIST *shell );
+ LIST *shell,
+ char *action,
+ char *target);
 
 int execwait();
 

Modified: branches/release/tools/jam/src/execmac.c
==============================================================================
--- branches/release/tools/jam/src/execmac.c (original)
+++ branches/release/tools/jam/src/execmac.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -47,7 +47,7 @@
 void
 execcmd(
         char *string,
- void (*func)( void *closure, int status ),
+ void (*func)( void *closure, int status, timing_info*, char *, char * ),
         void *closure,
         LIST *shell )
 {

Modified: branches/release/tools/jam/src/execnt.c
==============================================================================
--- branches/release/tools/jam/src/execnt.c (original)
+++ branches/release/tools/jam/src/execnt.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -6,6 +6,7 @@
 
 /* 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 http://www.boost.org/LICENSE_1_0.txt)
  */
@@ -14,7 +15,8 @@
 # include "lists.h"
 # include "execcmd.h"
 # include "pathsys.h"
-# include "debug.h"
+# include "string.h"
+# include "output.h"
 # include <errno.h>
 # include <assert.h>
 # include <ctype.h>
@@ -23,25 +25,18 @@
 # ifdef USE_EXECNT
 
 # define WIN32_LEAN_AND_MEAN
-# include <windows.h> /* do the ugly deed */
+# include <windows.h>
 # include <process.h>
-# if !defined( __BORLANDC__ )
 # include <tlhelp32.h>
-# endif
-
-# if !defined( __BORLANDC__ ) && !defined( OS_OS2 )
-# define wait my_wait
-static int my_wait( int *status );
-# endif
 
 /*
- * execnt.c - execute a shell command on Windows NT and Windows 95/98
+ * execnt.c - execute a shell command on Windows NT
  *
  * If $(JAMSHELL) is defined, uses that to formulate execvp()/spawnvp().
  * The default is:
  *
- * /bin/sh -c % [ on UNIX/AmigaOS ]
- * cmd.exe /c % [ on Windows NT ]
+ * /bin/sh -c % [ on UNIX/AmigaOS ]
+ * cmd.exe /c % [ on Windows NT ]
  *
  * Each word must be an individual element in a jam variable value.
  *
@@ -53,11 +48,11 @@
  * Don't just set JAMSHELL to /bin/sh or cmd.exe - it won't work!
  *
  * External routines:
- * execcmd() - launch an async command execution
- * execwait() - wait and drive at most one execution completion
+ * execcmd() - launch an async command execution
+ * execwait() - wait and drive at most one execution completion
  *
  * Internal routines:
- * onintr() - bump intr to note command interruption
+ * onintr() - bump intr to note command interruption
  *
  * 04/08/94 (seiwald) - Coherent/386 support added.
  * 05/04/94 (seiwald) - async multiprocess interface
@@ -65,59 +60,515 @@
  * 06/02/97 (gsar) - full async multiprocess support for Win32
  */
 
+/* get the maximum command line length according to the OS */
+int maxline();
+
+/* delete and argv list */
+static void free_argv(char**);
+/* Convert a command string into arguments for spawnvp. */
+static char** string_to_args(const char*);
+/* bump intr to note command interruption */
+static void onintr(int);
+/* If the command is suitable for execution via spawnvp */
+long can_spawn(char*);
+/* 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);
+/* Convert a FILETIME to a number of seconds */
+static double filetime_seconds(FILETIME t);
+/* record the timing info for the process */
+static void record_times(HANDLE, timing_info*);
+/* calc the current running time of an *active* process */
+static double running_time(HANDLE);
+/* */
+DWORD get_process_id(HANDLE);
+/* terminate the given process, after terminating all its children */
+static void kill_process_tree(DWORD, HANDLE);
+/* waits for a command to complete or for the given timeout, whichever is first */
+static int try_wait(int 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();
+/* */
+static double creation_time(HANDLE);
+/* Recursive check if first process is parent (directly or indirectly) of
+the second one. */
+static int is_parent_child(DWORD, DWORD);
+/* */
+static void close_alert(HANDLE);
+/* close any alerts hanging around */
+static void close_alerts();
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
 static int intr = 0;
 static int cmdsrunning = 0;
 static void (*istat)( int );
 
-static int is_nt_351 = 0;
-static int is_win95 = 1;
-static int is_win95_defined = 0;
-
-
+/* the list of commands we run */
 static struct
 {
- int pid; /* on win32, a real process handle */
- void (*func)( void *closure, int status, timing_info* );
- void *closure;
- char *tempfile;
-
+ /* buffer to hold action */
+ string action;
+ /* buffer to hold target */
+ string target;
+ /* buffer to hold command being invoked */
+ string command;
+ /* the temporary batch file of the action, when needed */
+ char *tempfile_bat;
+ /* the pipes for the child process, parent reads from (0),
+ child writes to (1) */
+ HANDLE pipe_out[2];
+ HANDLE pipe_err[2];
+ /* buffers to hold stdout and stderr, if any */
+ string buffer_out;
+ string buffer_err;
+ /* running process info */
+ PROCESS_INFORMATION pi;
+ /* when comand completes, the result value */
+ DWORD exitcode;
+ /* function called when the command completes */
+ void (*func)( void *closure, int status, timing_info*, char *, char * );
+ void *closure;
+ /* when command completes, the reason it completed */
+ int exit_reason;
 } cmdtab[ MAXJOBS ] = {{0}};
 
+/* 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 { char* command; int result; } test;
+ test tests[] = {
+ { "x", 0 },
+ { "x\n ", 0 },
+ { "x\ny", 1 },
+ { "x\n\n y", 1 },
+ { "echo x > foo.bar", 1 },
+ { "echo x < foo.bar", 1 },
+ { "echo x \">\" foo.bar", 0 },
+ { "echo x \"<\" foo.bar", 0 },
+ { "echo x \\\">\\\" foo.bar", 1 },
+ { "echo x \\\"<\\\" foo.bar", 1 }
+ };
+ int i;
+ for ( i = 0; i < sizeof(tests)/sizeof(*tests); ++i)
+ {
+ assert( !can_spawn( tests[i].command ) == tests[i].result );
+ }
 
-static void
-set_is_win95( void )
+ {
+ char* long_command = BJAM_MALLOC_ATOMIC(MAXLINE + 10);
+ assert( long_command != 0 );
+ memset( long_command, 'x', MAXLINE + 9 );
+ long_command[MAXLINE + 9] = 0;
+ assert( can_spawn( long_command ) == MAXLINE + 9);
+ BJAM_FREE( long_command );
+ }
+
+ {
+ /* Work around vc6 bug; it doesn't like escaped string
+ * literals inside assert
+ */
+ char** argv = string_to_args("\"g++\" -c -I\"Foobar\"");
+ char const expected[] = "-c -I\"Foobar\"";
+
+ assert(!strcmp(argv[0], "g++"));
+ assert(!strcmp(argv[1], expected));
+ free_argv(argv);
+ }
+#endif
+}
+
+/* execcmd() - launch an async command execution */
+void execcmd(
+ char *command,
+ void (*func)( void *closure, int status, timing_info*, char *invoked_command, char *command_output),
+ void *closure,
+ LIST *shell,
+ char *action,
+ char *target )
 {
- OSVERSIONINFO os_info;
+ int slot;
+ int raw_cmd = 0 ;
+ char *argv_static[ MAXARGC + 1 ]; /* +1 for NULL */
+ char **argv = argv_static;
+ char *p;
+ char* command_orig = command;
+
+ /* Check to see if we need to hack around the line-length limitation. */
+ /* Look for a JAMSHELL setting of "%", indicating that the command
+ * should be invoked directly */
+ if ( shell && !strcmp(shell->string,"%") && !list_next(shell) )
+ {
+ raw_cmd = 1;
+ shell = 0;
+ }
 
- os_info.dwOSVersionInfoSize = sizeof(os_info);
- os_info.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS;
- GetVersionEx( &os_info );
+ /* Find a slot in the running commands table for this one. */
+ for( slot = 0; slot < MAXJOBS; slot++ )
+ if( !cmdtab[ slot ].pi.hProcess )
+ break;
+ if( slot == MAXJOBS )
+ {
+ printf( "no slots for child!\n" );
+ exit( EXITBAD );
+ }
+
+ /* compute the name of a temp batch file, for possible use */
+ if( !cmdtab[ slot ].tempfile_bat )
+ {
+ const char *tempdir = path_tmpdir();
+ DWORD procID = GetCurrentProcessId();
   
- is_win95 = (os_info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
- is_win95_defined = 1;
+ /* SVA - allocate 64 other just to be safe */
+ cmdtab[ slot ].tempfile_bat = BJAM_MALLOC_ATOMIC( strlen( tempdir ) + 64 );
   
- /* now, test wether we're running Windows 3.51 */
- /* this is later used to limit the system call command length */
- if (os_info.dwPlatformId == VER_PLATFORM_WIN32_NT)
- is_nt_351 = os_info.dwMajorVersion == 3;
+ sprintf(
+ cmdtab[ slot ].tempfile_bat, "%s\\jam%d-%02d.bat",
+ tempdir, procID, slot );
+ }
+
+ /* Trim leading, -ending- white space */
+ while( isspace( *command ) )
+ ++command;
+
+ /* Write to .BAT file unless the line would be too long and it
+ * meets the other spawnability criteria.
+ */
+ if( raw_cmd && can_spawn( command ) >= MAXLINE )
+ {
+ if( DEBUG_EXECCMD )
+ printf("Executing raw command directly\n");
+ }
+ else
+ {
+ FILE *f = 0;
+ int tries = 0;
+ raw_cmd = 0;
+
+ /* Write command to bat file. For some reason this open can
+ fails intermitently. But doing some retries works. Most likely
+ this is due to a previously existing file of the same name that
+ happens to be opened by an active virus scanner. Pointed out,
+ and fix by Bronek Kozicki. */
+ for (; !f && tries < 4; ++tries)
+ {
+ f = fopen( cmdtab[ slot ].tempfile_bat, "w" );
+ if ( !f && tries < 4 ) Sleep( 250 );
+ }
+ if (!f)
+ {
+ printf( "failed to write command file!\n" );
+ exit( EXITBAD );
+ }
+ fputs( command, f );
+ fclose( f );
+
+ command = cmdtab[ slot ].tempfile_bat;
+
+ if( DEBUG_EXECCMD )
+ {
+ if (shell)
+ printf("using user-specified shell: %s", shell->string);
+ else
+ printf("Executing through .bat file\n");
+ }
+ }
+
+ /* Formulate argv; If shell was defined, be prepared for % and ! subs. */
+ /* Otherwise, use stock cmd.exe. */
+ if( shell )
+ {
+ int i;
+ char jobno[4];
+ int gotpercent = 0;
+
+ sprintf( jobno, "%d", slot + 1 );
+
+ for( i = 0; shell && i < MAXARGC; i++, shell = list_next( shell ) )
+ {
+ switch( shell->string[0] )
+ {
+ case '%': argv[i] = command; gotpercent++; break;
+ case '!': argv[i] = jobno; break;
+ default: argv[i] = shell->string;
+ }
+ if( DEBUG_EXECCMD )
+ printf( "argv[%d] = '%s'\n", i, argv[i] );
+ }
+
+ if( !gotpercent )
+ argv[i++] = command;
+
+ argv[i] = 0;
+ }
+ else if (raw_cmd)
+ {
+ argv = string_to_args(command);
+ }
+ else
+ {
+ argv[0] = "cmd.exe";
+ argv[1] = "/Q/C"; /* anything more is non-portable */
+ argv[2] = command;
+ argv[3] = 0;
+ }
+
+ /* Catch interrupts whenever commands are running. */
+
+ if( !cmdsrunning++ )
+ istat = signal( SIGINT, onintr );
+
+ /* Start the command */
+ {
+ SECURITY_ATTRIBUTES sa
+ = { sizeof(SECURITY_ATTRIBUTES), 0, 0 };
+ SECURITY_DESCRIPTOR sd;
+ STARTUPINFO si
+ = { sizeof(STARTUPINFO), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ string cmd;
+
+ /* init the security data */
+ InitializeSecurityDescriptor( &sd, SECURITY_DESCRIPTOR_REVISION );
+ SetSecurityDescriptorDacl( &sd, TRUE, NULL, FALSE );
+ sa.lpSecurityDescriptor = &sd;
+ sa.bInheritHandle = TRUE;
+
+ /* create the stdout, which is also the merged out+err, pipe */
+ if ( ! CreatePipe( &cmdtab[ slot ].pipe_out[0], &cmdtab[ slot ].pipe_out[1], &sa, 0 ) )
+ {
+ perror( "CreatePipe" );
+ exit( EXITBAD );
+ }
+
+ /* create the stdout, which is also the merged out+err, pipe */
+ if ( globs.pipe_action == 2 )
+ {
+ if ( ! CreatePipe( &cmdtab[ slot ].pipe_err[0], &cmdtab[ slot ].pipe_err[1], &sa, 0 ) )
+ {
+ perror( "CreatePipe" );
+ exit( EXITBAD );
+ }
+ }
+
+ /* set handle inheritance off for the pipe ends the parent reads from */
+ SetHandleInformation( cmdtab[ slot ].pipe_out[0], HANDLE_FLAG_INHERIT, 0 );
+ if ( globs.pipe_action == 2 )
+ {
+ SetHandleInformation( cmdtab[ slot ].pipe_err[0], HANDLE_FLAG_INHERIT, 0 );
+ }
+
+ /* hide the child window, if any */
+ si.dwFlags |= STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
+
+ /* set the child outputs to the pipes */
+ si.dwFlags |= STARTF_USESTDHANDLES;
+ si.hStdOutput = cmdtab[ slot ].pipe_out[1];
+ if ( globs.pipe_action == 2 )
+ {
+ /* pipe stderr to the action error output */
+ si.hStdError = cmdtab[ slot ].pipe_err[1];
+ }
+ else if ( globs.pipe_action == 1 )
+ {
+ /* pipe stderr to the console error output */
+ si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
+ }
+ else
+ {
+ /* pipe stderr to the action merged output */
+ si.hStdError = cmdtab[ slot ].pipe_out[1];
+ }
+
+ /* Save the operation for execwait() to find. */
+ cmdtab[ slot ].func = func;
+ cmdtab[ slot ].closure = closure;
+ if (action && target)
+ {
+ string_copy( &cmdtab[ slot ].action, action );
+ string_copy( &cmdtab[ slot ].target, target );
+ }
+ else
+ {
+ string_free( &cmdtab[ slot ].action );
+ string_new( &cmdtab[ slot ].action );
+ string_free( &cmdtab[ slot ].target );
+ string_new( &cmdtab[ slot ].target );
+ }
+ string_copy( &cmdtab[ slot ].command, command_orig );
+
+ /* put together the comman we run */
+ {
+ char ** argp = argv;
+ string_new(&cmd);
+ string_copy(&cmd,*(argp++));
+ while( *argp != 0 )
+ {
+ string_push_back(&cmd,' ');
+ string_append(&cmd,*(argp++));
+ }
+ }
+
+ /* create the output buffers */
+ string_new( &cmdtab[ slot ].buffer_out );
+ string_new( &cmdtab[ slot ].buffer_err );
+
+ /* run the command, by creating a sub-process for it */
+ if (
+ ! CreateProcess(
+ NULL, /* application name */
+ cmd.value, /* 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 /* the child process info, if created */
+ )
+ )
+ {
+ perror( "CreateProcess" );
+ exit( EXITBAD );
+ }
+
+ /* clean up temporary stuff */
+ string_free(&cmd);
+ }
+
+ /* Wait until we're under the limit of concurrent commands. */
+ /* Don't trust globs.jobs alone. */
+
+ while( cmdsrunning >= MAXJOBS || cmdsrunning >= globs.jobs )
+ if( !execwait() )
+ break;
+
+ if (argv != argv_static)
+ {
+ free_argv(argv);
+ }
 }
 
-int maxline()
+
+
+/* execwait()
+ - wait and drive at most one execution completion
+ * waits for one command to complete, while processing the io
+ for all ongoing commands.
+*/
+int execwait()
 {
- if (!is_win95_defined)
- set_is_win95();
+ int i = -1;
+
+ /* Handle naive make1() which doesn't know if cmds are running. */
+
+ if( !cmdsrunning )
+ return 0;
     
- /* Set the maximum command line length according to the OS */
- return is_nt_351 ? 996
- : is_win95 ? 1023
- : 2047;
+ /* wait for a command to complete, while snarfing up any output */
+ do
+ {
+ /* read in the output of all running commands */
+ read_output();
+ /* close out pending debug style dialogs */
+ close_alerts();
+ /* check for a complete command, briefly */
+ if ( i < 0 ) i = try_wait(500);
+ /* check if a command ran out of time */
+ if ( i < 0 ) i = try_kill_one();
+ }
+ while ( i < 0 );
+
+ /* we have a command... process it */
+ --cmdsrunning;
+ {
+ timing_info time;
+ int rstat;
+
+ /* the time data for the command */
+ record_times(cmdtab[i].pi.hProcess, &time);
+
+ /* Clear the temp file */
+ if ( cmdtab[i].tempfile_bat )
+ {
+ unlink( cmdtab[ i ].tempfile_bat );
+ BJAM_FREE(cmdtab[i].tempfile_bat);
+ cmdtab[i].tempfile_bat = NULL;
+ }
+
+ /* the dispossition of the command */
+ if( intr )
+ rstat = EXEC_CMD_INTR;
+ else if( cmdtab[i].exitcode != 0 )
+ rstat = EXEC_CMD_FAIL;
+ else
+ rstat = EXEC_CMD_OK;
+
+ /* output the action block */
+ out_action(
+ cmdtab[i].action.size > 0 ? cmdtab[i].action.value : 0,
+ cmdtab[i].target.size > 0 ? cmdtab[i].target.value : 0,
+ cmdtab[i].command.size > 0 ? cmdtab[i].command.value : 0,
+ cmdtab[i].buffer_out.size > 0 ? cmdtab[i].buffer_out.value : 0,
+ cmdtab[i].buffer_err.size > 0 ? cmdtab[i].buffer_err.value : 0,
+ cmdtab[i].exit_reason);
+
+ /* call the callback, may call back to jam rule land.
+ assume -p0 in effect so only pass buffer containing
+ merged output */
+ (*cmdtab[ i ].func)(
+ cmdtab[ i ].closure,
+ rstat,
+ &time,
+ cmdtab[i].command.value,
+ cmdtab[i].buffer_out.value );
+
+ /* clean up the command data, process, etc. */
+ string_free(&cmdtab[i].action); string_new(&cmdtab[i].action);
+ string_free(&cmdtab[i].target); string_new(&cmdtab[i].target);
+ string_free(&cmdtab[i].command); string_new(&cmdtab[i].command);
+ if (cmdtab[i].pi.hProcess) { CloseHandle(cmdtab[i].pi.hProcess); cmdtab[i].pi.hProcess = 0; }
+ if (cmdtab[i].pipe_out[0]) { CloseHandle(cmdtab[i].pipe_out[0]); cmdtab[i].pipe_out[0] = 0; }
+ if (cmdtab[i].pipe_out[1]) { CloseHandle(cmdtab[i].pipe_out[1]); cmdtab[i].pipe_out[1] = 0; }
+ if (cmdtab[i].pipe_err[0]) { CloseHandle(cmdtab[i].pipe_err[0]); cmdtab[i].pipe_err[0] = 0; }
+ if (cmdtab[i].pipe_err[1]) { CloseHandle(cmdtab[i].pipe_err[1]); cmdtab[i].pipe_err[1] = 0; }
+ string_free(&cmdtab[i].buffer_out); string_new(&cmdtab[i].buffer_out);
+ string_free(&cmdtab[i].buffer_err); string_new(&cmdtab[i].buffer_err);
+ cmdtab[i].exitcode = 0;
+ cmdtab[i].exit_reason = EXIT_OK;
+ }
+
+ return 1;
 }
 
-static void
-free_argv( char** args )
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+static void free_argv( char** args )
 {
- free( args[0] );
- free( args );
+ BJAM_FREE( args[0] );
+ BJAM_FREE( args );
+}
+
+int maxline()
+{
+ OSVERSIONINFO os_info;
+ os_info.dwOSVersionInfoSize = sizeof(os_info);
+ GetVersionEx(&os_info);
+
+ return (os_info.dwMajorVersion == 3)
+ ? 996 /* NT 3.5.1 */
+ : 2047 /* NT >= 4.x */
+ ;
 }
 
 /* Convert a command string into arguments for spawnvp. The original
@@ -130,8 +581,7 @@
  *
  * New strategy: break the string in at most one place.
  */
-static char**
-string_to_args( const char* string )
+static char** string_to_args( const char* string )
 {
     int src_len;
     int in_quote;
@@ -150,27 +600,21 @@
 
     /* Copy the input string into a buffer we can modify
      */
- line = (char*)malloc( src_len+1 );
+ line = (char*)BJAM_MALLOC_ATOMIC( src_len+1 );
     if (!line)
         return 0;
 
- if ( DEBUG_PROFILE )
- profile_memory( src_len+1 );
-
     /* allocate the argv array.
      * element 0: stores the path to the executable
      * element 1: stores the command-line arguments to the executable
      * element 2: NULL terminator
      */
- argv = (char**)malloc( 3 * sizeof(char*) );
+ argv = (char**)BJAM_MALLOC( 3 * sizeof(char*) );
     if (!argv)
     {
- free( line );
+ BJAM_FREE( line );
         return 0;
     }
-
- if ( DEBUG_PROFILE )
- profile_memory( 3 * sizeof(char*) );
     
     /* Strip quotes from the first command-line argument and find
      * where it ends. Quotes are illegal in Win32 pathnames, so we
@@ -197,7 +641,7 @@
 
     argv[1] = dst;
 
- /* Copy the rest of the arguments verbatim */
+ /* Copy the rest of the arguments verbatim */
     
     src_len -= src - string;
 
@@ -210,124 +654,10 @@
     return argv;
 }
 
-
-
-/* process a "del" or "erase" command under Windows 95/98 */
-static int
-process_del( char* command )
-{
- char** arg;
- char* p = command, *q;
- int wildcard = 0, result = 0;
-
- /* first of all, skip the command itself */
- if ( p[0] == 'd' )
- p += 3; /* assumes "del..;" */
- else if ( p[0] == 'e' )
- p += 5; /* assumes "erase.." */
- else
- return 1; /* invalid command */
-
- /* process all targets independently */
- for (;;)
- {
- /* skip leading spaces */
- while ( *p && isspace(*p) )
- p++;
-
- /* exit if we encounter an end of string */
- if (!*p)
- return 0;
-
- /* ignore toggles/flags */
- while (*p == '/')
- {
- p++;
- while ( *p && isalnum(*p) )
- p++;
- while (*p && isspace(*p) )
- ++p;
- }
-
-
- {
- int in_quote = 0;
- int wildcard = 0;
- int go_on = 1;
-
- q = p;
- while (go_on)
- {
- switch (*p)
- {
- case '"':
- in_quote = !in_quote;
- break;
-
- case '?':
- case '*':
- if (!in_quote)
- wildcard = 1;
- break;
-
- case '\0':
- if (in_quote)
- return 1;
- /* fall-through */
-
- case ' ':
- case '\t':
- if (!in_quote)
- {
- int len = p - q;
- int result;
- char* line;
-
- /* q..p-1 contains the delete argument */
- if ( len <= 0 )
- return 1;
-
- line = (char*)malloc( len+4+1 );
- if (!line)
- return 1;
- if ( DEBUG_PROFILE )
- profile_memory( len+4+1 );
-
- strncpy( line, "del ", 4 );
- strncpy( line+4, q, len );
- line[len+4] = '\0';
-
- if ( wildcard )
- result = system( line );
- else
- result = !DeleteFile( line+4 );
-
- free( line );
- if (result)
- return 1;
-
- go_on = 0;
- }
-
- default:
- ;
- }
- p++;
- } /* while (go_on) */
- }
- }
-}
-
-
-/*
- * onintr() - bump intr to note command interruption
- */
-
-void
-onintr( int disp )
+static void onintr( int disp )
 {
- intr++;
- printf( "...interrupted\n" );
+ intr++;
+ printf( "...interrupted\n" );
 }
 
 /*
@@ -387,58 +717,10 @@
         }
     }
     while (*p);
-
- /* Return the number of characters the command will occupy
- */
- return p - command;
-}
-
-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 { char* command; int result; } test;
- test tests[] = {
- { "x", 0 },
- { "x\n ", 0 },
- { "x\ny", 1 },
- { "x\n\n y", 1 },
- { "echo x > foo.bar", 1 },
- { "echo x < foo.bar", 1 },
- { "echo x \">\" foo.bar", 0 },
- { "echo x \"<\" foo.bar", 0 },
- { "echo x \\\">\\\" foo.bar", 1 },
- { "echo x \\\"<\\\" foo.bar", 1 }
- };
- int i;
- for ( i = 0; i < sizeof(tests)/sizeof(*tests); ++i)
- {
- assert( !can_spawn( tests[i].command ) == tests[i].result );
- }
-
- {
- char* long_command = malloc(MAXLINE + 10);
- assert( long_command != 0 );
- memset( long_command, 'x', MAXLINE + 9 );
- long_command[MAXLINE + 9] = 0;
- assert( can_spawn( long_command ) == MAXLINE + 9);
- free( long_command );
- }
-
- {
- /* Work around vc6 bug; it doesn't like escaped string
- * literals inside assert
- */
- char** argv = string_to_args("\"g++\" -c -I\"Foobar\"");
- char const expected[] = "-c -I\"Foobar\"";
-
- assert(!strcmp(argv[0], "g++"));
- assert(!strcmp(argv[1], expected));
- free_argv(argv);
- }
-#endif
+
+ /* Return the number of characters the command will occupy
+ */
+ return p - command;
 }
 
 /* 64-bit arithmetic helpers */
@@ -473,432 +755,197 @@
     return add_64(~t.dwHighDateTime, ~t.dwLowDateTime, 0, 1);
 }
 
-/* COnvert a FILETIME to a number of seconds */
+/* Convert a FILETIME to a number of seconds */
 static double filetime_seconds(FILETIME t)
 {
     return t.dwHighDateTime * (double)(1UL << 31) * 2 + t.dwLowDateTime * 1.0e-7;
 }
 
-static void
-record_times(int pid, timing_info* time)
+static void record_times(HANDLE process, timing_info* time)
 {
     FILETIME creation, exit, kernel, user;
- if (GetProcessTimes((HANDLE)pid, &creation, &exit, &kernel, &user))
+
+ if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
     {
         /* Compute the elapsed time */
-#if 0 /* We don't know how to get this number this on Unix */
+ #if 0 /* We don't know how to get this number on Unix */
         time->elapsed = filetime_seconds(
             add_FILETIME( exit, negate_FILETIME(creation) )
- );
-#endif
-
+ );
+ #endif
         time->system = filetime_seconds(kernel);
         time->user = filetime_seconds(user);
     }
         
- CloseHandle((HANDLE)pid);
+ /* CloseHandle((HANDLE)pid); */
 }
-
-
-/*
- * execcmd() - launch an async command execution
- */
-
-void
-execcmd(
- char *string,
- void (*func)( void *closure, int status, timing_info* ),
- void *closure,
- LIST *shell )
-{
- int pid;
- int slot;
- int raw_cmd = 0 ;
- char *argv_static[ MAXARGC + 1 ]; /* +1 for NULL */
- char **argv = argv_static;
- char *p;
-
- /* Check to see if we need to hack around the line-length limitation. */
- /* Look for a JAMSHELL setting of "%", indicating that the command
- * should be invoked directly */
- if ( shell && !strcmp(shell->string,"%") && !list_next(shell) )
- {
- raw_cmd = 1;
- shell = 0;
- }
-
- if ( !is_win95_defined )
- set_is_win95();
-
- /* Find a slot in the running commands table for this one. */
- if ( is_win95 )
- {
- /* only synchronous spans are supported on Windows 95/98 */
- slot = 0;
- }
- else
- {
- for( slot = 0; slot < MAXJOBS; slot++ )
- if( !cmdtab[ slot ].pid )
- break;
- }
- if( slot == MAXJOBS )
- {
- printf( "no slots for child!\n" );
- exit( EXITBAD );
- }
-
- if( !cmdtab[ slot ].tempfile )
- {
- const char *tempdir = path_tmpdir();
- DWORD procID = GetCurrentProcessId();
-
- /* SVA - allocate 64 other just to be safe */
- cmdtab[ slot ].tempfile = malloc( strlen( tempdir ) + 64 );
- if ( DEBUG_PROFILE )
- profile_memory( strlen( tempdir ) + 64 );
-
- sprintf( cmdtab[ slot ].tempfile, "%s\\jam%d-%02d.bat",
- tempdir, procID, slot );
- }
 
- /* Trim leading, ending white space */
+#define IO_BUFFER_SIZE (16*1024)
 
- while( isspace( *string ) )
- ++string;
+static char ioBuffer[IO_BUFFER_SIZE+1];
 
- /* Write to .BAT file unless the line would be too long and it
- * meets the other spawnability criteria.
- */
- if( raw_cmd && can_spawn( string ) >= MAXLINE )
- {
- if( DEBUG_EXECCMD )
- printf("Executing raw command directly\n");
- }
- else
+static void read_pipe(
+ HANDLE in, /* the pipe to read from */
+ string * out
+ )
+{
+ DWORD bytesInBuffer = 0;
+ DWORD bytesAvailable = 0;
+
+ do
     {
- FILE *f = 0;
- int tries = 0;
- raw_cmd = 0;
-
- /* Write command to bat file. For some reason this open can
- fails intermitently. But doing some retries works. Most likely
- this is due to a previously existing file of the same name that
- happens to be opened by an active virus scanner. Pointed out,
- and fix by Bronek Kozicki. */
- for (; !f && tries < 4; ++tries)
- {
- f = fopen( cmdtab[ slot ].tempfile, "w" );
- if ( !f && tries < 4 ) Sleep( 250 );
- }
- if (!f)
+ /* check if we have any data to read */
+ if ( ! PeekNamedPipe( in, ioBuffer, IO_BUFFER_SIZE, &bytesInBuffer, &bytesAvailable, NULL ) )
         {
- printf( "failed to write command file!\n" );
- exit( EXITBAD );
+ bytesAvailable = 0;
         }
- fputs( string, f );
- fclose( f );
-
- string = cmdtab[ slot ].tempfile;
         
- if( DEBUG_EXECCMD )
+ /* read in the available data */
+ if ( bytesAvailable > 0 )
         {
- if (shell)
- printf("using user-specified shell: %s", shell->string);
+ /* we only read in the available bytes, to avoid blocking */
+ if (
+ ReadFile( in, ioBuffer,
+ bytesAvailable <= IO_BUFFER_SIZE ? bytesAvailable : IO_BUFFER_SIZE,
+ &bytesInBuffer, NULL )
+ )
+ {
+ if ( bytesInBuffer > 0 )
+ {
+ /* clean up non-ascii chars */
+ int i;
+ for ( i = 0; i < bytesInBuffer; ++i )
+ {
+ if ((unsigned char)ioBuffer[i] < 1 ||
+ (unsigned char)ioBuffer[i] > 127 )
+ {
+ ioBuffer[i] = '?';
+ }
+ }
+ /* null, terminate */
+ ioBuffer[bytesInBuffer] = '\0';
+ /* append to the output */
+ string_append(out,ioBuffer);
+ /* subtract what we read in */
+ bytesAvailable -= bytesInBuffer;
+ }
+ else
+ {
+ /* likely read a error, bail out. */
+ bytesAvailable = 0;
+ }
+ }
             else
- printf("Executing through .bat file\n");
- }
- }
-
- /* Forumulate argv */
- /* If shell was defined, be prepared for % and ! subs. */
- /* Otherwise, use stock /bin/sh (on unix) or cmd.exe (on NT). */
-
- if( shell )
- {
- int i;
- char jobno[4];
- int gotpercent = 0;
-
- sprintf( jobno, "%d", slot + 1 );
-
- for( i = 0; shell && i < MAXARGC; i++, shell = list_next( shell ) )
- {
- switch( shell->string[0] )
             {
- case '%': argv[i] = string; gotpercent++; break;
- case '!': argv[i] = jobno; break;
- default: argv[i] = shell->string;
+ /* definitely read a error, bail out. */
+ bytesAvailable = 0;
             }
- if( DEBUG_EXECCMD )
- printf( "argv[%d] = '%s'\n", i, argv[i] );
         }
-
- if( !gotpercent )
- argv[i++] = string;
-
- argv[i] = 0;
     }
- else if (raw_cmd)
- {
- argv = string_to_args(string);
- }
- else
+ while ( bytesAvailable > 0 );
+}
+
+static void read_output()
+{
+ int i;
+
+ for ( i = 0; i < globs.jobs && i < MAXJOBS; ++i )
     {
- /* don't worry, this is ignored on Win95/98, see later.. */
- argv[0] = "cmd.exe";
- argv[1] = "/Q/C"; /* anything more is non-portable */
- argv[2] = string;
- argv[3] = 0;
+ /* read stdout data */
+ if (cmdtab[i].pipe_out[0])
+ read_pipe( cmdtab[i].pipe_out[0], & cmdtab[i].buffer_out );
+ /* read stderr data */
+ if (cmdtab[i].pipe_err[0])
+ read_pipe( cmdtab[i].pipe_err[0], & cmdtab[i].buffer_err );
     }
+}
 
- /* Catch interrupts whenever commands are running. */
-
- if( !cmdsrunning++ )
- istat = signal( SIGINT, onintr );
-
- /* Start the command */
+/* waits for a single child process command to complete, or the
+ timeout, whichever is first. returns the index of the completed
+ command, or -1. */
+static int try_wait(int timeoutMillis)
+{
+ int i, num_active, waiting;
+ HANDLE active_handles[MAXJOBS];
+ int active_procs[MAXJOBS];
 
- /* on Win95, we only do a synchronous call */
- if ( is_win95 )
+ for ( waiting = 1; waiting; )
     {
- static const char* hard_coded[] =
- {
- "del", "erase", "copy", "mkdir", "rmdir", "cls", "dir",
- "ren", "rename", "move", 0
- };
-
- const char** keyword;
- int len, spawn = 1;
- int result;
- timing_info time = {0,0};
-
- for ( keyword = hard_coded; keyword[0]; keyword++ )
- {
- len = strlen( keyword[0] );
- if ( strnicmp( string, keyword[0], len ) == 0 &&
- !isalnum(string[len]) )
- {
- /* this is one of the hard coded symbols, use 'system' to run */
- /* them.. except for "del"/"erase" */
- if ( keyword - hard_coded < 2 )
- result = process_del( string );
- else
- result = system( string );
-
- spawn = 0;
- break;
- }
- }
-
- if (spawn)
+ /* find the first completed child process */
+ for ( num_active = 0, i = 0; i < globs.jobs; ++i )
         {
- char** args;
-
- /* convert the string into an array of arguments */
- /* we need to take care of double quotes !! */
- args = string_to_args( string );
- if ( args )
+ /* if we have an already dead process, return it. */
+ cmdtab[i].exitcode = 0;
+ if ( GetExitCodeProcess( cmdtab[i].pi.hProcess, &cmdtab[i].exitcode ) )
             {
-#if 0
- char** arg;
- fprintf( stderr, "%s: ", args[0] );
- arg = args+1;
- while ( arg[0] )
+ if ( STILL_ACTIVE != cmdtab[i].exitcode )
                 {
- fprintf( stderr, " {%s}", arg[0] );
- arg++;
+ return i;
                 }
- fprintf( stderr, "\n" );
-#endif
- result = spawnvp( P_WAIT, args[0], args );
- record_times(result, &time);
- free_argv( args );
             }
- else
- result = 1;
+ /* it's running, add it to the list to watch for */
+ active_handles[num_active] = cmdtab[i].pi.hProcess;
+ active_procs[num_active] = i;
+ num_active += 1;
         }
- func( closure, result ? EXEC_CMD_FAIL : EXEC_CMD_OK, &time );
- return;
- }
-
- if( DEBUG_EXECCMD )
- {
- char **argp = argv;
-
- printf("Executing command");
- while(*argp != 0)
+
+ /* wait for a child to complete, or for our timeout window to expire */
+ if ( waiting )
         {
- printf(" [%s]", *argp);
- argp++;
+ WaitForMultipleObjects( num_active, active_handles, FALSE, timeoutMillis );
+ waiting = 0;
         }
- printf("\n");
     }
-
- /* the rest is for Windows NT only */
- /* spawn doesn't like quotes around the command name */
- if ( argv[0][0] == '"')
- {
- int l = strlen(argv[0]);
-
- /* Clobber any closing quote, shortening the string by one
- * element */
- if (argv[0][l-1] == '"')
- argv[0][l-1] = '\0';
-
- /* Move everything *including* the original terminating zero
- * back one place in memory, covering up the opening quote */
- memmove(argv[0],argv[0]+1,l);
- }
- if( ( pid = spawnvp( P_NOWAIT, argv[0], argv ) ) == -1 )
- {
- perror( "spawn" );
- exit( EXITBAD );
- }
- /* Save the operation for execwait() to find. */
-
- cmdtab[ slot ].pid = pid;
- cmdtab[ slot ].func = func;
- cmdtab[ slot ].closure = closure;
-
- /* Wait until we're under the limit of concurrent commands. */
- /* Don't trust globs.jobs alone. */
-
- while( cmdsrunning >= MAXJOBS || cmdsrunning >= globs.jobs )
- if( !execwait() )
- break;
     
- if (argv != argv_static)
- {
- free_argv(argv);
- }
+ return -1;
 }
 
-/*
- * execwait() - wait and drive at most one execution completion
- */
-
-int
-execwait()
+static int try_kill_one()
 {
- int i;
- int status, w;
- int rstat;
- timing_info time;
-
- /* Handle naive make1() which doesn't know if cmds are running. */
-
- if( !cmdsrunning )
- return 0;
-
- if ( is_win95 )
- return 0;
-
- /* Pick up process pid and status */
-
- while( ( w = wait( &status ) ) == -1 && errno == EINTR )
- ;
-
- if( w == -1 )
- {
- printf( "child process(es) lost!\n" );
- perror("wait");
- exit( EXITBAD );
- }
-
- /* Find the process in the cmdtab. */
-
- for( i = 0; i < MAXJOBS; i++ )
- if( w == cmdtab[ i ].pid )
- break;
-
- if( i == MAXJOBS )
- {
- printf( "waif child found!\n" );
- exit( EXITBAD );
- }
-
- record_times(cmdtab[i].pid, &time);
-
- /* Clear the temp file */
- if ( cmdtab[i].tempfile )
- unlink( cmdtab[ i ].tempfile );
-
- /* Drive the completion */
-
- if( !--cmdsrunning )
- signal( SIGINT, istat );
-
- if( intr )
- rstat = EXEC_CMD_INTR;
- else if( w == -1 || status != 0 )
- rstat = EXEC_CMD_FAIL;
- else
- rstat = EXEC_CMD_OK;
-
- cmdtab[ i ].pid = 0;
- /* SVA don't leak temp files */
- if(cmdtab[i].tempfile != NULL)
- {
- free(cmdtab[i].tempfile);
- cmdtab[i].tempfile = NULL;
- }
- (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time );
-
- return 1;
+ /* 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 )
+ {
+ double 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 */
+ close_alert(cmdtab[i].pi.hProcess);
+ /* we have a "runaway" job, kill it */
+ kill_process_tree(0,cmdtab[i].pi.hProcess);
+ /* and return it as complete, with the failure code */
+ GetExitCodeProcess( cmdtab[i].pi.hProcess, &cmdtab[i].exitcode );
+ /* mark it as a timeout */
+ cmdtab[i].exit_reason = EXIT_TIMEOUT;
+ return i;
+ }
+ }
+ }
+ return -1;
 }
 
-# if !defined( __BORLANDC__ )
-
-/* The possible result codes from check_process_exit, below */
-typedef enum { process_error, process_active, process_finished } process_state;
-
-/* Helper for my_wait() below. Checks to see whether the process has
- * exited and if so, records timing information.
- */
-static process_state
-check_process_exit(
- HANDLE process /* The process we're looking at */
-
- , int* status /* Storage for the finished process' exit
- * code. If the process is still active
- * this location is left untouched. */
-
- , HANDLE* active_handles /* Storage for the process handle if it is
- * found to be still active, or NULL. The
- * process is treated as though it is
- * complete. */
-
- , int* num_active /* The current length of active_handles */
-)
+static void close_alerts()
 {
- DWORD exitcode;
- process_state result;
-
- /* Try to get the process exit code */
- if (!GetExitCodeProcess(process, &exitcode))
- {
- result = process_error; /* signal an error */
- }
- else if (
- exitcode == STILL_ACTIVE /* If the process is still active */
- && active_handles != 0 /* and we've been passed a place to buffer it */
- )
- {
- active_handles[(*num_active)++] = process; /* push it onto the active stack */
- result = process_active;
- }
- else
+ /* we only attempt this every 5 seconds, or so, because it's
+ not a cheap operation, and we'll 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) )
     {
- *status = (int)((exitcode & 0xff) << 8);
- result = process_finished;
+ int i;
+ for ( i = 0; i < globs.jobs; ++i )
+ {
+ close_alert(cmdtab[i].pi.hProcess);
+ }
     }
-
- return result;
 }
 
-static double
-running_time(HANDLE process)
+/* calc the current running time of an *active* process */
+static double running_time(HANDLE process)
 {
     FILETIME creation, exit, kernel, user, current;
     if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
@@ -915,17 +962,6 @@
     return 0.0;
 }
 
-static double
-creation_time(HANDLE process)
-{
- FILETIME creation, exit, kernel, user, current;
- if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
- {
- return filetime_seconds(creation);
- }
- return 0.0;
-}
-
 /* it's just stupidly silly that one has to do this! */
 typedef struct PROCESS_BASIC_INFORMATION__ {
     LONG ExitStatus;
@@ -971,9 +1007,8 @@
 }
 
 /* not really optimal, or efficient, but it's easier this way, and it's not
-like we are going to be killing thousands, or even tens or processes. */
-static void
-kill_all(DWORD pid, HANDLE process)
+like we are going to be killing thousands, or even tens of processes. */
+static void kill_process_tree(DWORD pid, HANDLE process)
 {
     HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
     if ( !pid )
@@ -998,7 +1033,7 @@
                 HANDLE ph = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pinfo.th32ProcessID);
                 if (NULL != ph)
                 {
- kill_all(pinfo.th32ProcessID,ph);
+ kill_process_tree(pinfo.th32ProcessID,ph);
                     CloseHandle(ph);
                 }
             }
@@ -1009,12 +1044,21 @@
     TerminateProcess(process,-2);
 }
 
+static double creation_time(HANDLE process)
+{
+ FILETIME creation, exit, kernel, user, current;
+ if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
+ {
+ return filetime_seconds(creation);
+ }
+ return 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 parent, DWORD child)
+static int is_parent_child(DWORD parent, DWORD child)
 {
     HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
 
@@ -1109,8 +1153,7 @@
 typedef struct PROCESS_HANDLE_ID {HANDLE h; DWORD pid;} PROCESS_HANDLE_ID;
 
 /* This function is called by the operating system for each topmost window. */
-BOOL CALLBACK
-window_enum(HWND hwnd, LPARAM lParam)
+BOOL CALLBACK close_alert_window_enum(HWND hwnd, LPARAM lParam)
 {
     char buf[7] = {0};
     PROCESS_HANDLE_ID p = *((PROCESS_HANDLE_ID*) (lParam));
@@ -1152,109 +1195,18 @@
     return TRUE;
 }
 
-static void
-close_alert(HANDLE process)
+static void close_alert(HANDLE process)
 {
     DWORD pid = get_process_id(process);
     /* If process already exited or we just cannot get its process id, do not
     go any further */
     if (pid)
     {
- PROCESS_HANDLE_ID p = {process, pid};
- EnumWindows(&window_enum, (LPARAM) &p);
- }
-}
-
-static int
-my_wait( int *status )
-{
- int i, num_active = 0;
- DWORD exitcode, waitcode;
- HANDLE active_handles[MAXJOBS];
-
- /* first see if any non-waited-for processes are dead,
- * and return if so.
- */
- for ( i = 0; i < globs.jobs; i++ )
- {
- int pid = cmdtab[i].pid;
-
- if ( pid )
- {
- process_state state
- = check_process_exit((HANDLE)pid, status, active_handles, &num_active);
-
- if ( state == process_error )
- goto FAILED;
- else if ( state == process_finished )
- return pid;
- }
- }
-
- /* if a child exists, wait for it to die */
- if ( !num_active )
- {
- errno = ECHILD;
- return -1;
- }
-
- if ( globs.timeout > 0 )
- {
- unsigned int alert_wait = 1;
- /* with a timeout we wait for a finish or a timeout, we check every second
- to see if something timed out */
- for (waitcode = WAIT_TIMEOUT; waitcode == WAIT_TIMEOUT; ++alert_wait)
- {
- waitcode = WaitForMultipleObjects( num_active, active_handles, FALSE, 1*1000 /* 1 second */ );
- if ( waitcode == WAIT_TIMEOUT )
- {
- /* check if any jobs have surpassed the maximum run time. */
- for ( i = 0; i < num_active; ++i )
- {
- double t = running_time(active_handles[i]);
-
- /* periodically (each 5 secs) check and close message boxes
- displayed by any of our child processes */
- if ((alert_wait % ((unsigned int) 5)) == 0)
- close_alert(active_handles[i]);
-
- if ( t > (double)globs.timeout )
- {
- /* the job may have left an alert dialog around,
- try and get rid of it before killing */
- close_alert(active_handles[i]);
- /* we have a "runaway" job, kill it */
- kill_all(0,active_handles[i]);
- /* indicate the job "finished" so we query its status below */
- waitcode = WAIT_ABANDONED_0+i;
- }
- }
- }
- }
- }
- else
- {
- /* no timeout, so just wait indefinately for something to finish */
- waitcode = WaitForMultipleObjects( num_active, active_handles, FALSE, INFINITE );
+ PROCESS_HANDLE_ID p;
+ p.h = process;
+ p.pid = pid;
+ EnumWindows(&close_alert_window_enum, (LPARAM) &p);
     }
- if ( waitcode != WAIT_FAILED )
- {
- if ( waitcode >= WAIT_ABANDONED_0
- && waitcode < WAIT_ABANDONED_0 + num_active )
- i = waitcode - WAIT_ABANDONED_0;
- else
- i = waitcode - WAIT_OBJECT_0;
-
- if ( check_process_exit(active_handles[i], status, 0, 0) == process_finished )
- return (int)active_handles[i];
- }
-
-FAILED:
- errno = GetLastError();
- return -1;
-
 }
 
-# endif /* !__BORLANDC__ */
-
 # endif /* USE_EXECNT */

Modified: branches/release/tools/jam/src/execunix.c
==============================================================================
--- branches/release/tools/jam/src/execunix.c (original)
+++ branches/release/tools/jam/src/execunix.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,6 @@
 /*
  * Copyright 1993, 1995 Christopher Seiwald.
+ * Copyright 2007 Noel Belcourt.
  *
  * This file is part of Jam - see jam.c for Copyright information.
  */
@@ -7,9 +8,15 @@
 # include "jam.h"
 # include "lists.h"
 # include "execcmd.h"
+# include "output.h"
 # include <errno.h>
+# include <signal.h>
+# include <stdio.h>
 # include <time.h>
 # include <unistd.h> /* needed for vfork(), _exit() prototypes */
+# include <sys/resource.h>
+# include <sys/times.h>
+# include <sys/wait.h>
 
 #if defined(sun) || defined(__sun) || defined(linux)
 #include <wait.h>
@@ -53,15 +60,31 @@
  * 06/02/97 (gsar) - full async multiprocess support for Win32
  */
 
+static clock_t tps = 0;
+static struct timeval tv;
+static int select_timeout = 0;
 static int intr = 0;
 static int cmdsrunning = 0;
-static void (*istat)( int );
+static struct tms old_time;
+
+#define OUT 0
+#define ERR 1
 
 static struct
 {
- int pid; /* on win32, a real process handle */
- void (*func)( void *closure, int status, timing_info* );
- void *closure;
+ int pid; /* on win32, a real process handle */
+ int fd[2]; /* file descriptors for stdout and stderr */
+ FILE *stream[2]; /* child's stdout (0) and stderr (1) file stream */
+ clock_t start_time; /* start time of child process */
+ int exit_reason; /* termination status */
+ int action_length; /* length of action string */
+ int target_length; /* length of target string */
+ char *action; /* buffer to hold action and target invoked */
+ char *target; /* buffer to hold action and target invoked */
+ char *command; /* buffer to hold command being invoked */
+ char *buffer[2]; /* buffer to hold stdout and stderr, if any */
+ void (*func)( void *closure, int status, timing_info*, char *, char * );
+ void *closure;
 } cmdtab[ MAXJOBS ] = {{0}};
 
 /*
@@ -82,12 +105,15 @@
 void
 execcmd(
         char *string,
- void (*func)( void *closure, int status, timing_info* ),
+ void (*func)( void *closure, int status, timing_info*, char *, char * ),
         void *closure,
- LIST *shell )
+ LIST *shell,
+ char *action,
+ char *target )
 {
- int pid;
- int slot;
+ static int initialized = 0;
+ int out[2], err[2];
+ int slot, len;
         char *argv[ MAXARGC + 1 ]; /* +1 for NULL */
 
         /* Find a slot in the running commands table for this one. */
@@ -102,7 +128,6 @@
             exit( EXITBAD );
         }
 
-
         /* Forumulate argv */
         /* If shell was defined, be prepared for % and ! subs. */
         /* Otherwise, use stock /bin/sh (on unix) or cmd.exe (on NT). */
@@ -140,174 +165,375 @@
             argv[3] = 0;
         }
 
- /* Catch interrupts whenever commands are running. */
+ /* increment jobs running */
+ ++cmdsrunning;
+
+ /* save off actual command string */
+ cmdtab[ slot ].command = BJAM_MALLOC_ATOMIC(strlen(string)+1);
+ strcpy(cmdtab[slot].command, string);
+
+ /* initialize only once */
+ if ( ! initialized ) {
+ times(&old_time);
+ initialized = 1;
+ }
+
+ /* create pipe from child to parent */
+
+ if (pipe(out) < 0)
+ exit(EXITBAD);
+
+ fcntl(out[0], F_SETFL, O_NONBLOCK);
+ fcntl(out[1], F_SETFL, O_NONBLOCK);
+
+ if (pipe(err) < 0)
+ exit(EXITBAD);
 
- if( !cmdsrunning++ )
- istat = signal( SIGINT, onintr );
+ fcntl(err[0], F_SETFL, O_NONBLOCK);
+ fcntl(err[1], F_SETFL, O_NONBLOCK);
 
         /* Start the command */
 
- if ((pid = vfork()) == 0)
+ 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 == 0) tps = sysconf(_SC_CLK_TCK);
+ }
+
+ if ((cmdtab[slot].pid = vfork()) == 0)
            {
- execvp( argv[0], argv );
- _exit(127);
- }
+ close(out[0]);
+ close(err[0]);
+
+ dup2(out[1], STDOUT_FILENO);
 
- if( pid == -1 )
+ if (globs.pipe_action == 0)
+ {
+ dup2(out[1], STDERR_FILENO);
+ close(err[1]);
+ }
+ else
+ dup2(err[1], STDERR_FILENO);
+
+ /* 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);
+ }
+ setpgid(cmdtab[slot].pid, cmdtab[slot].pid);
+
+ execvp( argv[0], argv );
+ _exit(127);
+ }
+ else if( cmdtab[slot].pid == -1 )
         {
             perror( "vfork" );
             exit( EXITBAD );
         }
 
+ /* close write end of pipes */
+ close(out[1]);
+ close(err[1]);
+
+ /* child writes stdout to out[1], parent reads from out[0] */
+ cmdtab[slot].fd[OUT] = out[0];
+ cmdtab[slot].stream[OUT] = fdopen(cmdtab[slot].fd[OUT], "rb");
+ if (cmdtab[slot].stream[OUT] == NULL) {
+ perror( "fdopen" );
+ exit( EXITBAD );
+ }
+
+ /* child writes stderr to err[1], parent reads from err[0] */
+ if (globs.pipe_action == 0)
+ {
+ close(err[0]);
+ }
+ else
+ {
+ cmdtab[slot].fd[ERR] = err[0];
+ cmdtab[slot].stream[ERR] = fdopen(cmdtab[slot].fd[ERR], "rb");
+ if (cmdtab[slot].stream[ERR] == NULL) {
+ perror( "fdopen" );
+ exit( EXITBAD );
+ }
+ }
+
+ /* ensure enough room for rule and target name */
+
+ if (action && target)
+ {
+ len = strlen(action) + 1;
+ if (cmdtab[slot].action_length < len)
+ {
+ BJAM_FREE(cmdtab[ slot ].action);
+ cmdtab[ slot ].action = BJAM_MALLOC_ATOMIC(len);
+ cmdtab[ slot ].action_length = len;
+ }
+ strcpy(cmdtab[ slot ].action, action);
+ len = strlen(target) + 1;
+ if (cmdtab[slot].target_length < len)
+ {
+ BJAM_FREE(cmdtab[ slot ].target);
+ cmdtab[ slot ].target = BJAM_MALLOC_ATOMIC(len);
+ cmdtab[ slot ].target_length = len;
+ }
+ strcpy(cmdtab[ slot ].target, target);
+ }
+ else
+ {
+ BJAM_FREE(cmdtab[ slot ].action);
+ BJAM_FREE(cmdtab[ slot ].target);
+ cmdtab[ slot ].action = 0;
+ cmdtab[ slot ].target = 0;
+ cmdtab[ slot ].action_length = 0;
+ cmdtab[ slot ].target_length = 0;
+ }
+
         /* Save the operation for execwait() to find. */
 
- cmdtab[ slot ].pid = pid;
         cmdtab[ slot ].func = func;
         cmdtab[ slot ].closure = closure;
 
         /* Wait until we're under the limit of concurrent commands. */
         /* Don't trust globs.jobs alone. */
 
- while( cmdsrunning >= MAXJOBS || cmdsrunning >= globs.jobs )
- if( !execwait() )
- break;
+ while( cmdsrunning >= MAXJOBS || cmdsrunning >= globs.jobs )
+ if( !execwait() )
+ break;
 }
 
-/*
- * execwait() - wait and drive at most one execution completion
+/* returns 1 if file is closed, 0 if descriptor is still live
+ *
+ * i is index into cmdtab
+ *
+ * s (stream) indexes
+ *
+ * cmdtab[i].stream[s]
+ * cmdtab[i].buffer[s] and
+ * cmdtab[i].fd[s]
  */
 
-int
-execwait()
+int read_descriptor(int i, int s)
 {
- int i;
- int status, w;
- int rstat;
- timing_info time;
- struct tms old_time, new_time;
-
- /* Handle naive make1() which doesn't know if cmds are running. */
+ int ret, len;
+ char buffer[BUFSIZ];
 
- if( !cmdsrunning )
- return 0;
-
- times(&old_time);
-
- /* Pick up process pid and status */
- while( ( w = wait( &status ) ) == -1 && errno == EINTR )
- ;
-
- if( w == -1 )
- {
- printf( "child process(es) lost!\n" );
- perror("wait");
- exit( EXITBAD );
- }
-
- times(&new_time);
+ while (0 < (ret = fread(buffer, sizeof(char), BUFSIZ-1, cmdtab[i].stream[s])))
+ {
+ buffer[ret] = 0;
+ if (!cmdtab[i].buffer[s])
+ {
+ /* never been allocated */
+ cmdtab[i].buffer[s] = (char*)BJAM_MALLOC_ATOMIC(ret+1);
+ memcpy(cmdtab[i].buffer[s], buffer, ret+1);
+ }
+ else
+ {
+ /* previously allocated */
+ char *tmp = cmdtab[i].buffer[s];
+ len = strlen(tmp);
+ cmdtab[i].buffer[s] = (char*)BJAM_MALLOC_ATOMIC(len+ret+1);
+ memcpy(cmdtab[i].buffer[s], tmp, len);
+ memcpy(cmdtab[i].buffer[s]+len, buffer, ret+1);
+ BJAM_FREE(tmp);
+ }
+ }
 
- time.system = (double)(new_time.tms_cstime - old_time.tms_cstime) / CLOCKS_PER_SEC;
- time.user = (double)(new_time.tms_cutime - old_time.tms_cutime) / CLOCKS_PER_SEC;
-
- /* Find the process in the cmdtab. */
+ return feof(cmdtab[i].stream[s]);
+}
 
- for( i = 0; i < MAXJOBS; i++ )
- if( w == cmdtab[ i ].pid )
- break;
+void close_streams(int i, int s)
+{
+ /* close the stream and pipe descriptor */
+ fclose(cmdtab[i].stream[s]);
+ cmdtab[i].stream[s] = 0;
+
+ close(cmdtab[i].fd[s]);
+ cmdtab[i].fd[s] = 0;
+}
 
- if( i == MAXJOBS )
- {
- printf( "waif child found!\n" );
- exit( EXITBAD );
- }
+void populate_file_descriptors(int *fmax, fd_set *fds)
+{
+ int i, fd_max = 0;
+ struct tms buf;
+ clock_t current = times(&buf);
+ select_timeout = globs.timeout;
+
+ /* compute max read file descriptor for use in select */
+ FD_ZERO(fds);
+ for (i=0; i<globs.jobs; ++i)
+ {
+ if (0 < cmdtab[i].fd[OUT])
+ {
+ fd_max = fd_max < cmdtab[i].fd[OUT] ? cmdtab[i].fd[OUT] : fd_max;
+ FD_SET(cmdtab[i].fd[OUT], fds);
+ }
+ if (globs.pipe_action != 0)
+ {
+ if (0 < cmdtab[i].fd[ERR])
+ {
+ fd_max = fd_max < cmdtab[i].fd[ERR] ? cmdtab[i].fd[ERR] : fd_max;
+ FD_SET(cmdtab[i].fd[ERR], fds);
+ }
+ }
+
+ if (globs.timeout && cmdtab[i].pid) {
+ clock_t consumed = (current - cmdtab[i].start_time) / tps;
+ clock_t process_timesout = globs.timeout - consumed;
+ if (0 < process_timesout && process_timesout < select_timeout) {
+ select_timeout = process_timesout;
+ }
+ if (globs.timeout <= consumed) {
+ killpg(cmdtab[i].pid, SIGKILL);
+ cmdtab[i].exit_reason = EXIT_TIMEOUT;
+ }
+ }
+ }
+ *fmax = fd_max;
+}
 
-
- /* Drive the completion */
+/*
+ * execwait() - wait and drive at most one execution completion
+ */
 
- if( !--cmdsrunning )
- signal( SIGINT, istat );
+int
+execwait()
+{
+ int i, ret, fd_max;
+ int pid, status, finished;
+ int rstat;
+ timing_info time;
+ fd_set fds;
+ struct tms new_time;
 
- if( intr )
- rstat = EXEC_CMD_INTR;
- else if( w == -1 || status != 0 )
- rstat = EXEC_CMD_FAIL;
- else
- rstat = EXEC_CMD_OK;
+ /* Handle naive make1() which doesn't know if cmds are running. */
 
- cmdtab[ i ].pid = 0;
+ if( !cmdsrunning )
+ return 0;
 
- (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time );
+ /* process children that signaled */
+ finished = 0;
+ while (!finished && cmdsrunning)
+ {
+ /* compute max read file descriptor for use in select */
+ populate_file_descriptors(&fd_max, &fds);
 
- return 1;
-}
+ if (0 < globs.timeout) {
+ /* force select to timeout so we can terminate expired processes */
+ tv.tv_sec = select_timeout;
+ tv.tv_usec = 0;
+
+ /* select will wait until: io on a descriptor, a signal, or we time out */
+ ret = select(fd_max+1, &fds, 0, 0, &tv);
+ }
+ else {
+ /* select will wait until io on a descriptor or a signal */
+ ret = select(fd_max+1, &fds, 0, 0, 0);
+ }
+
+ if (0 < ret)
+ {
+ for (i=0; i<globs.jobs; ++i)
+ {
+ int out = 0, err = 0;
+ if (FD_ISSET(cmdtab[i].fd[OUT], &fds))
+ out = read_descriptor(i, OUT);
+
+ if (FD_ISSET(cmdtab[i].fd[ERR], &fds))
+ err = read_descriptor(i, ERR);
+
+ /* if feof on either descriptor, then we're done */
+ if (out || err)
+ {
+ /* close the stream and pipe descriptors */
+ close_streams(i, OUT);
+ if (globs.pipe_action != 0)
+ close_streams(i, ERR);
+
+ /* reap the child and release resources */
+ pid = waitpid(cmdtab[i].pid, &status, 0);
+
+ if (pid == cmdtab[i].pid)
+ {
+ finished = 1;
+ pid = 0;
+ cmdtab[i].pid = 0;
+
+ /* set reason for exit if not timed out */
+ if (WIFEXITED(status))
+ {
+ if (0 == WEXITSTATUS(status))
+ cmdtab[i].exit_reason = EXIT_OK;
+ else
+ cmdtab[i].exit_reason = EXIT_FAIL;
+ }
+
+ /* print out the rule and target name */
+ out_action(cmdtab[i].action, cmdtab[i].target,
+ cmdtab[i].command, cmdtab[i].buffer[OUT], cmdtab[i].buffer[ERR],
+ cmdtab[i].exit_reason);
 
-# if defined( OS_NT ) && !defined( __BORLANDC__ )
+ times(&new_time);
 
-# define WIN32_LEAN_AND_MEAN
+ time.system = (double)(new_time.tms_cstime - old_time.tms_cstime) / CLOCKS_PER_SEC;
+ time.user = (double)(new_time.tms_cutime - old_time.tms_cutime) / CLOCKS_PER_SEC;
+
+ old_time = new_time;
 
-# include <windows.h> /* do the ugly deed */
+ /* Drive the completion */
 
-static int
-my_wait( int *status )
-{
- int i, num_active = 0;
- DWORD exitcode, waitcode;
- static HANDLE *active_handles = 0;
+ --cmdsrunning;
 
- if (!active_handles)
- {
- active_handles = (HANDLE *)malloc(globs.jobs * sizeof(HANDLE) );
- if ( DEBUG_PROFILE )
- profile_memory( globs.jobs * sizeof(HANDLE) );
+ if( intr )
+ rstat = EXEC_CMD_INTR;
+ else if( status != 0 )
+ rstat = EXEC_CMD_FAIL;
+ else
+ rstat = EXEC_CMD_OK;
+
+ /* assume -p0 in effect so only pass buffer[0] containing merged output */
+ (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time, cmdtab[i].command, cmdtab[i].buffer[0] );
+
+ BJAM_FREE(cmdtab[i].buffer[OUT]);
+ cmdtab[i].buffer[OUT] = 0;
+
+ BJAM_FREE(cmdtab[i].buffer[ERR]);
+ cmdtab[i].buffer[ERR] = 0;
+
+ BJAM_FREE(cmdtab[i].command);
+ cmdtab[i].command = 0;
+
+ cmdtab[i].func = 0;
+ cmdtab[i].closure = 0;
+ cmdtab[i].start_time = 0;
+ }
+ else
+ {
+ printf("unknown pid %d with errno = %d\n", pid, errno);
+ exit(EXITBAD);
+ }
+ }
+ }
+ }
     }
 
- /* first see if any non-waited-for processes are dead,
- * and return if so.
- */
- for ( i = 0; i < globs.jobs; i++ ) {
- if ( cmdtab[i].pid ) {
- if ( GetExitCodeProcess((HANDLE)cmdtab[i].pid, &exitcode) ) {
- if ( exitcode == STILL_ACTIVE )
- active_handles[num_active++] = (HANDLE)cmdtab[i].pid;
- else {
- CloseHandle((HANDLE)cmdtab[i].pid);
- *status = (int)((exitcode & 0xff) << 8);
- return cmdtab[i].pid;
- }
- }
- else
- goto FAILED;
- }
- }
-
- /* if a child exists, wait for it to die */
- if ( !num_active ) {
- errno = ECHILD;
- return -1;
- }
- waitcode = WaitForMultipleObjects( num_active,
- active_handles,
- FALSE,
- INFINITE );
- if ( waitcode != WAIT_FAILED ) {
- if ( waitcode >= WAIT_ABANDONED_0
- && waitcode < WAIT_ABANDONED_0 + num_active )
- i = waitcode - WAIT_ABANDONED_0;
- else
- i = waitcode - WAIT_OBJECT_0;
- if ( GetExitCodeProcess(active_handles[i], &exitcode) ) {
- CloseHandle(active_handles[i]);
- *status = (int)((exitcode & 0xff) << 8);
- return (int)active_handles[i];
- }
- }
-
-FAILED:
- errno = GetLastError();
- return -1;
-
+ return 1;
 }
 
-# endif /* NT && !__BORLANDC__ */
-
 # endif /* USE_EXECUNIX */

Modified: branches/release/tools/jam/src/execvms.c
==============================================================================
--- branches/release/tools/jam/src/execvms.c (original)
+++ branches/release/tools/jam/src/execvms.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -49,9 +49,11 @@
 void
 execcmd(
         char *string,
- void (*func)( void *closure, int status ),
+ void (*func)( void *closure, int status, timing_info*, char *, char * ),
         void *closure,
- LIST *shell )
+ LIST *shell,
+ char *rule_name,
+ char *target )
 {
         char *s, *e, *p;
         int rstat = EXEC_CMD_OK;

Modified: branches/release/tools/jam/src/expand.c
==============================================================================
--- branches/release/tools/jam/src/expand.c (original)
+++ branches/release/tools/jam/src/expand.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -11,11 +11,12 @@
 # include "pathsys.h"
 # include "newstr.h"
 # include <assert.h>
+# include <stdlib.h>
+# include <limits.h>
 
 # ifdef OS_CYGWIN
 # include <sys/cygwin.h>
 # include <windows.h>
-# include <stdlib.h>
 # endif
 
 /*
@@ -90,18 +91,55 @@
 
     /* This gets alot of cases: $(<) and $(>) */
 
- if( in[0] == '$' && in[1] == '(' && in[3] == ')' && !in[4] )
+ if( in[0] == '$' && in[1] == '(' && in[3] == ')' && in[4] == '\0' )
     {
         switch( in[2] )
         {
- case '1':
         case '<':
             return list_copy( l, lol_get( lol, 0 ) );
 
- case '2':
         case '>':
             return list_copy( l, lol_get( lol, 1 ) );
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ return list_copy( l, lol_get( lol, in[2]-'1' ) );
+ }
+ }
+
+ /* Expand @() files, to single item plus accompanying file. */
+
+ if ( in[0] == '@' && in[1] == '(' && *(end-1) == ')' )
+ {
+ /* We try the expansion until it fits within the propspective output buffer. */
+ char * at_buf = 0;
+ int at_size = MAXJPATH;
+ int at_len = 0;
+ do
+ {
+ BJAM_FREE(at_buf);
+ at_buf = (char*)BJAM_MALLOC_ATOMIC(at_size + 1);
+ at_len = var_string( in, at_buf, at_size, lol );
+ at_size *= 2;
+ } while ( at_len < 0 && at_size < INT_MAX / 2 );
+ /* Return the result as a single item list. */
+ if ( at_len > 0 )
+ {
+ LIST * r;
+ string_copy( buf, at_buf );
+ r = list_new( l, newstr( buf->value) );
+ string_free( buf );
+ BJAM_FREE(at_buf);
+ return r;
         }
+ BJAM_FREE(at_buf);
     }
 
     /* Just try simple copy of in to out. */

Modified: branches/release/tools/jam/src/filent.c
==============================================================================
--- branches/release/tools/jam/src/filent.c (original)
+++ branches/release/tools/jam/src/filent.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -12,7 +12,6 @@
  */
 
 # include "jam.h"
-# include "debug.h"
 
 # include "filesys.h"
 # include "pathsys.h"
@@ -306,9 +305,7 @@
                 ** 15 characters (ie. don't fit into a ar_name
                 */
 
- string_table = malloc(lar_size+1);
- if ( DEBUG_PROFILE )
- profile_memory( lar_size+1 );
+ string_table = BJAM_MALLOC_ATOMIC(lar_size+1);
                 if (read(fd, string_table, lar_size) != lar_size)
                     printf("error reading string table\n");
                 string_table[lar_size] = '\0';

Modified: branches/release/tools/jam/src/fileunix.c
==============================================================================
--- branches/release/tools/jam/src/fileunix.c (original)
+++ branches/release/tools/jam/src/fileunix.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -12,7 +12,6 @@
  */
 
 # include "jam.h"
-# include "debug.h"
 # include "filesys.h"
 # include "strings.h"
 # include "pathsys.h"
@@ -326,9 +325,7 @@
                     ** 15 characters (ie. don't fit into a ar_name
                     */
 
- string_table = (char *)malloc(lar_size);
- if ( DEBUG_PROFILE )
- profile_memory( lar_size );
+ string_table = (char *)BJAM_MALLOC_ATOMIC(lar_size);
                     lseek(fd, offset + SARHDR, 0);
                     if (read(fd, string_table, lar_size) != lar_size)
                         printf("error reading string table\n");
@@ -365,7 +362,7 @@
         }
 
         if (string_table)
- free(string_table);
+ BJAM_FREE(string_table);
 
         close( fd );
 

Modified: branches/release/tools/jam/src/frames.c
==============================================================================
--- branches/release/tools/jam/src/frames.c (original)
+++ branches/release/tools/jam/src/frames.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,7 +7,6 @@
 # include "frames.h"
 # include "lists.h"
 
-
 void frame_init( FRAME* frame )
 {
     frame->prev = 0;

Modified: branches/release/tools/jam/src/frames.h
==============================================================================
--- branches/release/tools/jam/src/frames.h (original)
+++ branches/release/tools/jam/src/frames.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -24,6 +24,14 @@
     char* rulename;
 };
 
+/* When call into Python is in progress, this
+ variable points to the bjam frame that
+ was current at the moment of call. When the call
+ completes, the variable is not defined. Further,
+ if Jam calls Python which calls Jam and so on,
+ this variable only keeps the most recent Jam frame. */
+extern struct frame *frame_before_python_call;
+
 void frame_init( FRAME* ); /* implemented in compile.c */
 void frame_free( FRAME* ); /* implemented in compile.c */
 

Modified: branches/release/tools/jam/src/hash.c
==============================================================================
--- branches/release/tools/jam/src/hash.c (original)
+++ branches/release/tools/jam/src/hash.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,7 +7,6 @@
 # include "jam.h"
 # include "hash.h"
 # include "compile.h"
-#include "debug.h"
 # include <assert.h>
 
 /*
@@ -91,6 +90,53 @@
 
 static void hashrehash( struct hash *hp );
 static void hashstat( struct hash *hp );
+static void * hash_mem_alloc(size_t datalen, size_t size);
+static void hash_mem_free(size_t datalen, void * data);
+#ifdef OPT_BOEHM_GC
+static void hash_mem_finalizer(char * key, struct hash * hp);
+#endif
+
+static unsigned int hash_keyval( const char * key_ )
+{
+ const unsigned char * key = (const unsigned char *)key_;
+ unsigned int keyval = *key;
+ while( *key )
+ keyval = keyval * 2147059363 + *key++;
+ return keyval;
+}
+
+#define hash_bucket(hp,keyval) ((hp)->tab.base + ( (keyval) % (hp)->tab.nel ))
+
+/* Find the hash item for the given data. Returns pointer to the
+ item and if given a pointer to the item before the found item.
+ If it's the first item in a bucket, there is no previous item,
+ and zero is returned for the previous item instead.
+*/
+static ITEM * hash_search(
+ struct hash *hp,
+ unsigned int keyval,
+ const char * keydata,
+ ITEM ** previous )
+{
+ ITEM * i = *hash_bucket(hp,keyval);
+ ITEM * p = 0;
+
+ for ( ; i; i = i->hdr.next )
+ {
+ if( keyval == i->hdr.keyval &&
+ !strcmp( i->data.key, keydata ) )
+ {
+ if (previous)
+ {
+ *previous = p;
+ }
+ return i;
+ }
+ p = i;
+ }
+
+ return 0;
+}
 
 /*
  * hash_free() - remove the given item from the table if it's there.
@@ -100,38 +146,28 @@
  */
 int
 hash_free(
- register struct hash *hp,
- HASHDATA *data)
+ register struct hash *hp,
+ HASHDATA *data)
 {
- ITEM **prev;
- register ITEM **i;
- unsigned char *b = (unsigned char*)data->key;
- unsigned int keyval;
-
- keyval = *b;
-
- while( *b )
- keyval = keyval * 2147059363 + *b++;
-
- prev = hp->tab.base + ( keyval % hp->tab.nel );
- while(*prev )
+ ITEM * i = 0;
+ ITEM * prev = 0;
+ unsigned int keyval = hash_keyval(data->key);
+
+ i = hash_search( hp, keyval, data->key, &prev );
+ if (i)
     {
- register ITEM* i = *prev;
- if( keyval == i->hdr.keyval &&
- !strcmp( i->data.key, data->key ) )
- {
- /* unlink the record from the hash chain */
- *prev = i->hdr.next;
- /* link it into the freelist */
- i->hdr.next = hp->items.free;
- hp->items.free = i;
- /* mark it free so we skip it during enumeration */
- i->data.key = 0;
- /* we have another item */
- hp->items.more++;
- return 1;
- }
- prev = &i->hdr.next;
+ /* mark it free so we skip it during enumeration */
+ i->data.key = 0;
+ /* unlink the record from the hash chain */
+ if (prev) prev->hdr.next = i->hdr.next;
+ else *hash_bucket(hp,keyval) = i->hdr.next;
+ /* link it into the freelist */
+ i->hdr.next = hp->items.free;
+ hp->items.free = i;
+ /* we have another item */
+ hp->items.more++;
+
+ return 1;
     }
     return 0;
 }
@@ -146,10 +182,9 @@
         HASHDATA **data,
         int enter )
 {
- ITEM **base;
         register ITEM *i;
- unsigned char *b = (unsigned char*)(*data)->key;
- unsigned int keyval;
+ char *b = (*data)->key;
+ unsigned int keyval = hash_keyval(b);
     
     #ifdef HASH_DEBUG_PROFILE
     profile_frame prof[1];
@@ -168,28 +203,21 @@
         #endif
             return 0;
     }
-
- keyval = *b;
-
- while( *b )
- keyval = keyval * 2147059363 + *b++;
-
- base = hp->tab.base + ( keyval % hp->tab.nel );
-
- for( i = *base; i; i = i->hdr.next )
- if( keyval == i->hdr.keyval &&
- !strcmp( i->data.key, (*data)->key ) )
- {
- *data = &i->data;
+
+ i = hash_search( hp, keyval, (*data)->key, 0 );
+ if (i)
+ {
+ *data = &i->data;
         #ifdef HASH_DEBUG_PROFILE
- if ( DEBUG_PROFILE )
- profile_exit( prof );
+ if ( DEBUG_PROFILE ) profile_exit( prof );
         #endif
- return !0;
- }
+ return !0;
+ }
 
- if( enter )
- {
+ if( enter )
+ {
+ ITEM **base = hash_bucket(hp,keyval);
+
         /* try to grab one from the free list */
         if ( hp->items.free )
         {
@@ -202,13 +230,19 @@
             i = (ITEM *)hp->items.next;
             hp->items.next += hp->items.size;
         }
- hp->items.more--;
- memcpy( (char *)&i->data, (char *)*data, hp->items.datalen );
- i->hdr.keyval = keyval;
- i->hdr.next = *base;
- *base = i;
- *data = &i->data;
- }
+ hp->items.more--;
+ memcpy( (char *)&i->data, (char *)*data, hp->items.datalen );
+ i->hdr.keyval = keyval;
+ i->hdr.next = *base;
+ *base = i;
+ *data = &i->data;
+ #ifdef OPT_BOEHM_GC
+ if (sizeof(HASHDATA) == hp->items.datalen)
+ {
+ GC_REGISTER_FINALIZER(i->data.key,&hash_mem_finalizer,hp,0,0);
+ }
+ #endif
+ }
 
     #ifdef HASH_DEBUG_PROFILE
     if ( DEBUG_PROFILE )
@@ -225,24 +259,18 @@
 {
         int i = ++hp->items.list;
         hp->items.more = i ? 2 * hp->items.nel : hp->inel;
- hp->items.next = (char *)malloc( hp->items.more * hp->items.size );
+ hp->items.next = (char *)hash_mem_alloc( hp->items.datalen, hp->items.more * hp->items.size );
     hp->items.free = 0;
-
- if ( DEBUG_PROFILE )
- profile_memory( hp->items.more * hp->items.size );
     
         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 )
- free( (char *)hp->tab.base );
+ hash_mem_free( hp->items.datalen, (char *)hp->tab.base );
 
         hp->tab.nel = hp->items.nel * hp->bloat;
- hp->tab.base = (ITEM **)malloc( hp->tab.nel * sizeof(ITEM **) );
-
- if ( DEBUG_PROFILE )
- profile_memory( hp->tab.nel * sizeof(ITEM **) );
+ hp->tab.base = (ITEM **)hash_mem_alloc( hp->items.datalen, hp->tab.nel * sizeof(ITEM **) );
 
         memset( (char *)hp->tab.base, '\0', hp->tab.nel * sizeof( ITEM * ) );
 
@@ -297,10 +325,7 @@
         int datalen,
         char *name )
 {
- struct hash *hp = (struct hash *)malloc( sizeof( *hp ) );
-
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( *hp ) );
+ struct hash *hp = (struct hash *)hash_mem_alloc( datalen, sizeof( *hp ) );
 
         hp->bloat = 3;
         hp->tab.nel = 0;
@@ -329,16 +354,50 @@
         if( !hp )
             return;
 
- if( DEBUG_MEM )
+ if( DEBUG_MEM || DEBUG_PROFILE )
             hashstat( hp );
 
         if( hp->tab.base )
- free( (char *)hp->tab.base );
+ hash_mem_free( hp->items.datalen, (char *)hp->tab.base );
         for( i = 0; i <= hp->items.list; i++ )
- free( hp->items.lists[i].base );
- free( (char *)hp );
+ hash_mem_free( hp->items.datalen, hp->items.lists[i].base );
+ hash_mem_free( hp->items.datalen, (char *)hp );
 }
 
+static void * hash_mem_alloc(size_t datalen, size_t size)
+{
+ if (sizeof(HASHDATA) == datalen)
+ {
+ return BJAM_MALLOC_RAW(size);
+ }
+ else
+ {
+ return BJAM_MALLOC(size);
+ }
+}
+
+static void hash_mem_free(size_t datalen, void * data)
+{
+ if (sizeof(HASHDATA) == datalen)
+ {
+ BJAM_FREE_RAW(data);
+ }
+ else
+ {
+ BJAM_FREE(data);
+ }
+}
+
+#ifdef OPT_BOEHM_GC
+static void hash_mem_finalizer(char * key, struct hash * hp)
+{
+ HASHDATA d;
+ d.key = key;
+ hash_free(hp,&d);
+}
+#endif
+
+
 /* ---- */
 
 static void

Modified: branches/release/tools/jam/src/hcache.c
==============================================================================
--- branches/release/tools/jam/src/hcache.c (original)
+++ branches/release/tools/jam/src/hcache.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -137,7 +137,7 @@
         unsigned long new_len = buf_len * 2;
         if (new_len < len)
             new_len = len;
- buf = (char*)realloc(buf, new_len + 1);
+ buf = (char*)BJAM_REALLOC(buf, new_len + 1);
         if (buf)
             buf_len = new_len;
     }

Modified: branches/release/tools/jam/src/jam.c
==============================================================================
--- branches/release/tools/jam/src/jam.c (original)
+++ branches/release/tools/jam/src/jam.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -121,7 +121,6 @@
 # include "make.h"
 # include "strings.h"
 # include "expand.h"
-# include "debug.h"
 # include "filesys.h"
 
 /* Macintosh is "special" */
@@ -134,6 +133,7 @@
 
 # ifdef unix
 # include <sys/utsname.h>
+# include <signal.h>
 # endif
 
 struct globs globs = {
@@ -141,6 +141,7 @@
         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
@@ -205,6 +206,15 @@
  
     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);
 #endif
 
 int main( int argc, char **argv, char **arg_environ )
@@ -219,25 +229,29 @@
     char ** arg_v = argv;
     const char *progname = argv[0];
 
+ BJAM_MEM_INIT();
+
 # ifdef OS_MAC
     InitGraf(&qd.thePort);
 # endif
 
     argc--, argv++;
 
- if( getoptions( argc, argv, "-:l:d:j:f:gs:t:ano:qv", optv ) < 0 )
+ if( getoptions( argc, argv, "-:l:d:j:p:f:gs:t:ano:qv", optv ) < 0 )
     {
         printf( "\nusage: %s [ options ] targets...\n\n", progname );
 
         printf( "-a Build all targets, even if they are current.\n" );
         printf( "-dx Set the debug level to x (0-9).\n" );
         printf( "-fx Read x instead of Jambase.\n" );
- /* printf( "-g Build from newest sources first.\n" ); */
+ /* printf( "-g Build from newest sources first.\n" ); */
         printf( "-jx Run up to x shell commands concurrently.\n" );
         printf( "-lx Limit actions to x number of seconds after which they are stopped.\n" );
         printf( "-n Don't actually execute the updating actions.\n" );
         printf( "-ox Write the updating actions to file x.\n" );
- printf( "-q Quit quickly as soon as a target fails.\n" );
+ printf( "-px x=0, pipes action stdout and stderr merged into action output.\n" );
+ printf( "-q Quit quickly as soon as a target fails.\n" );
+ printf( "-r Enable Dart results.\n" );
         printf( "-sx=y Set variable x=y, overriding environment.\n" );
         printf( "-tx Rebuild x, even if it is up-to-date.\n" );
         printf( "-v Print the version of jam and exit.\n" );
@@ -252,7 +266,7 @@
     {
         printf( "Boost.Jam " );
         printf( "Version %s. %s.\n", VERSION, OSMINOR );
- printf( " Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. \n" );
+ printf( " Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. \n" );
         printf( " Copyright 2001 David Turner.\n" );
         printf( " Copyright 2001-2004 David Abrahams.\n" );
         printf( " Copyright 2002-2005 Rene Rivera.\n" );
@@ -266,16 +280,28 @@
     if( ( s = getoptval( optv, 'n', 0 ) ) )
         globs.noexec++, globs.debug[2] = 1;
 
- if( ( s = getoptval( optv, 'q', 0 ) ) )
- globs.quitquick = 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 (3 < globs.pipe_action || globs.pipe_action < 0)
+ {
+ 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( ( s = getoptval( optv, 'g', 0 ) ) )
- globs.newestfirst = 1;
+ if( ( s = getoptval( optv, 'g', 0 ) ) )
+ globs.newestfirst = 1;
 
     if( ( s = getoptval( optv, 'l', 0 ) ) )
         globs.timeout = atoi( s );
@@ -322,6 +348,12 @@
                  "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."},
                 {NULL, NULL, 0, NULL}
             };
     
@@ -412,6 +444,9 @@
         symv[0] = s;
         symv[1] = 0;
         var_defines( symv, 1 );
+ enter_module( bindmodule(".ENVIRON") );
+ var_defines( symv, 0 );
+ exit_module( bindmodule(".ENVIRON") );
     }
 
     /* Set the ARGV to reflect the complete list of arguments of invocation. */
@@ -485,10 +520,8 @@
         else
         {
             int targets_count = list_length(targets);
- const char **targets2 = (const char **)malloc(targets_count * sizeof(char *));
+ const char **targets2 = (const char **)BJAM_MALLOC(targets_count * sizeof(char *));
             int n = 0;
- if ( DEBUG_PROFILE )
- profile_memory( targets_count * sizeof(char *) );
             for ( ; targets; targets = list_next(targets) )
             {
                 targets2[n++] = targets->string;
@@ -522,6 +555,8 @@
 #ifdef HAVE_PYTHON
     Py_Finalize();
 #endif
+
+ BJAM_MEM_CLOSE();
 
 
     return status ? EXITBAD : EXITOK;

Modified: branches/release/tools/jam/src/jam.h
==============================================================================
--- branches/release/tools/jam/src/jam.h (original)
+++ branches/release/tools/jam/src/jam.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -218,6 +218,7 @@
 
 # ifdef _AIX
 # define unix
+# define MAXLINE 23552 /* 24k - 1k, longest 'together' actions */
 # define OSMINOR "OS=AIX"
 # define OS_AIX
 # define NO_VFORK
@@ -451,35 +452,33 @@
 # if defined( _i386_ ) || \
      defined( __i386__ ) || \
      defined( _M_IX86 )
-# if !defined( OS_FREEBSD ) && \
- !defined( OS_DRAGONFLYBSD ) && \
- !defined( OS_OS2 ) && \
- !defined( OS_AS400 )
 # define OSPLAT "OSPLAT=X86"
-# endif
 # 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
+
+
 # ifdef __sparc__
-# if !defined( OS_SUNOS ) && \
- !defined( OS_SOLARIS )
 # define OSPLAT "OSPLAT=SPARC"
 # endif
-# endif
 
 # ifdef __mips__
-# if !defined( OS_SGI )
 # define OSPLAT "OSPLAT=MIPS"
 # endif
-# endif
 
 # ifdef __arm__
 # define OSPLAT "OSPLAT=ARM"
 # endif
 
-# if defined( __ia64__ ) || defined( __IA64__ )
-# define OSPLAT "OSPLAT=IA64"
-# endif
-
 # ifdef __s390__
 # define OSPLAT "OSPLAT=390"
 # endif
@@ -522,9 +521,11 @@
         int jobs;
         int quitquick;
         int newestfirst; /* build newest sources first */
+ int pipe_action;
         char debug[DEBUG_MAX];
         FILE *cmdout; /* print cmds, not run them */
- long timeout; /* number of seconds to limit actions to, default 0 for no limit. */
+ long timeout; /* number of seconds to limit actions to, default 0 for no limit. */
+ int dart; /* output build and test results formatted for Dart */
 } ;
 
 extern struct globs globs;
@@ -556,4 +557,10 @@
 # define DEBUG_GRAPH ( globs.debug[ 12 ] ) /* debug dependencies */
 # define DEBUG_FATE ( globs.debug[ 13 ] ) /* show changes to fate in make0() */
 
+/* Everyone gets the memory definitions. */
+#include "mem.h"
+
+/* They also get the profile functions. */
+#include "debug.h"
+
 #endif

Modified: branches/release/tools/jam/src/jambase.c
==============================================================================
--- branches/release/tools/jam/src/jambase.c (original)
+++ branches/release/tools/jam/src/jambase.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -40,7 +40,7 @@
 "ECHO ;\n",
 "EXIT \"Please consult the documentation at 'http://www.boost.org'.\" ;\n",
 "}\n",
-"BOOST_BUILD_PATH = $(BOOST_BUILD_PATH) $(dir:R=$(.boost-build-file:D)) ;\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 =\n",
 "[ GLOB $(BOOST_BUILD_PATH) : bootstrap.jam ] ;\n",

Modified: branches/release/tools/jam/src/lists.c
==============================================================================
--- branches/release/tools/jam/src/lists.c (original)
+++ branches/release/tools/jam/src/lists.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,7 +7,6 @@
 # include "jam.h"
 # include "newstr.h"
 # include "lists.h"
-# include "debug.h"
 
 /*
  * lists.c - maintain lists of strings
@@ -81,9 +80,7 @@
         }
         else
         {
- l = (LIST *)malloc( sizeof( LIST ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( LIST ) );
+ l = (LIST *)BJAM_MALLOC( sizeof( LIST ) );
         }
 
         /* If first on chain, head points here. */

Modified: branches/release/tools/jam/src/lists.h
==============================================================================
--- branches/release/tools/jam/src/lists.h (original)
+++ branches/release/tools/jam/src/lists.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -91,6 +91,7 @@
 void lol_free( LOL *lol );
 LIST * lol_get( LOL *lol, int i );
 void lol_print( LOL *lol );
+void lol_build( LOL* lol, char** elements );
 
 #endif
 

Modified: branches/release/tools/jam/src/make.c
==============================================================================
--- branches/release/tools/jam/src/make.c (original)
+++ branches/release/tools/jam/src/make.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -126,12 +126,14 @@
     */
     bind_explicitly_located_targets();
 
+ { PROFILE_ENTER(MAKE_MAKE0);
         for( i = 0; i < n_targets; i++ )
         {
             TARGET *t = bindtarget( targets[i] );
 
             make0( t, 0, 0, counts, anyhow );
         }
+ PROFILE_EXIT(MAKE_MAKE0); }
         
 #ifdef OPT_GRAPH_DEBUG_EXT
         if( DEBUG_GRAPH )
@@ -169,8 +171,10 @@
 
         status = counts->cantfind || counts->cantmake;
 
+ { PROFILE_ENTER(MAKE_MAKE1);
         for( i = 0; i < n_targets; i++ )
             status |= make1( bindtarget( targets[i] ) );
+ PROFILE_EXIT(MAKE_MAKE1); }
 
         return status;
 }
@@ -795,6 +799,7 @@
 static TARGETS *
 make0sort( TARGETS *chain )
 {
+ PROFILE_ENTER(MAKE_MAKE0SORT);
         TARGETS *result = 0;
 
         /* We walk chain, taking each item and inserting it on the */
@@ -829,6 +834,7 @@
             s->tail = c; /* make next's prev us */
         }
 
+ PROFILE_EXIT(MAKE_MAKE0SORT);
         return result;
 }
 

Modified: branches/release/tools/jam/src/make1.c
==============================================================================
--- branches/release/tools/jam/src/make1.c (original)
+++ branches/release/tools/jam/src/make1.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -60,6 +60,8 @@
 # include "make.h"
 # include "command.h"
 # include "execcmd.h"
+# include "compile.h"
+# include "output.h"
 
 # include <stdlib.h>
 
@@ -103,7 +105,7 @@
 static void make1b( state *pState );
 static void make1c( state *pState );
 static void make1d( state *pState );
-static void make_closure(void *closure, int status, timing_info*);
+static void make_closure(void *closure, int status, timing_info*, char *, char *);
 
 typedef struct _stack
 {
@@ -127,9 +129,7 @@
         }
         else
         {
- if ( DEBUG_PROFILE )
- profile_memory( sizeof(state) );
- return (state *)malloc(sizeof(state));
+ return (state *)BJAM_MALLOC(sizeof(state));
         }
 }
 
@@ -145,7 +145,7 @@
         {
                 state *pState = state_freelist;
                 state_freelist = state_freelist->prev;
- free(pState);
+ BJAM_FREE(pState);
         }
 }
 
@@ -504,20 +504,19 @@
 
         if( cmd && pState->t->status == EXEC_CMD_OK )
         {
+ char *rule_name = 0;
+ char *target = 0;
                 if( DEBUG_MAKEQ ||
             ! ( cmd->rule->actions->flags & RULE_QUIETLY ) && DEBUG_MAKE)
             {
- printf( "%s ", cmd->rule->name );
- list_print( lol_get( &cmd->args, 0 ) );
- printf( "\n" );
+ rule_name = cmd->rule->name;
+ target = lol_get(&cmd->args, 0)->string;
+ if ( globs.noexec )
+ {
+ out_action(rule_name,target,cmd->buf,"","",EXIT_OK);
+ }
             }
 
- if( DEBUG_EXEC )
- printf( "%s\n", cmd->buf );
-
- if( globs.cmdout )
- fprintf( globs.cmdout, "%s", cmd->buf );
-
             if( globs.noexec )
             {
                         pState->curstate = T_STATE_MAKE1D;
@@ -526,10 +525,9 @@
             else
             {
                         TARGET *t = pState->t;
- fflush( stdout );
 
                         pop_state(&state_stack); /* pop state first because execcmd could push state */
- execcmd( cmd->buf, make_closure, t, cmd->shell );
+ execcmd( cmd->buf, make_closure, t, cmd->shell, rule_name, target );
             }
         }
         else
@@ -650,7 +648,7 @@
                     if( DEBUG_EXECCMD )
                         printf( "SEM: placing %s on stack\n", first->target->name);
             push_state(&temp_stack, first->target, NULL, T_STATE_MAKE1B);
- free( first );
+ BJAM_FREE( first );
                 }
             }
 #endif
@@ -710,14 +708,67 @@
     }
 }
 
+static void append_int_string(LOL *l, int x)
+{
+ char buffer[50];
+ sprintf(buffer, "%i", x);
+ lol_add(l, list_new(L0, newstr(buffer)));
+}
+
+/* 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* time,
+ char *executed_command, char *command_output)
+{
+ LIST* action_rule;
+
+ pushsettings(target->settings);
+ action_rule = var_get( "__ACTION_RULE__" );
+ popsettings(target->settings);
+
+ if (action_rule)
+ {
+ /* We'll prepend $(__ACTION_RULE__[2-]) to the first argument */
+ LIST* initial_args = list_copy( L0, action_rule->next );
+
+ /* Prepare the argument list */
+ FRAME frame[1];
+ frame_init( frame );
+
+ /* First argument is the name of the target */
+ lol_add( frame->args, list_new( initial_args, target->name ) );
+ append_int_string(frame->args, status);
+ append_double_string(frame->args, time->user);
+ append_double_string(frame->args, time->system);
+ lol_add(frame->args, list_new(L0, newstr(executed_command)));
+
+ if (command_output)
+ lol_add(frame->args, list_new(L0, newstr(command_output)));
+ else
+ lol_add(frame->args, L0);
+
+ if( lol_get( frame->args, 2 ) )
+ evaluate_rule( action_rule->string, frame );
+
+ /* Clean up */
+ frame_free( frame );
+ }
+}
+
+
 static void make_closure(
- void *closure, int status, timing_info* time)
+ void *closure, int status, timing_info* time, char *executed_command,
+ char *command_output)
 {
     TARGET* built = (TARGET*)closure;
 
     call_timing_rule(built, time);
     if (DEBUG_EXECCMD)
         printf("%f sec system; %f sec user\n", time->system, time->user);
+
+ call_action_rule(built, status, time, executed_command, command_output);
     
     push_state(&state_stack, built, NULL, T_STATE_MAKE1D)->status = status;
 }
@@ -1066,7 +1117,7 @@
 
             /* Add to settings chain */
 
- settings = addsettings( settings, 0, vars->string, nl );
+ settings = addsettings( settings, VAR_SET, vars->string, nl );
         }
 
         return settings;

Modified: branches/release/tools/jam/src/modules.c
==============================================================================
--- branches/release/tools/jam/src/modules.c (original)
+++ branches/release/tools/jam/src/modules.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -4,7 +4,6 @@
  * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  */
 #include "jam.h"
-#include "debug.h"
 
 #include "modules.h"
 #include "string.h"

Modified: branches/release/tools/jam/src/modules/order.c
==============================================================================
--- branches/release/tools/jam/src/modules/order.c (original)
+++ branches/release/tools/jam/src/modules/order.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -7,7 +7,6 @@
 #include "../strings.h"
 #include "../newstr.h"
 #include "../variable.h"
-#include "../debug.h"
 
 
 /* Use quite klugy approach: when we add order dependency from 'a' to 'b',
@@ -62,9 +61,7 @@
 void topological_sort(int** graph, int num_vertices, int* result)
 {
     int i;
- int* colors = (int*)calloc(num_vertices, sizeof(int));
- if ( DEBUG_PROFILE )
- profile_memory( num_vertices*sizeof(int) );
+ int* colors = (int*)BJAM_CALLOC(num_vertices, sizeof(int));
     for (i = 0; i < num_vertices; ++i)
         colors[i] = white;
 
@@ -72,7 +69,7 @@
         if (colors[i] == white)
             do_ts(graph, i, colors, &result);
 
- free(colors);
+ BJAM_FREE(colors);
 }
 
 LIST *order( PARSE *parse, FRAME *frame )
@@ -87,10 +84,8 @@
        passed to 'add_pair'.
     */
     int length = list_length(arg);
- int** graph = (int**)calloc(length, sizeof(int*));
- int* order = (int*)malloc((length+1)*sizeof(int));
- if ( DEBUG_PROFILE )
- profile_memory( length*sizeof(int*) + (length+1)*sizeof(int) );
+ int** graph = (int**)BJAM_CALLOC(length, sizeof(int*));
+ int* order = (int*)BJAM_MALLOC((length+1)*sizeof(int));
    
     for(tmp = arg, src = 0; tmp; tmp = tmp->next, ++src) {
         /* For all object this one depend upon, add elements
@@ -98,9 +93,7 @@
         LIST* dependencies = var_get(tmp->string);
         int index = 0;
 
- graph[src] = (int*)calloc(list_length(dependencies)+1, sizeof(int));
- if ( DEBUG_PROFILE )
- profile_memory( (list_length(dependencies)+1)*sizeof(int) );
+ graph[src] = (int*)BJAM_CALLOC(list_length(dependencies)+1, sizeof(int));
         for(; dependencies; dependencies = dependencies->next) {
             int dst = list_index(arg, dependencies->string);
             if (dst != -1)
@@ -125,9 +118,9 @@
     {
         int i;
         for(i = 0; i < length; ++i)
- free(graph[i]);
- free(graph);
- free(order);
+ BJAM_FREE(graph[i]);
+ BJAM_FREE(graph);
+ BJAM_FREE(order);
     }
 
     return result;

Modified: branches/release/tools/jam/src/modules/regex.c
==============================================================================
--- branches/release/tools/jam/src/modules/regex.c (original)
+++ branches/release/tools/jam/src/modules/regex.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -41,7 +41,7 @@
     if (indices_list)
     {
         size = list_length(indices_list);
- indices = (int*)malloc(size*sizeof(int));
+ indices = (int*)BJAM_MALLOC(size*sizeof(int));
         for(p = indices; indices_list; indices_list = indices_list->next)
         {
             *p++ = atoi(indices_list->string);
@@ -50,7 +50,7 @@
     else
     {
         size = 1;
- indices = (int*)malloc(sizeof(int));
+ indices = (int*)BJAM_MALLOC(sizeof(int));
         *indices = 1;
     }
 
@@ -82,7 +82,7 @@
         string_free( buf );
     }
 
- free(indices);
+ BJAM_FREE(indices);
     
     return result;
 }

Modified: branches/release/tools/jam/src/newstr.c
==============================================================================
--- branches/release/tools/jam/src/newstr.c (original)
+++ branches/release/tools/jam/src/newstr.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -56,19 +56,13 @@
 static char* storage_start = 0;
 static char* storage_finish = 0;
 
-/* */
-#define SIMPLE_ALLOC 0
-/*/
-#define SIMPLE_ALLOC 1
-/* */
-
 /*
  * allocate() - Allocate n bytes of immortal string storage
  */
 static char* allocate(size_t n)
 {
- #if SIMPLE_ALLOC
- return (char*)malloc(n);
+ #ifdef BJAM_NEWSTR_NO_ALLOCATE
+ return (char*)BJAM_MALLOC_ATOMIC(n);
     #else
     /* See if we can grab storage from an existing block */
     size_t remaining = storage_finish - storage_start;
@@ -86,7 +80,7 @@
             nalloc = STRING_BLOCK;
 
         /* allocate a new block and link into the chain */
- new_block = (strblock*)malloc( offsetof( strblock, data[0] ) + nalloc * sizeof(new_block->data[0]) );
+ 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;
@@ -125,9 +119,6 @@
             strtotal += l + 1;
             memcpy( m, string, l + 1 );
             *s = m;
-
- if ( DEBUG_PROFILE )
- profile_memory( l+1 );
         }
 
     strcount_in += 1;
@@ -166,7 +157,7 @@
     while ( strblock_chain != 0 )
     {
         strblock* n = strblock_chain->next;
- free(strblock_chain);
+ BJAM_FREE(strblock_chain);
         strblock_chain = n;
     }
     

Modified: branches/release/tools/jam/src/parse.c
==============================================================================
--- branches/release/tools/jam/src/parse.c (original)
+++ branches/release/tools/jam/src/parse.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -17,7 +17,6 @@
 # include "newstr.h"
 # include "modules.h"
 # include "frames.h"
-# include "debug.h"
 
 /*
  * parse.c - make and destroy parse trees as driven by the parser
@@ -78,9 +77,7 @@
         char *string1,
         int num )
 {
- PARSE *p = (PARSE *)malloc( sizeof( PARSE ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( PARSE ) );
+ PARSE *p = (PARSE *)BJAM_MALLOC( sizeof( PARSE ) );
 
         p->func = func;
         p->left = left;
@@ -130,7 +127,7 @@
         if ( p->rulename )
             freestr( p->rulename );
         
- free( (char *)p );
+ BJAM_FREE( (char *)p );
 }
 
 LIST* parse_evaluate( PARSE *p, FRAME* frame )

Modified: branches/release/tools/jam/src/patchlevel.h
==============================================================================
--- branches/release/tools/jam/src/patchlevel.h (original)
+++ branches/release/tools/jam/src/patchlevel.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -9,9 +9,9 @@
 
 #define VERSION_MAJOR 3
 #define VERSION_MINOR 1
-#define VERSION_PATCH 14
+#define VERSION_PATCH 16
 #define VERSION_MAJOR_SYM "03"
 #define VERSION_MINOR_SYM "1"
-#define VERSION_PATCH_SYM "14"
-#define VERSION "3.1.14"
+#define VERSION_PATCH_SYM "16"
+#define VERSION "3.1.16"
 #define JAMVERSYM "JAMVERSION=3.1"

Modified: branches/release/tools/jam/src/regexp.c
==============================================================================
--- branches/release/tools/jam/src/regexp.c (original)
+++ branches/release/tools/jam/src/regexp.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -41,8 +41,8 @@
  * precedence is structured in regular expressions. Serious changes in
  * regular-expression syntax might require a total rethink.
  */
+#include "jam.h"
 #include "regexp.h"
-#include "debug.h"
 #include <stdio.h>
 #include <ctype.h>
 #ifndef ultrix
@@ -239,11 +239,9 @@
                 FAIL("regexp too big");
 
         /* Allocate space. */
- r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
+ r = (regexp *)BJAM_MALLOC(sizeof(regexp) + (unsigned)regsize);
         if (r == NULL)
                 FAIL("out of space");
- if ( DEBUG_PROFILE )
- profile_memory( sizeof(regexp) + (unsigned)regsize );
 
         /* Second pass: emit code. */
         regparse = (char *)exp;

Modified: branches/release/tools/jam/src/rules.c
==============================================================================
--- branches/release/tools/jam/src/rules.c (original)
+++ branches/release/tools/jam/src/rules.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -16,7 +16,6 @@
 # include "lists.h"
 # include "pathsys.h"
 # include "timestamp.h"
-# include "debug.h"
 
 /* This file is ALSO:
  * Copyright 2001-2004 David Abrahams.
@@ -265,9 +264,7 @@
 {
         TARGET *t;
 
- t = (TARGET *)malloc( sizeof( *t ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( *t ) );
+ t = (TARGET *)BJAM_MALLOC( sizeof( *t ) );
         memset( (char *)t, '\0', sizeof( *t ) );
         t->name = copystr( ot->name );
         t->boundname = t->name;
@@ -321,9 +318,7 @@
 {
         TARGETS *c;
 
- c = (TARGETS *)malloc( sizeof( TARGETS ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( TARGETS ) );
+ c = (TARGETS *)BJAM_MALLOC( sizeof( TARGETS ) );
         c->target = target;
 
         if( !chain ) chain = c;
@@ -369,9 +364,7 @@
         ACTIONS *chain,
         ACTION *action )
 {
- ACTIONS *actions = (ACTIONS *)malloc( sizeof( ACTIONS ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( ACTIONS ) );
+ ACTIONS *actions = (ACTIONS *)BJAM_MALLOC( sizeof( ACTIONS ) );
 
         actions->action = action;
 
@@ -389,15 +382,16 @@
  * addsettings() - add a deferred "set" command to a target
  *
  * Adds a variable setting (varname=list) onto a chain of settings
- * for a particular target. Replaces the previous previous value,
- * if any, unless 'append' says to append the new list onto the old.
+ * 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 chain of settings.
  */
 
 SETTINGS *
 addsettings(
         SETTINGS *head,
- int append,
+ int flag,
         char *symbol,
         LIST *value )
 {
@@ -421,9 +415,7 @@
             settings_freelist = v->next;
         else
         {
- v = (SETTINGS *)malloc( sizeof( *v ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( *v ) );
+ v = (SETTINGS *)BJAM_MALLOC( sizeof( *v ) );
         }
         
             v->symbol = newstr( symbol );
@@ -431,15 +423,17 @@
             v->next = head;
             head = v;
         }
- else if( append )
+ else if( flag == VAR_APPEND )
         {
             v->value = list_append( v->value, value );
         }
- else
+ else if( flag != VAR_DEFAULT )
         {
             list_free( v->value );
             v->value = value;
         }
+ else
+ list_free( value );
 
         /* Return (new) head of list. */
 
@@ -476,7 +470,7 @@
     SETTINGS *copy = 0, *v;
 
     for (v = head; v; v = v->next)
- copy = addsettings(copy, 0, v->symbol, list_copy(0, v->value));
+ copy = addsettings(copy, VAR_SET, v->symbol, list_copy(0, v->value));
 
     return copy;
 }
@@ -489,7 +483,7 @@
     while( chain )
     {
         TARGETS* n = chain->next;
- free( chain );
+ BJAM_FREE( chain );
         chain = n;
     }
 }
@@ -502,7 +496,7 @@
     while( chain )
     {
         ACTIONS* n = chain->next;
- free( chain );
+ BJAM_FREE( chain );
         chain = n;
     }
 }
@@ -553,7 +547,7 @@
     while ( settings_freelist )
     {
         SETTINGS* n = settings_freelist->next;
- free( settings_freelist );
+ BJAM_FREE( settings_freelist );
         settings_freelist = n;
     }
 }
@@ -563,9 +557,7 @@
  */
 argument_list* args_new()
 {
- argument_list* r = (argument_list*)malloc( sizeof(argument_list) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof(argument_list) );
+ argument_list* r = (argument_list*)BJAM_MALLOC( sizeof(argument_list) );
     r->reference_count = 0;
     lol_init(r->data);
     return r;
@@ -587,7 +579,7 @@
     if (--a->reference_count <= 0)
     {
         lol_free(a->data);
- free(a);
+ BJAM_FREE(a);
     }
 }
 
@@ -608,7 +600,7 @@
     {
         freestr(a->command);
         list_free(a->bindlist);
- free(a);
+ BJAM_FREE(a);
     }
 }
 
@@ -702,9 +694,7 @@
 
 static rule_actions* actions_new( char* command, LIST* bindlist, int flags )
 {
- rule_actions* result = (rule_actions*)malloc(sizeof(rule_actions));
- if ( DEBUG_PROFILE )
- profile_memory( sizeof(rule_actions) );
+ rule_actions* result = (rule_actions*)BJAM_MALLOC(sizeof(rule_actions));
     result->command = copystr( command );
     result->bindlist = bindlist;
     result->flags = flags;

Modified: branches/release/tools/jam/src/rules.h
==============================================================================
--- branches/release/tools/jam/src/rules.h (original)
+++ branches/release/tools/jam/src/rules.h 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -246,7 +246,7 @@
 void freetargets( TARGETS *chain );
 ACTIONS *actionlist( ACTIONS *chain, ACTION *action );
 void freeactions( ACTIONS *chain );
-SETTINGS *addsettings( SETTINGS *head, int append, char *symbol, LIST *value );
+SETTINGS *addsettings( SETTINGS *head, int flag, char *symbol, LIST *value );
 void pushsettings( SETTINGS *v );
 void popsettings( SETTINGS *v );
 SETTINGS *copysettings( SETTINGS *v );

Modified: branches/release/tools/jam/src/scan.c
==============================================================================
--- branches/release/tools/jam/src/scan.c (original)
+++ branches/release/tools/jam/src/scan.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -11,7 +11,6 @@
 # include "jamgram.h"
 # include "jambase.h"
 # include "newstr.h"
-# include "debug.h"
 
 /*
  * scan.c - the jam yacc scanner
@@ -82,9 +81,7 @@
 void
 yyfparse( char *s )
 {
- struct include *i = (struct include *)malloc( sizeof( *i ) );
- if ( DEBUG_PROFILE )
- profile_memory( sizeof( *i ) );
+ struct include *i = (struct include *)BJAM_MALLOC( sizeof( *i ) );
 
         /* Push this onto the incp chain. */
 
@@ -171,7 +168,7 @@
         if( i->file && i->file != stdin )
             fclose( i->file );
         freestr( i->fname );
- free( (char *)i );
+ BJAM_FREE( (char *)i );
 
         return EOF;
 }

Modified: branches/release/tools/jam/src/strings.c
==============================================================================
--- branches/release/tools/jam/src/strings.c (original)
+++ branches/release/tools/jam/src/strings.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -2,8 +2,8 @@
 /* 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 "strings.h"
-#include "debug.h"
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -48,23 +48,21 @@
 {
     assert_invariants( s );
     if ( s->value != s->opt )
- free( s->value );
+ BJAM_FREE( s->value );
 }
 
 static void string_reserve_internal( string* self, size_t capacity )
 {
     if ( self->value == self->opt )
     {
- self->value = (char*)malloc( capacity + JAM_STRING_MAGIC_SIZE );
- if ( DEBUG_PROFILE )
- profile_memory( capacity + JAM_STRING_MAGIC_SIZE );
+ self->value = (char*)BJAM_MALLOC_ATOMIC( capacity + JAM_STRING_MAGIC_SIZE );
         self->value[0] = 0;
         strncat( self->value, self->opt, sizeof(self->opt) );
         assert( strlen( self->value ) <= self->capacity ); /* This is a regression test */
     }
     else
     {
- self->value = (char*)realloc( self->value, capacity + JAM_STRING_MAGIC_SIZE );
+ self->value = (char*)BJAM_REALLOC( self->value, capacity + JAM_STRING_MAGIC_SIZE );
     }
 #ifndef NDEBUG
     memcpy( self->value + capacity, self->magic, JAM_STRING_MAGIC_SIZE );

Modified: branches/release/tools/jam/src/timestamp.c
==============================================================================
--- branches/release/tools/jam/src/timestamp.c (original)
+++ branches/release/tools/jam/src/timestamp.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -11,7 +11,6 @@
  */
 
 # include "jam.h"
-# include "debug.h"
 
 # include "hash.h"
 # include "filesys.h"

Modified: branches/release/tools/jam/src/variable.c
==============================================================================
--- branches/release/tools/jam/src/variable.c (original)
+++ branches/release/tools/jam/src/variable.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -242,11 +242,21 @@
                     
                     if (!split)
                     {
- printf( "no file specified!\n" );
- exit( EXITBAD );
+ /* the @() reference doesn't match the @(foo:E=bar) format.
+ hence we leave it alone by copying directly to output. */
+ int l = 0;
+ if ( out+2 >= oute ) return -1;
+ *(out++) = '@';
+ *(out++) = '(';
+ l = var_string(in+2,out,oute-out,lol);
+ if ( l < 0 ) return -1;
+ out += l;
+ if ( out+1 >= oute ) return -1;
+ *(out++) = ')';
+ in = ine;
                     }
                     
- if ( depth == 0 )
+ else if ( depth == 0 )
                     {
                         string file_name_v;
                         int file_name_l = 0;

Modified: branches/release/tools/jam/src/w32_getreg.c
==============================================================================
--- branches/release/tools/jam/src/w32_getreg.c (original)
+++ branches/release/tools/jam/src/w32_getreg.c 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,8 @@
-/* Copyright Paul Lin 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) */
+/*
+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"
 
@@ -15,7 +17,9 @@
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 
-# define MAX_REGISTRY_DATA_LENGTH 4096
+# define MAX_REGISTRY_DATA_LENGTH 4096
+# define MAX_REGISTRY_KEYNAME_LENGTH 256
+# define MAX_REGISTRY_VALUENAME_LENGTH 16384
 
 typedef struct
 {
@@ -33,34 +37,35 @@
     { 0, 0 }
 };
 
-LIST*
-builtin_system_registry(
- PARSE *parse,
- FRAME *frame )
+static HKEY get_key(char const** path)
 {
- char const* path = lol_get(frame->args, 0)->string;
- LIST* result = L0;
- HKEY key;
-
+ const KeyMap *p;
+
+ for (p = dlRootKeys; p->name; ++p)
     {
- const KeyMap *p;
-
- for (p = dlRootKeys; p->name; ++p)
+ int n = strlen(p->name);
+ if (!strncmp(*path,p->name,n))
         {
- int n = strlen(p->name);
- if (!strncmp(path,p->name,n))
+ if ((*path)[n] == '\\' || (*path)[n] == 0)
             {
- if (path[n] == '\\' || path[n] == 0)
- {
- path += n + 1;
- break;
- }
+ *path += n + 1;
+ break;
             }
         }
-
- key = p->value;
     }
 
+ return p->value;
+}
+
+LIST*
+builtin_system_registry(
+ PARSE *parse,
+ FRAME *frame )
+{
+ char const* path = lol_get(frame->args, 0)->string;
+ LIST* result = L0;
+ HKEY key = get_key(&path);
+
     if (
         key != 0
         && ERROR_SUCCESS == RegOpenKeyEx(key, path, 0, KEY_QUERY_VALUE, &key)
@@ -125,4 +130,78 @@
     return result;
 }
 
+static LIST* get_subkey_names(HKEY key, char const* path)
+{
+ LIST* result = 0;
+
+ if ( ERROR_SUCCESS ==
+ RegOpenKeyEx(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 == RegEnumKeyEx(
+ 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(0, newstr(name)));
+ }
+
+ RegCloseKey(key);
+ }
+
+ return result;
+}
+
+static LIST* get_value_names(HKEY key, char const* path)
+{
+ LIST* result = 0;
+
+ if ( ERROR_SUCCESS == RegOpenKeyEx(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 == RegEnumValue(
+ key, index, name, &name_size, 0, 0, 0, 0);
+ ++index,
+ name_size = sizeof(name)
+ )
+ {
+ name[name_size] = 0;
+ result = list_append(result, list_new(0, newstr(name)));
+ }
+
+ RegCloseKey(key);
+ }
+
+ return result;
+}
+
+LIST*
+builtin_system_registry_names(
+ PARSE *parse,
+ FRAME *frame )
+{
+ char const* path = lol_get(frame->args, 0)->string;
+ char const* result_type = lol_get(frame->args, 1)->string;
+
+ 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

Modified: branches/release/tools/jam/test/builtin_shell.jam
==============================================================================
--- branches/release/tools/jam/test/builtin_shell.jam (original)
+++ branches/release/tools/jam/test/builtin_shell.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -4,31 +4,6 @@
 
 ECHO --- Testing SHELL builtin... ;
 
-local result = 0 ;
-local rule error ( message * )
-{
- local b = [ BACKTRACE ] ;
- ECHO "$(b[9]):$(b[10]): error:" $(message) ;
-}
-local rule assert ( expected + : test ? : obtained + )
-{
- test ?= "(==)" ;
- local r = 0 ;
- if $(test) = "(==)" && $(expected) != $(obtained)
- {
- error [FAILED] '$(expected)' $(test) '$(obtained)' ;
- r = 1 ;
- }
- else if $(test) = "(!=)" && $(expected) = $(obtained)
- {
- error [FAILED] '$(expected)' $(test) '$(obtained)' ;
- r = 1 ;
- }
- result = [ CALC $(result) + $(r) ] ;
-}
-
-#~ ---------------------------------------------------------------------
-
 local c = "date" ;
 if $(NT) { c = "PATH" ; }
 
@@ -40,7 +15,3 @@
 assert "" : (==) : [ COMMAND $(c) : no-output ] ;
 assert "" 0 : (!=) : [ COMMAND $(c) : exit-status ] ;
 assert "" 0 : (==) : [ COMMAND $(c) : no-output : exit-status ] ;
-
-#~ ---------------------------------------------------------------------
-
-EXIT --- Complete : $(result) ;

Modified: branches/release/tools/jam/test/test.bat
==============================================================================
--- branches/release/tools/jam/test/test.bat (original)
+++ branches/release/tools/jam/test/test.bat 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,7 +5,10 @@
 REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
 set BJAM=..\src\bin.ntx86\bjam
+REM ~ set BJAM=..\src\bin.ntx86.debug\bjam
+REM ~ set BJAM=bjam-3_1_14
+REM ~ set BJAM=bjam
 
 @ECHO ON
 
-%BJAM% -f builtin_shell.jam
+%BJAM% -f test.jam

Modified: branches/release/tools/jam/test/test.sh
==============================================================================
--- branches/release/tools/jam/test/test.sh (original)
+++ branches/release/tools/jam/test/test.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -6,4 +6,4 @@
 
 BJAM=`ls -1 ../src/bin.*/bjam`
 
-${BJAM} -f builtin_shell.jam
+${BJAM} -f test.jam "$*"

Modified: branches/release/tools/quickbook/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/Jamfile.v2 (original)
+++ branches/release/tools/quickbook/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 #==============================================================================
-# Copyright (c) 2002 2004 Joel de Guzman
+# Copyright (c) 2002 2004 2006 Joel de Guzman
 # Copyright (c) 2004 Eric Niebler
 # http://spirit.sourceforge.net/
 #
@@ -12,11 +12,15 @@
     :
     detail/quickbook.cpp
     detail/actions.cpp
+ detail/actions_class.cpp
     detail/utils.cpp
     detail/post_process.cpp
+ detail/collector.cpp
+ detail/template_stack.cpp
     /boost//program_options
     /boost//filesystem
     : #<define>QUICKBOOK_NO_DATES
+ <toolset>msvc:<cxxflags>/wd4355
       <toolset>msvc:<cxxflags>/wd4511
       <toolset>msvc:<cxxflags>/wd4512
       <toolset>msvc:<cxxflags>/wd4701
@@ -24,6 +28,8 @@
       <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
     ;
 
 install dist-bin

Modified: branches/release/tools/quickbook/block.hpp
==============================================================================
--- branches/release/tools/quickbook/block.hpp (original)
+++ branches/release/tools/quickbook/block.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -23,7 +23,7 @@
 {
     using namespace boost::spirit;
 
- template <typename Actions>
+ template <typename Actions, bool skip_initial_spaces = false>
     struct block_grammar : grammar<block_grammar<Actions> >
     {
         block_grammar(Actions& actions_)
@@ -33,15 +33,24 @@
         struct definition
         {
             definition(block_grammar const& self)
- : is_not_preformatted(true)
- , common(self.actions, is_not_preformatted)
+ : no_eols(true)
+ , common(self.actions, no_eols)
             {
                 using detail::var;
                 Actions& actions = self.actions;
 
- start_ =
- *(space_p | comment) >> blocks >> blank
- ;
+ if (skip_initial_spaces)
+ {
+ start_ =
+ *(space_p | comment) >> blocks >> blank
+ ;
+ }
+ else
+ {
+ start_ =
+ blocks >> blank
+ ;
+ }
 
                 blocks =
                    +( block_markup
@@ -65,20 +74,24 @@
                 eol = blank >> eol_p
                     ;
 
- close_bracket =
+ phrase_end =
                     ']' |
- if_p(var(is_not_preformatted))
+ if_p(var(no_eols))
                     [
- eol_p >> eol_p // Make sure that we don't go
+ eol >> eol // Make sure that we don't go
                     ] // past a single block, except
                     ; // when preformatted.
 
                 hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be followed by
+ (eps_p - (alnum_p | '_')) >> space // must not be preceded by
                     ; // alpha-numeric or underscore
 
                 comment =
- "[/" >> *(anychar_p - ']') >> ']'
+ "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ ;
+
+ dummy_block =
+ '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
                     ;
 
                 hr =
@@ -101,6 +114,8 @@
                         | variablelist
                         | xinclude
                         | include
+ | import
+ | template_
                         )
>> ( (space >> ']' >> +eol)
                         | eps_p [actions.error]
@@ -121,9 +136,10 @@
                     ;
 
                 headings =
- h1 | h2 | h3 | h4 | h5 | h6
+ h1 | h2 | h3 | h4 | h5 | h6 | h
                     ;
 
+ h = "heading" >> hard_space >> phrase [actions.h];
                 h1 = "h1" >> hard_space >> phrase [actions.h1];
                 h2 = "h2" >> hard_space >> phrase [actions.h2];
                 h3 = "h3" >> hard_space >> phrase [actions.h3];
@@ -131,48 +147,85 @@
                 h5 = "h5" >> hard_space >> phrase [actions.h5];
                 h6 = "h6" >> hard_space >> phrase [actions.h6];
 
+ static const bool true_ = true;
+ static const bool false_ = false;
+
+ inside_paragraph =
+ phrase [actions.inside_paragraph]
+ >> *(
+ eol >> eol >> phrase [actions.inside_paragraph]
+ )
+ ;
+
                 blurb =
                     "blurb" >> hard_space
- >> phrase [actions.blurb]
+ >> inside_paragraph [actions.blurb]
+ >> eps_p
                     ;
 
                 blockquote =
                     ':' >> blank >>
- phrase [actions.blockquote]
+ inside_paragraph [actions.blockquote]
                     ;
 
                 admonition =
                     "warning" >> blank >>
- phrase [self.actions.warning]
+ inside_paragraph [actions.warning]
                     |
                     "caution" >> blank >>
- phrase [self.actions.caution]
+ inside_paragraph [actions.caution]
                     |
                     "important" >> blank >>
- phrase [self.actions.important]
+ inside_paragraph [actions.important]
                     |
                     "note" >> blank >>
- phrase [self.actions.note]
+ inside_paragraph [actions.note]
                     |
                     "tip" >> blank >>
- phrase [self.actions.tip]
+ inside_paragraph [actions.tip]
                     ;
 
- {
- static const bool true_ = true;
- static const bool false_ = false;
-
- preformatted =
- "pre" >> hard_space [assign_a(is_not_preformatted, false_)]
- >> !eol >> phrase [actions.preformatted]
- >> eps_p [assign_a(is_not_preformatted, true_)]
- ;
- }
+ preformatted =
+ "pre" >> hard_space [assign_a(no_eols, false_)]
+ >> !eol >> phrase [actions.preformatted]
+ >> eps_p [assign_a(no_eols, true_)]
+ ;
+
+ macro_identifier =
+ +(anychar_p - (space_p | ']'))
+ ;
 
                 def_macro =
                     "def" >> hard_space
- >> identifier [actions.identifier]
- >> blank >> phrase [actions.macro_def]
+ >> macro_identifier [actions.macro_identifier]
+ >> blank >> phrase [actions.macro_definition]
+ ;
+
+ identifier =
+ (alpha_p | '_') >> *(alnum_p | '_')
+ ;
+
+ template_id =
+ identifier | (punct_p - (ch_p('[') | ']'))
+ ;
+
+ template_ =
+ "template"
+ >> hard_space >> template_id [push_back_a(actions.template_info)]
+ >>
+ !(
+ space >> '['
+ >> *(
+ space >> template_id [push_back_a(actions.template_info)]
+ )
+ >> space >> ']'
+ )
+ >> template_body [actions.template_body]
+ ;
+
+ template_body =
+ *(('[' >> template_body >> ']') | (anychar_p - ']'))
+ >> space >> eps_p(']')
                     ;
 
                 variablelist =
@@ -219,8 +272,8 @@
>>
                     (
                         (
- phrase [actions.end_varlistitem]
- >> ch_p(']')
+ inside_paragraph
+ >> ch_p(']') [actions.end_varlistitem]
>> space
                         )
                         | eps_p [actions.error]
@@ -228,7 +281,7 @@
                     ;
 
                 table =
- "table"
+ "table"
>> (eps_p(*blank_p >> eol_p) | hard_space)
>> (*(anychar_p - eol)) [assign_a(actions.table_title)]
>> +eol
@@ -256,7 +309,7 @@
>>
                     (
                         (
- phrase
+ inside_paragraph
>> ch_p(']') [actions.end_cell]
>> space
                         )
@@ -268,26 +321,29 @@
                        "xinclude"
>> hard_space
>> (*(anychar_p -
- close_bracket)) [actions.xinclude]
+ phrase_end)) [actions.xinclude]
+ ;
+
+ import =
+ "import"
+ >> hard_space
+ >> (*(anychar_p -
+ phrase_end)) [actions.import]
                     ;
 
                 include =
                        "include"
>> hard_space
- >>
+ >>
                    !(
                         ':'
>> (*((alnum_p | '_') - space_p))[assign_a(actions.include_doc_id)]
>> space
                     )
>> (*(anychar_p -
- close_bracket)) [actions.include]
+ phrase_end)) [actions.include]
                     ;
 
- identifier =
- +(anychar_p - (space_p | ']'))
- ;
-
                 code =
                     (
                         code_line
@@ -324,11 +380,13 @@
 
                 paragraph_end_markups =
                     "section", "endsect", "h1", "h2", "h3", "h4", "h5", "h6",
- "blurb", ":", "pre", "def", "table", "include"
+ "blurb", ":", "pre", "def", "table", "include", "xinclude",
+ "variablelist", "import", "template", "warning", "caution",
+ "important", "note", "tip", ":"
                     ;
 
                 paragraph_end =
- '[' >> space >> paragraph_end_markups | eol >> eol
+ '[' >> space >> paragraph_end_markups >> hard_space | eol >> eol
                     ;
 
                 paragraph =
@@ -344,23 +402,27 @@
                    *( common
                     | comment
                     | (anychar_p -
- close_bracket) [actions.plain_char]
+ phrase_end) [actions.plain_char]
                     )
                     ;
             }
 
- bool is_not_preformatted;
-
- rule<Scanner> start_, blocks, block_markup, code, code_line,
- paragraph, space, blank, comment, headings, h1, h2,
+ bool no_eols;
+
+ rule<Scanner> start_, blocks, block_markup, code, code_line,
+ paragraph, space, blank, comment, headings, h, h1, h2,
                             h3, h4, h5, h6, hr, blurb, blockquote, admonition,
- phrase, list, close_bracket, ordered_list, def_macro,
- identifier, table, table_row, variablelist,
+ phrase, list, phrase_end, ordered_list, def_macro,
+ macro_identifier, table, table_row, variablelist,
                             varlistentry, varlistterm, varlistitem, table_cell,
                             preformatted, list_item, begin_section, end_section,
- xinclude, include, hard_space, eol, paragraph_end;
+ xinclude, include, hard_space, eol, paragraph_end,
+ template_, template_id, template_formal_arg,
+ template_body, identifier, dummy_block, import,
+ inside_paragraph;
+
             symbols<> paragraph_end_markups;
-
+
             phrase_grammar<Actions> common;
 
             rule<Scanner> const&

Modified: branches/release/tools/quickbook/detail/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions.cpp (original)
+++ branches/release/tools/quickbook/detail/actions.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     Copyright (c) 2005 Thomas Guest
     http://spirit.sourceforge.net/
@@ -12,75 +12,140 @@
 #include <functional>
 #include <boost/bind.hpp>
 #include <boost/filesystem/convenience.hpp>
+#include <boost/lexical_cast.hpp>
 #include "./actions.hpp"
 #include "./utils.hpp"
-
-#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
-#pragma warning(disable:4355)
-#endif
+#include "./markups.hpp"
+#include "./actions_class.hpp"
+#include "../block.hpp"
+#include "../phrase.hpp"
+#include "../code_snippet.hpp"
 
 namespace quickbook
 {
- void error_action::operator()(iterator const& first, iterator const& /*last*/) const
+ // Handles line-breaks (DEPRECATED!!!)
+ void break_action::operator()(iterator first, iterator) const
+ {
+ boost::spirit::file_position const pos = first.get_position();
+ detail::outwarn(pos.file,pos.line) << "in column:" << pos.column << ", "
+ << "[br] and \\n are deprecated" << ".\n";
+ phrase << break_mark;
+ }
+
+ void error_action::operator()(iterator first, iterator /*last*/) const
     {
         boost::spirit::file_position const pos = first.get_position();
         detail::outerr(pos.file,pos.line)
             << "Syntax Error near column " << pos.column << ".\n";
     }
 
- void phrase_action::operator()(iterator const& first, iterator const& last) const
+ void phrase_action::operator()(iterator first, iterator last) const
     {
- if (out)
+ std::string str;
+ phrase.swap(str);
+ out << pre << str << post;
+ }
+
+ void header_action::operator()(iterator first, iterator last) const
+ {
+ std::string str;
+ phrase.swap(str);
+
+ if (qbk_version_n < 103) // version 1.2 and below
+ {
+ out << "<anchor id=\""
+ << section_id << '.'
+ << detail::make_identifier(str.begin(), str.end())
+ << "\" />"
+ << pre << str << post
+ ;
+ }
+ else // version 1.3 and above
         {
- std::string str = phrase.str();
- detail::convert_nbsp(str);
- phrase.str(std::string());
- out << pre << str << post;
+ std::string anchor =
+ library_id + '.' + qualified_section_id + '.' +
+ detail::make_identifier(str.begin(), str.end());
+
+ out << "<anchor id=\"" << anchor << "\"/>"
+ << pre
+ << "<link linkend=\"" << anchor << "\">"
+ << str
+ << "</link>"
+ << post
+ ;
         }
     }
 
- void anchored_phrase_action::operator()(iterator const& first, iterator const& last) const
+ void generic_header_action::operator()(iterator first, iterator last) const
+ {
+ int level_ = section_level + 2; // section_level is zero-based. We need to use a
+ // 0ne-based heading which is one greater
+ // than the current. Thus: section_level + 2.
+ if (level_ > 6) // The max is h6, clip it if it goes
+ level_ = 6; // further than that
+ std::string str;
+ phrase.swap(str);
+
+ std::string anchor =
+ library_id + '.' + qualified_section_id + '.' +
+ detail::make_identifier(str.begin(), str.end());
+
+ out
+ << "<anchor id=\"" << anchor << "\"/>"
+ << "<bridgehead renderas=\"sect" << level_ << "\">"
+ << "<link linkend=\"" << anchor << "\">"
+ << str
+ << "</link>"
+ << "</bridgehead>"
+ ;
+ }
+
+ void simple_phrase_action::operator()(iterator first, iterator last) const
     {
- if (out)
+ out << pre;
+ std::string str(first, last);
+ if (std::string const* ptr = find(macro, str.c_str()))
         {
- std::string str = phrase.str();
- detail::convert_nbsp(str);
- if (qbk_version_n < 103) // version 1.2 and below
- {
- out << "<anchor id=\""
- << section_id << '.'
- << detail::make_identifier(str.begin(), str.end())
- << "\" />";
- }
- else // version 1.3 and above
- {
- out << "<anchor id=\""
- << library_id << '.' << qualified_section_id << '.'
- << detail::make_identifier(str.begin(), str.end())
- << "\" />";
- }
- phrase.str(std::string());
- out << pre << str << post;
+ out << *ptr;
         }
+ else
+ {
+ while (first != last)
+ detail::print_char(*first++, out.get());
+ }
+ out << post;
+ }
+
+ void cond_phrase_action_pre::operator()(iterator first, iterator last) const
+ {
+ std::string str(first, last);
+ conditions.push_back(find(macro, str.c_str()));
+ out.push(); // save the stream
     }
 
- void simple_phrase_action::operator()(iterator first, iterator const& last) const
+ void cond_phrase_action_post::operator()(iterator first, iterator last) const
     {
- if (out)
+ bool symbol_found = conditions.back();
+ conditions.pop_back();
+
+ if (first == last || !symbol_found)
         {
- out << pre;
- while (first != last)
- detail::print_char(*first++, out);
- out << post;
+ out.pop(); // restore the stream
+ }
+ else
+ {
+ std::string save;
+ out.swap(save);
+ out.pop(); // restore the stream
+ out << save; // print the body
         }
     }
 
- void list_action::operator()(iterator const& first, iterator const& last) const
+ void list_action::operator()(iterator first, iterator last) const
     {
         BOOST_ASSERT(!list_marks.empty()); // there must be at least one item in the stack
- std::string str = list_buffer.str();
- list_buffer.str(std::string());
- out << str;
+ out << list_buffer.str();
+ list_buffer.clear();
 
         while (!list_marks.empty())
         {
@@ -91,10 +156,10 @@
                 out << std::string("\n</listitem>");
         }
 
- indent = -1; // reset
+ list_indent = -1; // reset
     }
 
- void list_format_action::operator()(iterator first, iterator const& last) const
+ void list_format_action::operator()(iterator first, iterator last) const
     {
         int new_indent = 0;
         while (first != last && (*first == ' ' || *first == '\t'))
@@ -115,15 +180,15 @@
         char mark = *first;
         BOOST_ASSERT(mark == '#' || mark == '*'); // expecting a mark
 
- if (indent == -1) // the very start
+ if (list_indent == -1) // the very start
         {
             BOOST_ASSERT(new_indent == 0);
         }
 
- if (new_indent > indent)
+ if (new_indent > list_indent)
         {
- indent = new_indent;
- list_marks.push(mark_type(mark, indent));
+ list_indent = new_indent;
+ list_marks.push(mark_type(mark, list_indent));
             if (list_marks.size() > 1)
             {
                 // Make this new list a child of the previous list.
@@ -131,22 +196,22 @@
                 // </listitem> to accomodate this sub-list. We'll close
                 // the listelem later.
 
- std::string str = out.str();
+ std::string str;
+ out.swap(str);
                 std::string::size_type pos = str.rfind("\n</listitem>");
                 BOOST_ASSERT(pos <= str.size());
                 str.erase(str.begin()+pos, str.end());
- out.str(std::string());
                 out << str;
             }
             out << std::string((mark == '#') ? "<orderedlist>\n" : "<itemizedlist>\n");
         }
 
- else if (new_indent < indent)
+ else if (new_indent < list_indent)
         {
             BOOST_ASSERT(!list_marks.empty());
- indent = new_indent;
+ list_indent = new_indent;
 
- while (!list_marks.empty() && (indent < list_marks.top().second))
+ while (!list_marks.empty() && (list_indent < list_marks.top().second))
             {
                 char mark = list_marks.top().first;
                 list_marks.pop();
@@ -156,7 +221,7 @@
             }
         }
 
- if (mark != list_marks.top().first) // new_indent == indent
+ if (mark != list_marks.top().first) // new_indent == list_indent
         {
             boost::spirit::file_position const pos = first.get_position();
             detail::outerr(pos.file,pos.line)
@@ -166,32 +231,25 @@
         }
     }
 
- void span::operator()(iterator first, iterator const& last) const
+ void span::operator()(iterator first, iterator last) const
     {
- if (out)
- {
- out << "<phrase role=\"" << name << "\">";
- while (first != last)
- detail::print_char(*first++, out);
- out << "</phrase>";
- }
+ out << "<phrase role=\"" << name << "\">";
+ while (first != last)
+ detail::print_char(*first++, out.get());
+ out << "</phrase>";
     }
 
     void unexpected_char::operator()(char) const
     {
- if (out)
- out << '#'; // print out an unexpected character
+ out << '#'; // print out an unexpected character
     }
 
- void anchor_action::operator()(iterator first, iterator const& last) const
+ void anchor_action::operator()(iterator first, iterator last) const
     {
- if (out)
- {
- out << "<anchor id=\"";
- while (first != last)
- detail::print_char(*first++, out);
- out << "\" />\n";
- }
+ out << "<anchor id=\"";
+ while (first != last)
+ detail::print_char(*first++, out.get());
+ out << "\" />\n";
     }
 
     void do_macro_action::operator()(std::string const& str) const
@@ -216,80 +274,66 @@
 
     void space::operator()(char ch) const
     {
- if (out)
- {
- detail::print_space(ch, out);
- }
+
+ detail::print_space(ch, out.get());
     }
 
- void space::operator()(iterator first, iterator const& last) const
+ void space::operator()(iterator first, iterator last) const
     {
- if (out)
- {
- while (first != last)
- detail::print_space(*first++, out);
- }
+ while (first != last)
+ detail::print_space(*first++, out.get());
     }
 
- void pre_escape_back::operator()(iterator const& first, iterator const& last) const
+ void pre_escape_back::operator()(iterator first, iterator last) const
     {
- save = escape_actions.phrase.str(); // save the stream
+ escape_actions.phrase.push(); // save the stream
     }
 
- void post_escape_back::operator()(iterator const& first, iterator const& last) const
+ void post_escape_back::operator()(iterator first, iterator last) const
     {
- std::string str = escape_actions.phrase.str();
- escape_actions.phrase.str(save); // restore the stream
- out << str;
+ out << escape_actions.phrase.str();
+ escape_actions.phrase.pop(); // restore the stream
     }
 
- void code_action::operator()(iterator const& first, iterator const& last) const
+ void code_action::operator()(iterator first, iterator last) const
     {
- if (out)
- {
- std::string save = phrase.str();
- phrase.str(std::string());
+ std::string save;
+ phrase.swap(save);
 
- // preprocess the code section to remove the initial indentation
- std::string program_(first, last);
- detail::unindent(program_);
+ // preprocess the code section to remove the initial indentation
+ std::string program(first, last);
+ detail::unindent(program);
+ if (program.size() == 0)
+ return; // Nothing left to do here. The program is empty.
 
- // $$$ fix me $$$ this is wasteful. we have to convert
- // back to a vector<char> so we can use the same iterator type
- // used by the rest of the system, otherwise, it is wasteful
- // of function template instantiations
+ iterator first_(program.begin(), program.end());
+ iterator last_(program.end(), program.end());
+ first_.set_position(first.get_position());
 
- std::vector<char> program(program_.begin(), program_.end());
- iterator first_(program.begin(), program.end());
- iterator last_(program.end(), program.end());
- first_.set_position(first.get_position());
+ // print the code with syntax coloring
+ if (source_mode == "c++")
+ {
+ parse(first_, last_, cpp_p);
+ }
+ else if (source_mode == "python")
+ {
+ parse(first_, last_, python_p);
+ }
 
- // print the code with syntax coloring
- if (source_mode == "c++")
- {
- parse(first_, last_, cpp_p);
- }
- else if (source_mode == "python")
- {
- parse(first_, last_, python_p);
- }
-
- std::string str = temp.str();
- temp.str(std::string());
- phrase.str(std::string());
- phrase << save;
+ std::string str;
+ temp.swap(str);
+ phrase.swap(save);
 
- out << "<programlisting>\n";
- out << str;
- out << "</programlisting>\n";
- }
+ out << "<programlisting>\n";
+ out << str;
+ out << "</programlisting>\n";
     }
 
- void inline_code_action::operator()(iterator const& first, iterator const& last) const
+ void inline_code_action::operator()(iterator first, iterator last) const
     {
- std::string save = out.str();
- out.str(std::string());
-
+ std::string save;
+ out.swap(save);
+
         // print the code with syntax coloring
         if (source_mode == "c++")
         {
@@ -299,11 +343,10 @@
         {
             parse(first, last, python_p);
         }
- std::string str = temp.str();
- temp.str(std::string());
- out.str(std::string());
+ std::string str;
+ temp.swap(str);
+ out.swap(save);
 
- out << save;
         out << "<code>";
         out << str;
         out << "</code>";
@@ -314,22 +357,22 @@
         phrase << ch;
     }
 
- void raw_char_action::operator()(iterator const& first, iterator const& /*last*/) const
+ void raw_char_action::operator()(iterator first, iterator /*last*/) const
     {
         phrase << *first;
     }
 
     void plain_char_action::operator()(char ch) const
     {
- detail::print_char(ch, phrase);
+ detail::print_char(ch, phrase.get());
     }
 
- void plain_char_action::operator()(iterator const& first, iterator const& /*last*/) const
+ void plain_char_action::operator()(iterator first, iterator /*last*/) const
     {
- detail::print_char(*first, phrase);
+ detail::print_char(*first, phrase.get());
     }
 
- void image_action::operator()(iterator first, iterator const& last) const
+ void image_action::operator()(iterator first, iterator last) const
     {
         fs::path const img_path(std::string(first, last));
 
@@ -337,40 +380,259 @@
 
         phrase << "<imageobject><imagedata fileref=\"";
         while (first != last)
- detail::print_char(*first++, phrase);
+ detail::print_char(*first++, phrase.get());
         phrase << "\"></imagedata></imageobject>";
 
         // Also add a textobject -- use the basename of the image file.
         // This will mean we get "alt" attributes of the HTML img.
         phrase << "<textobject><phrase>";
- detail::print_string(fs::basename(img_path), phrase);
+ detail::print_string(fs::basename(img_path), phrase.get());
         phrase << "</phrase></textobject>";
 
         phrase << "</inlinemediaobject>";
     }
 
- void indentifier_action::operator()(iterator const& first, iterator const& last) const
+ void macro_identifier_action::operator()(iterator first, iterator last) const
     {
         actions.macro_id.assign(first, last);
- actions.phrase_save = actions.phrase.str();
- actions.phrase.str(std::string());
+ actions.phrase.push(); // save the phrase
     }
 
- void macro_def_action::operator()(iterator const& first, iterator const& last) const
+ void macro_definition_action::operator()(iterator first, iterator last) const
     {
         actions.macro.add(
             actions.macro_id.begin()
           , actions.macro_id.end()
           , actions.phrase.str());
- actions.phrase.str(actions.phrase_save);
+ actions.phrase.pop(); // restore the phrase
+ }
+
+ void template_body_action::operator()(iterator first, iterator last) const
+ {
+ BOOST_ASSERT(actions.template_info.size());
+ if (actions.templates.find_top_scope(actions.template_info[0]))
+ {
+ boost::spirit::file_position const pos = first.get_position();
+ detail::outerr(pos.file,pos.line)
+ << "Template Redefinition: " << actions.template_info[0] << std::endl;
+ }
+
+ actions.template_info.push_back(std::string(first, last));
+ actions.templates.add(
+ actions.template_info[0]
+ , boost::make_tuple(actions.template_info, first.get_position()));
+ actions.template_info.clear();
+ }
+
+ namespace
+ {
+ bool break_arguments(
+ std::vector<std::string>& template_info
+ , std::vector<std::string> const& template_
+ , boost::spirit::file_position const& pos
+ )
+ {
+ if (template_.size()-1 != template_info.size())
+ {
+ while (template_.size()-1 != template_info.size())
+ {
+ // Try to break the last argument at the first space found
+ // and push it into the back of template_info. Do this
+ // recursively until we have all the expected number of
+ // arguments, or if there are no more spaces left.
+
+ std::string& str = template_info.back();
+ std::string::size_type l_pos = str.find_first_of(" \t\r\n");
+ if (l_pos == std::string::npos)
+ break;
+ std::string first(str.begin(), str.begin()+l_pos);
+ std::string::size_type r_pos = str.find_first_not_of(" \t\r\n", l_pos);
+ std::string second(str.begin()+r_pos, str.end());
+ str = first;
+ template_info.push_back(second);
+ }
+
+ if (template_.size()-1 != template_info.size())
+ {
+ detail::outerr(pos.file, pos.line)
+ << "Invalid number of arguments passed. Expecting: "
+ << template_.size()-2
+ << " argument(s), got: "
+ << template_info.size()-1
+ << " argument(s) instead."
+ << std::endl;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ std::pair<bool, std::vector<std::string>::const_iterator>
+ get_arguments(
+ std::vector<std::string>& template_info
+ , std::vector<std::string> const& template_
+ , boost::spirit::file_position const& pos
+ , quickbook::actions& actions
+ )
+ {
+ std::vector<std::string>::const_iterator arg = template_info.begin()+1;
+ std::vector<std::string>::const_iterator tpl = template_.begin()+1;
+
+ // Store each of the argument passed in as local templates:
+ while (arg != template_info.end())
+ {
+ std::vector<std::string> tinfo;
+ tinfo.push_back(*tpl);
+ tinfo.push_back(*arg);
+ template_symbol template_(tinfo, pos);
+
+ if (template_symbol* p = actions.templates.find_top_scope(*tpl))
+ {
+ detail::outerr(pos.file,pos.line)
+ << "Duplicate Symbol Found" << std::endl;
+ return std::make_pair(false, tpl);
+ }
+ else
+ {
+ actions.templates.add(*tpl, template_);
+ }
+ ++arg; ++tpl;
+ }
+ return std::make_pair(true, tpl);
+ }
+
+ bool parse_template(
+ std::string& body
+ , std::string& result
+ , boost::spirit::file_position const& template_pos
+ , quickbook::actions& actions
+ )
+ {
+ simple_phrase_grammar<quickbook::actions> phrase_p(actions);
+ block_grammar<quickbook::actions, true> block_p(actions);
+
+ // How do we know if we are to parse the template as a block or
+ // a phrase? We apply a simple heuristic: if the body starts with
+ // a newline, then we regard it as a block, otherwise, we parse
+ // it as a phrase.
+
+ std::string::const_iterator iter = body.begin();
+ while (iter != body.end() && ((*iter == ' ') || (*iter == '\t')))
+ ++iter; // skip spaces and tabs
+ bool is_block = (iter != body.end()) && ((*iter == '\r') || (*iter == '\n'));
+ bool r = false;
+
+ if (actions.template_escape)
+ {
+ // escape the body of the template
+ // we just copy out the literal body
+ result = body;
+ r = true;
+ }
+ else if (!is_block)
+ {
+ // do a phrase level parse
+ iterator first(body.begin(), body.end(), actions.filename.native_file_string().c_str());
+ first.set_position(template_pos);
+ iterator last(body.end(), body.end());
+ r = boost::spirit::parse(first, last, phrase_p).full;
+ actions.phrase.swap(result);
+ }
+ else
+ {
+ // do a block level parse
+ // ensure that we have enough trailing newlines to eliminate
+ // the need to check for end of file in the grammar.
+ body.push_back('\n');
+ body.push_back('\n');
+ while (iter != body.end() && ((*iter == '\r') || (*iter == '\n')))
+ ++iter; // skip initial newlines
+ iterator first(iter, body.end(), actions.filename.native_file_string().c_str());
+ first.set_position(template_pos);
+ iterator last(body.end(), body.end());
+ r = boost::spirit::parse(first, last, block_p).full;
+ actions.out.swap(result);
+ }
+ return r;
+ }
     }
 
- void link_action::operator()(iterator first, iterator const& last) const
+ void do_template_action::operator()(iterator first, iterator) const
+ {
+ boost::spirit::file_position const pos = first.get_position();
+ ++actions.template_depth;
+ if (actions.template_depth > actions.max_template_depth)
+ {
+ detail::outerr(pos.file,pos.line)
+ << "Infinite loop detected" << std::endl;
+ --actions.template_depth;
+ return;
+ }
+
+ std::string result;
+ actions.push(); // scope the actions' states
+ {
+ template_symbol const* symbol =
+ actions.templates.find(actions.template_info[0]);
+ BOOST_ASSERT(symbol);
+
+ std::vector<std::string> template_ = boost::get<0>(*symbol);
+ boost::spirit::file_position template_pos = boost::get<1>(*symbol);
+
+ std::vector<std::string> template_info;
+ std::swap(template_info, actions.template_info);
+
+ ///////////////////////////////////
+ // Break the arguments
+ if (!break_arguments(template_info, template_, pos))
+ {
+ actions.pop(); // restore the actions' states
+ --actions.template_depth;
+ return;
+ }
+
+ ///////////////////////////////////
+ // 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(template_info, template_, pos, actions);
+
+ if (!get_arg_result)
+ {
+ actions.pop(); // restore the actions' states
+ --actions.template_depth;
+ return;
+ }
+
+ ///////////////////////////////////
+ // parse the template body:
+ std::string body;
+ body.assign(tpl->begin(), tpl->end());
+ body.reserve(body.size()+2); // reserve 2 more
+
+ if (!parse_template(body, result, template_pos, actions))
+ {
+ boost::spirit::file_position const pos = first.get_position();
+ detail::outerr(pos.file,pos.line)
+ << "Expanding template" << std::endl;
+ actions.pop(); // restore the actions' states
+ --actions.template_depth;
+ return;
+ }
+ }
+
+ actions.pop(); // restore the actions' states
+ actions.phrase << result; // print it!!!
+ --actions.template_depth;
+ }
+
+ void link_action::operator()(iterator first, iterator last) const
     {
         iterator save = first;
         phrase << tag;
         while (first != last)
- detail::print_char(*first++, phrase);
+ detail::print_char(*first++, phrase.get());
         phrase << "\">";
 
         // Yes, it is safe to dereference last here. When we
@@ -382,72 +644,92 @@
         {
             first = save;
             while (first != last)
- detail::print_char(*first++, phrase);
+ detail::print_char(*first++, phrase.get());
         }
     }
 
     void variablelist_action::operator()(iterator, iterator) const
     {
- if (!!actions.out)
- {
- actions.out << "<variablelist>\n";
+ actions.out << "<variablelist>\n";
 
- actions.out << "<title>";
- std::string::iterator first = actions.table_title.begin();
- std::string::iterator last = actions.table_title.end();
- while (first != last)
- detail::print_char(*first++, actions.out);
- actions.out << "</title>\n";
+ actions.out << "<title>";
+ std::string::iterator first = actions.table_title.begin();
+ std::string::iterator last = actions.table_title.end();
+ while (first != last)
+ detail::print_char(*first++, actions.out.get());
+ actions.out << "</title>\n";
 
- std::string str = actions.phrase.str();
- actions.phrase.str(std::string());
- actions.out << str;
-
- actions.out << "</variablelist>\n";
- actions.table_span = 0;
- actions.table_header.clear();
- actions.table_title.clear();
- }
+ std::string str;
+ actions.phrase.swap(str);
+ actions.out << str;
+
+ actions.out << "</variablelist>\n";
+ actions.table_span = 0;
+ actions.table_header.clear();
+ actions.table_title.clear();
+ }
+
+ void start_varlistitem_action::operator()(char) const
+ {
+ phrase << start_varlistitem_;
+ phrase.push();
+ }
+
+ void end_varlistitem_action::operator()(char) const
+ {
+ std::string str;
+ temp_para.swap(str);
+ phrase.pop();
+ phrase << str << end_varlistitem_;
     }
 
     void table_action::operator()(iterator, iterator) const
     {
- if (!!actions.out)
+ std::string::iterator first = actions.table_title.begin();
+ std::string::iterator last = actions.table_title.end();
+ bool has_title = first != last;
+
+ if (has_title)
         {
- actions.out << "<informaltable frame=\"all\">\n"
- << "<bridgehead renderas=\"sect4\">";
+ actions.out << "<table frame=\"all\">\n";
+ actions.out << "<title>";
+ while (first != last)
+ detail::print_char(*first++, actions.out.get());
+ actions.out << "</title>";
+ }
+ else
+ {
+ actions.out << "<informaltable frame=\"all\">\n";
+ }
 
- std::string::iterator first = actions.table_title.begin();
- std::string::iterator last = actions.table_title.end();
- if (first != last) // allow no title
- {
- actions.out << "<phrase role=\"table-title\">";
- while (first != last)
- detail::print_char(*first++, actions.out);
- actions.out << "</phrase>";
- }
- actions.out << "</bridgehead>\n"
- << "<tgroup cols=\"" << actions.table_span << "\">\n";
+ actions.out << "<tgroup cols=\"" << actions.table_span << "\">\n";
 
- if (!actions.table_header.empty())
- {
- actions.out << "<thead>" << actions.table_header << "</thead>\n";
- }
+ if (!actions.table_header.empty())
+ {
+ actions.out << "<thead>" << actions.table_header << "</thead>\n";
+ }
+
+ actions.out << "<tbody>\n";
 
- actions.out << "<tbody>\n";
+ std::string str;
+ actions.phrase.swap(str);
+ actions.out << str;
 
- std::string str = actions.phrase.str();
- detail::convert_nbsp(str);
- actions.phrase.str(std::string());
- actions.out << str;
+ actions.out << "</tbody>\n"
+ << "</tgroup>\n";
 
- actions.out << "</tbody>\n"
- << "</tgroup>\n"
- << "</informaltable>\n";
- actions.table_span = 0;
- actions.table_header.clear();
- actions.table_title.clear();
+ if (has_title)
+ {
+ actions.out << "</table>\n";
         }
+ else
+ {
+ actions.out << "</informaltable>\n";
+ }
+
+ actions.table_span = 0;
+ actions.table_header.clear();
+ actions.table_title.clear();
     }
 
     void start_row_action::operator()(char) const
@@ -455,8 +737,7 @@
         // the first row is the header
         if (header.empty() && !phrase.str().empty())
         {
- header = phrase.str();
- phrase.str(std::string());
+ phrase.swap(header);
         }
 
         phrase << start_row_;
@@ -470,106 +751,301 @@
 
     void start_col_action::operator()(char) const
     {
- phrase << start_cell_;
+ phrase << start_cell_;
+ phrase.push();
         ++span;
     }
 
- void begin_section_action::operator()(iterator first, iterator const& last) const
+ void end_col_action::operator()(char) const
+ {
+ std::string str;
+ temp_para.swap(str);
+ phrase.pop();
+ phrase << str << end_cell_;
+ }
+
+ void begin_section_action::operator()(iterator first, iterator last) const
     {
         if (section_id.empty())
             section_id = detail::make_identifier(first, last);
 
- if (level != 0)
+ if (section_level != 0)
             qualified_section_id += '.';
         else
             BOOST_ASSERT(qualified_section_id.empty());
         qualified_section_id += section_id;
- ++level;
+ ++section_level;
 
         if (qbk_version_n < 103) // version 1.2 and below
         {
- out << "\n<section id=\""
+ out << "\n<section id=\""
                 << library_id << "." << section_id << "\">\n";
         }
         else // version 1.3 and above
         {
- out << "\n<section id=\"" << library_id
+ out << "\n<section id=\"" << library_id
                 << "." << qualified_section_id << "\">\n";
         }
         std::string str;
- str = phrase.str();
- phrase.str(std::string());
- out << "<title>" << str << "</title>\n";
+ phrase.swap(str);
+
+ if (qbk_version_n < 103) // version 1.2 and below
+ {
+ out << "<title>" << str << "</title>\n";
+ }
+ else // version 1.3 and above
+ {
+ out << "<title>"
+ << "<link linkend=\"" << library_id
+ << "." << qualified_section_id << "\">"
+ << str
+ << "</link>"
+ << "</title>\n"
+ ;
+ }
     }
 
- void end_section_action::operator()(iterator const& first, iterator const& last) const
+ void end_section_action::operator()(iterator first, iterator last) const
     {
         out << "</section>";
 
- --level;
- if (level < 0)
+ --section_level;
+ if (section_level < 0)
         {
             boost::spirit::file_position const pos = first.get_position();
             detail::outerr(pos.file,pos.line)
                 << "Mismatched [endsect] near column " << pos.column << ".\n";
+ // $$$ TODO: somehow fail parse else BOOST_ASSERT(std::string::npos != n)
+ // $$$ below will assert.
         }
- if (level == 0)
+ if (section_level == 0)
         {
             qualified_section_id.clear();
         }
         else
         {
- std::string::size_type const n =
+ std::string::size_type const n =
                 qualified_section_id.find_last_of('.');
             BOOST_ASSERT(std::string::npos != n);
             qualified_section_id.erase(n, std::string::npos);
         }
     }
 
- fs::path path_difference(fs::path const& outdir, fs::path const& xmlfile)
+ fs::path path_difference(fs::path const& outdir, fs::path const& path)
     {
- fs::path outtmp, xmltmp;
- fs::path::iterator out = outdir.begin(), xml = xmlfile.begin();
- for(; out != outdir.end() && xml != xmlfile.end(); ++out, ++xml)
+ fs::path outtmp, temp;
+ fs::path::iterator out = outdir.begin(), file = path.begin();
+ for(; out != outdir.end() && file != path.end(); ++out, ++file)
         {
- if(!fs::equivalent(outtmp /= *out, xmltmp /= *xml))
+ if(!fs::equivalent(outtmp /= *out, temp /= *file))
                 break;
         }
         std::divides<fs::path> concat;
         out = (out == outdir.begin()) ? outdir.end() : out;
- xmltmp = std::accumulate(out, outdir.end(), fs::path(), boost::bind(concat, _1, ".."));
- return std::accumulate(xml, xmlfile.end(), xmltmp, concat);
+ temp = std::accumulate(out, outdir.end(), fs::path(), boost::bind(concat, _1, ".."));
+ return std::accumulate(file, path.end(), temp, concat);
     }
 
- void xinclude_action::operator()(iterator const& first, iterator const& last) const
+ fs::path calculate_relative_path(
+ iterator first, iterator last, quickbook::actions& actions)
     {
- // Given an xml file to include and the current filename, calculate the
- // path to the XML file relative to the output directory.
- fs::path xmlfile(std::string(first, last));
- if (!xmlfile.is_complete())
+ // Given a source file and the current filename, calculate the
+ // path to the source file relative to the output directory.
+ fs::path path(std::string(first, last));
+ if (!path.is_complete())
         {
             fs::path infile = fs::complete(actions.filename).normalize();
- xmlfile = (infile.branch_path() / xmlfile).normalize();
+ path = (infile.branch_path() / path).normalize();
             fs::path outdir = fs::complete(actions.outdir).normalize();
- xmlfile = path_difference(outdir, xmlfile);
+ path = path_difference(outdir, path);
         }
+ return path;
+ }
+
+ void xinclude_action::operator()(iterator first, iterator last) const
+ {
+ fs::path path = calculate_relative_path(first, last, actions);
         out << "\n<xi:include href=\"";
- detail::print_string(detail::escape_uri(xmlfile.string()), out);
+ detail::print_string(detail::escape_uri(path.string()), out.get());
         out << "\" />\n";
     }
 
- void include_action::operator()(iterator const& first, iterator const& last) const
+ void cpp_code_snippet_grammar::pass_thru(iterator first, iterator last) const
     {
- fs::path filein(std::string(first, last), fs::native);
- std::string doc_type, doc_id, doc_dirname, doc_last_revision;
+ code += *first;
+ }
+
+ namespace detail
+ {
+ int callout_id = 0;
+ }
 
- // check to see if the path is complete and if not, make it relative to the current path
- if (!filein.is_complete())
+ void cpp_code_snippet_grammar::callout(iterator first, iterator last, char const* role) const
+ {
+ using detail::callout_id;
+ code += "``'''";
+ code += std::string("<phrase role=\"") + role + "\">";
+ code += "<co id=\"";
+ code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "co\" ";
+ code += "linkends=\"";
+ code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "\" />";
+ code += "</phrase>";
+ code += "'''``";
+
+ callouts.push_back(std::string(first, last));
+ }
+
+ void cpp_code_snippet_grammar::inline_callout(iterator first, iterator last) const
+ {
+ callout(first, last, "callout_bug");
+ }
+
+ void cpp_code_snippet_grammar::line_callout(iterator first, iterator last) const
+ {
+ callout(first, last, "line_callout_bug");
+ }
+
+ void cpp_code_snippet_grammar::escaped_comment(iterator first, iterator last) const
+ {
+ if (!code.empty())
+ {
+ detail::unindent(code); // remove all indents
+ if (code.size() != 0)
+ {
+ snippet += "\n\n``\n" + code + "``\n\n";
+ code.clear();
+ }
+ }
+ std::string temp(first, last);
+ detail::unindent(temp); // remove all indents
+ if (temp.size() != 0)
+ {
+ snippet += "\n" + temp; // add a linebreak to allow block marskups
+ }
+ }
+
+ void cpp_code_snippet_grammar::compile(iterator first, iterator last) const
+ {
+ using detail::callout_id;
+ if (!code.empty())
         {
- filein = actions.filename.branch_path() / filein;
- filein.normalize();
+ detail::unindent(code); // remove all indents
+ if (code.size() != 0)
+ {
+ snippet += "\n\n```\n" + code + "```\n\n";
+ }
+
+ if(callouts.size() > 0)
+ {
+ snippet += "'''<calloutlist>'''";
+ for (size_t i = 0; i < callouts.size(); ++i)
+ {
+ snippet += "'''<callout arearefs=\"";
+ snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "co\" ";
+ snippet += "id=\"";
+ snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "\">";
+ snippet += "'''";
+
+ snippet += "'''<para>'''";
+ snippet += callouts[i];
+ snippet += "'''</para>'''";
+ snippet += "'''</callout>'''";
+ }
+ snippet += "'''</calloutlist>'''";
+ }
         }
 
+ std::vector<std::string> tinfo;
+ tinfo.push_back(id);
+ tinfo.push_back(snippet);
+ storage.push_back(boost::make_tuple(tinfo, first.get_position()));
+
+ callout_id += callouts.size();
+ callouts.clear();
+ code.clear();
+ snippet.clear();
+ id.clear();
+ }
+
+ void load_snippets(
+ std::string const& file
+ , std::vector<template_symbol>& storage // snippets are stored in a
+ // vector of template_symbols
+ , std::string const& extension
+ , std::string const& doc_id)
+ {
+ std::string code;
+ int err = detail::load(file, code);
+ if (err != 0)
+ return; // return early on error
+
+ typedef position_iterator<std::string::const_iterator> iterator_type;
+ iterator_type first(code.begin(), code.end(), file);
+ iterator_type last(code.end(), code.end());
+
+ cpp_code_snippet_grammar g(storage, doc_id);
+ boost::spirit::parse(first, last, g);
+ }
+
+ namespace
+ {
+ fs::path include_search(fs::path const & current, std::string const & name)
+ {
+ fs::path path(name,fs::native);
+
+ // If the path is relative, try and resolve it.
+ if (!path.is_complete())
+ {
+ // See if it can be found locally first.
+ if (fs::exists(current / path))
+ {
+ return current / path;
+ }
+
+ // Search in each of the include path locations.
+ BOOST_FOREACH(std::string const & p, include_path)
+ {
+ fs::path full(p,fs::native);
+ full /= path;
+ if (fs::exists(full))
+ {
+ return full;
+ }
+ }
+ }
+
+ return path;
+ }
+ }
+
+ void import_action::operator()(iterator first, iterator last) const
+ {
+ fs::path path = include_search(actions.filename.branch_path(), std::string(first,last));
+ std::string ext = fs::extension(path);
+ std::vector<template_symbol> storage;
+ load_snippets(path.string(), storage, ext, actions.doc_id);
+
+ BOOST_FOREACH(template_symbol const& ts, storage)
+ {
+ std::string tname = boost::get<0>(ts)[0];
+ if (actions.templates.find_top_scope(tname))
+ {
+ boost::spirit::file_position const pos = boost::get<1>(ts);
+ detail::outerr(pos.file, pos.line)
+ << "Template Redefinition: " << tname << std::endl;
+ }
+ else
+ {
+ actions.templates.add(tname, ts);
+ }
+ }
+ }
+
+ void include_action::operator()(iterator first, iterator last) const
+ {
+ fs::path filein = include_search(actions.filename.branch_path(), std::string(first,last));
+ std::string doc_type, doc_id, doc_dirname, doc_last_revision;
+
         // swap the filenames
         std::swap(actions.filename, filein);
 
@@ -580,9 +1056,11 @@
         actions.doc_last_revision.swap(doc_last_revision);
 
         // scope the macros
- macros_type macro = actions.macro;
+ string_symbols macro = actions.macro;
+ // scope the templates
+ //~ template_symbols templates = actions.templates; $$$ fixme $$$
 
- // if an id is specified in this include (in in [include:id foo.qbk]
+ // if an id is specified in this include (as in [include:id foo.qbk])
         // then use it as the doc_id.
         if (!actions.include_doc_id.empty())
         {
@@ -604,15 +1082,18 @@
         actions.doc_dirname.swap(doc_dirname);
         actions.doc_last_revision.swap(doc_last_revision);
 
+ // restore the macros
         actions.macro = macro;
+ // restore the templates
+ //~ actions.templates = templates; $$$ fixme $$$
     }
 
     void xml_author::operator()(std::pair<std::string, std::string> const& author) const
     {
- out << " <author>\n"
- << " <firstname>" << author.first << "</firstname>\n"
- << " <surname>" << author.second << "</surname>\n"
- << " </author>\n";
+ out << " <author>\n"
+ << " <firstname>" << author.first << "</firstname>\n"
+ << " <surname>" << author.second << "</surname>\n"
+ << " </author>\n";
     }
 
     void xml_year::operator()(std::string const &year) const
@@ -620,9 +1101,9 @@
         out << " <year>" << year << "</year>\n";
     }
 
- void pre(std::ostream& out, quickbook::actions& actions, bool ignore_docinfo)
+ void pre(collector& out, quickbook::actions& actions, bool ignore_docinfo)
     {
- // The doc_info in the file has been parsed. Here's what we'll do
+ // The doc_info in the file has been parsed. Here's what we'll do
         // *before* anything else.
 
         if (actions.doc_id.empty())
@@ -639,7 +1120,7 @@
             char strdate[64];
             strftime(
                 strdate, sizeof(strdate),
- (debug_mode ?
+ (debug_mode ?
                     "DEBUG MODE Date: %Y/%m/%d %H:%M:%S $" :
                     "$" /* prevent CVS substitution */ "Date: %Y/%m/%d %H:%M:%S $"),
                 current_gm_time
@@ -665,7 +1146,7 @@
         }
         else
         {
- qbk_version_n = (qbk_major_version * 100) + qbk_minor_version;
+ qbk_version_n = (qbk_major_version * 100) + qbk_minor_version;
         }
 
         out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -679,10 +1160,15 @@
             << " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n"
             << " <" << actions.doc_type << "info>\n";
 
- for_each(
- actions.doc_authors.begin()
- , actions.doc_authors.end()
- , xml_author(out));
+ if(!actions.doc_authors.empty())
+ {
+ out << " <authorgroup>\n";
+ for_each(
+ actions.doc_authors.begin()
+ , actions.doc_authors.end()
+ , xml_author(out));
+ out << " </authorgroup>\n";
+ }
 
         if (!actions.doc_copyright_holder.empty())
         {
@@ -748,7 +1234,7 @@
         }
     }
 
- void post(std::ostream& out, quickbook::actions& actions, bool ignore_docinfo)
+ void post(collector& out, quickbook::actions& actions, bool ignore_docinfo)
     {
         // if we're ignoring the document info, do nothing.
         if (ignore_docinfo)
@@ -761,119 +1247,9 @@
         out << "\n</" << actions.doc_type << ">\n\n";
     }
 
- void phrase_to_string_action::operator()(iterator const& first, iterator const& last) const
+ void phrase_to_string_action::operator()(iterator first, iterator last) const
     {
- out = phrase.str();
- phrase.str(std::string());
- }
-
- actions::actions(char const* filein_, fs::path const& outdir_, std::ostream &out_)
- : filename(fs::complete(fs::path(filein_, fs::native)))
- , outdir(outdir_)
- , out(out_)
- , extract_doc_license(doc_license, phrase)
- , extract_doc_purpose(doc_purpose, phrase)
- , table_span(0)
- , table_header()
- , source_mode("c++")
- , code(out, phrase, temp, source_mode, macro, *this)
- , code_block(phrase, phrase, temp, source_mode, macro, *this)
- , inline_code(phrase, temp, source_mode, macro, *this)
- , paragraph(out, phrase, paragraph_pre, paragraph_post)
- , h1(out, phrase, doc_id, section_id, qualified_section_id, h1_pre, h1_post)
- , h2(out, phrase, doc_id, section_id, qualified_section_id, h2_pre, h2_post)
- , h3(out, phrase, doc_id, section_id, qualified_section_id, h3_pre, h3_post)
- , h4(out, phrase, doc_id, section_id, qualified_section_id, h4_pre, h4_post)
- , h5(out, phrase, doc_id, section_id, qualified_section_id, h5_pre, h5_post)
- , h6(out, phrase, doc_id, section_id, qualified_section_id, h6_pre, h6_post)
- , hr(out, hr_)
- , blurb(out, phrase, blurb_pre, blurb_post)
- , blockquote(out, phrase, blockquote_pre, blockquote_post)
- , preformatted(out, phrase, preformatted_pre, preformatted_post)
- , warning(out, phrase, warning_pre, warning_post)
- , caution(out, phrase, caution_pre, caution_post)
- , important(out, phrase, important_pre, important_post)
- , note(out, phrase, note_pre, note_post)
- , tip(out, phrase, tip_pre, tip_post)
- , plain_char(phrase)
- , raw_char(phrase)
- , image(phrase)
- , list_buffer()
- , list_marks()
- , indent(-1)
- , list(out, list_buffer, indent, list_marks)
- , list_format(list_buffer, indent, list_marks)
- , list_item(list_buffer, phrase, list_item_pre, list_item_post)
- , funcref_pre(phrase, funcref_pre_)
- , funcref_post(phrase, funcref_post_)
- , classref_pre(phrase, classref_pre_)
- , classref_post(phrase, classref_post_)
- , memberref_pre(phrase, memberref_pre_)
- , memberref_post(phrase, memberref_post_)
- , enumref_pre(phrase, enumref_pre_)
- , enumref_post(phrase, enumref_post_)
- , headerref_pre(phrase, headerref_pre_)
- , headerref_post(phrase, headerref_post_)
- , bold_pre(phrase, bold_pre_)
- , bold_post(phrase, bold_post_)
- , italic_pre(phrase, italic_pre_)
- , italic_post(phrase, italic_post_)
- , underline_pre(phrase, underline_pre_)
- , underline_post(phrase, underline_post_)
- , teletype_pre(phrase, teletype_pre_)
- , teletype_post(phrase, teletype_post_)
- , strikethrough_pre(phrase, strikethrough_pre_)
- , strikethrough_post(phrase, strikethrough_post_)
- , quote_pre(phrase, quote_pre_)
- , quote_post(phrase, quote_post_)
- , replaceable_pre(phrase, replaceable_pre_)
- , replaceable_post(phrase, replaceable_post_)
- , footnote_pre(phrase, footnote_pre_)
- , footnote_post(phrase, footnote_post_)
- , simple_bold(phrase, bold_pre_, bold_post_)
- , simple_italic(phrase, italic_pre_, italic_post_)
- , simple_underline(phrase, underline_pre_, underline_post_)
- , simple_teletype(phrase, teletype_pre_, teletype_post_)
- , simple_strikethrough(phrase, strikethrough_pre_, strikethrough_post_)
- , variablelist(*this)
- , start_varlistentry(phrase, start_varlistentry_)
- , end_varlistentry(phrase, end_varlistentry_)
- , start_varlistterm(phrase, start_varlistterm_)
- , end_varlistterm(phrase, end_varlistterm_)
- , start_varlistitem(phrase, start_varlistitem_)
- , end_varlistitem(phrase, end_varlistitem_)
- , break_(phrase, break_mark)
- , identifier(*this)
- , macro_def(*this)
- , do_macro(phrase)
- , url_pre(phrase, url_pre_)
- , url_post(phrase, url_post_)
- , link_pre(phrase, link_pre_)
- , link_post(phrase, link_post_)
- , table(*this)
- , start_row(phrase, table_span, table_header)
- , end_row(phrase, end_row_)
- , start_cell(phrase, table_span)
- , end_cell(phrase, end_cell_)
- , anchor(out)
- , begin_section(out, phrase, doc_id, section_id, level, qualified_section_id)
- , end_section(out, level, qualified_section_id)
- , xinclude(out, *this)
- , include(*this)
- , level(0)
- , escape_pre(phrase, escape_pre_)
- , escape_post(phrase, escape_post_)
- {
- // turn off __FILENAME__ macro on debug mode = true
- std::string filename_str = debug_mode ?
- std::string("NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE") :
- filename.native_file_string();
-
- // add the predefined macros
- macro.add
- ("__DATE__", std::string(quickbook_get_date))
- ("__TIME__", std::string(quickbook_get_time))
- ("__FILENAME__", filename_str)
- ;
+ phrase.swap(out);
     }
 }
+

Modified: branches/release/tools/quickbook/detail/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions.hpp (original)
+++ branches/release/tools/quickbook/detail/actions.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -16,140 +16,45 @@
 #include <vector>
 #include <stack>
 #include <algorithm>
-#include <sstream>
 #include <boost/spirit/iterator/position_iterator.hpp>
 #include <boost/filesystem/operations.hpp>
+#include <boost/foreach.hpp>
+#include <boost/tuple/tuple.hpp>
 #include "../syntax_highlight.hpp"
-#include "utils.hpp"
+#include "./collector.hpp"
+#include "./template_stack.hpp"
+#include "./utils.hpp"
 
 #ifdef BOOST_MSVC
 // disable copy/assignment could not be generated, unreferenced formal params
+#pragma warning (push)
 #pragma warning(disable : 4511 4512 4100)
 #endif
 
 namespace quickbook
 {
     namespace fs = boost::filesystem;
- typedef std::vector<char> file_storage;
- typedef position_iterator<file_storage::const_iterator> iterator;
- typedef std::string::const_iterator string_iterator;
+ typedef position_iterator<std::string::const_iterator> iterator;
+ typedef symbols<std::string> string_symbols;
+
     struct actions;
     extern tm* current_time; // the current time
     extern tm* current_gm_time; // the current UTC time
- extern bool debug_mode;
+ extern bool debug_mode;
     extern unsigned qbk_major_version;
     extern unsigned qbk_minor_version;
     extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
+ extern std::vector<std::string> include_path;
 
     // forward declarations
     struct actions;
     int parse(char const* filein_, actions& actor, bool ignore_docinfo = false);
 
- namespace
- {
- // Some markups
-
- const char* paragraph_pre = "<para>\n";
- const char* paragraph_post = "</para>\n";
- const char* h1_pre = "<bridgehead renderas=\"sect1\">";
- const char* h1_post = "</bridgehead>";
- const char* h2_pre = "<bridgehead renderas=\"sect2\">";
- const char* h2_post = "</bridgehead>";
- const char* h3_pre = "<bridgehead renderas=\"sect3\">";
- const char* h3_post = "</bridgehead>";
- const char* h4_pre = "<bridgehead renderas=\"sect4\">";
- const char* h4_post = "</bridgehead>";
- const char* h5_pre = "<bridgehead renderas=\"sect5\">";
- const char* h5_post = "</bridgehead>";
- const char* h6_pre = "<bridgehead renderas=\"sect6\">";
- const char* h6_post = "</bridgehead>";
- const char* hr_ = "<para/>";
-
- const char* blurb_pre =
- "<informaltable frame=\"all\">\n"
- "<?dbhtml table-width=\"74%\" ?>\n"
- "<tgroup cols=\"1\">\n"
- "<tbody>\n"
- "<row>\n"
- "<entry role=\"blurb\">\n"
- ;
-
- const char* blurb_post =
- "</entry>\n"
- "</row>\n"
- "</tbody>\n"
- "</tgroup>\n"
- "</informaltable>\n"
- ;
-
- const char* blockquote_pre = "<blockquote><para>";
- const char* blockquote_post = "</para></blockquote>";
- const char* preformatted_pre = "<programlisting>";
- const char* preformatted_post = "</programlisting>";
- const char* warning_pre = "<warning><para>";
- const char* warning_post = "</para></warning>";
- const char* caution_pre = "<caution><para>";
- const char* caution_post = "</para></caution>";
- const char* important_pre = "<important><para>";
- const char* important_post = "</para></important>";
- const char* note_pre = "<note><para>";
- const char* note_post = "</para></note>";
- const char* tip_pre = "<tip><para>";
- const char* tip_post = "</para></tip>";
- const char* list_item_pre = "<listitem>\n";
- const char* list_item_post = "\n</listitem>";
- const char* bold_pre_ = "<emphasis role=\"bold\">";
- const char* bold_post_ = "</emphasis>";
- const char* italic_pre_ = "<emphasis>";
- const char* italic_post_ = "</emphasis>";
- const char* underline_pre_ = "<emphasis role=\"underline\">";
- const char* underline_post_ = "</emphasis>";
- const char* teletype_pre_ = "<literal>";
- const char* teletype_post_ = "</literal>";
- const char* strikethrough_pre_ = "<emphasis role=\"strikethrough\">";
- const char* strikethrough_post_ = "</emphasis>";
- const char* quote_pre_ = "<quote>";
- const char* quote_post_ = "</quote>";
- const char* break_mark = "<sbr/>\n";
- const char* url_pre_ = "<ulink url=\"";
- const char* url_post_ = "</ulink>";
- const char* link_pre_ = "<link linkend=\"";
- const char* link_post_ = "</link>";
- const char* start_varlistentry_ = "<varlistentry>";
- const char* end_varlistentry_ = "</varlistentry>\n";
- const char* start_varlistterm_ = "<term>";
- const char* end_varlistterm_ = "</term>";
- const char* start_varlistitem_ = "<listitem>";
- const char* end_varlistitem_ = "</listitem>";
- const char* start_header_ = "<thead>";
- const char* end_header_ = "</thead>\n";
- const char* start_row_ = "<row>";
- const char* end_row_ = "</row>\n";
- const char* start_cell_ = "<entry>";
- const char* end_cell_ = "</entry>";
- const char* funcref_pre_ = "<functionname alt=\"";
- const char* funcref_post_ = "</functionname>";
- const char* classref_pre_ = "<classname alt=\"";
- const char* classref_post_ = "</classname>";
- const char* memberref_pre_ = "<methodname alt=\"";
- const char* memberref_post_ = "</methodname>";
- const char* enumref_pre_ = "<enumname alt=\"";
- const char* enumref_post_ = "</enumname>";
- const char* headerref_pre_ = "<headername alt=\"";
- const char* headerref_post_ = "</headername>";
- const char* footnote_pre_ = "<footnote><para>";
- const char* footnote_post_ = "</para></footnote>";
- const char* escape_pre_ = "<!--quickbook-escape-prefix-->";
- const char* escape_post_ = "<!--quickbook-escape-postfix-->";
- const char* replaceable_pre_ = "<replaceable>";
- const char* replaceable_post_ = "</replaceable>";
- }
-
     struct error_action
     {
         // Prints an error message to std::cerr
 
- void operator()(iterator const& first, iterator const& /*last*/) const;
+ void operator()(iterator first, iterator /*last*/) const;
     };
 
     struct phrase_action
@@ -158,35 +63,35 @@
         // unordered_list, ordered_list
 
         phrase_action(
- std::ostream& out,
- std::stringstream& phrase,
- std::string const& pre,
- std::string const& post)
+ collector& out,
+ collector& phrase,
+ std::string const& pre,
+ std::string const& post)
         : out(out)
         , phrase(phrase)
         , pre(pre)
         , post(post) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::stringstream& phrase;
- std::string pre;
- std::string post;
+ collector& out;
+ collector& phrase;
+ std::string pre;
+ std::string post;
     };
 
- struct anchored_phrase_action
+ struct header_action
     {
         // Handles paragraph, h1, h2, h3, h4, h5, h6,
 
- anchored_phrase_action(
- std::ostream& out,
- std::stringstream& phrase,
- std::string const& library_id,
- std::string const& section_id,
- std::string const& qualified_section_id,
- std::string const& pre,
- std::string const& post)
+ header_action(
+ collector& out,
+ collector& phrase,
+ std::string const& library_id,
+ std::string const& section_id,
+ std::string const& qualified_section_id,
+ std::string const& pre,
+ std::string const& post)
         : out(out)
         , phrase(phrase)
         , library_id(library_id)
@@ -195,15 +100,43 @@
         , pre(pre)
         , post(post) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
+
+ collector& out;
+ collector& phrase;
+ std::string const& library_id;
+ std::string const& section_id;
+ std::string const& qualified_section_id;
+ std::string pre;
+ std::string post;
+ };
+
+ struct generic_header_action
+ {
+ // Handles h
+
+ generic_header_action(
+ collector& out,
+ collector& phrase,
+ std::string const& library_id,
+ std::string const& section_id,
+ std::string const& qualified_section_id,
+ int const& section_level)
+ : out(out)
+ , phrase(phrase)
+ , library_id(library_id)
+ , section_id(section_id)
+ , qualified_section_id(qualified_section_id)
+ , section_level(section_level) {}
+
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::stringstream& phrase;
- std::string const& library_id;
- std::string const& section_id;
- std::string const& qualified_section_id;
- std::string pre;
- std::string post;
+ collector& out;
+ collector& phrase;
+ std::string const& library_id;
+ std::string const& section_id;
+ std::string const& qualified_section_id;
+ int const& section_level;
     };
 
     struct simple_phrase_action
@@ -211,18 +144,59 @@
         // Handles simple text formats
 
         simple_phrase_action(
- std::ostream& out,
- std::string const& pre,
- std::string const& post)
+ collector& out
+ , std::string const& pre
+ , std::string const& post
+ , string_symbols const& macro)
         : out(out)
         , pre(pre)
- , post(post) {}
+ , post(post)
+ , macro(macro) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::string pre;
- std::string post;
+ collector& out;
+ std::string pre;
+ std::string post;
+ string_symbols const& macro;
+ };
+
+ struct cond_phrase_action_pre
+ {
+ // Handles conditional phrases
+
+ cond_phrase_action_pre(
+ collector& out
+ , std::vector<bool>& conditions
+ , string_symbols const& macro)
+ : out(out)
+ , conditions(conditions)
+ , macro(macro) {}
+
+ void operator()(iterator first, iterator last) const;
+
+ collector& out;
+ std::vector<bool>& conditions;
+ string_symbols const& macro;
+ };
+
+ struct cond_phrase_action_post
+ {
+ // Handles conditional phrases
+
+ cond_phrase_action_post(
+ collector& out
+ , std::vector<bool>& conditions
+ , string_symbols const& macro)
+ : out(out)
+ , conditions(conditions)
+ , macro(macro) {}
+
+ void operator()(iterator first, iterator last) const;
+
+ collector& out;
+ std::vector<bool>& conditions;
+ string_symbols const& macro;
     };
 
     struct list_action
@@ -231,20 +205,20 @@
 
         typedef std::pair<char, int> mark_type;
         list_action(
- std::ostream& out
- , std::stringstream& list_buffer
- , int& indent
+ collector& out
+ , collector& list_buffer
+ , int& list_indent
           , std::stack<mark_type>& list_marks)
         : out(out)
         , list_buffer(list_buffer)
- , indent(indent)
+ , list_indent(list_indent)
         , list_marks(list_marks) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::stringstream& list_buffer;
- int& indent;
+ collector& out;
+ collector& list_buffer;
+ int& list_indent;
         std::stack<mark_type>& list_marks;
     };
 
@@ -254,17 +228,17 @@
 
         typedef std::pair<char, int> mark_type;
         list_format_action(
- std::stringstream& out
- , int& indent
+ collector& out
+ , int& list_indent
           , std::stack<mark_type>& list_marks)
         : out(out)
- , indent(indent)
+ , list_indent(list_indent)
         , list_marks(list_marks) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::stringstream& out;
- int& indent;
+ collector& out;
+ int& list_indent;
         std::stack<mark_type>& list_marks;
     };
 
@@ -272,37 +246,37 @@
     {
         // Decorates c++ code fragments
 
- span(char const* name, std::ostream& out)
+ span(char const* name, collector& out)
         : name(name), out(out) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
         char const* name;
- std::ostream& out;
+ collector& out;
     };
 
     struct unexpected_char
     {
         // Handles unexpected chars in c++ syntax
 
- unexpected_char(std::ostream& out)
+ unexpected_char(collector& out)
         : out(out) {}
 
         void operator()(char) const;
 
- std::ostream& out;
+ collector& out;
     };
 
     struct anchor_action
     {
         // Handles anchors
 
- anchor_action(std::ostream& out)
+ anchor_action(collector& out)
             : out(out) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
+ collector& out;
     };
 
     namespace
@@ -315,24 +289,24 @@
     {
         // Handles macro substitutions
 
- do_macro_action(std::ostream& phrase)
- : phrase(phrase) {}
+ do_macro_action(collector& phrase)
+ : phrase(phrase) {}
 
         void operator()(std::string const& str) const;
- std::ostream& phrase;
+ collector& phrase;
     };
 
     struct space
     {
         // Prints a space
 
- space(std::ostream& out)
- : out(out) {}
+ space(collector& out)
+ : out(out) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
         void operator()(char ch) const;
 
- std::ostream& out;
+ collector& out;
     };
 
     struct pre_escape_back
@@ -342,7 +316,7 @@
         pre_escape_back(actions& escape_actions, std::string& save)
             : escape_actions(escape_actions), save(save) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
         actions& escape_actions;
         std::string& save;
@@ -352,51 +326,51 @@
     {
         // Escapes back from code to quickbook (Post)
 
- post_escape_back(std::ostream& out, actions& escape_actions, std::string& save)
+ post_escape_back(collector& out, actions& escape_actions, std::string& save)
             : out(out), escape_actions(escape_actions), save(save) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
+ collector& out;
         actions& escape_actions;
         std::string& save;
     };
 
- typedef symbols<std::string> macros_type;
     typedef cpp_highlight<
         span
       , space
- , macros_type
+ , string_symbols
       , do_macro_action
       , pre_escape_back
       , post_escape_back
       , actions
       , unexpected_char
- , std::ostream>
+ , collector>
     cpp_p_type;
-
+
     typedef python_highlight<
         span
       , space
- , macros_type
+ , string_symbols
       , do_macro_action
       , pre_escape_back
       , post_escape_back
       , actions
       , unexpected_char
- , std::ostream>
+ , collector>
     python_p_type;
 
     struct code_action
     {
         // Does the actual syntax highlighing of code
 
- code_action(std::ostream& out,
- std::stringstream& phrase,
- std::stringstream& temp,
- std::string const& source_mode,
- macros_type const& macro,
- actions& escape_actions)
+ code_action(
+ collector& out
+ , collector& phrase
+ , collector& temp
+ , std::string const& source_mode
+ , string_symbols const& macro
+ , actions& escape_actions)
         : out(out)
         , phrase(phrase)
         , temp(temp)
@@ -406,11 +380,11 @@
         {
         }
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::stringstream& phrase;
- std::stringstream& temp;
+ collector& out;
+ collector& phrase;
+ collector& temp;
         std::string const& source_mode;
 
         cpp_p_type cpp_p;
@@ -421,11 +395,12 @@
     {
         // Does the actual syntax highlighing of code inlined in text
 
- inline_code_action(std::stringstream& out,
- std::stringstream& temp,
- std::string const& source_mode,
- macros_type const& macro,
- actions& escape_actions)
+ inline_code_action(
+ collector& out
+ , collector& temp
+ , std::string const& source_mode
+ , string_symbols const& macro
+ , actions& escape_actions)
         : out(out)
         , source_mode(source_mode)
         , temp(temp)
@@ -433,11 +408,11 @@
         , python_p(temp, macro, do_macro_action(temp), escape_actions)
         {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::stringstream& out;
+ collector& out;
         std::string const& source_mode;
- std::stringstream& temp;
+ collector& temp;
 
         cpp_p_type cpp_p;
         python_p_type python_p;
@@ -448,13 +423,13 @@
         // Prints a single raw (unprocessed) char.
         // Allows '<', '>'... etc.
 
- raw_char_action(std::ostream& phrase)
+ raw_char_action(collector& phrase)
         : phrase(phrase) {}
 
         void operator()(char ch) const;
- void operator()(iterator const& first, iterator const& /*last*/) const;
+ void operator()(iterator first, iterator /*last*/) const;
 
- std::ostream& phrase;
+ collector& phrase;
     };
 
     struct plain_char_action
@@ -462,32 +437,32 @@
         // Prints a single plain char.
         // Converts '<' to "&lt;"... etc See utils.hpp
 
- plain_char_action(std::ostream& phrase)
+ plain_char_action(collector& phrase)
         : phrase(phrase) {}
 
         void operator()(char ch) const;
- void operator()(iterator const& first, iterator const& /*last*/) const;
+ void operator()(iterator first, iterator /*last*/) const;
 
- std::ostream& phrase;
+ collector& phrase;
     };
 
     struct image_action
     {
         // Handles inline images
 
- image_action(std::ostream& phrase)
+ image_action(collector& phrase)
         : phrase(phrase) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& phrase;
+ collector& phrase;
     };
-
+
     struct markup_action
     {
         // A generic markup action
 
- markup_action(std::ostream& phrase, std::string const& str)
+ markup_action(collector& phrase, std::string const& str)
         : phrase(phrase), str(str) {}
 
         template <typename T>
@@ -502,30 +477,87 @@
             phrase << str;
         }
 
- std::ostream& phrase;
+ collector& phrase;
         std::string str;
     };
 
- struct indentifier_action
+ struct start_varlistitem_action
+ {
+ start_varlistitem_action(collector& phrase)
+ : phrase(phrase) {}
+
+ void operator()(char) const;
+
+ collector& phrase;
+ };
+
+ struct end_varlistitem_action
+ {
+ end_varlistitem_action(collector& phrase, collector& temp_para)
+ : phrase(phrase), temp_para(temp_para) {}
+
+ void operator()(char) const;
+
+ collector& phrase;
+ collector& temp_para;
+ };
+
+ struct break_action
+ {
+ // Handles line-breaks (DEPRECATED!!!)
+
+ break_action(collector& phrase)
+ : phrase(phrase) {}
+
+ void operator()(iterator f, iterator) const;
+
+ collector& phrase;
+ };
+
+ struct macro_identifier_action
     {
         // Handles macro identifiers
 
- indentifier_action(quickbook::actions& actions)
+ macro_identifier_action(quickbook::actions& actions)
         : actions(actions) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
         quickbook::actions& actions;
     };
 
- struct macro_def_action
+ struct macro_definition_action
     {
         // Handles macro definitions
 
- macro_def_action(quickbook::actions& actions)
+ macro_definition_action(quickbook::actions& actions)
+ : actions(actions) {}
+
+ void operator()(iterator first, iterator last) const;
+
+ quickbook::actions& actions;
+ };
+
+ struct template_body_action
+ {
+ // Handles template definitions
+
+ template_body_action(quickbook::actions& actions)
+ : actions(actions) {}
+
+ void operator()(iterator first, iterator last) const;
+
+ quickbook::actions& actions;
+ };
+
+ struct do_template_action
+ {
+ // Handles template substitutions
+
+ do_template_action(quickbook::actions& actions)
         : actions(actions) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
         quickbook::actions& actions;
     };
@@ -534,12 +566,12 @@
     {
         // Handles links (URL, XML refentry, function, class, member)
 
- link_action(std::ostream& phrase, char const* tag)
+ link_action(collector& phrase, char const* tag)
         : phrase(phrase), tag(tag) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& phrase;
+ collector& phrase;
         char const* tag;
     };
 
@@ -571,13 +603,13 @@
     {
         // Handles table rows
 
- start_row_action(std::stringstream& phrase, unsigned& span, std::string& header)
+ start_row_action(collector& phrase, unsigned& span, std::string& header)
             : phrase(phrase), span(span), header(header) {}
 
         void operator()(char) const;
         void operator()(iterator f, iterator) const;
 
- std::stringstream& phrase;
+ collector& phrase;
         unsigned& span;
         std::string& header;
     };
@@ -586,69 +618,80 @@
     {
         // Handles table columns
 
- start_col_action(std::ostream& phrase, unsigned& span)
+ start_col_action(collector& phrase, unsigned& span)
         : phrase(phrase), span(span) {}
 
         void operator()(char) const;
 
- std::ostream& phrase;
+ collector& phrase;
         unsigned& span;
     };
 
+ struct end_col_action
+ {
+ end_col_action(collector& phrase, collector& temp_para)
+ : phrase(phrase), temp_para(temp_para) {}
+
+ void operator()(char) const;
+
+ collector& phrase;
+ collector& temp_para;
+ };
+
     struct begin_section_action
     {
         // Handles begin page
 
         begin_section_action(
- std::ostream& out
- , std::stringstream& phrase
+ collector& out
+ , collector& phrase
           , std::string& library_id
           , std::string& section_id
- , int& level
+ , int& section_level
           , std::string& qualified_section_id)
         : out(out)
         , phrase(phrase)
         , library_id(library_id)
         , section_id(section_id)
- , level(level)
+ , section_level(section_level)
         , qualified_section_id(qualified_section_id) {}
 
- void operator()(iterator first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- std::stringstream& phrase;
+ collector& out;
+ collector& phrase;
         std::string& library_id;
         std::string& section_id;
- int& level;
+ int& section_level;
         std::string& qualified_section_id;
     };
 
     struct end_section_action
     {
         end_section_action(
- std::ostream& out
- , int& level
+ collector& out
+ , int& section_level
           , std::string& qualified_section_id)
         : out(out)
- , level(level)
+ , section_level(section_level)
         , qualified_section_id(qualified_section_id) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
- int& level;
+ collector& out;
+ int& section_level;
         std::string& qualified_section_id;
    };
 
     struct xinclude_action
     {
         // Handles XML includes
- xinclude_action(std::ostream& out_, quickbook::actions& actions_)
+ xinclude_action(collector& out_, quickbook::actions& actions_)
             : out(out_), actions(actions_) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::ostream& out;
+ collector& out;
         quickbook::actions& actions;
     };
 
@@ -659,8 +702,20 @@
         include_action(quickbook::actions& actions_)
             : actions(actions_) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
+
+ quickbook::actions& actions;
+ };
+
+ struct import_action
+ {
+ // Handles import of source code files (e.g. *.cpp *.py)
+ import_action(collector& out_, quickbook::actions& actions_)
+ : out(out_), actions(actions_) {}
+
+ void operator()(iterator first, iterator last) const;
 
+ collector& out;
         quickbook::actions& actions;
     };
 
@@ -668,177 +723,44 @@
     {
         // Handles xml author
 
- xml_author(std::ostream& out)
+ xml_author(collector& out)
         : out(out) {}
 
         void operator()(std::pair<std::string, std::string> const& author) const;
 
- std::ostream& out;
+ collector& out;
     };
 
     struct xml_year
     {
         // Handles xml year
 
- xml_year(std::ostream& out)
+ xml_year(collector& out)
             : out(out) {}
 
         void operator()(std::string const &year) const;
 
- std::ostream& out;
+ collector& out;
     };
 
- void pre(std::ostream& out, quickbook::actions& actions, bool ignore_docinfo = false);
- void post(std::ostream& out, quickbook::actions& actions, bool ignore_docinfo = false);
+ void pre(collector& out, quickbook::actions& actions, bool ignore_docinfo = false);
+ void post(collector& out, quickbook::actions& actions, bool ignore_docinfo = false);
 
     struct phrase_to_string_action
     {
- phrase_to_string_action(std::string& out, std::stringstream& phrase)
+ phrase_to_string_action(std::string& out, collector& phrase)
             : out(out) , phrase(phrase) {}
 
- void operator()(iterator const& first, iterator const& last) const;
+ void operator()(iterator first, iterator last) const;
 
- std::string& out;
- std::stringstream& phrase;
- };
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // Our actions
- //
- ///////////////////////////////////////////////////////////////////////////
- struct actions
- {
- actions(char const* filein_, fs::path const& outdir, std::ostream &out_);
-
- fs::path filename;
- fs::path outdir;
- std::string macro_id;
- std::string phrase_save;
- std::string table_title;
- std::ostream& out;
- error_action error;
-
- typedef std::vector<std::string> copyright_list;
- typedef std::vector<std::pair<std::string, std::string> > author_list;
-
- std::string doc_type;
- std::string doc_title;
- std::string doc_version;
- std::string doc_id;
- std::string doc_dirname;
- copyright_list doc_copyright_years;
- std::string doc_copyright_holder;
- std::string doc_purpose;
- std::string doc_category;
- author_list doc_authors;
- std::string doc_license;
- std::string doc_last_revision;
- std::string include_doc_id;
- phrase_to_string_action extract_doc_license;
- phrase_to_string_action extract_doc_purpose;
- std::string doc_license_1_1;
- std::string doc_purpose_1_1;
-
- std::string page_title;
- std::string section_id;
- std::string previous;
- std::stringstream phrase;
- std::stringstream temp;
- unsigned table_span;
- std::string table_header;
-
- macros_type macro;
- std::string source_mode;
- code_action code;
- code_action code_block;
- inline_code_action inline_code;
- phrase_action paragraph;
- anchored_phrase_action h1, h2, h3, h4, h5, h6;
- markup_action hr;
- phrase_action blurb, blockquote, preformatted;
- phrase_action warning, caution, important, note, tip;
- plain_char_action plain_char;
- raw_char_action raw_char;
- image_action image;
-
- typedef std::pair<char, int> mark_type;
- std::stringstream list_buffer;
- std::stack<mark_type> list_marks;
- int indent;
- list_action list;
- list_format_action list_format;
- phrase_action list_item;
-
- link_action funcref_pre;
- markup_action funcref_post;
- link_action classref_pre;
- markup_action classref_post;
- link_action memberref_pre;
- markup_action memberref_post;
- link_action enumref_pre;
- markup_action enumref_post;
- link_action headerref_pre;
- markup_action headerref_post;
-
- markup_action bold_pre;
- markup_action bold_post;
- markup_action italic_pre;
- markup_action italic_post;
- markup_action underline_pre;
- markup_action underline_post;
- markup_action teletype_pre;
- markup_action teletype_post;
- markup_action strikethrough_pre;
- markup_action strikethrough_post;
- markup_action quote_pre;
- markup_action quote_post;
- markup_action replaceable_pre;
- markup_action replaceable_post;
- markup_action footnote_pre;
- markup_action footnote_post;
-
- simple_phrase_action simple_bold;
- simple_phrase_action simple_italic;
- simple_phrase_action simple_underline;
- simple_phrase_action simple_teletype;
- simple_phrase_action simple_strikethrough;
-
- variablelist_action variablelist;
- markup_action start_varlistentry;
- markup_action end_varlistentry;
- markup_action start_varlistterm;
- markup_action end_varlistterm;
- markup_action start_varlistitem;
- markup_action end_varlistitem;
-
- markup_action break_;
- indentifier_action identifier;
- macro_def_action macro_def;
- do_macro_action do_macro;
- link_action url_pre;
- markup_action url_post;
- link_action link_pre;
- markup_action link_post;
- table_action table;
- start_row_action start_row;
- markup_action end_row;
- start_col_action start_cell;
- markup_action end_cell;
- anchor_action anchor;
-
- begin_section_action begin_section;
- end_section_action end_section;
- xinclude_action xinclude;
- include_action include;
-
- markup_action escape_pre;
- markup_action escape_post;
-
- int level;
- std::string qualified_section_id;
+ std::string& out;
+ collector& phrase;
     };
 }
 
-#endif // BOOST_SPIRIT_QUICKBOOK_UTILS_HPP
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
+#endif // BOOST_SPIRIT_QUICKBOOK_ACTIONS_HPP
 

Modified: branches/release/tools/quickbook/detail/post_process.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/post_process.cpp (original)
+++ branches/release/tools/quickbook/detail/post_process.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 2006 Joel de Guzman
     http://spirit.sourceforge.net/
 
     Use, modification and distribution is subject to the Boost Software
@@ -19,13 +19,13 @@
     using namespace boost::spirit;
     using boost::bind;
     typedef std::string::const_iterator iter_type;
-
+
     struct printer
     {
         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!
@@ -40,7 +40,7 @@
             out += '\n';
             indent();
         }
-
+
         bool line_is_empty() const
         {
             for (iter_type i = out.end()-(column-current_indent); i != out.end(); ++i)
@@ -50,7 +50,7 @@
             }
             return true;
         }
-
+
         void align_indent()
         {
             // make sure we are at the proper indent position
@@ -73,7 +73,7 @@
                 else
                 {
                     // will this happen? (i.e. column <= current_indent)
- while (column != current_indent)
+ while (column != current_indent)
                     {
                         out += ' ';
                         ++column;
@@ -86,17 +86,17 @@
         {
             // 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
+ // 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
+ // 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
+ // will have &quot; instead. We shall deal only with tag
             // attributes here.
             if (ch == '"')
                 in_string = !in_string; // don't break strings!
@@ -124,11 +124,11 @@
             }
             else
             {
- // we can break tag boundaries and stuff after
+ // 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
+ if (!in_string
+ && column >= linewidth
                     && (ch == '<' && std::isspace(static_cast<unsigned char>(prev))))
                     break_line();
                 out += ch;
@@ -138,14 +138,14 @@
             prev = ch;
         }
 
- void
+ void
         print(iter_type f, iter_type l)
         {
             for (iter_type i = f; i != l; ++i)
                 print(*i);
         }
 
- void
+ void
         print_tag(iter_type f, iter_type l, bool is_flow_tag)
         {
             if (is_flow_tag)
@@ -154,7 +154,7 @@
             }
             else
             {
- // This is not a flow tag, so, we're going to do a
+ // 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);
@@ -163,7 +163,7 @@
                 while (i != str.begin() && std::isspace(static_cast<unsigned char>(*(i-1))))
                     --i;
                 print(str.begin(), i);
- }
+ }
         }
 
         char prev;
@@ -172,57 +172,88 @@
         int column;
         bool in_string;
         int linewidth;
- };
-
+ };
+
+ char const* block_tags_[] =
+ {
+ "author"
+ , "blockquote"
+ , "bridgehead"
+ , "caution"
+ , "copyright"
+ , "footnote"
+ , "important"
+ , "informaltable"
+ , "itemizedlist"
+ , "legalnotice"
+ , "listitem"
+ , "note"
+ , "orderedlist"
+ , "para"
+ , "replaceable"
+ , "row"
+ , "section"
+ , "tbody"
+ , "textobject"
+ , "tgroup"
+ , "thead"
+ , "tip"
+ , "variablelist"
+ , "warning"
+ , "xml"
+ , "xi:include"
+ , "calloutlist"
+ , "callout"
+ };
+
+ 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)
             : out(out), current_indent(0), printer_(out, current_indent, linewidth)
         {
- flow_tags.insert("anchor");
- flow_tags.insert("phrase");
- flow_tags.insert("literal");
- flow_tags.insert("entry");
- flow_tags.insert("emphasis");
- flow_tags.insert("ulink");
- flow_tags.insert("link");
- flow_tags.insert("varlistentry");
- flow_tags.insert("term");
- flow_tags.insert("functionname");
- flow_tags.insert("classname");
- flow_tags.insert("methodname");
- flow_tags.insert("enumname");
- flow_tags.insert("headername");
- flow_tags.insert("inlinemediaobject");
- flow_tags.insert("imageobject");
- flow_tags.insert("imagedata");
- flow_tags.insert("title");
- flow_tags.insert("xi");
- flow_tags.insert("firstname");
- flow_tags.insert("surname");
- flow_tags.insert("year");
- flow_tags.insert("holder");
- flow_tags.insert("sbr");
- flow_tags.insert("quote");
- flow_tags.insert("code");
- flow_tags.insert("type");
- flow_tags.insert("paramtype");
+ static int const n_block_tags = sizeof(block_tags_)/sizeof(char const*);
+ for (int i = 0; i != n_block_tags; ++i)
+ {
+ block_tags.insert(block_tags_[i]);
+ }
 
+ static int const n_doc_types = sizeof(doc_types_)/sizeof(char const*);
+ for (int 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 flow_tags.find(tag) != flow_tags.end();
+ return block_tags.find(tag) == block_tags.end();
         }
 
- std::set<std::string> flow_tags;
+ std::set<std::string> block_tags;
         std::stack<std::string> tags;
         std::string& out;
         int current_indent;
         printer printer_;
         std::string current_tag;
- };
-
+ };
+
     struct tidy_grammar : grammar<tidy_grammar>
     {
         tidy_grammar(tidy_compiler& state, int indent)
@@ -233,7 +264,7 @@
         {
             definition(tidy_grammar const& self)
             {
- tag = (lexeme_d[+alnum_p]) [bind(&tidy_grammar::do_tag, &self, _1, _2)];
+ tag = (lexeme_d[+(alpha_p | '_' | ':')]) [bind(&tidy_grammar::do_tag, &self, _1, _2)];
 
                 code =
                         "<programlisting>"
@@ -244,24 +275,35 @@
                 // What's the business of lexeme_d['>' >> *space_p]; ?
                 // It is there to preserve the space after the tag that is
                 // otherwise consumed by the space_p skipper.
-
- escape = str_p("<!--quickbook-escape-prefix-->") >>
- *(anychar_p - str_p("<!--quickbook-escape-postfix-->"))
- >> str_p("<!--quickbook-escape-postfix-->")
+
+ escape =
+ str_p("<!--quickbook-escape-prefix-->") >>
+ (*(anychar_p - str_p("<!--quickbook-escape-postfix-->")))
+ [
+ bind(&tidy_grammar::do_escape, &self, _1, _2)
+ ]
+ >> lexeme_d
+ [
+ str_p("<!--quickbook-escape-postfix-->") >>
+ (*space_p)
+ [
+ bind(&tidy_grammar::do_escape_post, &self, _1, _2)
+ ]
+ ]
                     ;
-
+
                 start_tag = '<' >> tag >> *(anychar_p - '>') >> lexeme_d['>' >> *space_p];
- start_end_tag =
- '<' >> tag >> *(anychar_p - ('/' | ch_p('>'))) >> lexeme_d["/>" >> *space_p]
+ start_end_tag =
+ '<' >> tag >> *(anychar_p - ("/>" | ch_p('>'))) >> lexeme_d["/>" >> *space_p]
                     | "<?" >> tag >> *(anychar_p - '?') >> lexeme_d["?>" >> *space_p]
- | "<!--" >> tag >> *(anychar_p - "-->") >> lexeme_d["-->" >> *space_p]
+ | "<!--" >> *(anychar_p - "-->") >> lexeme_d["-->" >> *space_p]
                     | "<!" >> tag >> *(anychar_p - '>') >> lexeme_d['>' >> *space_p]
                     ;
                 content = lexeme_d[ +(anychar_p - '<') ];
                 end_tag = "</" >> +(anychar_p - '>') >> lexeme_d['>' >> *space_p];
 
- markup =
- escape [bind(&tidy_grammar::do_escape, &self, _1, _2)]
+ markup =
+ escape
                     | code [bind(&tidy_grammar::do_code, &self, _1, _2)]
                     | start_end_tag [bind(&tidy_grammar::do_start_end_tag, &self, _1, _2)]
                     | start_tag [bind(&tidy_grammar::do_start_tag, &self, _1, _2)]
@@ -279,21 +321,24 @@
                             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
         {
- state.out += '\n';
             while (f != l && std::isspace(*f))
                 ++f;
             for (iter_type i = f; i != l; ++i)
                 state.out += *i;
- state.out += '\n';
- state.printer_.indent();
         }
 
         void do_code(iter_type f, iter_type l) const
         {
             state.out += '\n';
- // print the string taking care of line
+ // print the string taking care of line
             // ending CR/LF platform issues
             for (iter_type i = f; i != l; ++i)
             {
@@ -337,7 +382,7 @@
 
         void do_start_tag(iter_type f, iter_type l) const
         {
- state.tags.push(state.current_tag);
+ 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();
@@ -365,9 +410,9 @@
             state.printer_.print_tag(f, l, is_flow_tag);
             if (!is_flow_tag)
                 state.printer_.break_line();
- state.tags.pop();
+ state.tags.pop();
         }
-
+
         tidy_compiler& state;
         int indent;
     };
@@ -389,15 +434,26 @@
             tidy_compiler state(tidy, linewidth);
             tidy_grammar g(state, indent);
             parse_info<iter_type> r = parse(in.begin(), in.end(), g, space_p);
- BOOST_ASSERT(r.full); // this should not happen!
- out << tidy;
+ if (r.full)
+ {
+ out << tidy;
+ }
+ else
+ {
+ // fallback!
+ ::quickbook::detail::outerr("",0)
+ << "Warning: Post Processing Failed."
+ << std::endl;
+ out << in;
+ }
         }
-
+
         catch(...)
         {
+ // fallback!
             ::quickbook::detail::outerr("",0)
- << "Error Post Processing Failed. "
- << std::endl;
+ << "Warning: Post Processing Failed."
+ << std::endl;
             out << in;
         }
     }

Modified: branches/release/tools/quickbook/detail/post_process.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/post_process.hpp (original)
+++ branches/release/tools/quickbook/detail/post_process.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 2006 Joel de Guzman
     http://spirit.sourceforge.net/
 
     Use, modification and distribution is subject to the Boost Software

Modified: branches/release/tools/quickbook/detail/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/quickbook.cpp (original)
+++ branches/release/tools/quickbook/detail/quickbook.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -7,11 +7,11 @@
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
+#include "./actions_class.hpp"
 #include "../block.hpp"
 #include "../doc_info.hpp"
 #include "./post_process.hpp"
-#include "utils.hpp"
-#include "actions.hpp"
+#include "./utils.hpp"
 #include <boost/spirit/iterator/position_iterator.hpp>
 #include <boost/program_options.hpp>
 #include <boost/filesystem/path.hpp>
@@ -21,13 +21,13 @@
 #include <stdexcept>
 #include <fstream>
 #include <iostream>
-#include <sstream>
+#include <vector>
 
 #if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310))
 #pragma warning(disable:4355)
 #endif
 
-#define QUICKBOOK_VERSION "Quickbook Version 1.3"
+#define QUICKBOOK_VERSION "Quickbook Version 1.4"
 
 namespace quickbook
 {
@@ -40,44 +40,7 @@
     unsigned qbk_minor_version = 0;
     unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
     bool ms_errors = false; // output errors/warnings as if for VS
-
- ///////////////////////////////////////////////////////////////////////////
- //
- // Load a file
- //
- ///////////////////////////////////////////////////////////////////////////
- static int
- load(char const* filename, file_storage& storage)
- {
- using std::cerr;
- using std::endl;
- using std::ios;
- using std::ifstream;
- using std::istream_iterator;
-
- ifstream in(filename, std::ios_base::in);
-
- if (!in)
- {
- detail::outerr(filename,1)
- << "Could not open input file." << endl;
- return 1;
- }
-
- // Turn off white space skipping on the stream
- in.unsetf(ios::skipws);
-
- std::copy(
- istream_iterator<char>(in),
- istream_iterator<char>(),
- std::back_inserter(storage));
-
- // ensure that we have enough trailing newlines to eliminate
- // the need to check for end of file in the grammar.
- storage.push_back('\n');
- storage.push_back('\n');
- return 0;
- }
+ std::vector<std::string> include_path;
 
     ///////////////////////////////////////////////////////////////////////////
     //
@@ -91,12 +54,12 @@
         using std::vector;
         using std::string;
 
- file_storage storage;
- int err = quickbook::load(filein_, storage);
+ std::string storage;
+ int err = detail::load(filein_, storage);
         if (err != 0)
             return err;
 
- typedef position_iterator<file_storage::const_iterator> iterator_type;
+ typedef position_iterator<std::string::const_iterator> iterator_type;
         iterator_type first(storage.begin(), storage.end(), filein_);
         iterator_type last(storage.end(), storage.end());
 
@@ -127,11 +90,11 @@
     }
 
     static int
- parse(char const* filein_, fs::path const& outdir, std::ostream& out, bool ignore_docinfo = false)
+ parse(char const* filein_, fs::path const& outdir, string_stream& out, bool ignore_docinfo = false)
     {
         actions actor(filein_, outdir, out);
         bool r = parse(filein_, actor);
- if (actor.level != 0)
+ if (actor.section_level != 0)
             detail::outwarn(filein_,1)
                 << "Warning missing [endsect] detected at end of file."
                 << std::endl;
@@ -153,7 +116,7 @@
             outdir = ".";
         if (pretty_print)
         {
- std::stringstream buffer;
+ string_stream buffer;
             result = parse(filein_, outdir, buffer);
             if (result == 0)
             {
@@ -162,7 +125,9 @@
         }
         else
         {
- result = parse(filein_, outdir, fileout);
+ string_stream buffer;
+ result = parse(filein_, outdir, buffer);
+ fileout << buffer.str();
         }
         return result;
     }
@@ -176,7 +141,7 @@
 int
 main(int argc, char* argv[])
 {
- try
+ try
     {
         using boost::program_options::options_description;
         using boost::program_options::variables_map;
@@ -201,19 +166,20 @@
             ("output-file", value<std::string>(), "output file")
             ("debug", "debug mode (for developers)")
             ("ms-errors", "use Microsoft Visual Studio style error & warn message format")
+ ("include-path,I", value< std::vector<std::string> >(), "include path")
         ;
-
+
         positional_options_description p;
         p.add("input-file", -1);
-
+
         variables_map vm;
         int indent = -1;
         int linewidth = -1;
         bool pretty_print = true;
         store(command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
- notify(vm);
-
- if (vm.count("help"))
+ notify(vm);
+
+ if (vm.count("help"))
         {
             std::cout << desc << "\n";
             return 0;
@@ -224,7 +190,7 @@
             std::cout << QUICKBOOK_VERSION << std::endl;
             return 0;
         }
-
+
         if (vm.count("ms-errors"))
             quickbook::ms_errors = true;
 
@@ -236,7 +202,7 @@
 
         if (vm.count("linewidth"))
             linewidth = vm["linewidth"].as<int>();
-
+
         if (vm.count("debug"))
         {
             static tm timeinfo;
@@ -261,6 +227,11 @@
             quickbook::current_gm_time = &gmt;
             quickbook::debug_mode = false;
         }
+
+ if (vm.count("include-path"))
+ {
+ quickbook::include_path = vm["include-path"].as< std::vector<std::string> >();
+ }
 
         if (vm.count("input-file"))
         {
@@ -280,7 +251,7 @@
             std::cout << "Generating Output File: "
                 << fileout
                 << std::endl;
-
+
             return quickbook::parse(filein.c_str(), fileout.c_str(), indent, linewidth, pretty_print);
         }
         else
@@ -288,14 +259,14 @@
             quickbook::detail::outerr("",0) << "Error: No filename given" << std::endl;
         }
     }
-
- catch(std::exception& e)
+
+ catch(std::exception& e)
     {
         quickbook::detail::outerr("",0) << "Error: " << e.what() << "\n";
         return 1;
     }
 
- catch(...)
+ catch(...)
     {
         quickbook::detail::outerr("",0) << "Error: Exception of unknown type caught\n";
     }

Modified: branches/release/tools/quickbook/detail/utils.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/utils.cpp (original)
+++ branches/release/tools/quickbook/detail/utils.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -8,17 +8,21 @@
     http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 #include "./utils.hpp"
-#include <cctype>
 #include <boost/spirit/core.hpp>
 
+#include <cctype>
+#include <stdexcept>
+#include <fstream>
+#include <iostream>
+#include <map>
+
 namespace quickbook {
     extern bool ms_errors;
 }
 
 namespace quickbook { namespace detail
 {
- void
- print_char(char ch, std::ostream& out)
+ void print_char(char ch, std::ostream& out)
     {
         switch (ch)
         {
@@ -27,13 +31,12 @@
             case '&': out << "&amp;"; break;
             case '"': out << "&quot;"; break;
             default: out << ch; break;
- // note &apos; is not included. see the curse of apos:
+ // note &apos; is not included. see the curse of apos:
             // http://fishbowl.pastiche.org/2003/07/01/the_curse_of_apos
         }
     }
 
- void
- print_string(std::basic_string<char> const& str, std::ostream& out)
+ void print_string(std::basic_string<char> const& str, std::ostream& out)
     {
         for (std::string::const_iterator cur = str.begin();
             cur != str.end(); ++cur)
@@ -42,48 +45,12 @@
         }
     }
 
- void
- print_space(char ch, std::ostream& out)
+ void print_space(char ch, std::ostream& out)
     {
         out << ch;
     }
-
- namespace
- {
- bool
- find_empty_content_pattern(
- std::basic_string<char> const& str
- , std::string::size_type& pos
- , std::string::size_type& len)
- {
- using namespace boost::spirit;
- typedef std::basic_string<char>::const_iterator iter;
- for (iter i = str.begin(); i!=str.end(); ++i)
- {
- parse_info<iter> r = parse(i, str.end(), '>' >> +blank_p >> '<');
- if (r.hit)
- {
- pos = i-str.begin();
- len = r.length;
- return true;
- }
- }
 
- return false;
- }
- }
-
- void
- convert_nbsp(std::basic_string<char>& str)
- {
- std::string::size_type pos;
- std::string::size_type len;
- while (find_empty_content_pattern(str, pos, len))
- str.replace(pos, len, ">&nbsp;<");
- }
-
- char
- filter_identifier_char(char ch)
+ char filter_identifier_char(char ch)
     {
         if (!std::isalnum(static_cast<unsigned char>(ch)))
             ch = '_';
@@ -93,14 +60,51 @@
     // un-indent a code segment
     void unindent(std::string& program)
     {
- std::string::size_type const start = program.find_first_not_of("\r\n");
- program.erase(0, start); // erase leading newlines
+ // Erase leading blank lines and newlines:
+ std::string::size_type start = program.find_first_not_of(" \t");
+ if (start != std::string::npos &&
+ (program[start] == '\r' || program[start] == '\n'))
+ {
+ program.erase(0, start);
+ }
+ start = program.find_first_not_of("\r\n");
+ program.erase(0, start);
 
- std::string::size_type const n = program.find_first_not_of(" \t");
- BOOST_ASSERT(std::string::npos != n);
- program.erase(0, n);
+ if (program.size() == 0)
+ return; // nothing left to do
 
+ // Get the first line indent
+ std::string::size_type indent = program.find_first_not_of(" \t");
         std::string::size_type pos = 0;
+ if (std::string::npos == indent)
+ {
+ // Nothing left to do here. The code is empty (just spaces).
+ // We clear the program to signal the caller that it is empty
+ // and return early.
+ program.clear();
+ return;
+ }
+
+ // Calculate the minimum indent from the rest of the lines
+ do
+ {
+ 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)
+ {
+ char ch = program[n];
+ if (ch != '\r' && ch != '\n') // ignore empty lines
+ indent = (std::min)(indent, n-pos);
+ }
+ }
+ while (std::string::npos != (pos = program.find_first_of("\r\n", pos)));
+
+ // Trim white spaces from column 0..indent
+ pos = 0;
+ program.erase(0, indent);
         while (std::string::npos != (pos = program.find_first_of("\r\n", pos)))
         {
             if (std::string::npos == (pos = program.find_first_not_of("\r\n", pos)))
@@ -108,7 +112,8 @@
                 break;
             }
 
- program.erase(pos, n);
+ std::string::size_type next = program.find_first_of("\r\n", pos);
+ program.erase(pos, (std::min)(indent, next-pos));
         }
     }
 
@@ -144,22 +149,86 @@
         }
         return uri;
     }
-
- std::ostream & outerr(const std::string & file, int line)
+
+ std::ostream& outerr(std::string const& file, int line)
     {
- if (ms_errors)
- return std::clog << file << "(" << line << "): error: ";
+ if (line >= 0)
+ {
+ if (ms_errors)
+ return std::clog << file << "(" << line << "): error: ";
+ else
+ return std::clog << file << ":" << line << ": error: ";
+ }
         else
- return std::clog << file << ":" << line << ": error: ";
+ {
+ return std::clog << file << ": error: ";
+ }
     }
-
- std::ostream & outwarn(const std::string & file, int line)
+
+ std::ostream& outwarn(std::string const& file, int line)
     {
- if (ms_errors)
- return std::clog << file << "(" << line << "): warning: ";
+ if (line >= 0)
+ {
+ if (ms_errors)
+ return std::clog << file << "(" << line << "): warning: ";
+ else
+ return std::clog << file << ":" << line << ": warning: ";
+ }
         else
- return std::clog << file << ":" << line << ": warning: ";
+ {
+ return std::clog << file << ": warning: ";
+ }
     }
+
+ int load(std::string const& filename, std::string& storage)
+ {
+ using std::cerr;
+ using std::endl;
+ using std::ios;
+ using std::ifstream;
+ using std::istream_iterator;
+
+ ifstream in(filename.c_str(), std::ios_base::in);
+
+ if (!in)
+ {
+ outerr(filename,-1) << "Could not open input file." << endl;
+ return 1;
+ }
+
+ // Turn off white space skipping on the stream
+ in.unsetf(ios::skipws);
+
+ std::copy(
+ istream_iterator<char>(in),
+ istream_iterator<char>(),
+ std::back_inserter(storage));
+
+ // ensure that we have enough trailing newlines to eliminate
+ // the need to check for end of file in the grammar.
+ storage.push_back('\n');
+ storage.push_back('\n');
+ return 0;
+ }
+
+ file_type get_file_type(std::string const& extension)
+ {
+ static std::map<std::string, file_type> ftypes;
+ if (ftypes.empty())
+ {
+ // init the map of types
+ ftypes["cpp"] = cpp_file;
+ ftypes["hpp"] = cpp_file;
+ ftypes["h"] = cpp_file;
+ ftypes["c"] = cpp_file;
+ ftypes["cxx"] = cpp_file;
+ ftypes["hxx"] = cpp_file;
+ ftypes["ipp"] = cpp_file;
+ ftypes["py"] = python_file;
+ }
+ return ftypes[extension];
+ }
+
 }}
 
 

Modified: branches/release/tools/quickbook/detail/utils.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/utils.hpp (original)
+++ branches/release/tools/quickbook/detail/utils.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -18,20 +18,10 @@
 
 namespace quickbook { namespace detail
 {
- void
- print_char(char ch, std::ostream& out);
-
- void
- print_string(std::basic_string<char> const& str, std::ostream& out);
-
- void
- print_space(char ch, std::ostream& out);
-
- void
- convert_nbsp(std::basic_string<char>& str);
-
- char
- filter_identifier_char(char ch);
+ void print_char(char ch, std::ostream& out);
+ void print_string(std::basic_string<char> const& str, std::ostream& out);
+ void print_space(char ch, std::ostream& out);
+ char filter_identifier_char(char ch);
 
     template <typename Iterator>
     inline std::string
@@ -65,17 +55,31 @@
     void unindent(std::string& program);
 
     // remove the extension from a filename
- std::string
- remove_extension(std::string const& filename);
-
+ std::string remove_extension(std::string const& filename);
+
     std::string escape_uri(std::string uri);
-
+
     // Preformats an error/warning message so that it can be parsed by
     // common IDEs. Uses the ms_errors global to determine if VS format
     // or GCC format. Returns the stream to continue ouput of the verbose
     // error message.
- std::ostream & outerr(const std::string & file, int line);
- std::ostream & outwarn(const std::string & file, int line);
+ std::ostream & outerr(std::string const& file, int line);
+ std::ostream & outwarn(std::string const& file, int line);
+
+ // load file into memory with extra trailing newlines to eliminate
+ // the need to check for end of file in the grammar.
+ int load(std::string const& filename, std::string& storage);
+
+ // given a file extension, return the type of the source file
+ // we'll have an internal database for known file types.
+
+ enum file_type
+ {
+ cpp_file
+ , python_file
+ };
+
+ file_type get_file_type(std::string const& extension);
 }}
 
 #endif // BOOST_SPIRIT_QUICKBOOK_UTILS_HPP

Modified: branches/release/tools/quickbook/doc/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/doc/Jamfile.v2 (original)
+++ branches/release/tools/quickbook/doc/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,13 +1,3 @@
-#==============================================================================
-# Copyright (c) 2002 2004 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)
-#==============================================================================
-
 project boost/quickbook/doc ;
 
 import boostbook : boostbook ;
@@ -21,8 +11,10 @@
     :
         <xsl:param>boost.root=../../../..
         <xsl:param>boost.libraries=../../../../libs/libraries.htm
+ <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
         <xsl:param>generate.section.toc.level=3
         <xsl:param>chunk.section.depth=2
         <xsl:param>chunk.first.sections=1
- <xsl:param>admon.graphics=1
+
+ #<xsl:param>callout.graphics.path=../../images/callouts//
     ;

Deleted: branches/release/tools/quickbook/doc/html/boostbook.css
==============================================================================
--- branches/release/tools/quickbook/doc/html/boostbook.css 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,437 +0,0 @@
-/*=============================================================================
- Copyright (c) 2004 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)
-=============================================================================*/
-
-/*=============================================================================
- Body defaults
-=============================================================================*/
-
- body
- {
- margin: 1em;
- font-family: sans-serif;
- }
-
-/*=============================================================================
- Paragraphs
-=============================================================================*/
-
- p
- {
- text-align: justify;
- font-size: 11pt;
- line-height: 1.2;
- }
-
-/*=============================================================================
- Program listings
-=============================================================================*/
-
- tt.computeroutput
- {
- font-size: 10pt;
- }
-
- pre.synopsis
- {
- font-size: 10pt;
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc 0.5pc 0.5pc 0.5pc;
- }
-
- .programlisting,
- .screen
- {
- font-size: 10pt;
- display: block;
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc 0.5pc 0.5pc 0.5pc;
- }
-
-/*=============================================================================
- Headings
-=============================================================================*/
-
- h1,
- h2,
- h3,
- h4,
- h5,
- h6
- {
- text-align: left;
- margin-top: 2pc;
- }
-
- h1 { font: 170% }
- h2 { font: bold 140% }
- h3 { font: bold 120% }
- h4 { font: bold 100% }
- h5 { font: italic 100% }
- h6 { font: italic 100% }
-
- /* Top page titles */
- title,
- h1.title,
- h2.title
- h3.title,
- h4.title,
- h5.title,
- h6.title,
- .refentrytitle
- {
- font-weight: bold;
- margin-bottom: 1pc;
- }
-
- h1.title { font-size: 220% }
- h2.title { font-size: 220% }
- h3.title { font-size: 170% }
- h4.title { font-size: 140% }
- h5.title { font-size: 120% }
- h6.title { font-size: 120% }
-
-/*=============================================================================
- Lists
-=============================================================================*/
-
- li
- {
- font-size: 11pt;
- line-height: 1.3;
- }
-
- /* Unordered lists */
- ul
- {
- text-align: justify;
- }
-
- /* Ordered lists */
- ol
- {
- text-align: justify;
- }
-
-/*=============================================================================
- Links
-=============================================================================*/
-
- a
- {
- text-decoration: none; /* no underline */
- }
-
- a:hover
- {
- text-decoration: underline;
- }
-
-/*=============================================================================
- Spirit style navigation
-=============================================================================*/
-
- .spirit-nav
- {
- text-align: right;
- }
-
- .spirit-nav a
- {
- color: white;
- padding-left: 0.5em;
- }
-
- .spirit-nav img
- {
- border-width: 0px;
- }
-
-/*=============================================================================
- Table of contents
-=============================================================================*/
-
- .toc
- {
- margin: 1pc 4% 0pc 4%;
- padding: 0.5pc;
- font-size: 11pt;
- line-height: 1.3;
- }
-
- .boost-toc
- {
- float: right;
- padding: 0.5pc;
- }
-
-/*=============================================================================
- Tables
-=============================================================================*/
-
- .table-title,
- div.table p.title
- {
- margin-left: 4%;
- padding-right: 0.5em;
- padding-left: 0.5em;
- font-size: 120%;
- }
-
- .informaltable table,
- .table table
- {
- width: 92%;
- margin: 0% 4% 0% 4%;
- }
-
- div.informaltable table,
- div.table table
- {
- padding: 4px 0px 4px 0px;
- }
-
- /* Table Cells */
- div.informaltable table tr td,
- div.table table tr td
- {
- padding: 0.5em;
- text-align: left;
- font-size: 11pt;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- padding: 0.5em 0.5em 0.5em 0.5em;
- border: 1pt solid white;
- }
-
-/*=============================================================================
- Blurbs
-=============================================================================*/
-
- div.informaltable table tr td.blurb
- {
- font-size: 10pt; /* A little bit smaller than the main text */
- line-height: 1.2;
- }
-
- td.blurb img
- {
- padding: 1pt;
- }
-
-/*=============================================================================
- Misc
-=============================================================================*/
-
- /* Tone down the title of Parameter lists */
- div.variablelist p.title
- {
- font-weight: bold;
- font-size: 100%;
- text-align: left;
- }
-
- /* Tabularize parameter lists */
- div.variablelist dl dt
- {
- float: left;
- clear: left;
- display: block;
- font-style: italic;
- }
-
- div.variablelist dl dd
- {
- display: block;
- clear: right;
- padding-left: 8pc;
- }
-
- /* Title of books and articles in bibliographies */
- span.title
- {
- font-style: italic;
- }
-
- span.underline
- {
- text-decoration: underline;
- }
-
- span.strikethrough
- {
- text-decoration: line-through;
- }
-
- /* Copyright, Legal Notice */
- div div.legalnotice p
- {
- text-align: left
- }
-
-/*=============================================================================
- Colors
-=============================================================================*/
-
- @media screen
- {
- /* Links */
- a
- {
- color: #005a9c;
- }
-
- a:visited
- {
- color: #9c5a9c;
- }
-
- /* Syntax Highlighting */
- .keyword { color: #0000AA; }
- .identifier { color: #000000; }
- .special { color: #707070; }
- .preprocessor { color: #402080; }
- .char { color: teal; }
- .comment { color: #800000; }
- .string { color: teal; }
- .number { color: teal; }
- .white_bkd { background-color: #FFFFFF; }
- .dk_grey_bkd { background-color: #999999; }
-
- /* Copyright, Legal Notice */
- .copyright
- {
- color: #666666;
- font-size: small;
- }
-
- div div.legalnotice p
- {
- color: #666666;
- }
-
- /* Program listing */
- pre.synopsis
- {
- background-color: #F3F3F3;
- border: 1pt solid #C0C0C0;
- }
-
- .programlisting,
- .screen
- {
- background-color: #F3F3F3;
- border: 1pt solid #C0C0C0;
- }
-
- /* Blurbs */
- div.informaltable table tr td.blurb
- {
- background-color: #FFFFF0;
- border: 1pt solid #707070;
- }
-
- /* Admonitions */
- div.note, div.tip, div.important, div.warning, div.caution
- {
- background-color: #FFFFF0;
- border: 1pt solid #707070;
- }
-
-
- /* Table of contents */
- .toc
- {
- background-color: #F3F3F3;
- }
-
- /* Tables */
- div.informaltable table tr td,
- div.table table tr td
- {
- background-color: #F0F0F0;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- background-color: #E4E4E4;
- }
-
- /* Misc */
- span.highlight
- {
- color: #00A000;
- }
- }
-
- @media print
- {
- /* Links */
- a
- {
- color: black;
- }
-
- a:visited
- {
- color: black;
- }
-
- .spirit-nav
- {
- display: none;
- }
-
- /* Program listing */
- pre.synopsis
- {
- border: 1px solid gray;
- }
-
- .programlisting,
- .screen
- {
- border: 1px solid gray;
- }
-
- /* Table of contents */
- .toc
- {
- border: 1px solid gray;
- }
-
- .informaltable table,
- .table table
- {
- border: 1px solid gray;
- border-collapse: collapse;
- }
-
- /* Tables */
- div.informaltable table tr td,
- div.table table tr td
- {
- border: 1px solid gray;
- }
-
- div.informaltable table tr th,
- div.table table tr th
- {
- border: 1px solid gray;
- }
-
- /* Misc */
- span.highlight
- {
- font-weight: bold;
- }
- }

Modified: branches/release/tools/quickbook/doc/html/index.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/index.html (original)
+++ branches/release/tools/quickbook/doc/html/index.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,37 +1,40 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Quickbook 1.3</title>
-<link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="index.html" title="Quickbook 1.3">
+<title>Quickbook 1.4</title>
+<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="index.html" title="Quickbook 1.4">
 <link rel="next" href="quickbook/intro.html" title=" Introduction">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="n" href="quickbook/intro.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="quickbook/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
 <div class="article" lang="en">
 <div class="titlepage">
 <div>
 <div><h2 class="title">
-<a name="quickbook"></a>Quickbook 1.3</h2></div>
-<div><div class="author"><h3 class="author">
+<a name="quickbook"></a>Quickbook 1.4</h2></div>
+<div><div class="authorgroup">
+<div class="author"><h3 class="author">
 <span class="firstname">Joel</span> <span class="surname">de Guzman</span>
-</h3></div></div>
-<div><div class="author"><h3 class="author">
+</h3></div>
+<div class="author"><h3 class="author">
 <span class="firstname">Eric</span> <span class="surname">Niebler</span>
-</h3></div></div>
-<div><p class="copyright">Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</p></div>
+</h3></div>
+</div></div>
+<div><p class="copyright">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler</p></div>
 <div><div class="legalnotice">
-<a name="id2549106"></a><p>
+<a name="id385586"></a><p>
         Distributed under the Boost Software License, Version 1.0. (See accompanying
         file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       </p>
@@ -50,15 +53,27 @@
 <dt><span class="section"> Phrase Level Elements</span></dt>
 <dt><span class="section"> Block Level Elements</span></dt>
 </dl></dd>
+<dt><span class="section"> Installation and configuration</span></dt>
+<dd><dl>
+<dt><span class="section"> Mac OS X</span></dt>
+<dt><span class="section"> Windows 2000, XP, 2003, Vista</span></dt>
+<dt><span class="section"> Debian, Ubuntu</span></dt>
+</dl></dd>
+<dt><span class="section"> Editor Support</span></dt>
+<dd><dl>
+<dt><span class="section"> Scintilla Text Editor</span></dt>
+<dt><span class="section">KDE Support</span></dt>
+</dl></dd>
+<dt><span class="section"> Frequently Asked Questions</span></dt>
 <dt><span class="section"> Quick Reference</span></dt>
 </dl>
 </div>
 </div>
-<table width="100%"><tr>
-<td align="left"><small><p>Last revised: August 27, 2006 at 05:24:19 GMT</p></small></td>
-<td align="right"><small></small></td>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: November 14, 2007 at 10:19:55 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="n" href="quickbook/intro.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="quickbook/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/change_log.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/change_log.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/change_log.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,44 +1,33 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Change Log</title>
-<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Quickbook 1.3">
-<link rel="up" href="../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../index.html" title="Quickbook 1.4">
+<link rel="up" href="../index.html" title="Quickbook 1.4">
 <link rel="prev" href="intro.html" title=" Introduction">
 <link rel="next" href="syntax.html" title=" Syntax Summary">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="intro.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="syntax.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="quickbook.change_log"></a> Change Log</h2></div></div></div>
+<a name="quickbook.change_log"></a> Change Log</h2></div></div></div>
 <a name="quickbook.change_log.version_1_3"></a><h3>
-<a name="id2512618"></a>
- Version 1.3
+<a name="id386998"></a>
+ Version 1.3
     </h3>
 <div class="itemizedlist"><ul type="disc">
 <li>
@@ -70,13 +59,13 @@
         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="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>
 </li>
 <li>
         Fully qualified section and headers. Subsection names are concatenated to
- the ID to avoid clashing. Example: <code class="computeroutput"><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>
+ the ID to avoid clashing. Example: <tt class="computeroutput"><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></tt>
 </li>
 <li>
         Better &amp;nbsp; and whitespace handling in code snippets.
@@ -104,14 +93,76 @@
         Replaceable, with the [~replacement] syntax.
       </li>
 </ul></div>
+<a name="quickbook.change_log.version_1_4"></a><h3>
+<a name="id386285"></a>
+ Version 1.4
+ </h3>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Generic Headers
+ </li>
+<li>
+ Code changes to allow full recursion (i.e. Collectors and push/pop functions)
+ </li>
+<li>
+ Various code cleanup/maintenance
+ </li>
+<li>
+ Templates!
+ </li>
+<li>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </li>
+<li>
+ Allow escape of spaces. The escaped space is removed from the output. Syntax:
+ <tt class="computeroutput"><span class="special">\</span> </tt>.
+ </li>
+<li>
+ Nested comments are now allowed.
+ </li>
+<li>
+ Quickbook blocks can nest inside comments.
+ </li>
+<li>
+Import facility.
+ </li>
+<li>
+ Callouts on imported code
+ </li>
+<li>
+ Simple markups can now span a whole block.
+ </li>
+<li>
+Blurbs, Admonitions
+ and table cells (see Tables)
+ may now contain paragraphs.
+ </li>
+<li>
+<tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt>
+ and <tt class="computeroutput"><span class="special">[</span><span class="identifier">br</span><span class="special">]</span></tt> are now deprecated.
+ </li>
+<li>
+Conditional Generation.
+ Ala C++ #ifdef.
+ </li>
+<li>
+ Searching of included and imported files in an extensible search path with
+ <tt class="computeroutput"><span class="special">--</span><span class="identifier">include</span><span class="special">-</span><span class="identifier">path</span></tt> (<tt class="computeroutput"><span class="special">-</span><span class="identifier">I</span></tt>) option.
+ </li>
+</ul></div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="intro.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="syntax.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/intro.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/intro.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/intro.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,58 +1,63 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Introduction</title>
-<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Quickbook 1.3">
-<link rel="up" href="../index.html" title="Quickbook 1.3">
-<link rel="prev" href="../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../index.html" title="Quickbook 1.4">
+<link rel="up" href="../index.html" title="Quickbook 1.4">
+<link rel="prev" href="../index.html" title="Quickbook 1.4">
 <link rel="next" href="change_log.html" title=" Change Log">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="quickbook.intro"></a> Introduction</h2></div></div></div>
-<div class="blockquote"><blockquote class="blockquote"><p>
- <span class="bold"><strong><span class="emphasis"><em>&#8220;<span class="quote">Why program by hand in five days what
- you can spend five years of your life automating?</span>&#8221;</em></span></strong></span><br>
- <br> -- Terrence Parr, author ANTLR/PCCTS
- </p></blockquote></div>
+<a name="quickbook.intro"></a> Introduction</h2></div></div></div>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <span class="bold"><b><span class="emphasis"><em>&#8220;<span class="quote">Why program by hand in five days
+ what you can spend five years of your life automating?</span>&#8221;</em></span></b></span>
+ </p>
+<p>
+ </p>
+<p>
+ -- Terrence Parr, author ANTLR/PCCTS
+ </p>
+<p>
+ </p>
+</blockquote></div>
 <p>
       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:
     </p>
-<div class="blockquote"><blockquote class="blockquote"><p>
- quickbook.qbk
- </p></blockquote></div>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ quickbook.qbk
+ </p>
+<p>
+ </p>
+</blockquote></div>
 <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
+ 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" target="_top">BoostBook</a>
       instead of HTML. The BoostBook
       documentation format is an extension of DocBook,
@@ -92,13 +97,18 @@
       </li>
 </ul></div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="change_log.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/ref.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/ref.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/ref.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,402 +1,942 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Quick Reference</title>
-<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Quickbook 1.3">
-<link rel="up" href="../index.html" title="Quickbook 1.3">
-<link rel="prev" href="syntax/block.html" title=" Block Level Elements">
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../index.html" title="Quickbook 1.4">
+<link rel="up" href="../index.html" title="Quickbook 1.4">
+<link rel="prev" href="faq.html" title=" Frequently Asked Questions">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="syntax/block.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+<a accesskey="p" href="faq.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="quickbook.ref"></a> Quick Reference</h2></div></div></div>
-<div class="informaltable">
-<h4>
-<a name="id2562261"></a>
- <span class="table-title">Syntax Compendium</span>
- </h4>
-<table class="table">
+<a name="quickbook.ref"></a> Quick Reference</h2></div></div></div>
+<p>
+ </p>
+<div class="table">
+<a name="id467661"></a><p class="title"><b>Table 8. Syntax Compendium</b></p>
+<table class="table" summary="Syntax Compendium">
 <colgroup>
 <col>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>To do this...</th>
-<th>Use this...</th>
-<th>See this...</th>
+<th>
+ <p>
+ To do this...
+ </p>
+ </th>
+<th>
+ <p>
+ Use this...
+ </p>
+ </th>
+<th>
+ <p>
+ See this...
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
-<td>comment</td>
-<td><code class="literal">
-[/ some comment]
- </code></td>
-<td>Comments</td>
+<td>
+ <p>
+ comment
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[/ some comment]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Comments
+ </p>
+ </td>
 </tr>
 <tr>
-<td><span class="emphasis"><em>italics</em></span></td>
-<td><code class="literal">
-['italics] or /italics/
- </code></td>
 <td>
-<a href="syntax/phrase.html#quickbook.syntax.phrase.font_styles" title="Font Styles">Font
- Styles</a> and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">formatting
- Simple formatting</a>
-</td>
+ <p>
+ <span class="emphasis"><em>italics</em></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">['italics] or /italics/</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Font Styles
+ and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">Simple
+ formatting</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><span class="bold"><strong>bold</strong></span></td>
-<td><code class="literal">
-[*bold] or *bold*
- </code></td>
 <td>
-<a href="syntax/phrase.html#quickbook.syntax.phrase.font_styles" title="Font Styles">Font
- Styles</a> and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">formatting
- Simple formatting</a>
-</td>
+ <p>
+ <span class="bold"><b>bold</b></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[*bold] or *bold*</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Font Styles
+ and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">Simple
+ formatting</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><span class="underline">underline</span></td>
-<td><code class="literal">
-[_underline] or _underline_
- </code></td>
 <td>
-<a href="syntax/phrase.html#quickbook.syntax.phrase.font_styles" title="Font Styles">Font
- Styles</a> and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">formatting
- Simple formatting</a>
-</td>
+ <p>
+ <span class="underline">underline</span>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[_underline] or _underline_</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Font Styles
+ and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">Simple
+ formatting</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">teletype</code></td>
-<td><code class="literal">
-[^teletype] or =teletype=
- </code></td>
 <td>
-<a href="syntax/phrase.html#quickbook.syntax.phrase.font_styles" title="Font Styles">Font
- Styles</a> and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">formatting
- Simple formatting</a>
-</td>
+ <p>
+ <tt class="literal">teletype</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[^teletype] or =teletype=</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Font Styles
+ and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">Simple
+ formatting</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><span class="strikethrough">strikethrough</span></td>
-<td><code class="literal">
-[-strikethrough]
- </code></td>
 <td>
-<a href="syntax/phrase.html#quickbook.syntax.phrase.font_styles" title="Font Styles">Font
- Styles</a> and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">formatting
- Simple formatting</a>
-</td>
+ <p>
+ <span class="strikethrough">strikethrough</span>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[-strikethrough]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Font Styles
+ and <a href="syntax/phrase.html#quickbook.syntax.phrase.simple_formatting" title="Simple formatting">Simple
+ formatting</a>
+ </p>
+ </td>
 </tr>
 <tr>
 <td>
- <em class="replaceable"><code>
+ <p>
+ <i class="replaceable"><tt>
               replaceable
- </code></em>
- </td>
-<td><code class="literal">
-[~replaceable]
- </code></td>
-<td>Replaceble</td>
+ </tt></i>
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[~replaceable]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Replaceble
+ </p>
+ </td>
 </tr>
 <tr>
-<td>source mode</td>
 <td>
-<code class="literal">[c++]</code> or <code class="literal">[python]</code>
-</td>
-<td>Source Mode</td>
+ <p>
+ source mode
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[c++]</tt> or <tt class="literal">[python]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Source Mode
+ </p>
+ </td>
 </tr>
 <tr>
-<td>inline code</td>
-<td><code class="literal">
-`int main();`
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.inline_code" title="Inline code">Inline
- code</a></td>
+<td>
+ <p>
+ inline code
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">`int main();`</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Inline code
+ </p>
+ </td>
 </tr>
 <tr>
-<td>code block</td>
-<td><code class="literal">
-``int main();``
- </code></td>
-<td>Code</td>
+<td>
+ <p>
+ code block
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">``int main();``</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Code
+ </p>
+ </td>
 </tr>
 <tr>
-<td>code escape</td>
-<td><code class="literal">
-``from c++ to QuickBook``
- </code></td>
-<td><a href="syntax/block.html#quickbook.syntax.block.escape_back" title=" Escaping Back To QuickBook">Escaping
- Back To QuickBook</a></td>
+<td>
+ <p>
+ code escape
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">``from c++ to QuickBook``</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/block.html#quickbook.syntax.block.escape_back" title=" Escaping Back
+ To QuickBook">Escaping Back To QuickBook</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>line break</td>
-<td><code class="literal">
-[br] or \n
- </code></td>
-<td>line-break</td>
+<td>
+ <p>
+ line break
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[br] or \n</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ line-break
+ <span class="bold"><b>DEPRECATED</b></span>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>anchor</td>
-<td><code class="literal">
-[#anchor]
- </code></td>
-<td>Anchors</td>
+<td>
+ <p>
+ anchor
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[#anchor]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Anchors
+ </p>
+ </td>
 </tr>
 <tr>
-<td>link</td>
-<td><code class="literal">
-[@http://www.boost.org Boost]
- </code></td>
-<td>Links</td>
+<td>
+ <p>
+ link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[@http://www.boost.org Boost]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Links
+ </p>
+ </td>
 </tr>
 <tr>
-<td>anchor link</td>
-<td><code class="literal">
-[link section.anchor Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.anchor_links" title="Anchor links">Anchor
- links</a></td>
+<td>
+ <p>
+ anchor link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[link section.anchor Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Anchor links
+ </p>
+ </td>
 </tr>
 <tr>
-<td>refentry link</td>
-<td><code class="literal">
-[link xml.refentry Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.refentry_links" title="refentry links">refentry
- links</a></td>
+<td>
+ <p>
+ refentry link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[link xml.refentry Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ refentry links
+ </p>
+ </td>
 </tr>
 <tr>
-<td>function link</td>
-<td><code class="literal">
-[funcref fully::qualified::function_name Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function,
- class, member, enum or header links</a></td>
+<td>
+ <p>
+ function link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[funcref fully::qualified::function_name Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>class link</td>
-<td><code class="literal">
-[classref fully::qualified::class_name Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function,
- class, member, enum or header links</a></td>
+<td>
+ <p>
+ class link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[classref fully::qualified::class_name Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>member link</td>
-<td><code class="literal">
-[memberref fully::qualified::member_name Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function,
- class, member, enum or header links</a></td>
+<td>
+ <p>
+ member link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[memberref fully::qualified::member_name Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>enum link</td>
-<td><code class="literal">
-[enumref fully::qualified::enum_name Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function,
- class, member, enum or header links</a></td>
+<td>
+ <p>
+ enum link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[enumref fully::qualified::enum_name Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>header link</td>
-<td><code class="literal">
-[headerref path/to/header.hpp Link text]
- </code></td>
-<td><a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function,
- class, member, enum or header links</a></td>
+<td>
+ <p>
+ macro link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[macroref MACRO_NAME Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>escape</td>
-<td><code class="literal">'''escaped text (no processing/formatting)'''</code></td>
-<td>Escape</td>
+<td>
+ <p>
+ concept link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[conceptref ConceptName Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>single char escape</td>
-<td><code class="literal">\c</code></td>
-<td>Single char escape</td>
+<td>
+ <p>
+ header link
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[headerref path/to/header.hpp Link text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.code_links" title=" Code Links">function, class, member,
+ enum, macro, concept or header links</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>images</td>
-<td><code class="literal">
-[$image.jpg]
- </code></td>
-<td>Images</td>
+<td>
+ <p>
+ escape
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">'''escaped text (no processing/formatting)'''</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Escape
+ </p>
+ </td>
 </tr>
 <tr>
-<td>begin section</td>
-<td><code class="literal">
-[section The Section Title]
- </code></td>
-<td>Section</td>
+<td>
+ <p>
+ single char escape
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">\c</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/phrase.html#quickbook.syntax.phrase.single_char_escape" title="Single
+ char escape">Single char
+ escape</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>end section</td>
-<td><code class="literal">
-[endsect]
- </code></td>
-<td>Section</td>
+<td>
+ <p>
+ images
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[$image.jpg]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Images
+ </p>
+ </td>
 </tr>
 <tr>
-<td>paragraph</td>
-<td>No markup. Paragraphs start left-flushed
- and are terminated by two or more newlines.</td>
-<td>Paragraphs</td>
+<td>
+ <p>
+ begin section
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[section The Section Title]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Section
+ </p>
+ </td>
 </tr>
 <tr>
-<td>ordered list</td>
-<td><code class="literal"># one<br> # two<br> #
- three<br> </code></td>
-<td><a href="syntax/block.html#quickbook.syntax.block.lists.ordered_lists" title="Ordered lists">Ordered
- lists</a></td>
+<td>
+ <p>
+ end section
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[endsect]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Section
+ </p>
+ </td>
 </tr>
 <tr>
-<td>unordered list</td>
-<td><code class="literal">* one<br> * two<br>
- * three<br> </code></td>
-<td><a href="syntax/block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered lists">Unordered
- lists</a></td>
+<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>
+ Paragraphs
+ </p>
+ </td>
 </tr>
 <tr>
-<td>code</td>
-<td>No markup. Preformatted code starts with a
- space or a tab.</td>
-<td>Code</td>
+<td>
+ <p>
+ ordered list
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre class="programlisting"># one
+# two
+# three
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/block.html#quickbook.syntax.block.lists.ordered_lists" title="Ordered
+ lists">Ordered lists</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>preformatted</td>
-<td><code class="literal">
-[pre preformatted]
- </code></td>
-<td>Preformatted</td>
+<td>
+ <p>
+ unordered list
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre class="programlisting">* one
+* two
+* three
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ <a href="syntax/block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered
+ lists">Unordered
+ lists</a>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>block quote</td>
-<td><code class="literal">
-[:sometext...]
- </code></td>
-<td>Blockquote</td>
+<td>
+ <p>
+ code
+ </p>
+ </td>
+<td>
+ <p>
+ No markup. Preformatted code starts with a space or a tab.
+ </p>
+ </td>
+<td>
+ <p>
+ Code
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 1</td>
-<td><code class="literal">
-[h1 Heading 1]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ preformatted
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[pre preformatted]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Preformatted
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 2</td>
-<td><code class="literal">
-[h2 Heading 2]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ block quote
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[:sometext...]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Blockquote
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 3</td>
-<td><code class="literal">
-[h3 Heading 3]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ heading 1
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h1 Heading 1]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 4</td>
-<td><code class="literal">
-[h4 Heading 4]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ heading 2
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h2 Heading 2]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 5</td>
-<td><code class="literal">
-[h5 Heading 5]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ heading 3
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h3 Heading 3]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
 </tr>
 <tr>
-<td>heading 6</td>
-<td><code class="literal">
-[h6 Heading 6]
- </code></td>
-<td>Heading</td>
+<td>
+ <p>
+ heading 4
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h4 Heading 4]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
 </tr>
 <tr>
-<td>macro</td>
-<td><code class="literal">
-[def macro_identifier some text]
- </code></td>
-<td>Macros</td>
+<td>
+ <p>
+ heading 5
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h5 Heading 5]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ heading 6
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[h6 Heading 6]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Heading
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ macro
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[def macro_identifier some text]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Macros
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ template
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[template[a b] [a] body [b]]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Templates
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ blurb
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[blurb advertisement or note...]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Blurbs
+ </p>
+ </td>
 </tr>
 <tr>
-<td>blurb</td>
-<td><code class="literal">
-[blurb advertisement or note...]
- </code></td>
-<td>Blurbs</td>
+<td>
+ <p>
+ admonition
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[warning Warning text...]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Admonitions
+ </p>
+ </td>
 </tr>
 <tr>
-<td>admonition</td>
-<td><code class="literal">
-[warning Warning text...]
- </code></td>
-<td>Admonitions</td>
+<td>
+ <p>
+ table
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre class="programlisting">[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Tables
+ </p>
+ </td>
 </tr>
 <tr>
-<td>table</td>
-<td><code class="literal">[table Title<br> [[a][b][c]]<br>
- [[a][b][c]]<br> ]</code></td>
-<td>Tables</td>
+<td>
+ <p>
+ variablelist
+ </p>
+ </td>
+<td>
+ <p>
+
+</p>
+<pre class="programlisting">[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+</pre>
+<p>
+ </p>
+ </td>
+<td>
+ <p>
+ Variable Lists
+ </p>
+ </td>
 </tr>
 <tr>
-<td>variablelist</td>
-<td><code class="literal">[variablelist Title<br>
- [[a][b]]<br> [[a][b]]<br> ]</code></td>
-<td><a href="syntax/block.html#quickbook.syntax.block.variable_lists" title="Variable Lists">Variable
- Lists</a></td>
+<td>
+ <p>
+ include
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[include someother.qbk]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Include
+ </p>
+ </td>
 </tr>
 <tr>
-<td>include</td>
-<td><code class="literal">
-[include someother.qbk]
- </code></td>
-<td>Include</td>
+<td>
+ <p>
+ conditional generation
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[? symbol phrase]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ Conditional Generation
+ </p>
+ </td>
 </tr>
 </tbody>
 </table>
 </div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="syntax/block.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+<a accesskey="p" href="faq.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/syntax.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/syntax.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/syntax.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,41 +1,30 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Syntax Summary</title>
-<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Quickbook 1.3">
-<link rel="up" href="../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../index.html" title="Quickbook 1.4">
+<link rel="up" href="../index.html" title="Quickbook 1.4">
 <link rel="prev" href="change_log.html" title=" Change Log">
 <link rel="next" href="syntax/comments.html" title="Comments">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="change_log.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="syntax/comments.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="change_log.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax/comments.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="quickbook.syntax"></a> Syntax Summary</h2></div></div></div>
+<a name="quickbook.syntax"></a> Syntax Summary</h2></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section">Comments</span></dt>
 <dt><span class="section"> Phrase Level Elements</span></dt>
@@ -57,13 +46,18 @@
       past a single block.
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="change_log.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="syntax/comments.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="change_log.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="syntax/comments.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/syntax/block.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/syntax/block.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/syntax/block.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,41 +1,30 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Block Level Elements</title>
-<link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../../index.html" title="Quickbook 1.4">
 <link rel="up" href="../syntax.html" title=" Syntax Summary">
 <link rel="prev" href="phrase.html" title=" Phrase Level Elements">
-<link rel="next" href="../ref.html" title=" Quick Reference">
+<link rel="next" href="../install.html" title=" Installation and configuration">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="phrase.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ref.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="phrase.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../install.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="quickbook.syntax.block"></a> Block Level Elements</h3></div></div></div>
+<a name="quickbook.syntax.block"></a> Block Level Elements</h3></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section">Document</span></dt>
 <dt><span class="section">Section</span></dt>
@@ -43,21 +32,26 @@
 <dt><span class="section">Paragraphs</span></dt>
 <dt><span class="section">Lists</span></dt>
 <dt><span class="section">Code</span></dt>
-<dt><span class="section"> Escaping Back To QuickBook</span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.escape_back"> Escaping Back
+ To QuickBook</a></span></dt>
 <dt><span class="section">Preformatted</span></dt>
 <dt><span class="section">Blockquote</span></dt>
 <dt><span class="section">Admonitions</span></dt>
 <dt><span class="section">Headings</span></dt>
+<dt><span class="section">Generic Heading</span></dt>
 <dt><span class="section">Macros</span></dt>
-<dt><span class="section">Predefined Macros</span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.predefined_macros">Predefined
+ Macros</a></span></dt>
+<dt><span class="section">Templates</span></dt>
 <dt><span class="section">Blurbs</span></dt>
 <dt><span class="section">Tables</span></dt>
 <dt><span class="section">Variable Lists</span></dt>
 <dt><span class="section">Include</span></dt>
+<dt><span class="section">Import</span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.document"></a>Document</h4></div></div></div>
+<a name="quickbook.syntax.block.document"></a>Document</h4></div></div></div>
 <p>
           Every document must begin with a Document Info section, which should look
           like this:
@@ -118,21 +112,21 @@
           for. In its absence, version 1.1 is assumed.
         </p>
 <p>
- <code class="literal">version</code>, <code class="literal">id</code>, <code class="literal">dirname</code>,
- <code class="literal">copyright</code>, <code class="literal">purpose</code>, <code class="literal">category</code>,
- <code class="literal">authors</code>, <code class="literal">license</code>, <code class="literal">last-revision</code>
- and <code class="literal">source-mode</code> are optional information.
+ <tt class="literal">version</tt>, <tt class="literal">id</tt>, <tt class="literal">dirname</tt>,
+ <tt class="literal">copyright</tt>, <tt class="literal">purpose</tt>, <tt class="literal">category</tt>,
+ <tt class="literal">authors</tt>, <tt class="literal">license</tt>, <tt class="literal">last-revision</tt>
+ and <tt class="literal">source-mode</tt> are optional information.
         </p>
 <p>
- <code class="literal">source-type</code> is a lowercase string setting the initial
+ <tt class="literal">source-type</tt> is a lowercase string setting the initial
           <a href="phrase.html#quickbook.syntax.phrase.source_mode" title="Source Mode">Source Mode</a>.
- If the <code class="literal">source-mode</code> field is omitted, a default value
- of <code class="literal">c++</code> will be used.
+ If the <tt class="literal">source-mode</tt> field is omitted, a default value
+ of <tt class="literal">c++</tt> will be used.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.section"></a>Section</h4></div></div></div>
+<a name="quickbook.syntax.block.section"></a>Section</h4></div></div></div>
 <p>
           Starting a new section is accomplished with:
         </p>
@@ -141,8 +135,8 @@
 <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, "The Section Title"
- will be normalized and become the id. Valid characters are <code class="literal">a-Z</code>,
- <code class="literal">A-Z</code>, <code class="literal">0-9</code> and <code class="literal">_</code>.
+ will be normalized and become the id. Valid characters are <tt class="literal">a-Z</tt>,
+ <tt class="literal">A-Z</tt>, <tt class="literal">0-9</tt> and <tt class="literal">_</tt>.
           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".
@@ -158,7 +152,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.xinclude"></a>xinclude</h4></div></div></div>
+<a name="quickbook.syntax.block.xinclude"></a>xinclude</h4></div></div></div>
 <p>
           You can include another XML file with:
         </p>
@@ -171,7 +165,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.paragraphs"></a>Paragraphs</h4></div></div></div>
+<a name="quickbook.syntax.block.paragraphs"></a>Paragraphs</h4></div></div></div>
 <p>
           Paragraphs start left-flushed and are terminated by two or more newlines.
           No markup is needed for paragraphs. QuickBook automatically detects paragraphs
@@ -179,20 +173,29 @@
           h6, blurb, (block-quote) ':', pre, def, table and include ] may also terminate
           a paragraph.
         </p>
+<p>
+ This is a new paragraph...
+ </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.lists"></a>Lists</h4></div></div></div>
+<a name="quickbook.syntax.block.lists"></a>Lists</h4></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section">Ordered lists</span></dt>
-<dt><span class="section">List Hierarchies</span></dt>
-<dt><span class="section">Long List Lines</span></dt>
-<dt><span class="section">Unordered lists</span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</a></span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.lists.list_hierarchies">List
+ Hierarchies</a></span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.lists.long_list_lines">Long
+ List Lines</a></span></dt>
+<dt><span class="section"><a href="block.html#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a></span></dt>
 <dt><span class="section">Mixed lists</span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="quickbook.syntax.block.lists.ordered_lists"></a>Ordered lists</h5></div></div></div>
+<a name="quickbook.syntax.block.lists.ordered_lists"></a><a href="block.html#quickbook.syntax.block.lists.ordered_lists" title="Ordered
+ lists">Ordered
+ lists</a></h5></div></div></div>
 <pre class="programlisting"># One
 # Two
 # Three
@@ -214,7 +217,9 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="quickbook.syntax.block.lists.list_hierarchies"></a>List Hierarchies</h5></div></div></div>
+<a name="quickbook.syntax.block.lists.list_hierarchies"></a><a href="block.html#quickbook.syntax.block.lists.list_hierarchies" title="List
+ Hierarchies">List
+ Hierarchies</a></h5></div></div></div>
 <p>
             List hierarchies are supported. Example:
           </p>
@@ -275,7 +280,9 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="quickbook.syntax.block.lists.long_list_lines"></a>Long List Lines</h5></div></div></div>
+<a name="quickbook.syntax.block.lists.long_list_lines"></a><a href="block.html#quickbook.syntax.block.lists.long_list_lines" title="Long
+ List Lines">Long
+ List Lines</a></h5></div></div></div>
 <p>
             Long lines will be wrapped appropriately. Example:
           </p>
@@ -304,7 +311,9 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="quickbook.syntax.block.lists.unordered_lists"></a>Unordered lists</h5></div></div></div>
+<a name="quickbook.syntax.block.lists.unordered_lists"></a><a href="block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered
+ lists">Unordered
+ lists</a></h5></div></div></div>
 <pre class="programlisting">* First
 * Second
 * Third
@@ -326,7 +335,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="quickbook.syntax.block.lists.mixed_lists"></a>Mixed lists</h5></div></div></div>
+<a name="quickbook.syntax.block.lists.mixed_lists"></a>Mixed lists</h5></div></div></div>
 <p>
             Mixed lists (ordered and unordered) are supported. Example:
           </p>
@@ -437,7 +446,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.code"></a>Code</h4></div></div></div>
+<a name="quickbook.syntax.block.code"></a>Code</h4></div></div></div>
 <p>
           Preformatted code starts with a space or a tab. The code will be syntax
           highlighted according to the current <a href="phrase.html#quickbook.syntax.phrase.source_mode" title="Source Mode">Source
@@ -466,6 +475,8 @@
     <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>
+ </p>
+<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]]
@@ -477,12 +488,14 @@
           Generates:
         </p>
 <pre class="programlisting">
-<span class="identifier">using</span> boost<span class="special">::</span>array<span class="special">;</span>
+<span class="keyword">using</span> boost<span class="special">::</span>array<span class="special">;</span>
 </pre>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.escape_back"></a> Escaping Back To QuickBook</h4></div></div></div>
+<a name="quickbook.syntax.block.escape_back"></a><a href="block.html#quickbook.syntax.block.escape_back" title=" Escaping Back
+ To QuickBook"> Escaping Back
+ To QuickBook</a></h4></div></div></div>
 <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
@@ -499,7 +512,7 @@
           Will generate:
         </p>
 <pre class="programlisting">
-<span class="identifier">void</span> foo<span class="special">()</span>
+<span class="keyword">void</span> foo<span class="special">()</span>
 <span class="special">{</span>
 <span class="special">}</span>
 </pre>
@@ -510,10 +523,10 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.preformatted"></a>Preformatted</h4></div></div></div>
+<a name="quickbook.syntax.block.preformatted"></a>Preformatted</h4></div></div></div>
 <p>
           Sometimes, you don't want some preformatted text to be parsed as C++. In
- such cases, use the <code class="literal">[pre ... ]</code> markup block.
+ such cases, use the <tt class="literal">[pre ... ]</tt> markup block.
         </p>
 <pre class="programlisting">[pre
 
@@ -530,30 +543,36 @@
           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
+<pre class="programlisting">Some <span class="bold"><b>preformatted</b></span> text Some <span class="bold"><b>preformatted</b></span> text
 
- Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+ Some <span class="bold"><b>preformatted</b></span> text Some <span class="bold"><b>preformatted</b></span> text
 
- Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+ Some <span class="bold"><b>preformatted</b></span> text Some <span class="bold"><b>preformatted</b></span> text
 
 </pre>
 <p>
           Notice that unlike Code, phrase markup such as font style is still permitted
- inside <code class="literal">pre</code> blocks.
+ inside <tt class="literal">pre</tt> blocks.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.blockquote"></a>Blockquote</h4></div></div></div>
+<a name="quickbook.syntax.block.blockquote"></a>Blockquote</h4></div></div></div>
 <pre class="programlisting">[:sometext...]
 </pre>
-<div class="blockquote"><blockquote class="blockquote"><p>
- Indents the paragraph. This applies to one paragraph only.
- </p></blockquote></div>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Indents the paragraph. This applies to one paragraph only.
+ </p>
+<p>
+ </p>
+</blockquote></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.admonitions"></a>Admonitions</h4></div></div></div>
+<a name="quickbook.syntax.block.admonitions"></a>Admonitions</h4></div></div></div>
 <pre class="programlisting">[note This is a note]
 [tip This is a tip]
 [important This is important]
@@ -565,58 +584,58 @@
         </p>
 <div class="note"><table border="0" summary="Note">
 <tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
 <th align="left">Note</th>
 </tr>
-<tr><td align="left" valign="top"><p>
+<tr><td colspan="2" align="left" valign="top"><p>
             This is a note
           </p></td></tr>
 </table></div>
 <div class="tip"><table border="0" summary="Tip">
 <tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../images/tip.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../../doc/html/images/tip.png"></td>
 <th align="left">Tip</th>
 </tr>
-<tr><td align="left" valign="top"><p>
+<tr><td colspan="2" align="left" valign="top"><p>
             This is a tip
           </p></td></tr>
 </table></div>
 <div class="important"><table border="0" summary="Important">
 <tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
 <th align="left">Important</th>
 </tr>
-<tr><td align="left" valign="top"><p>
+<tr><td colspan="2" align="left" valign="top"><p>
             This is important
           </p></td></tr>
 </table></div>
 <div class="caution"><table border="0" summary="Caution">
 <tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../images/caution.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/html/images/caution.png"></td>
 <th align="left">Caution</th>
 </tr>
-<tr><td align="left" valign="top"><p>
+<tr><td colspan="2" align="left" valign="top"><p>
             This is a caution
           </p></td></tr>
 </table></div>
 <div class="warning"><table border="0" summary="Warning">
 <tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../images/warning.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
 <th align="left">Warning</th>
 </tr>
-<tr><td align="left" valign="top"><p>
+<tr><td colspan="2" align="left" valign="top"><p>
             This is a warning
           </p></td></tr>
 </table></div>
 <p>
           These are the only admonitions supported by DocBook.
- So, for example <code class="literal">[information This is some information]</code>
+ So, for example <tt class="literal">[information This is some information]</tt>
           is unlikely to produce the desired effect.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.headings"></a>Headings</h4></div></div></div>
+<a name="quickbook.syntax.block.headings"></a>Headings</h4></div></div></div>
 <pre class="programlisting">[h1 Heading 1]
 [h2 Heading 2]
 [h3 Heading 3]
@@ -625,36 +644,36 @@
 [h6 Heading 6]
 </pre>
 <a name="quickbook.syntax.block.headings.heading_1"></a><h1>
-<a name="id2561073"></a>
- Heading 1
+<a name="id459656"></a>
+ Heading 1
         </h1>
 <a name="quickbook.syntax.block.headings.heading_2"></a><h2>
-<a name="id2561085"></a>
- Heading 2
+<a name="id459680"></a>
+ Heading 2
         </h2>
 <a name="quickbook.syntax.block.headings.heading_3"></a><h3>
-<a name="id2561098"></a>
- Heading 3
+<a name="id459704"></a>
+ Heading 3
         </h3>
 <a name="quickbook.syntax.block.headings.heading_4"></a><h4>
-<a name="id2561110"></a>
- Heading 4
+<a name="id459729"></a>
+ Heading 4
         </h4>
 <a name="quickbook.syntax.block.headings.heading_5"></a><h5>
-<a name="id2561124"></a>
- Heading 5
+<a name="id459754"></a>
+ Heading 5
         </h5>
 <a name="quickbook.syntax.block.headings.heading_6"></a><h5>
-<a name="id2561136"></a>
- Heading 6
+<a name="id459779"></a>
+ Heading 6
         </h5>
 <p>
           Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
- names with <code class="literal">name="section_id.normalized_header_text"</code>
- (i.e. valid characters are <code class="literal">a-z</code>, <code class="literal">A-Z</code>,
- <code class="literal">0-9</code> and <code class="literal">_</code>. All non-valid characters
+ names with <tt class="literal">name="section_id.normalized_header_text"</tt>
+ (i.e. valid characters are <tt class="literal">a-z</tt>, <tt class="literal">A-Z</tt>,
+ <tt class="literal">0-9</tt> and <tt class="literal">_</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 <code class="literal">section_2.heading_1</code>).
+ For example: Heading 1 in section Section 2 will be normalized to <tt class="literal">section_2.heading_1</tt>).
           You can use:
         </p>
 <pre class="programlisting">[link section_id.normalized_header_text The link text]
@@ -667,14 +686,62 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.macros"></a>Macros</h4></div></div></div>
+<a name="quickbook.syntax.block.generic_heading"></a>Generic Heading</h4></div></div></div>
+<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 class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="quickbook.syntax.block.macros"></a>Macros</h4></div></div></div>
 <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 ']' while the replacement text can be any phrase
- (even marked up). Example:
+ 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
@@ -685,23 +752,24 @@
 <p>
           <span class="inlinemediaobject"></span>
         </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> 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. <code class="literal">
-__spirit__
- </code>). The reason is to avoid unwanted macro replacement.</td></tr></tbody>
+<div class="tip"><table border="0" summary="Tip">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../../../../doc/html/images/tip.png"></td>
+<th align="left">Tip</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><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 class="literal">__spirit__</tt>). The reason is to avoid unwanted
+ macro replacement.
+ </p></td></tr>
 </table></div>
 <p>
- Links (URLS) and images are good candidates for macros. <span class="bold"><strong>1</strong></span>)
+ Links (URLS) and images are good candidates for macros. <span class="bold"><b>1</b></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. <code class="literal">
-__spirit__
- </code> than <code class="literal">
-[@http://spirit.sourceforge.net Spirit]
- </code>.
+ in one place near the top to make it easy to make changes. <span class="bold"><b>2</b></span>)
+ The syntax is not pretty. It's easier to read and write, e.g. <tt class="literal">__spirit__</tt>
+ than <tt class="literal">[@http://spirit.sourceforge.net Spirit]</tt>.
         </p>
 <p>
           Some more examples:
@@ -722,52 +790,93 @@
           will generate this:
         </p>
 <p>
- Hi Spirit <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span>
+ Hi Spirit <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span>
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.predefined_macros"></a>Predefined Macros</h4></div></div></div>
+<a name="quickbook.syntax.block.predefined_macros"></a><a href="block.html#quickbook.syntax.block.predefined_macros" title="Predefined
+ Macros">Predefined
+ Macros</a></h4></div></div></div>
 <p>
           Quickbook has some predefined macros that you can already use.
         </p>
-<div class="informaltable">
-<h4>
-<a name="id2561441"></a>
- <span class="table-title">Predefined Macros</span>
- </h4>
-<table class="table">
+<div class="table">
+<a name="id460235"></a><p class="title"><b>Table 3. Predefined Macros</b></p>
+<table class="table" summary="Predefined Macros">
 <colgroup>
 <col>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Macro</th>
-<th>Meaning</th>
-<th>Example</th>
+<th>
+ <p>
+ Macro
+ </p>
+ </th>
+<th>
+ <p>
+ Meaning
+ </p>
+ </th>
+<th>
+ <p>
+ Example
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
 <td>
-__DATE__
- </td>
-<td>Today's date</td>
-<td>2006-Aug-27</td>
+ <p>
+ __DATE__
+ </p>
+ </td>
+<td>
+ <p>
+ Today's date
+ </p>
+ </td>
+<td>
+ <p>
+ 2007-Nov-14
+ </p>
+ </td>
 </tr>
 <tr>
 <td>
-__TIME__
- </td>
-<td>The current time</td>
-<td>06:24:19 AM</td>
+ <p>
+ __TIME__
+ </p>
+ </td>
+<td>
+ <p>
+ The current time
+ </p>
+ </td>
+<td>
+ <p>
+ 06:19:55 PM
+ </p>
+ </td>
 </tr>
 <tr>
 <td>
-__FILENAME__
- </td>
-<td>Quickbook source filename</td>
-<td>/home/daniel/src/boost-1.34/tools/quickbook/doc/quickbook.qbk</td>
+ <p>
+ __FILENAME__
+ </p>
+ </td>
+<td>
+ <p>
+ Quickbook source filename
+ </p>
+ </td>
+<td>
+ <p>
+ C:\dev\boost\tools\quickbook\doc\quickbook.qbk
+ </p>
+ </td>
 </tr>
 </tbody>
 </table>
@@ -775,8 +884,320 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.blurbs"></a>Blurbs</h4></div></div></div>
-<pre class="programlisting">[blurb :-) [*An eye catching advertisement or note...]\n\n
+<a name="quickbook.syntax.block.templates"></a>Templates</h4></div></div></div>
+<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>
+<a name="quickbook.syntax.block.templates.template_identifier"></a><h5>
+<a name="id460416"></a>
+ <a href="block.html#quickbook.syntax.block.templates.template_identifier">Template
+ Identifier</a>
+ </h5>
+<p>
+ Template identifiers can either consist of:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ 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.
+ </li>
+<li>
+ A single character punctuation (a non-alphanumeric printable character)
+ </li>
+</ul></div>
+<a name="quickbook.syntax.block.templates.formal_template_arguments"></a><h5>
+<a name="id460462"></a>
+ <a href="block.html#quickbook.syntax.block.templates.formal_template_arguments">Formal
+ Template Arguments</a>
+ </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="block.html#quickbook.syntax.block.templates.template_expansion">template
+ is expanded</a>. Note that the body of the <tt class="literal">person</tt>
+ template above refers to <tt class="literal">name</tt> <tt class="literal">age</tt>
+ and <tt class="literal">what</tt> as <tt class="literal">[name]</tt> <tt class="literal">[age]</tt>
+ and <tt class="literal">[what]</tt>. <tt class="literal">name</tt> <tt class="literal">age</tt>
+ and <tt class="literal">what</tt> are actually templates that exist in the duration
+ of the template call.
+ </p>
+<a name="quickbook.syntax.block.templates.template_body"></a><h5>
+<a name="id460581"></a>
+ <a href="block.html#quickbook.syntax.block.templates.template_body">Template
+ Body</a>
+ </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>
+<a name="quickbook.syntax.block.templates.template_expansion"></a><h5>
+<a name="id460640"></a>
+ <a href="block.html#quickbook.syntax.block.templates.template_expansion">Template
+ Expansion</a>
+ </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>
+ </p>
+<p>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </p>
+<p>
+ </p>
+<p>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
+ </p>
+<p>
+ </p>
+<div class="caution"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/html/images/caution.png"></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><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></td></tr>
+</table></div>
+<p>
+ Each actual argument can be a word, a text fragment or just about any
+ QuickBook phrase. Arguments
+ are separated by the double dot <tt class="literal">".."</tt> and terminated
+ by the close parenthesis.
+ </p>
+<a name="quickbook.syntax.block.templates.nullary_templates"></a><h5>
+<a name="id460747"></a>
+ <a href="block.html#quickbook.syntax.block.templates.nullary_templates">Nullary
+ Templates</a>
+ </h5>
+<p>
+ Nullary templates look and act like simple macros. Example:
+ </p>
+<pre class="programlisting">[template alpha[]'''&amp;#945;''']
+[template beta[]'''&amp;#946;''']
+</pre>
+<p>
+ Expanding:
+ </p>
+<pre class="programlisting">Some squigles...[*[alpha][beta]]</pre>
+<p>
+ We have:
+ </p>
+<p>
+ Some squiggles...<span class="bold"><b>&#945;&#946;</b></span>
+ </p>
+<p>
+ The difference with macros are
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ The explicit <a href="block.html#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.
+ </li>
+<li>
+ 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.
+ </li>
+</ul></div>
+<p>
+ The empty brackets after the template identifier (<tt class="literal">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"><b><span class="emphasis"><em>Education
+ is the best provision for the journey to old age.</em></span></b></span>.
+ </p>
+<p>
+ The disadvantage is that you can't avoid the space between the template
+ identifier, <tt class="computeroutput"><span class="identifier">aristotle_quote</span></tt>,
+ 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: "<tt class="computeroutput"><span class="special">\</span> </tt>".
+ 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>
+ <tt class="computeroutput"><span class="keyword">struct</span></tt> x_tag;
+ </p>
+<p>
+ You have a couple of ways to do it. I personally prefer the explicit empty
+ brackets, though.
+ </p>
+<a name="quickbook.syntax.block.templates.simple_arguments"></a><h5>
+<a name="id460981"></a>
+ <a href="block.html#quickbook.syntax.block.templates.simple_arguments">Simple
+ Arguments</a>
+ </h5>
+<p>
+ As mentioned, arguments are separated by the double dot <tt class="literal">".."</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>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Break the last argument into two, at the first space found (<tt class="literal">'',
+ '\n', \t' or '\r'</tt>).
+ </li>
+<li>
+ Repeat until there are enough arguments or if there are no more spaces
+ found (in which case, an error is reported).
+ </li>
+</ul></div>
+<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>
+ "w x y z" is initially treated as a single argument because we
+ didn't supply any <tt class="literal">".."</tt> separators. However,
+ since <tt class="literal">simple</tt> expects 4 arguments, "w x y z"
+ is broken down iteratively (applying the logic above) until we have "w",
+ "x", "y" and "z".
+ </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: "w", "x", "y" and "z
+ trail".
+ </p>
+<p>
+ It should be obvious now that for simple arguments with no spaces, we can
+ get by without separating the arguments with <tt class="literal">".."</tt>
+ separators. It is possible to combine <tt class="literal">".."</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>
+<a name="quickbook.syntax.block.templates.punctuation_templates"></a><h5>
+<a name="id461151"></a>
+ <a href="block.html#quickbook.syntax.block.templates.punctuation_templates">Punctuation
+ Templates</a>
+ </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="block.html#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 class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="quickbook.syntax.block.blurbs"></a>Blurbs</h4></div></div></div>
+<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)
@@ -786,19 +1207,32 @@
 <p>
           will generate this:
         </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span> <span class="bold"><strong>An eye catching advertisement
- or note...</strong></span><br> <br> 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++. </td></tr></tbody>
+<div class="sidebar">
+<p>
+ <span class="inlinemediaobject"><img src="../../images/smiley.png" alt="smiley"></span> <span class="bold"><b>An eye catching advertisement
+ or note...</b></span>
+ </p>
+<p>
+ 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++.
+ </p>
+</div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ Prefer admonitions
+ wherever appropriate.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.tables"></a>Tables</h4></div></div></div>
+<a name="quickbook.syntax.block.tables"></a>Tables</h4></div></div></div>
 <pre class="programlisting">[table A Simple Table
     [[Heading 1] [Heading 2] [Heading 3]]
     [[R0-C0] [R0-C1] [R0-C2]]
@@ -809,44 +1243,89 @@
 <p>
           will generate:
         </p>
-<div class="informaltable">
-<h4>
-<a name="id2561624"></a>
- <span class="table-title">A Simple Table</span>
- </h4>
-<table class="table">
+<div class="table">
+<a name="id461354"></a><p class="title"><b>Table 4. A Simple Table</b></p>
+<table class="table" summary="A Simple Table">
 <colgroup>
 <col>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Heading 1</th>
-<th>Heading 2</th>
-<th>Heading 3</th>
+<th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+<th>
+ <p>
+ Heading 2
+ </p>
+ </th>
+<th>
+ <p>
+ Heading 3
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
-<td>R0-C0</td>
-<td>R0-C1</td>
-<td>R0-C2</td>
+<td>
+ <p>
+ R0-C0
+ </p>
+ </td>
+<td>
+ <p>
+ R0-C1
+ </p>
+ </td>
+<td>
+ <p>
+ R0-C2
+ </p>
+ </td>
 </tr>
 <tr>
-<td>R2-C0</td>
-<td>R2-C1</td>
-<td>R2-C2</td>
+<td>
+ <p>
+ R2-C0
+ </p>
+ </td>
+<td>
+ <p>
+ R2-C1
+ </p>
+ </td>
+<td>
+ <p>
+ R2-C2
+ </p>
+ </td>
 </tr>
 <tr>
-<td>R3-C0</td>
-<td>R3-C1</td>
-<td>R3-C2</td>
+<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 <code class="literal">&lt;thead&gt;...&lt;/thead&gt;</code>
+ treated as the table header; that is, it is wrapped in <tt class="literal">&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:
@@ -856,10 +1335,14 @@
     [
         [Row 0, Col 0: a small cell]
         [
- Row 0, Col 1:
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big 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.
         ]
     ]
     [
@@ -871,32 +1354,58 @@
 <p>
           and thus:
         </p>
-<div class="informaltable">
-<h4>
-<a name="id2508134"></a>
- <span class="table-title">Table with fat cells</span>
- </h4>
-<table class="table">
+<div class="table">
+<a name="id461518"></a><p class="title"><b>Table 5. Table with fat cells</b></p>
+<table class="table" summary="Table with fat cells">
 <colgroup>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Heading 1</th>
-<th>Heading 2</th>
+<th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+<th>
+ <p>
+ Heading 2
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
-<td>Row 0, Col 0: a small cell</td>
-<td> Row 0, Col 1: A
- very big cell...A very big cell...A very big cell... A very big cell...A
- very big cell...A very big cell... A very big cell...A very big cell...A
- very big cell... </td>
+<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>Row 1, Col 0: a small cell</td>
-<td>Row 1, Col 1: a small
- cell</td>
+<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>
@@ -920,44 +1429,62 @@
     ]
 ]
 </pre>
-<div class="informaltable">
-<h4>
-<a name="id2508215"></a>
- <span class="table-title">Table with code</span>
- </h4>
-<table class="table">
+<div class="table">
+<a name="id461636"></a><p class="title"><b>Table 6. Table with code</b></p>
+<table class="table" summary="Table with code">
 <colgroup>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Comment</th>
-<th>Code</th>
+<th>
+ <p>
+ Comment
+ </p>
+ </th>
+<th>
+ <p>
+ Code
+ </p>
+ </th>
 </tr></thead>
 <tbody><tr>
-<td>My first program</td>
 <td>
-<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">
-<span class="comment">#include &lt;iostream&gt;
-</span>
-<span class="identifier">int</span> <span class="identifier">main</span><span class="special">()</span>
+ <p>
+ My first program
+ </p>
+ </td>
+<td>
+ <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">"Hello, World!"</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="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Hello, World!"</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>
- </td>
+<p>
+ </p>
+ </td>
 </tr></tbody>
 </table>
 </div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.variable_lists"></a>Variable Lists</h4></div></div></div>
+<a name="quickbook.syntax.block.variable_lists"></a>Variable Lists</h4></div></div></div>
 <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]]
+ [[term 3] [
+ The definition of term 3.
+
+ Definitions may contain paragraphs.
+ ]]
 ]
 </pre>
 <p>
@@ -967,17 +1494,22 @@
 <p class="title"><b>A Variable List</b></p>
 <dl>
 <dt><span class="term">term 1</span></dt>
-<dd>
- The definition of term 1
- </dd>
+<dd><p>
+ The definition of term 1
+ </p></dd>
 <dt><span class="term">term 2</span></dt>
-<dd>
- The definition of term 2
- </dd>
+<dd><p>
+ The definition of term 2
+ </p></dd>
 <dt><span class="term">term 3</span></dt>
 <dd>
- The definition of term 3
- </dd>
+<p>
+ The definition of term 3.
+ </p>
+<p>
+ Definitions may contain paragraphs.
+ </p>
+</dd>
 </dl>
 </div>
 <p>
@@ -989,52 +1521,376 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.block.include"></a>Include</h4></div></div></div>
+<a name="quickbook.syntax.block.include"></a>Include</h4></div></div></div>
 <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 be cut and pasted into
+ The included file will be processed as if it had been cut and pasted into
           the current document, with the following exceptions:
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
- The
-__FILENAME__
- predefined macro will reflect the name of the file currently being processed.
+ The __FILENAME__ predefined macro will reflect the name of the file currently being
+ processed.
           </li>
 <li>
             Any macros defined in the included file are scoped to that file.
           </li>
 </ul></div>
 <p>
- As the number of included QuickBook files grows, so too does the likelihood
- of two sections having the same name. Since QuickBook generates an anchor
- for each section based on the section name, it is possible to end up with
- two identically named anchors, leading to link ambiguities. To resolve
- these ambiguities, the <code class="literal">[include]</code> directive lets you
- specify a document id to use for the included file. You can use it like
- this:
+ The <tt class="literal">[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 ("someother", in the example
+ above). You can specify the id like this:
         </p>
 <pre class="programlisting">[include:someid someother.qbk]
 </pre>
 <p>
- When using this form, all auto-generated anchors will use "someid"
- as a unique prefix. So for instance, if there is a section in someother.qbk
- named "Intro", the named anchor for that section will be "someid.intro",
- and you can link to it with <code class="literal">[link someid.intro The Intro]</code>.
+ 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 <tt class="literal">[link someid.intro The Intro]</tt>.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="quickbook.syntax.block.import"></a>Import</h4></div></div></div>
+<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>
+<a name="quickbook.syntax.block.import.example"></a><h5>
+<a name="id462059"></a>
+ 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 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. <tt class="computeroutput"><span class="identifier">foo</span></tt>
+ and <tt class="computeroutput"><span class="identifier">bar</span></tt> 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>
+ </p>
+<p>
+ This is the <span class="bold"><b><span class="emphasis"><em>foo</em></span></b></span>
+ function.
+ </p>
+<p>
+ </p>
+<p>
+ This description can have paragraphs...
+ </p>
+<p>
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ lists
+ </li>
+<li>
+ etc.
+ </li>
+</ul></div>
+<p>
+ </p>
+<p>
+ And any quickbook block markup.
+ </p>
+<p>
+ </p>
+<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">"foo"</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ This is the <span class="bold"><b><span class="emphasis"><em>bar</em></span></b></span>
+ function
+ </p>
+<p>
+ </p>
+<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">"bar"</span><span class="special">;</span>
+<span class="special">}</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some trailing text here
+ </p>
+<p>
+ </p>
+<a name="quickbook.syntax.block.import.code_snippet_markup"></a><h5>
+<a name="id462364"></a>
+ <a href="block.html#quickbook.syntax.block.import.code_snippet_markup">Code
+ Snippet Markup</a>
+ </h5>
+<p>
+ Note how the code snippets in stub.cpp
+ 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 <tt class="computeroutput"><span class="comment">//[id</span></tt> and <tt class="computeroutput"><span class="comment">//]</span></tt>
+ 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 <tt class="computeroutput"><span class="comment">//]</span></tt> ends a code-snippet
+ This too will not be visible in quickbook.
+ </p>
+<a name="quickbook.syntax.block.import.special_comments"></a><h5>
+<a name="id462489"></a>
+ <a href="block.html#quickbook.syntax.block.import.special_comments">Special
+ Comments</a>
+ </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>
+<p>
+ Special comments of the form:
+ </p>
+<pre class="programlisting">
+<span class="comment">/*&lt;- this C++ comment will be ignored -&gt;*/</span>
+</pre>
+<p>
+ or
+ </p>
+<pre class="programlisting">
+<span class="comment">/*&lt;-*/</span> <span class="string">"this c++ code will be ignored"</span> <span class="comment">/*-&gt;*/</span>
+</pre>
+<p>
+ or
+ </p>
+<pre class="programlisting">
+<span class="comment">//&lt;-
+</span><span class="keyword">private</span><span class="special">:</span>
+ <span class="keyword">int</span> <span class="identifier">some_member</span><span class="special">;</span>
+<span class="comment">//-&gt;
+</span></pre>
+<p>
+ can be used to inhibit code from passing through to quickbook. All text
+ between the delimeters will simply be ignored.
+ </p>
+<a name="quickbook.syntax.block.import.callouts"></a><h5>
+<a name="id462669"></a>
+ 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 "callout bug" (a small icon with a number). After the whole
+ snippet is parsed, the callout list is generated. See Callouts
+ for details. Example:
+ </p>
+<p>
+ </p>
+<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> <span class="callout_bug"><a name="quickbook0co" href="block.html#quickbook0"><img src="../../images/callouts/1.png" alt="1" border="0"></a></span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="string">"foo-bar"</span><span class="special">;</span> <span class="callout_bug"><a name="quickbook1co" href="block.html#quickbook1"><img src="../../images/callouts/2.png" alt="2" border="0"></a></span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook0"></a>1 </td>
+<td valign="top" align="left"><p> The <span class="emphasis"><em>Mythical</em></span> FooBar. See <a href="http://en.wikipedia.org/wiki/Foobar" target="_top">Foobar
+ for details</a> </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook1"></a>2 </td>
+<td valign="top" align="left"><p> return 'em, foo-bar man! </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ This is the actual code:
+ </p>
+<pre class="programlisting">
+<span class="comment">//[ foo_bar
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo_bar</span><span class="special">()</span> <span class="comment">/*&lt; The /Mythical/ FooBar.
+ See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] &gt;*/</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="string">"foo-bar"</span><span class="special">;</span> <span class="comment">/*&lt; return 'em, foo-bar man! &gt;*/</span>
+<span class="special">}</span>
+<span class="comment">//]
+</span></pre>
+<p>
+ The callouts bugs are placed exactly where the special callout comment
+ is situated. It can be anywhere in the code. The bugs can be rather obtrusive,
+ however. They get in the way of the clarity of the code. Another special
+ callout comment style is available:
+ </p>
+<pre class="programlisting">
+<span class="comment">/*&lt;&lt; some [*quickbook] markup here &gt;&gt;*/</span>
+</pre>
+<p>
+ This is the line-oriented version of the callout. With this, the "bug"
+ is placed at the very left of the code block, away from the actual code.
+ By placing it at the far left, the code is rendered un-obscured. Example:
+ </p>
+<p>
+ </p>
+<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>
+
+ <span class="line_callout_bug"><a name="quickbook2co" href="block.html#quickbook2"><img src="../../images/callouts/1.png" alt="1" border="0"></a></span><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>
+
+ <span class="line_callout_bug"><a name="quickbook3co" href="block.html#quickbook3"><img src="../../images/callouts/2.png" alt="2" border="0"></a></span><span class="special">~</span><span class="identifier">x</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="line_callout_bug"><a name="quickbook4co" href="block.html#quickbook4"><img src="../../images/callouts/3.png" alt="3" border="0"></a></span><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>
+
+ <span class="line_callout_bug"><a name="quickbook5co" href="block.html#quickbook5"><img src="../../images/callouts/4.png" alt="4" border="0"></a></span><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>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list">
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook2"></a>1 </td>
+<td valign="top" align="left"><p> Constructor </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook3"></a>2 </td>
+<td valign="top" align="left"><p> Destructor </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook4"></a>3 </td>
+<td valign="top" align="left"><p> Get the <tt class="computeroutput"><span class="identifier">n</span></tt>
+ member variable </p></td>
+</tr>
+<tr>
+<td width="5%" valign="top" align="left">
+<a name="quickbook5"></a>4 </td>
+<td valign="top" align="left"><p> Set the <tt class="computeroutput"><span class="identifier">n</span></tt>
+ member variable </p></td>
+</tr>
+</table></div>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ See the actual code here: ../../test/stub.cpp
         </p>
 </div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="phrase.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../ref.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="phrase.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../install.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/syntax/comments.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/syntax/comments.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/syntax/comments.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,54 +1,52 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Comments</title>
-<link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../../index.html" title="Quickbook 1.4">
 <link rel="up" href="../syntax.html" title=" Syntax Summary">
 <link rel="prev" href="../syntax.html" title=" Syntax Summary">
 <link rel="next" href="phrase.html" title=" Phrase Level Elements">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../syntax.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="phrase.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../syntax.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="phrase.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="quickbook.syntax.comments"></a>Comments</h3></div></div></div>
+<a name="quickbook.syntax.comments"></a>Comments</h3></div></div></div>
 <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>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../syntax.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="phrase.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="../syntax.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="phrase.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/html/quickbook/syntax/phrase.html
==============================================================================
--- branches/release/tools/quickbook/doc/html/quickbook/syntax/phrase.html (original)
+++ branches/release/tools/quickbook/doc/html/quickbook/syntax/phrase.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,41 +1,30 @@
 <html>
 <head>
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Phrase Level Elements</title>
-<link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../../index.html" title="Quickbook 1.3">
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
+<link rel="start" href="../../index.html" title="Quickbook 1.4">
 <link rel="up" href="../syntax.html" title=" Syntax Summary">
 <link rel="prev" href="comments.html" title="Comments">
 <link rel="next" href="block.html" title=" Block Level Elements">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center">Home</td>
 <td align="center">Libraries</td>
 <td align="center">People</td>
 <td align="center">FAQ</td>
 <td align="center">More</td>
-</table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="comments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="block.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="comments.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="block.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="quickbook.syntax.phrase"></a> Phrase Level Elements</h3></div></div></div>
+<a name="quickbook.syntax.phrase"></a> Phrase Level Elements</h3></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section">Font Styles</span></dt>
 <dt><span class="section">Replaceable</span></dt>
@@ -51,20 +40,22 @@
 <dt><span class="section">refentry links</span></dt>
 <dt><span class="section"> Code Links</span></dt>
 <dt><span class="section">Escape</span></dt>
-<dt><span class="section">Single char escape</span></dt>
+<dt><span class="section"><a href="phrase.html#quickbook.syntax.phrase.single_char_escape">Single
+ char escape</a></span></dt>
 <dt><span class="section">Images</span></dt>
 <dt><span class="section">Footnotes</span></dt>
+<dt><span class="section"> Conditional Generation</span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.font_styles"></a>Font Styles</h4></div></div></div>
+<a name="quickbook.syntax.phrase.font_styles"></a>Font Styles</h4></div></div></div>
 <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>, <code class="literal">teletype</code>, <span class="strikethrough">strikethrough</span>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><b>bold</b></span>, <span class="underline">underline</span>, <tt class="literal">teletype</tt>, <span class="strikethrough">strikethrough</span>
         </p>
 <p>
           Like all non-terminal phrase level elements, this can of course be nested:
@@ -75,12 +66,12 @@
           will generate:
         </p>
 <p>
- <span class="bold"><strong><span class="emphasis"><em>bold-italic</em></span></strong></span>
+ <span class="bold"><b><span class="emphasis"><em>bold-italic</em></span></b></span>
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.replaceable"></a>Replaceable</h4></div></div></div>
+<a name="quickbook.syntax.phrase.replaceable"></a>Replaceable</h4></div></div></div>
 <p>
           When you want content that may or must be replaced by the user, use the
           syntax:
@@ -91,14 +82,14 @@
           This will generate:
         </p>
 <p>
- <em class="replaceable"><code>
+ <i class="replaceable"><tt>
             replacement
- </code></em>
+ </tt></i>
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.quotations"></a>Quotations</h4></div></div></div>
+<a name="quickbook.syntax.phrase.quotations"></a>Quotations</h4></div></div></div>
 <pre class="programlisting">["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
 </pre>
 <p>
@@ -129,7 +120,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.simple_formatting"></a>Simple formatting</h4></div></div></div>
+<a name="quickbook.syntax.phrase.simple_formatting"></a>Simple formatting</h4></div></div></div>
 <p>
           Simple markup for formatting text, common in many applications, is now
           supported:
@@ -140,11 +131,13 @@
           will generate:
         </p>
 <p>
- <span class="emphasis"><em>italic</em></span>, <span class="bold"><strong>bold</strong></span>, <span class="underline">underline</span>, <code class="literal">teletype</code>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><b>bold</b></span>, <span class="underline">underline</span>, <tt class="literal">teletype</tt>
         </p>
 <p>
           Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives
- are much stricter.
+ are much stricter
+ <sup>[<a name="id455996" href="#ftn.id455996">1</a>]</sup>
+ .
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
@@ -152,6 +145,9 @@
             markup.
           </li>
 <li>
+ Simple markups cannot contain any other form of quickbook markup.
+ </li>
+<li>
             A non-space character must follow the leading markup
           </li>
 <li>
@@ -161,136 +157,243 @@
             A space or a punctuation must follow the trailing markup
           </li>
 <li>
- If the matching markup cannot be found within a line, the formatting
+ 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
- line. We do not want the rest of the document to be rendered bold just
- because we forgot a trailing '*'.
+ 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: ']'.
           </li>
 <li>
             A line starting with the star will be interpreted as an unordered list.
- See <a href="block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered lists">Unordered
+ See <a href="block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered
+ lists">Unordered
             lists</a>.
           </li>
 </ul></div>
-<div class="informaltable">
-<h4>
-<a name="id2508715"></a>
- <span class="table-title">More Formatting Samples</span>
- </h4>
-<table class="table">
+<div class="table">
+<a name="id456079"></a><p class="title"><b>Table 1. More Formatting Samples</b></p>
+<table class="table" summary="More Formatting Samples">
 <colgroup>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Markup</th>
-<th>Result</th>
+<th>
+ <p>
+ Markup
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
-<td><code class="literal">
-*Bold*
- </code></td>
-<td><span class="bold"><strong>Bold</strong></span></td>
+<td>
+ <p>
+ <tt class="literal">*Bold*</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>Bold</b></span>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-*Is bold*
- </code></td>
-<td><span class="bold"><strong>Is bold</strong></span></td>
+<td>
+ <p>
+ <tt class="literal">*Is bold*</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>Is bold</b></span>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-* Not bold* *Not bold * * Not bold *
- </code></td>
-<td>* Not bold* *Not bold * * Not bold *</td>
+<td>
+ <p>
+ <tt class="literal">* Not bold* *Not bold * * Not bold *</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ * Not bold* *Not bold * * Not bold *
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-This*Isn't*Bold (no bold)
- </code></td>
-<td>This*Isn't*Bold (no bold)</td>
+<td>
+ <p>
+ <tt class="literal">This*Isn't*Bold (no bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ This*Isn't*Bold (no bold)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-(*Bold Inside*) (parenthesis not bold)
- </code></td>
-<td>(<span class="bold"><strong>Bold Inside</strong></span>)
- (parenthesis not bold)</td>
+<td>
+ <p>
+ <tt class="literal">(*Bold Inside*) (parenthesis not bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ (<span class="bold"><b>Bold Inside</b></span>) (parenthesis not bold)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-*(Bold Outside)* (parenthesis bold)
- </code></td>
 <td>
-<span class="bold"><strong>(Bold Outside)</strong></span>
- (parenthesis bold)</td>
+ <p>
+ <tt class="literal">*(Bold Outside)* (parenthesis bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>(Bold Outside)</b></span> (parenthesis bold)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-3*4*5 = 60 (no bold)
- </code></td>
-<td>3*4*5 = 60 (no bold)</td>
+<td>
+ <p>
+ <tt class="literal">3*4*5 = 60 (no bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ 3*4*5 = 60 (no bold)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-3 * 4 * 5 = 60 (no bold)
- </code></td>
-<td>3 * 4 * 5 = 60 (no bold)</td>
+<td>
+ <p>
+ <tt class="literal">3 * 4 * 5 = 60 (no bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ 3 * 4 * 5 = 60 (no bold)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-3 *4* 5 = 60 (4 is bold)
- </code></td>
-<td>3 <span class="bold"><strong>4</strong></span> 5 =
- 60 (4 is bold)</td>
+<td>
+ <p>
+ <tt class="literal">3 *4* 5 = 60 (4 is bold)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ 3 <span class="bold"><b>4</b></span> 5 = 60 (4 is bold)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <tt class="literal">*This is bold* this is not *but this is*</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>This is bold</b></span> this is not <span class="bold"><b>but this is</b></span>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-*This is bold* this is not *but this is*
- </code></td>
 <td>
-<span class="bold"><strong>This is bold</strong></span>
- this is not <span class="bold"><strong>but this is</strong></span>
-</td>
+ <p>
+ <tt class="literal">*This is bold*.</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>This is bold</b></span>.
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-*This is bold*.
- </code></td>
 <td>
-<span class="bold"><strong>This is bold</strong></span>.</td>
+ <p>
+ <tt class="literal">*B*. (bold B)</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>B</b></span>. (bold B)
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-*B*. (bold B)
- </code></td>
 <td>
-<span class="bold"><strong>B</strong></span>. (bold
- B)</td>
+ <p>
+ <tt class="literal">['*Bold-Italic*]</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em><span class="bold"><b>Bold-Italic</b></span></em></span>
+ </p>
+ </td>
 </tr>
 <tr>
-<td><code class="literal">
-['*Bold-Italic*]
- </code></td>
-<td><span class="emphasis"><em><span class="bold"><strong>Bold-Italic</strong></span></em></span></td>
+<td>
+ <p>
+ <tt class="literal">*side-by*/-side/</tt>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><b>side-by</b></span><span class="emphasis"><em>-side</em></span>
+ </p>
+ </td>
 </tr>
 </tbody>
 </table>
 </div>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> Thanks to David Barrett, author of Qwiki,
- for sharing these samples and teaching me these obscure formatting
- rules. I wasn't sure at all if Spirit,
- being more or less a formal EBNF parser, can handle the context sensitivity
- and ambiguity.</td></tr></tbody>
-</table></div>
+<p>
+ 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:
+ </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"><b>have you any wool? Yes sir,
+ yes sir, three bags full!</b></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 class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.inline_code"></a>Inline code</h4></div></div></div>
+<a name="quickbook.syntax.phrase.inline_code"></a>Inline code</h4></div></div></div>
 <p>
           Inlining code in paragraphs is quite common when writing C++ documentation.
           We provide a very simple markup for this. For example, this:
@@ -301,29 +404,31 @@
           will generate:
         </p>
 <p>
- This text has inlined code <code class="computeroutput"><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.
+ This text has inlined code <tt class="computeroutput"><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></tt>
+ in it. The code will be syntax highlighted.
         </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> Note that we simply enclose the code with the
- tick: <code class="literal">
-"`"
- </code>, not the single quote: <code class="computeroutput"><span class="string">"'"</span></code>.
- Note too that <code class="literal">
-`some code`
- </code> is preferred over <code class="literal">
-[^some code]
- </code>. </td></tr></tbody>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ We simply enclose the code with the tick: <tt class="literal">"`"</tt>, not the
+ single quote: <tt class="computeroutput"><span class="string">"'"</span></tt>.
+ Note too that <tt class="literal">`some code`</tt> is preferred over <tt class="literal">[^some code]</tt>.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.code_blocks"></a>Code blocks</h4></div></div></div>
+<a name="quickbook.syntax.phrase.code_blocks"></a>Code blocks</h4></div></div></div>
 <p>
           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 <a href="block.html#quickbook.syntax.block.lists.ordered_lists" title="Ordered lists">Ordered
- lists</a> and <a href="block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered lists">Unordered
+ (See <a href="block.html#quickbook.syntax.block.lists.ordered_lists" title="Ordered
+ lists">Ordered
+ lists</a> and <a href="block.html#quickbook.syntax.block.lists.unordered_lists" title="Unordered
+ lists">Unordered
           lists</a>), 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.
@@ -350,12 +455,12 @@
           
 </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="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="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">"Hello, World!"</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="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Hello, World!"</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>
@@ -363,7 +468,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.source_mode"></a>Source Mode</h4></div></div></div>
+<a name="quickbook.syntax.phrase.source_mode"></a>Source Mode</h4></div></div></div>
 <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
@@ -372,8 +477,8 @@
           section.
         </p>
 <p>
- To change the source mode, use the <code class="literal">[source-mode]</code> markup,
- where <code class="literal">source-mode</code> is one of the supported modes. For
+ To change the source mode, use the <tt class="literal">[source-mode]</tt> markup,
+ where <tt class="literal">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
@@ -384,77 +489,109 @@
           will generate:
         </p>
 <p>
- Python's <code class="computeroutput"><span class="keyword">import</span></code> is rather
- like C++'s <code class="computeroutput"><span class="preprocessor">#include</span></code>.
- A C++ comment <code class="computeroutput"><span class="comment">// looks like this</span></code>
- whereas a Python comment <code class="computeroutput"><span class="comment">#looks like this</span></code>.
- </p>
-<div class="informaltable">
-<h4>
-<a name="id2559064"></a>
- <span class="table-title">Supported Source Modes</span>
- </h4>
-<table class="table">
+ Python's <tt class="computeroutput"><span class="keyword">import</span></tt> is rather
+ like C++'s <tt class="computeroutput"><span class="preprocessor">#include</span></tt>.
+ A C++ comment <tt class="computeroutput"><span class="comment">// looks like this</span></tt>
+ whereas a Python comment <tt class="computeroutput"><span class="comment">#looks like this</span></tt>.
+ </p>
+<div class="table">
+<a name="id457060"></a><p class="title"><b>Table 2. Supported Source Modes</b></p>
+<table class="table" summary="Supported Source Modes">
 <colgroup>
 <col>
 <col>
 </colgroup>
 <thead><tr>
-<th>Mode</th>
-<th>Source Mode Markup</th>
+<th>
+ <p>
+ Mode
+ </p>
+ </th>
+<th>
+ <p>
+ Source Mode Markup
+ </p>
+ </th>
 </tr></thead>
 <tbody>
 <tr>
-<td>C++</td>
-<td><code class="literal">[c++]</code></td>
+<td>
+ <p>
+ C++
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[c++]</tt>
+ </p>
+ </td>
 </tr>
 <tr>
-<td>Python</td>
-<td><code class="literal">[python]</code></td>
+<td>
+ <p>
+ Python
+ </p>
+ </td>
+<td>
+ <p>
+ <tt class="literal">[python]</tt>
+ </p>
+ </td>
 </tr>
 </tbody>
 </table>
 </div>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> The source mode strings are lowercase.</td></tr></tbody>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ The source mode strings are lowercase.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.line_break"></a>line-break</h4></div></div></div>
+<a name="quickbook.syntax.phrase.line_break"></a>line-break</h4></div></div></div>
 <pre class="programlisting">[br]
 </pre>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> Note that <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code> is now preferred over <code class="computeroutput"><span class="special">[</span><span class="identifier">br</span><span class="special">]</span></code>.</td></tr></tbody>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ <tt class="computeroutput"><span class="special">[</span><span class="identifier">br</span><span class="special">]</span></tt> is now deprecated. Blurbs,
+ Admonitions
+ and table cells (see Tables)
+ may now contain paragraphs.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.anchors"></a>Anchors</h4></div></div></div>
+<a name="quickbook.syntax.phrase.anchors"></a>Anchors</h4></div></div></div>
 <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 <code class="literal">
-[link named_anchor
-Some link text]
- </code>. See <a href="phrase.html#quickbook.syntax.phrase.anchor_links" title="Anchor links">Anchor
- links</a>, Section
- and Heading.
+ the document. You can then reference an anchor with <tt class="literal">[link named_anchor
+Some link text]</tt>.
+ See Anchor links,
+ Section and Heading.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.links"></a>Links</h4></div></div></div>
+<a name="quickbook.syntax.phrase.links"></a>Links</h4></div></div></div>
 <pre class="programlisting">[@http://www.boost.org this is [*boost's] website....]
 </pre>
 <p>
           will generate:
         </p>
 <p>
- <a href="http://www.boost.org" target="_top">this is <span class="bold"><strong>boost's</strong></span>
+ <a href="http://www.boost.org" target="_top">this is <span class="bold"><b>boost's</b></span>
           website....</a>
         </p>
 <p>
@@ -476,7 +613,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.anchor_links"></a>Anchor links</h4></div></div></div>
+<a name="quickbook.syntax.phrase.anchor_links"></a>Anchor links</h4></div></div></div>
 <p>
           You can link within a document using:
         </p>
@@ -490,15 +627,15 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.refentry_links"></a>refentry links</h4></div></div></div>
+<a name="quickbook.syntax.phrase.refentry_links"></a>refentry links</h4></div></div></div>
 <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 <code class="literal">&lt;link linkend="xml.refentry"&gt;The
- link text&lt;/link&gt;</code>.
+ This gets converted into <tt class="literal">&lt;link linkend="xml.refentry"&gt;The
+ link text&lt;/link&gt;</tt>.
         </p>
 <p>
           Like URLs, the link text is optional. If this is not present, the link
@@ -507,25 +644,28 @@
 <pre class="programlisting">[link xml.refentry]
 </pre>
 <p>
- This gets converted into <code class="literal">&lt;link linkend="xml.refentry"&gt;xml.refentry&lt;/link&gt;</code>.
+ This gets converted into <tt class="literal">&lt;link linkend="xml.refentry"&gt;xml.refentry&lt;/link&gt;</tt>.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.code_links"></a> Code Links</h4></div></div></div>
+<a name="quickbook.syntax.phrase.code_links"></a> Code Links</h4></div></div></div>
 <p>
- If you want to link to a function, class, member, enum or header in the
- reference section, you can use:
+ 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 or enum. Example:
+ will automatically be the function, class, member, enum, macro, concept
+ or header. Example:
         </p>
 <pre class="programlisting">[classref boost::bar::baz]
 </pre>
@@ -535,7 +675,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.escape"></a>Escape</h4></div></div></div>
+<a name="quickbook.syntax.phrase.escape"></a>Escape</h4></div></div></div>
 <p>
           The escape mark-up is used when we don't want to do any processing.
         </p>
@@ -552,67 +692,160 @@
 '''
 </pre>
 <p>
-
-<span class="bold"><strong>This is direct XML markup</strong></span>
-
+ <span class="bold"><b>This is direct XML markup</b></span>
         </p>
-<div class="informaltable"><table class="table">
-<colgroup><col></colgroup>
-<tbody><tr><td class="blurb"> <span class="inlinemediaobject"><img src="../../images/alert.png" alt="alert"></span> Be careful when using the escape. The text must
- conform to BoostBook/DocBook syntax.</td></tr></tbody>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ Be careful when using the escape. The text must conform to BoostBook/DocBook syntax.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.single_char_escape"></a>Single char escape</h4></div></div></div>
+<a name="quickbook.syntax.phrase.single_char_escape"></a><a href="phrase.html#quickbook.syntax.phrase.single_char_escape" title="Single
+ char escape">Single
+ char escape</a></h4></div></div></div>
 <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 class="computeroutput"><span class="special">[</span></code> and <code class="computeroutput"><span class="special">]</span></code>.
- For example, how do you escape the triple quote? Simple: <code class="literal">\'\'\'</code>
+ This is useful when we need to escape QuickBook punctuations such as <tt class="computeroutput"><span class="special">[</span></tt> and <tt class="computeroutput"><span class="special">]</span></tt>.
+ For example, how do you escape the triple quote? Simple: <tt class="literal">\'\'\'</tt>
         </p>
 <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>
- has a special meaning. It is used to generate line breaks. Note that <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code> is
- now preferred over <code class="computeroutput"><span class="special">[</span><span class="identifier">br</span><span class="special">]</span></code>.
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt>
+ has a special meaning. It is used to generate line breaks.
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt>
+ and <tt class="computeroutput"><span class="special">[</span><span class="identifier">br</span><span class="special">]</span></tt> are now deprecated. Blurbs,
+ Admonitions
+ and table cells (see Tables)
+ may now contain paragraphs.
+ </p></td></tr>
+</table></div>
+<p>
+ The escaped space: <tt class="computeroutput"><span class="special">\</span> </tt> also
+ has a special meaning. The escaped space is removed from the output.
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.images"></a>Images</h4></div></div></div>
+<a name="quickbook.syntax.phrase.images"></a>Images</h4></div></div></div>
 <pre class="programlisting">[$image.jpg]
 </pre>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="quickbook.syntax.phrase.footnotes"></a>Footnotes</h4></div></div></div>
+<a name="quickbook.syntax.phrase.footnotes"></a>Footnotes</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="phrase.html#quickbook.syntax.phrase.footnotes.macro_expansion">Macro
+ Expansion</a></span></dt>
+<dt><span class="section"><a href="phrase.html#quickbook.syntax.phrase.footnotes.template_expansion">Template
+ Expansion</a></span></dt>
+</dl></div>
 <p>
           As of version 1.3, QuickBook supports footnotes. Just put the text of the
- footnote in a <code class="computeroutput"><span class="special">[</span><span class="identifier">footnote</span><span class="special">]</span></code> block, and the text will be put at the
+ footnote in a <tt class="computeroutput"><span class="special">[</span><span class="identifier">footnote</span><span class="special">]</span></tt> 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
- <sup>[<a name="id2559780" href="#ftn.id2559780">1</a>]</sup>
+ <sup>[<a name="id457901" href="#ftn.id457901">2</a>]</sup>
           .
         </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="quickbook.syntax.phrase.footnotes.macro_expansion"></a><a href="phrase.html#quickbook.syntax.phrase.footnotes.macro_expansion" title="Macro
+ Expansion">Macro
+ Expansion</a></h5></div></div></div>
+<pre class="programlisting">__a_macro_identifier__
+</pre>
+<p>
+ See Macros for details.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="quickbook.syntax.phrase.footnotes.template_expansion"></a><a href="phrase.html#quickbook.syntax.phrase.footnotes.template_expansion" title="Template
+ Expansion">Template
+ Expansion</a></h5></div></div></div>
+<pre class="programlisting">[a_template_identifier]
+</pre>
+<p>
+ See Templates
+ for details.
+ </p>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="quickbook.syntax.phrase.cond"></a> Conditional Generation</h4></div></div></div>
+<p>
+ Like C++ <tt class="computeroutput"><span class="comment">#ifdef</span></tt>, you can generate
+ phrases depending on the presence of a macro. Example:
+ </p>
+<pre class="programlisting">[? __to_be__ To be or not to be]
+</pre>
+<p>
+ </p>
+<p>
+ Here, the phrase "To be or not to be" will only be generated
+ if the macro symbol __to_be__ has been previously defined. The phrase above will
+ not do anything since we haven't defined __to_be__. Now, let's define the symbol:
+ </p>
+<pre class="programlisting">[def __to_be__]
+</pre>
+<p>
+ And try again:
+ </p>
+<p>
+ To be or not to be
+ </p>
+<p>
+ Yes!
+ <sup>[<a name="id458075" href="#ftn.id458075">3</a>]</sup>
+ </p>
 </div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id2559780" href="#id2559780">1</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id455996" href="#id455996">1</a>] </sup>
+ Thanks to David Barrett, author of Qwiki,
+ for sharing these samples and teaching me these obscure formatting
+ rules. I wasn't sure at all if Spirit,
+ being more or less a formal EBNF parser, can handle the context sensitivity
+ and ambiguity.
+ </p></div>
+<div class="footnote"><p><sup>[<a name="ftn.id457901" href="#id457901">2</a>] </sup>
               A sample footnote
             </p></div>
+<div class="footnote"><p><sup>[<a name="ftn.id458075" href="#id458075">3</a>] </sup>
+ Conditional Generation makes quickbook turing complete.
+ </p></div>
 </div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
-<td align="right"><small>Copyright © 2002, 2004 Joel de Guzman, Eric Niebler</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002, 2004, 2006 Joel de Guzman,
+ Eric Niebler<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="comments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="block.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="comments.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="block.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk (original)
+++ branches/release/tools/quickbook/doc/quickbook.qbk 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,8 +1,8 @@
 [article Quickbook
- [quickbook 1.3]
- [version 1.3]
+ [quickbook 1.4]
+ [version 1.4]
     [authors [de Guzman, Joel], [Niebler, Eric]]
- [copyright 2002 2004 Joel de Guzman, Eric Niebler]
+ [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
     [purpose /WikiWiki/ style documentation tool]
     [license
         Distributed under the Boost Software License, Version 1.0.
@@ -11,7 +11,7 @@
     ]
 ]
 
-[/ QuickBook Document version 1.3 ]
+[/ QuickBook Document version 1.4 ]
 [/ Sept 24, 2002 ]
 [/ Sept 2, 2004 ]
 [/ Feb 14, 2005 ]
@@ -32,7 +32,7 @@
 [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 formatting Simple formatting]]
+[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]]
@@ -41,10 +41,11 @@
 [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 or header 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 __cond__ [link quickbook.syntax.phrase.cond Conditional Generation]]
 
 [def __document__ [link quickbook.syntax.block.document Document]]
 [def __section__ [link quickbook.syntax.block.section Section]]
@@ -61,17 +62,22 @@
 [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?]]]\n\n-- Terrence Parr, author ANTLR/PCCTS]
+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
@@ -80,7 +86,7 @@
 
 [:[@../quickbook.qbk quickbook.qbk]]
 
-Originally named QuickDoc, this funky tool that never dies evolved into a
+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
@@ -138,6 +144,27 @@
 * Post-processor bug fix for escaped XML code that it does not recognize.
 * Replaceable, with the \[~replacement\] syntax.
 
+[h3 Version 1.4]
+
+* 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.
+* __cond__. Ala C++ #ifdef.
+* Searching of included and imported files in an extensible search path with
+ `--include-path` (`-I`) option.
+
 [endsect]
 
 [section:syntax Syntax Summary]
@@ -164,6 +191,20 @@
 '''[/ 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]
@@ -198,7 +239,7 @@
 [~replacement]
 ''']
 
-This will generate:
+This will generate:
 
 [~replacement]
 
@@ -215,7 +256,7 @@
 ["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
+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:
@@ -243,18 +284,24 @@
 
 /italic/, *bold*, _underline_, =teletype=
 
-Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives
-are much stricter.
+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 line, the formatting
+* 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 line.
+ 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 '*'.
+ 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__.
 
@@ -273,12 +320,38 @@
     [[[^'''*This is bold*.''']] [*This is bold*.]]
     [[[^'''*B*. (bold B)''']] [*B*. (bold B)]]
     [[[^'''['*Bold-Italic*]''']] [['*Bold-Italic*]]]
+ [[[^'''*side-by*/-side/''']] [*side-by*/-side/]]
 ]
 
-[blurb __note__ 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.]
+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]
@@ -295,11 +368,9 @@
 This text has inlined code `int main() { return 0; }` in it. The code will be
 syntax highlighted.
 
-[blurb __note__
-Note that we simply enclose the code with the tick: [^'''"`"'''], not the
+[note We simply enclose the code with the tick: [^'''"`"'''], not the
 single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over
-[^'''[^some code]'''].
-]
+[^'''[^some code]''']. ]
 
 [endsect]
 [section Code blocks]
@@ -367,7 +438,7 @@
     [[Python] [[^\[python\]]]]
 ]
 
-[blurb __note__ The source mode strings are lowercase.]
+[note The source mode strings are lowercase.]
 
 [endsect]
 [section line-break]
@@ -376,7 +447,8 @@
 [br]
 ''']
 
-[blurb __note__ Note that `\n` is now preferred over `[br]`.]
+[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and
+table cells (see __tables__) may now contain paragraphs.]
 
 [endsect]
 [section Anchors]
@@ -450,7 +522,7 @@
 [endsect]
 [section:code_links Code Links]
 
-If you want to link to a function, class, member, enum or header in the reference
+If you want to link to a function, class, member, enum, concept or header in the reference
 section, you can use:
 
 [pre'''
@@ -458,11 +530,13 @@
 [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 or enum. Example:
+automatically be the function, class, member, enum, macro, concept or header. Example:
 
 [pre'''
 [classref boost::bar::baz]
@@ -493,7 +567,7 @@
 <emphasis role="bold">This is direct XML markup</emphasis>
 '''
 
-[blurb __alert__ Be careful when using the escape. The text must conform to
+[important Be careful when using the escape. The text must conform to
 __boostbook__/__docbook__ syntax.]
 
 [endsect]
@@ -504,8 +578,14 @@
 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. Note that `\n`
-is now preferred over `[br]`.
+
+`\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]
@@ -527,7 +607,58 @@
 
 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]
+
+[section:cond Conditional Generation]
+
+Like C++ `#ifdef`, you can generate phrases depending on the presence of
+a macro. Example:
+
+[pre'''
+[? __to_be__ To be or not to be]
+''']
+
+[? __to_be__ To be or not to be]
+
+Here, the phrase "To be or not to be" will only be generated if the
+macro symbol '''__to_be__''' has been previously defined. The phrase
+above will not do anything since we haven't defined '''__to_be__'''.
+Now, let's define the symbol:
+
+[pre'''
+[def __to_be__]
+''']
+
+[def __to_be__]
+
+And try again:
+
+[? __to_be__ To be or not to be]
+
+Yes![footnote Conditional Generation makes quickbook turing complete.]
+
+[endsect]
+
 [endsect]
 [section:block Block Level Elements]
 
@@ -616,6 +747,8 @@
 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.
+ [/ <-- There's a space here. Don't remove. this is intentianal, for testing]
+This is a new paragraph...
 
 [endsect]
 
@@ -790,6 +923,8 @@
 
         return cgi.escape(text)
 
+[c++]
+
 Macros that are already defined are expanded in source code. Example:
 
 [pre'''
@@ -929,15 +1064,61 @@
 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 '\]' while the replacement text can be any phrase (even
+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'''
@@ -950,9 +1131,10 @@
 [def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
 sf_logo
 
-[blurb __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.]
+[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
@@ -991,10 +1173,271 @@
 ]
 
 [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...]\n\n
+[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)
@@ -1004,13 +1447,17 @@
 
 will generate this:
 
-[blurb :-) [*An eye catching advertisement or note...]\n\n
+[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]
 
@@ -1044,10 +1491,14 @@
     [
         [Row 0, Col 0: a small cell]
         [
- Row 0, Col 1:
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big 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.
         ]
     ]
     [
@@ -1064,10 +1515,14 @@
     [
         [Row 0, Col 0: a small cell]
         [
- Row 0, Col 1:
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
+ Row 0, Col 1: a big fat cell with paragraphs
+
+ Boost provides free peer-reviewed portable C++ source libraries.
+ [/ <-- There's a space here. Don't remove. This is intentional, for testing]
+ 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.
         ]
     ]
     [
@@ -1119,7 +1574,11 @@
 [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]]
+ [[term 3] [
+ The definition of term 3.
+
+ Definitions may contain paragraphs.
+ ]]
 ]
 ''']
 
@@ -1128,7 +1587,11 @@
 [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]]
+ [[term 3] [
+ The definition of term 3.
+
+ Definitions may contain paragraphs.
+ ]]
 ]
 
 The rules for variable lists are the same as for tables, except that
@@ -1145,35 +1608,512 @@
 [include someother.qbk]
 ''']
 
-The included file will be processed as if it had be cut and pasted
+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.
 
-As the number of included QuickBook files grows, so too does the
-likelihood of two sections having the same name. Since QuickBook generates
-an anchor for each section based on the section name, it is possible to
-end up with two identically named anchors, leading to link ambiguities.
-To resolve these ambiguities, the [^\[include\]] directive lets you
-specify a document id to use for the included file. You can use it like
-this:
+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]
 ''']
 
-When using this form, all auto-generated anchors will use "someid" as
-a unique prefix. So for instance, if there is a 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\]].
+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.
+
+Special comments of the form:
+
+ /*<- this C++ comment will be ignored ->*/
+
+or
+
+ /*<-*/ "this c++ code will be ignored" /*->*/
+
+or
+
+ //<-
+ private:
+ int some_member;
+ //->
+
+can be used to inhibit code from passing through to quickbook. All text between
+the delimeters will simply 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]
+
+This is the actual code:
+
+ //[ 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! >*/
+ }
+ //]
+
+The callouts bugs are placed exactly where the special callout comment
+is situated. It can be anywhere in the code. The bugs can be rather
+obtrusive, however. They get in the way of the clarity of the code.
+Another special callout comment style is available:
+
+ /*<< some [*quickbook] markup here >>*/
+
+This is the line-oriented version of the callout. With this, the "bug"
+is placed at the very left of the code block, away from the actual code.
+By placing it at the far left, the code is rendered un-obscured.
+Example:
+
+[class_]
+
+See the actual code here: [@../../test/stub.cpp]
+
+[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:macosx Mac OS X]
+
+[:['Section contributed by Julio M. Merino Vidal]]
+
+The following instructions explain how to install Docbook XML, Docbook XSL
+and Doxygen in a Mac OS X system, how to configure Boost.Build v2 to
+recognize them and how to build and install Quickbook. They were taken
+from a 10.4 (Tiger) machine so it is likely that they also apply to future
+versions; they may not work with older ones, though.
+
+The text below assumes you want to install all the necessary utilities in a
+system-wide location, allowing any user in the machine to have access to
+them. Therefore, all files will be put in the `/usr/local` hierarchy. If
+you do not want this, you can choose any other prefix such as
+`~/Applications` for a single-user installation.
+
+Mac OS X comes with `xsltproc` and all related libraries preinstalled, so
+you do not need to take any extra steps to set them up. It is probable
+that future versions will include them too, but these instructions may not
+apply to older versions.
+
+To get started:
+
+# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
+ 4.2] and unpack it inside `/usr/local/share/xml/docbook/4.2`.
+
+# Download the latest
+ [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
+ Docbook XSL] version and unpack it. Put the results in
+ `/usr/local/share/xsl/docbook`, thus effectively removing the version
+ number from the directory name (for simplicity).
+
+# Add the following to your `user-config.jam` file, which should live in
+ your home directory (`/Users/<your_username>`). You must already have it
+ somewhere or otherwise you could not be building Boost (i.e. missing
+ tools configuration).
+
+ using xsltproc ;
+
+ using boostbook
+ : "/usr/local/share/xsl/docbook"
+ : "/usr/local/share/xml/docbook/4.2"
+ ;
+
+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 and install a system-wide Quickbook instead:
+
+# 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. Following our previous
+ example, you can install it into: `/usr/local/bin`.
+
+# Add the following to your `user-config.jam` file:
+
+ using quickbook
+ : "/usr/local/bin/quickbook" ;
+ ;
+
+Additionally, if you need to build documentation that uses
+[@http://www.doxygen.org Doxygen], you will need to install it too:
+
+# Go to the [@http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
+ downloads section] and get the disk image (`dmg` file) for Mac OS X.
+
+# Open the disk image and drag the Doxygen application to your
+ `Applications` folder to install it.
+
+# Add the following to your `user-config.jam` file:
+
+ using doxygen
+ : /Applications/Doxygen.app/Contents/Resources/doxygen
+ ;
+
+Alternatively, you may want to install all the prerequistes through a
+package system to avoid manual management of the installations. In that
+case, check out [@http://www.pkgsrc.org pkgsrc].
+
+[endsect]
+
+[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 xsltproc 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]
+
+[/ KDE support (Kate, KWrite, Konqueror, KDevelop) ]
+[include ../extra/katepart/katepart.qbk]
+
+[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
+ ;
+]
+
+[heading Is there an easy way to convert BoostBook docs to QuickBook?]
+
+There's a stylesheet that allows Boostbook generated HTML to be viewed
+as quickbook source, see
+[@http://svn.boost.org/trac/boost/wiki/QuickbookSourceStylesheetProject],
+so it's then just a cut and paste job to convert the BoostBook to
+QuickBook (which IMO is a whole lot easier to edit and maintain).
+
+--John Maddock
+
+[endsect] [/faq]
+
 [section:ref Quick Reference]
 
+[c++]
+
+[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__]]
@@ -1187,7 +2127,7 @@
     [[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__]]
+ [[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__]]
@@ -1196,6 +2136,8 @@
     [[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__]]
@@ -1203,8 +2145,8 @@
     [[begin section] [[^'''[section The Section Title]''']] [__section__]]
     [[end section] [[^'''[endsect]''']] [__section__]]
     [[paragraph] [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.] [__paragraphs__]]
- [[ordered list] [[^# one\n# two\n# three\n]] [__ordered_lists__]]
- [[unordered list] [[^\* one\n\* two\n\* three\n]] [__unordered_lists__]]
+ [[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__]]
@@ -1215,11 +2157,14 @@
     [[heading 5] [[^'''[h5 Heading 5]''']] [__heading__]]
     [[heading 6] [[^'''[h6 Heading 6]''']] [__heading__]]
     [[macro] [[^'''[def macro_identifier some text]''']] [__macros__]]
+ [[template] [[^'''[template[a b] [a] body [b]]''']] [__templates__]]
     [[blurb] [[^'''[blurb advertisement or note...]''']] [__blurbs__]]
     [[admonition] [[^'''[warning Warning text...]''']] [__admonitions__]]
- [[table] [[^[table Title\n \[\[a\]\[b\]\[c\]\]\n \[\[a\]\[b\]\[c\]\]\n\]]] [__tables__]]
- [[variablelist] [[^[variablelist Title\n \[\[a\]\[b\]\]\n \[\[a\]\[b\]\]\n\]]] [__variable_lists__]]
+ [[table] [[table_sample]] [__tables__]]
+ [[variablelist] [[var_list_sample]] [__variable_lists__]]
     [[include] [[^'''[include someother.qbk]''']] [__include__]]
+ [[conditional generation]
+ [[^'''[? symbol phrase]''']] [__cond__]]
 ]
 
 [endsect]

Deleted: branches/release/tools/quickbook/doc/quickbook.xml
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.xml 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,1869 +0,0 @@
-<?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">
-<article id="quickbook" name="quickbook" dirname="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- <author>
- <firstname>Joel</firstname> <surname>de Guzman</surname>
- </author>
- <author>
- <firstname>Eric</firstname> <surname>Niebler</surname>
- </author>
- <copyright>
- <year>2002</year> <year>2004</year> <holder>Joel de Guzman, Eric Niebler</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>)
- </para>
- </legalnotice>
- <articlepurpose>
- <emphasis>WikiWiki</emphasis> style documentation tool
- </articlepurpose>
- </articleinfo>
- <title>quickbook 1.3</title>
- <section id="quickbook.intro">
- <title> Introduction</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><sbr/>
- <sbr/> -- 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>
- generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
- xml, to generate HTML, PostScript and PDF
- </listitem>
- <listitem>
- simple markup to link to Doxygen-generated entities
- </listitem>
- <listitem>
- macro system for simple text substitution
- </listitem>
- <listitem>
- simple markup for italics, bold, preformatted, blurbs, code samples, tables,
- URLs, anchors, images, etc.
- </listitem>
- <listitem>
- automatic syntax coloring of code samples
- </listitem>
- <listitem>
- CSS support
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.change_log">
- <title> Change Log</title> <anchor id="quickbook.change_log.version_1_3" />
- <bridgehead renderas="sect3">
- Version 1.3
- </bridgehead>
- <itemizedlist>
- <listitem>
- Quickbook file inclusion [include].
- </listitem>
- <listitem>
- Better xml output (pretty layout). Check out the generated XML.
- </listitem>
- <listitem>
- Regression testing facility: to make sure your document will always be compatible
- (full backward compatibility) regardless of changes to QuickBook.
- </listitem>
- <listitem>
- Code cleanup and refactoring.
- </listitem>
- <listitem>
- Allow phrase markup in the doc-info.
- </listitem>
- <listitem>
- Preformatted code blocks via ``code`` (double ticks) allows code in tables
- and lists, for example.
- </listitem>
- <listitem>
- 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.
- </listitem>
- <listitem>
- Better (intuitive) paragraph termination. Some markups may terminate a paragraph.
- Example:
-<programlisting>
-<phrase role="special">[</phrase><phrase role="identifier">section</phrase>&nbsp;<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>
- </listitem>
- <listitem>
- 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>
- </listitem>
- <listitem>
- Better &amp;nbsp; and whitespace handling in code snippets.
- </listitem>
- <listitem>
- [xinclude] fixes up the relative path to the target XML file when input_directory
- is not the same as the output_directory.
- </listitem>
- <listitem>
- Allow untitled tables.
- </listitem>
- <listitem>
- Allow phrase markups in section titles.
- </listitem>
- <listitem>
- Allow escaping back to QuickBook from code, code blocks and inline code.
- </listitem>
- <listitem>
- Footnotes, with the [footnote This is the footnote] syntax.
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.syntax">
- <title> Syntax Summary</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>Comments</title>
- <para>
- Can be placed anywhere.
- </para>
-
-<programlisting>[/ comment (no output generated) ]
-</programlisting>
- </section>
- <section id="quickbook.syntax.phrase">
- <title> Phrase Level Elements</title>
- <section id="quickbook.syntax.phrase.font_styles">
- <title>Font Styles</title>
-<programlisting>['italic], [*bold], [_underline], [^teletype], [-strikethrough]
-</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>[*['bold-italic]]
-</programlisting>
- <para>
- will generate:
- </para>
- <para>
- <emphasis role="bold"><emphasis>bold-italic</emphasis></emphasis>
- </para>
- </section>
- <section id="quickbook.syntax.phrase.quotations">
- <title>Quotations</title>
-<programlisting>["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
-</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>["Here's the rule for bargains: ["Do other men, for they would do you.] That's
-the true business precept.]
-</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>Simple formatting</title>
- <para>
- Simple markup for formatting text, common in many applications, is now
- supported:
- </para>
-
-<programlisting>/italic/, *bold*, _underline_, =teletype=
-</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.
- </para>
- <itemizedlist>
- <listitem>
- Simple markups cannot nest. You can combine a simple markup with a nestable
- markup.
- </listitem>
- <listitem>
- A non-space character must follow the leading markup
- </listitem>
- <listitem>
- A non-space character must precede the trailing markup
- </listitem>
- <listitem>
- A space or a punctuation must follow the trailing markup
- </listitem>
- <listitem>
- If the matching markup cannot be found within a line, 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
- line. We do not want the rest of the document to be rendered bold just
- because we forgot a trailing '*'.
- </listitem>
- <listitem>
- 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>.
- </listitem>
- </itemizedlist>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">More Formatting Samples</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Markup</entry><entry>Result</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>*Bold*</literal></entry><entry><emphasis role="bold">Bold</emphasis></entry>
- </row>
- <row>
- <entry><literal>*Is bold*</literal></entry><entry><emphasis role="bold">Is
- bold</emphasis></entry>
- </row>
- <row>
- <entry><literal>* Not bold* *Not bold * * Not bold *</literal></entry><entry>*
- Not bold* *Not bold * * Not bold *</entry>
- </row>
- <row>
- <entry><literal>This*Isn't*Bold (no bold)</literal></entry><entry>This*Isn't*Bold
- (no bold)</entry>
- </row>
- <row>
- <entry><literal>(*Bold Inside*) (parenthesis not bold)</literal></entry><entry>(<emphasis
- role="bold">Bold Inside</emphasis>) (parenthesis not bold)</entry>
- </row>
- <row>
- <entry><literal>*(Bold Outside)* (parenthesis bold)</literal></entry><entry><emphasis
- role="bold">(Bold Outside)</emphasis> (parenthesis bold)</entry>
- </row>
- <row>
- <entry><literal>3*4*5 = 60 (no bold)</literal></entry><entry>3*4*5
- = 60 (no bold)</entry>
- </row>
- <row>
- <entry><literal>3 * 4 * 5 = 60 (no bold)</literal></entry><entry>3
- * 4 * 5 = 60 (no bold)</entry>
- </row>
- <row>
- <entry><literal>3 *4* 5 = 60 (4 is bold)</literal></entry><entry>3
- <emphasis role="bold">4</emphasis> 5 = 60 (4 is bold)</entry>
- </row>
- <row>
- <entry><literal>*This is bold* this is not *but this is*</literal></entry><entry><emphasis
- role="bold">This is bold</emphasis> this is not <emphasis role="bold">but
- this is</emphasis></entry>
- </row>
- <row>
- <entry><literal>*This is bold*.</literal></entry><entry><emphasis
- role="bold">This is bold</emphasis>.</entry>
- </row>
- <row>
- <entry><literal>*B*. (bold B)</literal></entry><entry><emphasis role="bold">B</emphasis>.
- (bold B)</entry>
- </row>
- <row>
- <entry><literal>['*Bold-Italic*]</literal></entry><entry><emphasis><emphasis
- role="bold">Bold-Italic</emphasis></emphasis></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> 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.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.inline_code">
- <title>Inline code</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>This text has inlined code `int main() { return 0; }` in it.
-</programlisting>
- <para>
- will generate:
- </para>
- <para>
- This text has inlined code <code><phrase role="keyword">int</phrase>&nbsp;<phrase
- role="identifier">main</phrase><phrase role="special">()</phrase>&nbsp;<phrase
- role="special">{</phrase>&nbsp;<phrase role="keyword">return</phrase>&nbsp;<phrase
- role="number">0</phrase><phrase role="special">;</phrase>&nbsp;<phrase
- role="special">}</phrase></code> in it. The code will be syntax highlighted.
- </para>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> Note that 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>.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.code_blocks">
- <title>Code blocks</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>&nbsp;<phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
-
-<phrase role="keyword">int</phrase>&nbsp;<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>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="string">&quot;Hello, World!&quot;</phrase>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
- <phrase role="keyword">return</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </para>
- </section>
- <section id="quickbook.syntax.phrase.source_mode">
- <title>Source Mode</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>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`.
-</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>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Supported Source Modes</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Mode</entry><entry>Source Mode Markup</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>C++</entry><entry><literal>[c++]</literal></entry>
- </row>
- <row>
- <entry>Python</entry><entry><literal>[python]</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> The source mode strings are lowercase.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.line_break">
- <title>line-break</title>
-<programlisting>[br]
-</programlisting>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> Note that <code><phrase role="special">\</phrase><phrase
- role="identifier">n</phrase></code> is now preferred over <code><phrase
- role="special">[</phrase><phrase role="identifier">br</phrase><phrase
- role="special">]</phrase></code>.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.anchors">
- <title>Anchors</title>
-<programlisting>[#named_anchor]
-</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>Links</title>
-<programlisting>[@http://www.boost.org this is [*boost's] website....]
-</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>see http://spirit.sourceforge.net/
-</programlisting>
- <para>
- so, when the text is absent in a link markup, the URL is assumed. Example:
- </para>
-
-<programlisting>see [@http://spirit.sourceforge.net/]
-</programlisting>
- <para>
- will generate:
- </para>
- <para>
- see <ulink url="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/>
- </para>
- </section>
- <section id="quickbook.syntax.phrase.anchor_links">
- <title>Anchor links</title>
- <para>
- You can link within a document using:
- </para>
-
-<programlisting>[link section_id.normalized_header_text The link text]
-</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>refentry links</title>
- <para>
- In addition, you can link internally to an XML refentry like:
- </para>
-
-<programlisting>[link xml.refentry The link text]
-</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>[link xml.refentry]
-</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> Code Links</title>
- <para>
- If you want to link to a function, class, member, enum or header in the
- reference section, you can use:
- </para>
-
-<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]
-[headerref path/to/header.hpp The link text]
-</programlisting>
- <para>
- Again, the link text is optional. If this is not present, the link text
- will automatically be the function, class, member or enum. Example:
- </para>
-
-<programlisting>[classref boost::bar::baz]
-</programlisting>
- <para>
- would have &quot;boost::bar::baz&quot; as the link text.
- </para>
- </section>
- <section id="quickbook.syntax.phrase.escape">
- <title>Escape</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>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/alert.png"></imagedata></imageobject>
- <textobject>
- <phrase>alert</phrase>
- </textobject>
- </inlinemediaobject> 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.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.single_char_escape">
- <title>Single char escape</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. Note that <code><phrase
- role="special">\</phrase><phrase role="identifier">n</phrase></code> is
- now preferred over <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
- role="special">]</phrase></code>.
- </para>
- </section>
- <section id="quickbook.syntax.phrase.images">
- <title>Images</title>
-<programlisting>[$image.jpg]
-</programlisting>
- </section>
- <section id="quickbook.syntax.phrase.footnotes">
- <title>Footnotes</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>[footnote A sample footnote]
-</programlisting>
- <para>
- will generate this
- <footnote>
- <para>
- A sample footnote
- </para>
- </footnote>
- .
- </para>
- </section>
- </section>
- <section id="quickbook.syntax.block">
- <title> Block Level Elements</title>
- <section id="quickbook.syntax.block.document">
- <title>Document</title>
- <para>
- Every document must begin with a Document Info section, which should look
- like this:
- </para>
-
-<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]
-]
-</programlisting>
- <para>
- Where document-type is one of:
- </para>
- <itemizedlist>
- <listitem>
- book
- </listitem>
- <listitem>
- article
- </listitem>
- <listitem>
- library
- </listitem>
- <listitem>
- chapter
- </listitem>
- <listitem>
- part
- </listitem>
- <listitem>
- appendix
- </listitem>
- <listitem>
- preface
- </listitem>
- <listitem>
- qandadiv
- </listitem>
- <listitem>
- qandaset
- </listitem>
- <listitem>
- reference
- </listitem>
- <listitem>
- set
- </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>Section</title>
- <para>
- Starting a new section is accomplished with:
- </para>
-
-<programlisting>[section:id The Section Title]
-</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>[endsect]
-</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>xinclude</title>
- <para>
- You can include another XML file with:
- </para>
-
-<programlisting>[xinclude file.xml]
-</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>Paragraphs</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>Lists</title>
- <section id="quickbook.syntax.block.lists.ordered_lists">
- <title>Ordered lists</title>
-<programlisting># One
-# Two
-# Three
-</programlisting>
- <para>
- will generate:
- </para>
- <orderedlist>
- <listitem>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.list_hierarchies">
- <title>List Hierarchies</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>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- <orderedlist>
- <listitem>
- Three.a
- </listitem>
- <listitem>
- Three.b
- </listitem>
- <listitem>
- Three.c
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- Fourth
- <orderedlist>
- <listitem>
- Four.a
- <orderedlist>
- <listitem>
- Four.a.i
- </listitem>
- <listitem>
- Four.a.ii
- </listitem>
- </orderedlist>
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- Five
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.long_list_lines">
- <title>Long List Lines</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>
- A short item.
- </listitem>
- <listitem>
- 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.
- </listitem>
- <listitem>
- A short item.
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.unordered_lists">
- <title>Unordered lists</title>
-<programlisting>* First
-* Second
-* Third
-</programlisting>
- <para>
- will generate:
- </para>
- <itemizedlist>
- <listitem>
- First
- </listitem>
- <listitem>
- Second
- </listitem>
- <listitem>
- Third
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.syntax.block.lists.mixed_lists">
- <title>Mixed lists</title>
- <para>
- Mixed lists (ordered and unordered) are supported. Example:
- </para>
-
-<programlisting># One
-# Two
-# Three
- * Three.a
- * Three.b
- * Three.c
-# Four
-</programlisting>
- <para>
- will generate:
- </para>
- <orderedlist>
- <listitem>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- <itemizedlist>
- <listitem>
- Three.a
- </listitem>
- <listitem>
- Three.b
- </listitem>
- <listitem>
- Three.c
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- Four
- </listitem>
- </orderedlist>
- <para>
- And...
- </para>
-
-<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
-</programlisting>
- <para>
- will generate:
- </para>
- <orderedlist>
- <listitem>
- 1
- <itemizedlist>
- <listitem>
- 1.a
- <orderedlist>
- <listitem>
- 1.a.1
- </listitem>
- <listitem>
- 1.a.2
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- 1.b
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- 2
- <itemizedlist>
- <listitem>
- 2.a
- </listitem>
- <listitem>
- 2.b
- <orderedlist>
- <listitem>
- 2.b.1
- </listitem>
- <listitem>
- 2.b.2
- <itemizedlist>
- <listitem>
- 2.b.2.a
- </listitem>
- <listitem>
- 2.b.2.b
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
- </section>
- </section>
- <section id="quickbook.syntax.block.code">
- <title>Code</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>
- <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="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>
- <para>
- </para>
-
-<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>[def __syntax_highlight__ [@quickbook/highlight.html syntax_highlight]]
-[def __quickbook__ [@index.html quickbook]]
-
- using __quickbook__::__syntax_highlight__;
-</programlisting>
- <para>
- Generates:
- </para>
-
-<programlisting>
-<phrase role="identifier">using</phrase> <ulink url="index.html">quickbook</ulink><phrase role="special">::</phrase><ulink url="quickbook/highlight.html">syntax_highlight</ulink><phrase role="special">;</phrase>
-</programlisting>
- </section>
- <section id="quickbook.syntax.block.escape_back">
- <title> Escaping Back To QuickBook</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>void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
-{
-}
-</programlisting>
- <para>
- Will generate:
- </para>
-
-<programlisting>
-<phrase role="identifier">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>Preformatted</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>[pre
-
- Some *preformatted* text Some *preformatted* text
-
- Some *preformatted* text Some *preformatted* text
-
- Some *preformatted* text Some *preformatted* text
-
-]
-</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>Blockquote</title>
-<programlisting>[:sometext...]
-</programlisting>
- <blockquote>
- <para>
- Indents the paragraph. This applies to one paragraph only.
- </para>
- </blockquote>
- </section>
- <section id="quickbook.syntax.block.admonitions">
- <title>Admonitions</title>
-<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]
-</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>Headings</title>
-<programlisting>[h1 Heading 1]
-[h2 Heading 2]
-[h3 Heading 3]
-[h4 Heading 4]
-[h5 Heading 5]
-[h6 Heading 6]
-</programlisting>
- <anchor id="quickbook.syntax.block.headings.heading_1" />
- <bridgehead renderas="sect1">
- Heading 1
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_2" />
- <bridgehead renderas="sect2">
- Heading 2
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_3" />
- <bridgehead renderas="sect3">
- Heading 3
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_4" />
- <bridgehead renderas="sect4">
- Heading 4
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_5" />
- <bridgehead renderas="sect5">
- Heading 5
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_6" />
- <bridgehead renderas="sect6">
- Heading 6
- </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>[link section_id.normalized_header_text The link text]
-</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.macros">
- <title>Macros</title>
-<programlisting>[def macro_identifier some text]
-</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 ']' while the replacement text can be any phrase
- (even marked up). Example:
- </para>
-
-<programlisting>[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
-sf_logo
-</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>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
- <textobject>
- <phrase>tip</phrase>
- </textobject>
- </inlinemediaobject> 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.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <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>[def :-) [$theme/smiley.png]]
-[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
-</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>Hi __spirit__ :-)
-</programlisting>
- <para>
- will generate this:
- </para>
- <para>
- Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink>&nbsp;<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>Predefined Macros</title>
- <para>
- Quickbook has some predefined macros that you can already use.
- </para>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Predefined Macros</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Macro</entry><entry>Meaning</entry><entry>Example</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>__DATE__</entry><entry>Today's date</entry><entry>2000-Dec-20</entry>
- </row>
- <row>
- <entry>__TIME__</entry><entry>The current time</entry><entry>12:00:00
- PM</entry>
- </row>
- <row>
- <entry>__FILENAME__</entry><entry>Quickbook source filename</entry><entry>NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.blurbs">
- <title>Blurbs</title>
-<programlisting>[blurb :-) [*An eye catching advertisement or note...]\n\n
- __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++.
-]
-</programlisting>
- <para>
- will generate this:
- </para>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
- <textobject>
- <phrase>smiley</phrase>
- </textobject>
- </inlinemediaobject>&nbsp;<emphasis role="bold">An eye catching advertisement
- or note...</emphasis><sbr/> <sbr/> <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++. </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.tables">
- <title>Tables</title>
-<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]]
-]
-</programlisting>
- <para>
- will generate:
- </para>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">A Simple Table</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Heading 1</entry><entry>Heading 2</entry><entry>Heading 3</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>R0-C0</entry><entry>R0-C1</entry><entry>R0-C2</entry>
- </row>
- <row>
- <entry>R2-C0</entry><entry>R2-C1</entry><entry>R2-C2</entry>
- </row>
- <row>
- <entry>R3-C0</entry><entry>R3-C1</entry><entry>R3-C2</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <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>[table Table with fat cells
- [[Heading 1] [Heading 2]]
- [
- [Row 0, Col 0: a small cell]
- [
- Row 0, Col 1:
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- ]
- ]
- [
- [Row 1, Col 0: a small cell]
- [Row 1, Col 1: a small cell]
- ]
-]
-</programlisting>
- <para>
- and thus:
- </para>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Table with fat cells</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Heading 1</entry><entry>Heading 2</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Row 0, Col 0: a small cell</entry><entry> Row 0, Col 1: A
- very big cell...A very big cell...A very big cell... A very big cell...A
- very big cell...A very big cell... A very big cell...A very big cell...A
- very big cell... </entry>
- </row>
- <row>
- <entry>Row 1, Col 0: a small cell</entry><entry>Row 1, Col 1: a small
- cell</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- Here's how to have preformatted blocks of code in a table cell:
- </para>
-
-<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;
- }
- ``]
- ]
-]
-</programlisting>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Table with code</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Comment</entry><entry>Code</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>My first program</entry><entry>
-<programlisting>
-<phrase role="comment">#include &lt;iostream&gt;
-</phrase>
-<phrase role="identifier">int</phrase>&nbsp;<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>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="string">&quot;Hello, World!&quot;</phrase>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
- <phrase role="keyword">return</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.variable_lists">
- <title>Variable Lists</title>
-<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]]
-]
-</programlisting>
- <para>
- will generate:
- </para>
- <variablelist>
- <title>A Variable List</title> <varlistentry><term>term 1</term>
- <listitem>
- The definition of term 1
- </listitem>
- </varlistentry> <varlistentry><term>term 2</term>
- <listitem>
- The definition of term 2
- </listitem>
- </varlistentry> <varlistentry><term>term 3</term>
- <listitem>
- The definition of term 3
- </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>Include</title>
- <para>
- You can include one QuickBook file from another. The syntax is simply:
- </para>
-
-<programlisting>[include someother.qbk]
-</programlisting>
- <para>
- The included file will be processed as if it had be cut and pasted into
- the current document, with the following exceptions:
- </para>
- <itemizedlist>
- <listitem>
- The __FILENAME__ predefined macro will reflect the name of the file currently
- being processed.
- </listitem>
- <listitem>
- Any macros defined in the included file are scoped to that file.
- </listitem>
- </itemizedlist>
- <para>
- As the number of included QuickBook files grows, so too does the likelihood
- of two sections having the same name. Since QuickBook generates an anchor
- for each section based on the section name, it is possible to end up with
- two identically named anchors, leading to link ambiguities. To resolve
- these ambiguities, the <literal>[include]</literal> directive lets you
- specify a document id to use for the included file. You can use it like
- this:
- </para>
-
-<programlisting>[include:someid someother.qbk]
-</programlisting>
- <para>
- When using this form, all auto-generated anchors will use &quot;someid&quot;
- as a unique prefix. So for instance, if there is a 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>
- </section>
- <section id="quickbook.ref">
- <title> Quick Reference</title>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Syntax Compendium</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>To do this...</entry><entry>Use this...</entry><entry>See this...</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>comment</entry><entry><literal>[/ some comment]</literal></entry><entry><link
- linkend="quickbook.syntax.comments">Comments</link></entry>
- </row>
- <row>
- <entry><emphasis>italics</emphasis></entry><entry><literal>['italics]
- or /italics/</literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="bold">bold</emphasis></entry><entry><literal>[*bold]
- or *bold*</literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="underline">underline</emphasis></entry><entry><literal>[_underline]
- or _underline_</literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><literal>teletype</literal></entry><entry><literal>[^teletype]
- or =teletype=</literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="strikethrough">strikethrough</emphasis></entry><entry><literal>[-strikethrough]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.font_styles">Font Styles</link> and
- <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry>source mode</entry><entry><literal>[c++]</literal> or <literal>[python]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.source_mode">Source Mode</link></entry>
- </row>
- <row>
- <entry>inline code</entry><entry><literal>`int main();`</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.inline_code">Inline code</link></entry>
- </row>
- <row>
- <entry>code block</entry><entry><literal>``int main();``</literal></entry><entry><link
- linkend="quickbook.syntax.block.code">Code</link></entry>
- </row>
- <row>
- <entry>code escape</entry><entry><literal>``from c++ to QuickBook``</literal></entry><entry><link
- linkend="quickbook.syntax.block.escape_back">Escaping Back To QuickBook</link></entry>
- </row>
- <row>
- <entry>line break</entry><entry><literal>[br] or \n</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.line_break">line-break</link></entry>
- </row>
- <row>
- <entry>anchor</entry><entry><literal>[#anchor]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.anchors">Anchors</link></entry>
- </row>
- <row>
- <entry>link</entry><entry><literal>[@http://www.boost.org Boost]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.links">Links</link></entry>
- </row>
- <row>
- <entry>anchor link</entry><entry><literal>[link section.anchor Link text]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link></entry>
- </row>
- <row>
- <entry>refentry link</entry><entry><literal>[link xml.refentry Link text]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.refentry_links">refentry links</link></entry>
- </row>
- <row>
- <entry>function link</entry><entry><literal>[funcref fully::qualified::function_name
- Link text]</literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>class link</entry><entry><literal>[classref fully::qualified::class_name
- Link text]</literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>member link</entry><entry><literal>[memberref fully::qualified::member_name
- Link text]</literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>enum link</entry><entry><literal>[enumref fully::qualified::enum_name
- Link text]</literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>header link</entry><entry><literal>[headerref path/to/header.hpp
- Link text]</literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>escape</entry><entry><literal>'''escaped text (no processing/formatting)'''</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.escape">Escape</link></entry>
- </row>
- <row>
- <entry>single char escape</entry><entry><literal>\c</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.single_char_escape">Single char escape</link></entry>
- </row>
- <row>
- <entry>images</entry><entry><literal>[$image.jpg]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.images">Images</link></entry>
- </row>
- <row>
- <entry>begin section</entry><entry><literal>[section The Section Title]</literal></entry><entry><link
- linkend="quickbook.syntax.block.section">Section</link></entry>
- </row>
- <row>
- <entry>end section</entry><entry><literal>[endsect]</literal></entry><entry><link
- linkend="quickbook.syntax.block.section">Section</link></entry>
- </row>
- <row>
- <entry>paragraph</entry><entry>No markup. Paragraphs start left-flushed
- and are terminated by two or more newlines.</entry><entry><link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link></entry>
- </row>
- <row>
- <entry>ordered list</entry><entry><literal># one<sbr/> # two<sbr/> #
- three<sbr/> </literal></entry><entry><link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
- lists</link></entry>
- </row>
- <row>
- <entry>unordered list</entry><entry><literal>* one<sbr/> * two<sbr/>
- * three<sbr/> </literal></entry><entry><link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
- lists</link></entry>
- </row>
- <row>
- <entry>code</entry><entry>No markup. Preformatted code starts with a
- space or a tab.</entry><entry><link linkend="quickbook.syntax.block.code">Code</link></entry>
- </row>
- <row>
- <entry>preformatted</entry><entry><literal>[pre preformatted]</literal></entry><entry><link
- linkend="quickbook.syntax.block.preformatted">Preformatted</link></entry>
- </row>
- <row>
- <entry>block quote</entry><entry><literal>[:sometext...]</literal></entry><entry><link
- linkend="quickbook.syntax.block.blockquote">Blockquote</link></entry>
- </row>
- <row>
- <entry>heading 1</entry><entry><literal>[h1 Heading 1]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 2</entry><entry><literal>[h2 Heading 2]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 3</entry><entry><literal>[h3 Heading 3]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 4</entry><entry><literal>[h4 Heading 4]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 5</entry><entry><literal>[h5 Heading 5]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 6</entry><entry><literal>[h6 Heading 6]</literal></entry><entry><link
- linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>macro</entry><entry><literal>[def macro_identifier some text]</literal></entry><entry><link
- linkend="quickbook.syntax.block.macros">Macros</link></entry>
- </row>
- <row>
- <entry>blurb</entry><entry><literal>[blurb advertisement or note...]</literal></entry><entry><link
- linkend="quickbook.syntax.block.blurbs">Blurbs</link></entry>
- </row>
- <row>
- <entry>admonition</entry><entry><literal>[warning Warning text...]</literal></entry><entry><link
- linkend="quickbook.syntax.block.admonitions">Admonitions</link></entry>
- </row>
- <row>
- <entry>table</entry><entry><literal>[table Title<sbr/> [[a][b][c]]<sbr/>
- [[a][b][c]]<sbr/> ]</literal></entry><entry><link linkend="quickbook.syntax.block.tables">Tables</link></entry>
- </row>
- <row>
- <entry>variablelist</entry><entry><literal>[variablelist Title<sbr/>
- [[a][b]]<sbr/> [[a][b]]<sbr/> ]</literal></entry><entry><link linkend="quickbook.syntax.block.variable_lists">Variable
- Lists</link></entry>
- </row>
- <row>
- <entry>include</entry><entry><literal>[include someother.qbk]</literal></entry><entry><link
- linkend="quickbook.syntax.block.include">Include</link></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-</article>

Modified: branches/release/tools/quickbook/doc_info.hpp
==============================================================================
--- branches/release/tools/quickbook/doc_info.hpp (original)
+++ branches/release/tools/quickbook/doc_info.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -165,7 +165,7 @@
                     ;
 
                 hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be followed by
+ (eps_p - (alnum_p | '_')) >> space // must not be preceded by
                     ; // alpha-numeric or underscore
 
                 phrase =

Modified: branches/release/tools/quickbook/index.html
==============================================================================
--- branches/release/tools/quickbook/index.html (original)
+++ branches/release/tools/quickbook/index.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -2,17 +2,6 @@
 <html>
   <head>
     <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
-
- <--
- Copyright (c) 2002 2004 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)
- -->
-
   </head>
   <body>
     Automatic redirection failed, click this

Modified: branches/release/tools/quickbook/phrase.hpp
==============================================================================
--- branches/release/tools/quickbook/phrase.hpp (original)
+++ branches/release/tools/quickbook/phrase.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -23,7 +23,12 @@
 
     template <typename Rule, typename Action>
     inline void
- simple_markup(Rule& simple, char mark, Action const& action, Rule const& eol)
+ simple_markup(
+ Rule& simple
+ , char mark
+ , Action const& action
+ , Rule const& close
+ )
     {
         simple =
             mark >>
@@ -31,27 +36,30 @@
                 (
                     graph_p // A single char. e.g. *c*
>> eps_p(mark
- >> (space_p | punct_p))
- )
- | ( graph_p >> // graph_p must follow mark
+ >> (space_p | punct_p | end_p))
+ // space_p, punct_p or end_p
+ ) // must follow mark
+ |
+ ( graph_p >> // graph_p must follow mark
                     *(anychar_p -
- ( eol // Make sure that we don't go
- | (graph_p >> mark) // past a single line
+ ( (graph_p >> mark) // Make sure that we don't go
+ | close // past a single block
                         )
                     ) >> graph_p // graph_p must precede mark
>> eps_p(mark
- >> (space_p | punct_p)) // space_p or punct_p must
- ) // follow mark
+ >> (space_p | punct_p | end_p))
+ // space_p, punct_p or end_p
+ ) // must follow mark
             ) [action]
>> mark
             ;
     }
-
+
     template <typename Actions>
     struct phrase_grammar : grammar<phrase_grammar<Actions> >
     {
- phrase_grammar(Actions& actions, bool& is_not_preformatted)
- : is_not_preformatted(is_not_preformatted), actions(actions) {}
+ phrase_grammar(Actions& actions, bool& no_eols)
+ : no_eols(no_eols), actions(actions) {}
 
         template <typename Scanner>
         struct definition
@@ -72,24 +80,28 @@
                 eol = blank >> eol_p
                     ;
 
- close_bracket =
+ phrase_end =
                     ']' |
- if_p(var(self.is_not_preformatted))
+ if_p(var(self.no_eols))
                     [
- eol_p >> eol_p // Make sure that we don't go
+ eol >> eol // Make sure that we don't go
                     ] // past a single block, except
                     ; // when preformatted.
 
                 hard_space =
- (eps_p - (alnum_p | '_')) >> space // must not be followed by
+ (eps_p - (alnum_p | '_')) >> space // must not be preceded by
                     ; // alpha-numeric or underscore
 
                 comment =
- "[/" >> *(anychar_p - ']') >> ']'
+ "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ ;
+
+ dummy_block =
+ '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
                     ;
 
                 common =
- actions.macro [actions.do_macro]
+ macro
                     | phrase_markup
                     | code_block
                     | inline_code
@@ -98,6 +110,51 @@
                     | comment
                     ;
 
+ macro =
+ eps_p(actions.macro // must not be followed by
+ >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ >> actions.macro [actions.do_macro]
+ ;
+
+ template_args =
+ template_arg [push_back_a(actions.template_info)]
+ >> *(
+ ".." >> template_arg [push_back_a(actions.template_info)]
+ )
+ ;
+
+ static const bool true_ = true;
+ static const bool false_ = false;
+
+ template_ =
+ (
+ ch_p('`') [assign_a(actions.template_escape,true_)]
+ |
+ eps_p [assign_a(actions.template_escape,false_)]
+ )
+ >>
+ ( (
+ (eps_p(punct_p)
+ >> actions.templates.scope
+ ) [push_back_a(actions.template_info)]
+ >> !template_args
+ ) | (
+ (actions.templates.scope
+ >> eps_p
+ ) [push_back_a(actions.template_info)]
+ >> !(hard_space
+ >> template_args)
+ ) )
+ ;
+
+ brackets =
+ '[' >> +template_arg >> ']'
+ ;
+
+ template_arg =
+ +(brackets | (anychar_p - (str_p("..") | ']')))
+ ;
+
                 inline_code =
                     '`' >>
                     (
@@ -111,12 +168,22 @@
                     ;
 
                 code_block =
- "``" >>
- (
- *(anychar_p - "``")
- >> eps_p("``")
- ) [actions.code_block]
- >> "``"
+ (
+ "```" >>
+ (
+ *(anychar_p - "```")
+ >> eps_p("```")
+ ) [actions.code_block]
+ >> "```"
+ )
+ | (
+ "``" >>
+ (
+ *(anychar_p - "``")
+ >> eps_p("``")
+ ) [actions.code_block]
+ >> "``"
+ )
                     ;
 
                 simple_format =
@@ -126,35 +193,37 @@
                     | simple_teletype
                     ;
 
- simple_markup(simple_bold,
- '*', actions.simple_bold, eol);
- simple_markup(simple_italic,
- '/', actions.simple_italic, eol);
- simple_markup(simple_underline,
- '_', actions.simple_underline, eol);
- simple_markup(simple_teletype,
- '=', actions.simple_teletype, eol);
+ simple_markup(simple_bold,
+ '*', actions.simple_bold, phrase_end);
+ simple_markup(simple_italic,
+ '/', actions.simple_italic, phrase_end);
+ simple_markup(simple_underline,
+ '_', actions.simple_underline, phrase_end);
+ simple_markup(simple_teletype,
+ '=', actions.simple_teletype, phrase_end);
 
                 phrase =
                    *( common
                     | comment
- | (anychar_p -
- close_bracket) [actions.plain_char]
+ | (anychar_p - phrase_end) [actions.plain_char]
                     )
                     ;
 
                 phrase_markup =
                         '['
- >> ( image
+ >> ( cond_phrase
+ | image
                         | url
                         | link
                         | anchor
- | source_mode
+ | source_mode
                         | funcref
                         | classref
                         | memberref
                         | enumref
+ | macroref
                         | headerref
+ | conceptref
                         | bold
                         | italic
                         | underline
@@ -163,6 +232,7 @@
                         | quote
                         | replaceable
                         | footnote
+ | template_ [actions.do_template]
                         | str_p("br") [actions.break_]
                         )
>> ']'
@@ -170,6 +240,7 @@
 
                 escape =
                         str_p("\\n") [actions.break_]
+ | "\\ " // ignore an escaped char
                     | '\\' >> punct_p [actions.raw_char]
                     | (
                             ("'''" >> !eol) [actions.escape_pre]
@@ -178,10 +249,20 @@
                         )
                     ;
 
+ macro_identifier =
+ +(anychar_p - (space_p | ']'))
+ ;
+
+ cond_phrase =
+ '?' >> blank
+ >> macro_identifier [actions.cond_phrase_pre]
+ >> (!phrase) [actions.cond_phrase_post]
+ ;
+
                 image =
                         '$' >> blank
>> (*(anychar_p -
- close_bracket)) [actions.image]
+ phrase_end)) [actions.image]
                     ;
 
                 url =
@@ -206,7 +287,7 @@
                         '#'
>> blank
>> ( *(anychar_p -
- close_bracket)
+ phrase_end)
                         ) [actions.anchor]
                     ;
 
@@ -246,6 +327,15 @@
                         ) [actions.enumref_post]
                     ;
 
+ macroref =
+ "macroref" >> hard_space
+ >> (*(anychar_p -
+ (']' | hard_space))) [actions.macroref_pre]
+ >> ( eps_p(']')
+ | (hard_space >> phrase)
+ ) [actions.macroref_post]
+ ;
+
                 headerref =
                     "headerref" >> hard_space
>> (*(anychar_p -
@@ -255,6 +345,15 @@
                         ) [actions.headerref_post]
                     ;
 
+ conceptref =
+ "conceptref" >> hard_space
+ >> (*(anychar_p -
+ (']' | hard_space))) [actions.conceptref_pre]
+ >> ( eps_p(']')
+ | (hard_space >> phrase)
+ ) [actions.conceptref_post]
+ ;
+
                 bold =
                         ch_p('*') [actions.bold_pre]
>> blank >> phrase [actions.bold_post]
@@ -279,7 +378,7 @@
                         ch_p('-') [actions.strikethrough_pre]
>> blank >> phrase [actions.strikethrough_post]
                     ;
-
+
                 quote =
                         ch_p('"') [actions.quote_pre]
>> blank >> phrase [actions.quote_post]
@@ -302,21 +401,66 @@
>> blank >> phrase [actions.footnote_post]
                     ;
             }
-
- rule<Scanner> space, blank, comment, phrase, phrase_markup, image,
- close_bracket, bold, italic, underline, teletype,
- strikethrough, escape, url, common, funcref,
- classref, memberref, enumref, headerref, anchor,
- link, hard_space, eol, inline_code, simple_format,
- simple_bold, simple_italic, simple_underline,
- simple_teletype, source_mode,
- quote, code_block, footnote, replaceable;
+
+ rule<Scanner> space, blank, comment, phrase, phrase_markup, image,
+ phrase_end, bold, italic, underline, teletype,
+ strikethrough, escape, url, common, funcref,
+ classref, memberref, enumref, macroref, headerref, conceptref,
+ anchor, link, hard_space, eol, inline_code, simple_format,
+ simple_bold, simple_italic, simple_underline,
+ simple_teletype, source_mode, template_, template_arg,
+ quote, code_block, footnote, replaceable, macro,
+ brackets, template_args, dummy_block, cond_phrase,
+ macro_identifier
+ ;
 
             rule<Scanner> const&
             start() const { return common; }
         };
 
- bool& is_not_preformatted;
+ bool& no_eols;
+ Actions& actions;
+ };
+
+ template <typename Actions>
+ struct simple_phrase_grammar
+ : public grammar<simple_phrase_grammar<Actions> >
+ {
+ simple_phrase_grammar(Actions& actions)
+ : actions(actions) {}
+
+ template <typename Scanner>
+ struct definition
+ {
+ definition(simple_phrase_grammar const& self)
+ : unused(false), common(self.actions, unused)
+ {
+ Actions& actions = self.actions;
+
+ phrase =
+ *( common
+ | comment
+ | (anychar_p - ']') [actions.plain_char]
+ )
+ ;
+
+ comment =
+ "[/" >> *(dummy_block | (anychar_p - ']')) >> ']'
+ ;
+
+ dummy_block =
+ '[' >> *(dummy_block | (anychar_p - ']')) >> ']'
+ ;
+ }
+
+ bool unused;
+ rule<Scanner> phrase, comment, dummy_block;
+ phrase_grammar<Actions> common;
+
+ rule<Scanner> const&
+ start() const { return phrase; }
+ };
+
         Actions& actions;
     };
 }

Modified: branches/release/tools/quickbook/syntax_highlight.hpp
==============================================================================
--- branches/release/tools/quickbook/syntax_highlight.hpp (original)
+++ branches/release/tools/quickbook/syntax_highlight.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 /*=============================================================================
- Copyright (c) 2002 2004 Joel de Guzman
+ Copyright (c) 2002 2004 2006 Joel de Guzman
     Copyright (c) 2004 Eric Niebler
     http://spirit.sourceforge.net/
 
@@ -48,7 +48,7 @@
                 program
                     =
                     *( (+space_p) [Space(self.out)]
- | self.macro [self.do_macro]
+ | macro
                     | escape
                     | preprocessor [Process("preprocessor", self.out)]
                     | comment [Process("comment", self.out)]
@@ -62,6 +62,12 @@
                     )
                     ;
 
+ macro =
+ eps_p(self.macro // must not be followed by
+ >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ >> self.macro [self.do_macro]
+ ;
+
                 qbk_phrase =
                    *( common
                     | (anychar_p - str_p("``")) [self.escape_actions.plain_char]
@@ -78,7 +84,7 @@
                     ;
 
                 preprocessor
- = '#' >> ((alpha_p | '_') >> *(alnum_p | '_'))
+ = '#' >> *space_p >> ((alpha_p | '_') >> *(alnum_p | '_'))
                     ;
 
                 comment
@@ -179,7 +185,7 @@
                 program
                     =
                     *( (+space_p) [Space(self.out)]
- | self.macro [self.do_macro]
+ | macro
                     | escape
                     | comment [Process("comment", self.out)]
                     | keyword [Process("keyword", self.out)]
@@ -191,6 +197,12 @@
                     )
                     ;
 
+ macro =
+ eps_p(self.macro // must not be followed by
+ >> (eps_p - (alpha_p | '_'))) // alpha or underscore
+ >> self.macro [self.do_macro]
+ ;
+
                 qbk_phrase =
                    *( common
                     | (anychar_p - str_p("``")) [self.escape_actions.plain_char]

Modified: branches/release/tools/quickbook/test/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/Jamfile.v2 (original)
+++ branches/release/tools/quickbook/test/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -18,4 +18,7 @@
     [ quickbook-test preformatted ]
     [ quickbook-test link-side-by-side ]
     [ quickbook-test escape ]
+ [ quickbook-test templates ]
+ [ quickbook-test xinclude ]
+ [ quickbook-test import ]
     ;

Modified: branches/release/tools/quickbook/test/code-block-1.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-1.gold (original)
+++ branches/release/tools/quickbook/test/code-block-1.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,24 +1,24 @@
-<?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">
-<article id="code_block_1" name="Code Block 1" dirname="code_block_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Code Block 1</title>
- <section id="code_block_1.a_code_block">
- <title>A code block</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>
-</article>
+<?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">
+<article id="code_block_1" name="Code Block 1" dirname="code_block_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Code Block 1</title>
+ <section id="code_block_1.a_code_block">
+ <title>A code block</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>
+</article>

Modified: branches/release/tools/quickbook/test/code-block-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-1.quickbook (original)
+++ branches/release/tools/quickbook/test/code-block-1.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,16 +1,16 @@
-[article Code Block 1
-]
-
-[section A code block]
-
-A code block with proper indentation ;-)
-
- #include <iostream>
-
- int main()
- {
- std::cout << "Hello, World!" << std::endl;
- return 0;
- }
-
-[endsect]
+[article Code Block 1
+]
+
+[section A code block]
+
+A code block with proper indentation ;-)
+
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+
+[endsect]

Modified: branches/release/tools/quickbook/test/code-block-2.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-2.gold (original)
+++ branches/release/tools/quickbook/test/code-block-2.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,26 +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">
-<article id="code_block_2" name="Code Block 2" dirname="code_block_2" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Code Block 2</title>
- <section id="code_block_2.a_code_block">
- <title>A code block</title>
- <para>
- A code block with proper indentation ;-)
- </para>
- <para>
-
-<programlisting>
-<phrase role="preprocessor">#include</phrase>&nbsp;<phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
-
-<phrase role="keyword">int</phrase>&nbsp;<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>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="string">&quot;Hello, World!&quot;</phrase>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
- <phrase role="keyword">return</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </para>
- </section>
-</article>
+<?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">
+<article id="code_block_2" name="Code Block 2" dirname="code_block_2" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Code Block 2</title>
+ <section id="code_block_2.a_code_block">
+ <title>A code block</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>
+</article>

Modified: branches/release/tools/quickbook/test/code-block-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-block-2.quickbook (original)
+++ branches/release/tools/quickbook/test/code-block-2.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,18 +1,18 @@
-[article Code Block 2
-]
-
-[section A code block]
-
-A code block with proper indentation ;-)
-
-``
- #include <iostream>
-
- int main()
- {
- std::cout << "Hello, World!" << std::endl;
- return 0;
- }
-``
-
-[endsect]
+[article Code Block 2
+]
+
+[section A code block]
+
+A code block with proper indentation ;-)
+
+``
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+``
+
+[endsect]

Modified: branches/release/tools/quickbook/test/code-snippet.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-snippet.gold (original)
+++ branches/release/tools/quickbook/test/code-snippet.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,20 +1,20 @@
-<?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">
-<article id="code_snippets" name="Code Snippets" dirname="code_snippets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <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>&nbsp;<phrase
- role="identifier">quickbook</phrase>&nbsp;<phrase role="special">{</phrase>&nbsp;<phrase
- role="keyword">static</phrase>&nbsp;<phrase role="keyword">const</phrase>&nbsp;<phrase
- role="keyword">int</phrase> <phrase role="identifier">value</phrase>&nbsp;<phrase
- role="special">=</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>&nbsp;<phrase
- role="special">}</phrase></code>, should be properly formatted and not glued
- to the surrounding text.
- </para>
- </section>
-</article>
+<?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">
+<article id="code_snippets" name="Code Snippets" dirname="code_snippets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <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>
+ </section>
+</article>

Modified: branches/release/tools/quickbook/test/code-snippet.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/code-snippet.quickbook (original)
+++ branches/release/tools/quickbook/test/code-snippet.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,10 +1,10 @@
-[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.
-
-[endsect]
+[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.
+
+[endsect]

Modified: branches/release/tools/quickbook/test/escape.gold
==============================================================================
--- branches/release/tools/quickbook/test/escape.gold (original)
+++ branches/release/tools/quickbook/test/escape.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,16 +1,17 @@
-<?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">
-<article id="escape" name="Escape" dirname="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Escape</title>
- <section id="escape.escape">
- <title>Escape</title>
- <para>
-
-<!--quickbook-escape-prefix--><emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
-<!--quickbook-escape-postfix-->
- </para>
- </section>
-</article>
+<?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">
+<article id="escape" name="Escape" dirname="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <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>
+ </section>
+</article>

Modified: branches/release/tools/quickbook/test/escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/escape.quickbook (original)
+++ branches/release/tools/quickbook/test/escape.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,11 +1,13 @@
-[article Escape
-]
-
-[section Escape]
-
-'''
-<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
-'''
-
-[endsect]
-
+[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.
+
+[endsect]
+

Copied: branches/release/tools/quickbook/test/import.gold (from r41096, /trunk/tools/quickbook/test/import.gold)
==============================================================================
--- /trunk/tools/quickbook/test/import.gold (original)
+++ branches/release/tools/quickbook/test/import.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,40 +1,40 @@
-<?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">
-<article id="import" name="Import" dirname="import" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Import</title>
- <para>
- <para>
- This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
- </para>
- <para>
- This description can have paragraphs...
- </para>
- <itemizedlist>
- <listitem>
- lists
- </listitem>
- <listitem>
- etc.
- </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>
- <calloutlist></calloutlist>
- </para>
- </para>
-</article>
+<?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">
+<article id="import" name="Import" dirname="import" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Import</title>
+ <para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ lists
+ </listitem>
+ <listitem>
+ etc.
+ </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>
+ <calloutlist></calloutlist>
+ </para>
+ </para>
+</article>

Copied: branches/release/tools/quickbook/test/import.quickbook (from r41096, /trunk/tools/quickbook/test/import.quickbook)
==============================================================================
--- /trunk/tools/quickbook/test/import.quickbook (original)
+++ branches/release/tools/quickbook/test/import.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,6 +1,6 @@
-[article Import]
-
-[import stub.cpp]
-
-[foo]
-
+[article Import]
+
+[import stub.cpp]
+
+[foo]
+

Modified: branches/release/tools/quickbook/test/link-side-by-side.gold
==============================================================================
--- branches/release/tools/quickbook/test/link-side-by-side.gold (original)
+++ branches/release/tools/quickbook/test/link-side-by-side.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,18 +1,18 @@
-<?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">
-<article id="side_by_side_links" name="Side-by-side links" dirname="side_by_side_links"
-last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Side-by-side links</title>
- <section id="side_by_side_links.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>&nbsp;<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>
-</article>
+<?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">
+<article id="side_by_side_links" name="Side-by-side links" dirname="side_by_side_links"
+last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Side-by-side links</title>
+ <section id="side_by_side_links.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>
+</article>

Modified: branches/release/tools/quickbook/test/link-side-by-side.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/link-side-by-side.quickbook (original)
+++ branches/release/tools/quickbook/test/link-side-by-side.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,13 +1,13 @@
-[article Side-by-side links
-]
-
-[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]
+[article Side-by-side links
+]
+
+[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]

Modified: branches/release/tools/quickbook/test/preformatted.gold
==============================================================================
--- branches/release/tools/quickbook/test/preformatted.gold (original)
+++ branches/release/tools/quickbook/test/preformatted.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,29 +1,29 @@
-<?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">
-<article id="preformatted" name="Preformatted" dirname="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <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>
- </section>
-</article>
+<?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">
+<article id="preformatted" name="Preformatted" dirname="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <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>
+ </section>
+</article>

Modified: branches/release/tools/quickbook/test/preformatted.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/preformatted.quickbook (original)
+++ branches/release/tools/quickbook/test/preformatted.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,22 +1,22 @@
-[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.
-
-[endsect]
+[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.
+
+[endsect]

Modified: branches/release/tools/quickbook/test/quickbook-manual.gold
==============================================================================
--- branches/release/tools/quickbook/test/quickbook-manual.gold (original)
+++ branches/release/tools/quickbook/test/quickbook-manual.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,1976 +1,3765 @@
-<?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">
-<article id="quickbook" name="Quickbook" dirname="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- <author>
- <firstname>Joel</firstname> <surname>de Guzman</surname>
- </author>
- <author>
- <firstname>Eric</firstname> <surname>Niebler</surname>
- </author>
- <copyright>
- <year>2002</year> <year>2004</year> <holder>Joel de Guzman, Eric Niebler</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>)
- </para>
- </legalnotice>
- <articlepurpose>
- <emphasis>WikiWiki</emphasis> style documentation tool
- </articlepurpose>
- </articleinfo>
- <title>Quickbook 1.3</title>
- <section id="quickbook.intro">
- <title> Introduction</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><sbr/>
- <sbr/> -- 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>
- generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
- xml, to generate HTML, PostScript and PDF
- </listitem>
- <listitem>
- simple markup to link to Doxygen-generated entities
- </listitem>
- <listitem>
- macro system for simple text substitution
- </listitem>
- <listitem>
- simple markup for italics, bold, preformatted, blurbs, code samples, tables,
- URLs, anchors, images, etc.
- </listitem>
- <listitem>
- automatic syntax coloring of code samples
- </listitem>
- <listitem>
- CSS support
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.change_log">
- <title> Change Log</title> <anchor id="quickbook.change_log.version_1_3" />
- <bridgehead renderas="sect3">
- Version 1.3
- </bridgehead>
- <itemizedlist>
- <listitem>
- Quickbook file inclusion [include].
- </listitem>
- <listitem>
- Better xml output (pretty layout). Check out the generated XML.
- </listitem>
- <listitem>
- Regression testing facility: to make sure your document will always be compatible
- (full backward compatibility) regardless of changes to QuickBook.
- </listitem>
- <listitem>
- Code cleanup and refactoring.
- </listitem>
- <listitem>
- Allow phrase markup in the doc-info.
- </listitem>
- <listitem>
- Preformatted code blocks via ``code`` (double ticks) allows code in tables
- and lists, for example.
- </listitem>
- <listitem>
- 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.
- </listitem>
- <listitem>
- Better (intuitive) paragraph termination. Some markups may terminate a paragraph.
- Example:
-<programlisting>
-<phrase role="special">[</phrase><phrase role="identifier">section</phrase>&nbsp;<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>
- </listitem>
- <listitem>
- 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>
- </listitem>
- <listitem>
- Better &amp;nbsp; and whitespace handling in code snippets.
- </listitem>
- <listitem>
- [xinclude] fixes up the relative path to the target XML file when input_directory
- is not the same as the output_directory.
- </listitem>
- <listitem>
- Allow untitled tables.
- </listitem>
- <listitem>
- Allow phrase markups in section titles.
- </listitem>
- <listitem>
- Allow escaping back to QuickBook from code, code blocks and inline code.
- </listitem>
- <listitem>
- Footnotes, with the [footnote This is the footnote] syntax.
- </listitem>
- <listitem>
- Post-processor bug fix for escaped XML code that it does not recognize.
- </listitem>
- <listitem>
- Replaceable, with the [~replacement] syntax.
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.syntax">
- <title> Syntax Summary</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>Comments</title>
- <para>
- Can be placed anywhere.
- </para>
-
-<programlisting><!--quickbook-escape-prefix-->[/ comment (no output generated) ]<!--quickbook-escape-postfix-->
-</programlisting>
- </section>
- <section id="quickbook.syntax.phrase">
- <title> Phrase Level Elements</title>
- <section id="quickbook.syntax.phrase.font_styles">
- <title>Font Styles</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>Replaceable</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>Quotations</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>Simple formatting</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.
- </para>
- <itemizedlist>
- <listitem>
- Simple markups cannot nest. You can combine a simple markup with a nestable
- markup.
- </listitem>
- <listitem>
- A non-space character must follow the leading markup
- </listitem>
- <listitem>
- A non-space character must precede the trailing markup
- </listitem>
- <listitem>
- A space or a punctuation must follow the trailing markup
- </listitem>
- <listitem>
- If the matching markup cannot be found within a line, 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
- line. We do not want the rest of the document to be rendered bold just
- because we forgot a trailing '*'.
- </listitem>
- <listitem>
- 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>.
- </listitem>
- </itemizedlist>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">More Formatting Samples</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Markup</entry><entry>Result</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*Bold*<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">Bold</emphasis></entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*Is bold*<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">Is bold</emphasis></entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->* Not bold* *Not bold * * Not bold *<!--quickbook-escape-postfix-->
- </literal></entry><entry>* Not bold* *Not bold * * Not bold *</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->This*Isn't*Bold (no bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry>This*Isn't*Bold (no bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->(*Bold Inside*) (parenthesis not bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry>(<emphasis role="bold">Bold Inside</emphasis>)
- (parenthesis not bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*(Bold Outside)* (parenthesis bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">(Bold Outside)</emphasis>
- (parenthesis bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->3*4*5 = 60 (no bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry>3*4*5 = 60 (no bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->3 * 4 * 5 = 60 (no bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry>3 * 4 * 5 = 60 (no bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->3 *4* 5 = 60 (4 is bold)<!--quickbook-escape-postfix-->
- </literal></entry><entry>3 <emphasis role="bold">4</emphasis> 5 =
- 60 (4 is bold)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*This is bold* this is not *but this is*<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">This is bold</emphasis>
- this is not <emphasis role="bold">but this is</emphasis></entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*This is bold*.<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">This is bold</emphasis>.</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->*B*. (bold B)<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis role="bold">B</emphasis>. (bold
- B)</entry>
- </row>
- <row>
- <entry><literal>
-<!--quickbook-escape-prefix-->['*Bold-Italic*]<!--quickbook-escape-postfix-->
- </literal></entry><entry><emphasis><emphasis role="bold">Bold-Italic</emphasis></emphasis></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> 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.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.inline_code">
- <title>Inline code</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>&nbsp;<phrase
- role="identifier">main</phrase><phrase role="special">()</phrase>&nbsp;<phrase
- role="special">{</phrase>&nbsp;<phrase role="keyword">return</phrase>&nbsp;<phrase
- role="number">0</phrase><phrase role="special">;</phrase>&nbsp;<phrase
- role="special">}</phrase></code> in it. The code will be syntax highlighted.
- </para>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> Note that we simply enclose the code with the
- tick: <literal>
-<!--quickbook-escape-prefix-->"`"<!--quickbook-escape-postfix-->
- </literal>, not the single quote: <code><phrase role="string">&quot;'&quot;</phrase></code>.
- Note too that <literal>
-<!--quickbook-escape-prefix-->`some code`<!--quickbook-escape-postfix-->
- </literal> is preferred over <literal>
-<!--quickbook-escape-prefix-->[^some code]<!--quickbook-escape-postfix-->
- </literal>. </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.code_blocks">
- <title>Code blocks</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>&nbsp;<phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
-
-<phrase role="keyword">int</phrase>&nbsp;<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>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="string">&quot;Hello, World!&quot;</phrase>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
- <phrase role="keyword">return</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </para>
- </section>
- <section id="quickbook.syntax.phrase.source_mode">
- <title>Source Mode</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>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Supported Source Modes</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Mode</entry><entry>Source Mode Markup</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>C++</entry><entry><literal>[c++]</literal></entry>
- </row>
- <row>
- <entry>Python</entry><entry><literal>[python]</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> The source mode strings are lowercase.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.line_break">
- <title>line-break</title>
-<programlisting><!--quickbook-escape-prefix-->[br]
-<!--quickbook-escape-postfix--></programlisting>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
- <textobject>
- <phrase>note</phrase>
- </textobject>
- </inlinemediaobject> Note that <code><phrase role="special">\</phrase><phrase
- role="identifier">n</phrase></code> is now preferred over <code><phrase
- role="special">[</phrase><phrase role="identifier">br</phrase><phrase
- role="special">]</phrase></code>.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.anchors">
- <title>Anchors</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>
-<!--quickbook-escape-prefix-->[link named_anchor
-Some link text]<!--quickbook-escape-postfix-->
- </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>Links</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/>
- </para>
- </section>
- <section id="quickbook.syntax.phrase.anchor_links">
- <title>Anchor links</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>refentry links</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> Code Links</title>
- <para>
- If you want to link to a function, class, member, enum 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]
-[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 or enum. 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>Escape</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>
-
-<!--quickbook-escape-prefix--><emphasis role="bold">This is direct XML markup</emphasis>
-<!--quickbook-escape-postfix-->
- </para>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/alert.png"></imagedata></imageobject>
- <textobject>
- <phrase>alert</phrase>
- </textobject>
- </inlinemediaobject> 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.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.phrase.single_char_escape">
- <title>Single char escape</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. Note that <code><phrase
- role="special">\</phrase><phrase role="identifier">n</phrase></code> is
- now preferred over <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
- role="special">]</phrase></code>.
- </para>
- </section>
- <section id="quickbook.syntax.phrase.images">
- <title>Images</title>
-<programlisting><!--quickbook-escape-prefix-->[$image.jpg]
-<!--quickbook-escape-postfix--></programlisting>
- </section>
- <section id="quickbook.syntax.phrase.footnotes">
- <title>Footnotes</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>
- <para>
- A sample footnote
- </para>
- </footnote>
- .
- </para>
- </section>
- </section>
- <section id="quickbook.syntax.block">
- <title> Block Level Elements</title>
- <section id="quickbook.syntax.block.document">
- <title>Document</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>
- book
- </listitem>
- <listitem>
- article
- </listitem>
- <listitem>
- library
- </listitem>
- <listitem>
- chapter
- </listitem>
- <listitem>
- part
- </listitem>
- <listitem>
- appendix
- </listitem>
- <listitem>
- preface
- </listitem>
- <listitem>
- qandadiv
- </listitem>
- <listitem>
- qandaset
- </listitem>
- <listitem>
- reference
- </listitem>
- <listitem>
- set
- </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>Section</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>xinclude</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>Paragraphs</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>Lists</title>
- <section id="quickbook.syntax.block.lists.ordered_lists">
- <title>Ordered lists</title>
-<programlisting># One
-# Two
-# Three
-</programlisting>
- <para>
- will generate:
- </para>
- <orderedlist>
- <listitem>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.list_hierarchies">
- <title>List Hierarchies</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>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- <orderedlist>
- <listitem>
- Three.a
- </listitem>
- <listitem>
- Three.b
- </listitem>
- <listitem>
- Three.c
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- Fourth
- <orderedlist>
- <listitem>
- Four.a
- <orderedlist>
- <listitem>
- Four.a.i
- </listitem>
- <listitem>
- Four.a.ii
- </listitem>
- </orderedlist>
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- Five
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.long_list_lines">
- <title>Long List Lines</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>
- A short item.
- </listitem>
- <listitem>
- 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.
- </listitem>
- <listitem>
- A short item.
- </listitem>
- </orderedlist>
- </section>
- <section id="quickbook.syntax.block.lists.unordered_lists">
- <title>Unordered lists</title>
-<programlisting><!--quickbook-escape-prefix-->* First
-* Second
-* Third
-<!--quickbook-escape-postfix--></programlisting>
- <para>
- will generate:
- </para>
- <itemizedlist>
- <listitem>
- First
- </listitem>
- <listitem>
- Second
- </listitem>
- <listitem>
- Third
- </listitem>
- </itemizedlist>
- </section>
- <section id="quickbook.syntax.block.lists.mixed_lists">
- <title>Mixed lists</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>
- One
- </listitem>
- <listitem>
- Two
- </listitem>
- <listitem>
- Three
- <itemizedlist>
- <listitem>
- Three.a
- </listitem>
- <listitem>
- Three.b
- </listitem>
- <listitem>
- Three.c
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- Four
- </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>
- 1
- <itemizedlist>
- <listitem>
- 1.a
- <orderedlist>
- <listitem>
- 1.a.1
- </listitem>
- <listitem>
- 1.a.2
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- 1.b
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- 2
- <itemizedlist>
- <listitem>
- 2.a
- </listitem>
- <listitem>
- 2.b
- <orderedlist>
- <listitem>
- 2.b.1
- </listitem>
- <listitem>
- 2.b.2
- <itemizedlist>
- <listitem>
- 2.b.2.a
- </listitem>
- <listitem>
- 2.b.2.b
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
- </section>
- </section>
- <section id="quickbook.syntax.block.code">
- <title>Code</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>
- <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="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>
- <para>
- </para>
-
-<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 __syntax_highlight__ [@quickbook/highlight.html syntax_highlight]]
-[def __quickbook__ [@index.html quickbook]]
-
- using __quickbook__::__syntax_highlight__;
-<!--quickbook-escape-postfix--></programlisting>
- <para>
- Generates:
- </para>
-
-<programlisting>
-<phrase role="identifier">using</phrase> <ulink url="index.html">quickbook</ulink><phrase role="special">::</phrase><ulink url="quickbook/highlight.html">syntax_highlight</ulink><phrase role="special">;</phrase>
-</programlisting>
- </section>
- <section id="quickbook.syntax.block.escape_back">
- <title> Escaping Back To QuickBook</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="identifier">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>Preformatted</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>Blockquote</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>Admonitions</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>Headings</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>
- <anchor id="quickbook.syntax.block.headings.heading_1" />
- <bridgehead renderas="sect1">
- Heading 1
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_2" />
- <bridgehead renderas="sect2">
- Heading 2
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_3" />
- <bridgehead renderas="sect3">
- Heading 3
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_4" />
- <bridgehead renderas="sect4">
- Heading 4
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_5" />
- <bridgehead renderas="sect5">
- Heading 5
- </bridgehead>
- <anchor id="quickbook.syntax.block.headings.heading_6" />
- <bridgehead renderas="sect6">
- Heading 6
- </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.macros">
- <title>Macros</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 ']' while 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>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
- <textobject>
- <phrase>tip</phrase>
- </textobject>
- </inlinemediaobject> 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>
-<!--quickbook-escape-prefix-->__spirit__<!--quickbook-escape-postfix-->
- </literal>). The reason is to avoid unwanted macro replacement.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <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>
-<!--quickbook-escape-prefix-->__spirit__<!--quickbook-escape-postfix-->
- </literal> than <literal>
-<!--quickbook-escape-prefix-->[@http://spirit.sourceforge.net Spirit]<!--quickbook-escape-postfix-->
- </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>&nbsp;<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>Predefined Macros</title>
- <para>
- Quickbook has some predefined macros that you can already use.
- </para>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Predefined Macros</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Macro</entry><entry>Meaning</entry><entry>Example</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
-<!--quickbook-escape-prefix-->__DATE__<!--quickbook-escape-postfix-->
- </entry><entry>Today's date</entry><entry>2000-Dec-20</entry>
- </row>
- <row>
- <entry>
-<!--quickbook-escape-prefix-->__TIME__<!--quickbook-escape-postfix-->
- </entry><entry>The current time</entry><entry>12:00:00 PM</entry>
- </row>
- <row>
- <entry>
-<!--quickbook-escape-prefix-->__FILENAME__<!--quickbook-escape-postfix-->
- </entry><entry>Quickbook source filename</entry><entry>NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.blurbs">
- <title>Blurbs</title>
-<programlisting><!--quickbook-escape-prefix-->[blurb :-) [*An eye catching advertisement or note...]\n\n
- __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>
- <informaltable frame="all">
- <?dbhtml table-width="74%" ?>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry role="blurb"> <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
- <textobject>
- <phrase>smiley</phrase>
- </textobject>
- </inlinemediaobject>&nbsp;<emphasis role="bold">An eye catching advertisement
- or note...</emphasis><sbr/> <sbr/> <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++. </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.tables">
- <title>Tables</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>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">A Simple Table</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Heading 1</entry><entry>Heading 2</entry><entry>Heading 3</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>R0-C0</entry><entry>R0-C1</entry><entry>R0-C2</entry>
- </row>
- <row>
- <entry>R2-C0</entry><entry>R2-C1</entry><entry>R2-C2</entry>
- </row>
- <row>
- <entry>R3-C0</entry><entry>R3-C1</entry><entry>R3-C2</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <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 very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- ]
- ]
- [
- [Row 1, Col 0: a small cell]
- [Row 1, Col 1: a small cell]
- ]
-]
-<!--quickbook-escape-postfix--></programlisting>
- <para>
- and thus:
- </para>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Table with fat cells</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Heading 1</entry><entry>Heading 2</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Row 0, Col 0: a small cell</entry><entry> Row 0, Col 1: A
- very big cell...A very big cell...A very big cell... A very big cell...A
- very big cell...A very big cell... A very big cell...A very big cell...A
- very big cell... </entry>
- </row>
- <row>
- <entry>Row 1, Col 0: a small cell</entry><entry>Row 1, Col 1: a small
- cell</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <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>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Table with code</phrase>
- </bridgehead>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Comment</entry><entry>Code</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>My first program</entry><entry>
-<programlisting>
-<phrase role="comment">#include &lt;iostream&gt;
-</phrase>
-<phrase role="identifier">int</phrase>&nbsp;<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>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="string">&quot;Hello, World!&quot;</phrase>&nbsp;<phrase role="special">&lt;&lt;</phrase>&nbsp;<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
- <phrase role="keyword">return</phrase>&nbsp;<phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
- <section id="quickbook.syntax.block.variable_lists">
- <title>Variable Lists</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>
- The definition of term 1
- </listitem>
- </varlistentry> <varlistentry><term>term 2</term>
- <listitem>
- The definition of term 2
- </listitem>
- </varlistentry> <varlistentry><term>term 3</term>
- <listitem>
- The definition of term 3
- </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>Include</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 be cut and pasted into
- the current document, with the following exceptions:
- </para>
- <itemizedlist>
- <listitem>
- The
-<!--quickbook-escape-prefix-->__FILENAME__<!--quickbook-escape-postfix-->
- predefined macro will reflect the name of the file currently being processed.
- </listitem>
- <listitem>
- Any macros defined in the included file are scoped to that file.
- </listitem>
- </itemizedlist>
- <para>
- As the number of included QuickBook files grows, so too does the likelihood
- of two sections having the same name. Since QuickBook generates an anchor
- for each section based on the section name, it is possible to end up with
- two identically named anchors, leading to link ambiguities. To resolve
- these ambiguities, the <literal>[include]</literal> directive lets you
- specify a document id to use for the included file. You can use it like
- this:
- </para>
-
-<programlisting><!--quickbook-escape-prefix-->[include:someid someother.qbk]
-<!--quickbook-escape-postfix--></programlisting>
- <para>
- When using this form, all auto-generated anchors will use &quot;someid&quot;
- as a unique prefix. So for instance, if there is a 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>
- </section>
- <section id="quickbook.ref">
- <title> Quick Reference</title>
- <informaltable frame="all">
- <bridgehead renderas="sect4">
- <phrase role="table-title">Syntax Compendium</phrase>
- </bridgehead>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>To do this...</entry><entry>Use this...</entry><entry>See this...</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>comment</entry><entry><literal>
-<!--quickbook-escape-prefix-->[/ some comment]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.comments">Comments</link></entry>
- </row>
- <row>
- <entry><emphasis>italics</emphasis></entry><entry><literal>
-<!--quickbook-escape-prefix-->['italics] or /italics/<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="bold">bold</emphasis></entry><entry><literal>
-<!--quickbook-escape-prefix-->[*bold] or *bold*<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="underline">underline</emphasis></entry><entry><literal>
-<!--quickbook-escape-prefix-->[_underline] or _underline_<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><literal>teletype</literal></entry><entry><literal>
-<!--quickbook-escape-prefix-->[^teletype] or =teletype=<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry><emphasis role="strikethrough">strikethrough</emphasis></entry><entry><literal>
-<!--quickbook-escape-prefix-->[-strikethrough]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.font_styles">Font
- Styles</link> and <link linkend="quickbook.syntax.phrase.simple_formatting">formatting
- Simple formatting</link></entry>
- </row>
- <row>
- <entry>
- <replaceable>
- replaceable
- </replaceable>
- </entry><entry><literal>
-<!--quickbook-escape-prefix-->[~replaceable]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.replaceable">Replaceble</link></entry>
- </row>
- <row>
- <entry>source mode</entry><entry><literal>[c++]</literal> or <literal>[python]</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.source_mode">Source Mode</link></entry>
- </row>
- <row>
- <entry>inline code</entry><entry><literal>
-<!--quickbook-escape-prefix-->`int main();`<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.inline_code">Inline
- code</link></entry>
- </row>
- <row>
- <entry>code block</entry><entry><literal>
-<!--quickbook-escape-prefix-->``int main();``<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.code">Code</link></entry>
- </row>
- <row>
- <entry>code escape</entry><entry><literal>
-<!--quickbook-escape-prefix-->``from c++ to QuickBook``<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.escape_back">Escaping
- Back To QuickBook</link></entry>
- </row>
- <row>
- <entry>line break</entry><entry><literal>
-<!--quickbook-escape-prefix-->[br] or \n<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.line_break">line-break</link></entry>
- </row>
- <row>
- <entry>anchor</entry><entry><literal>
-<!--quickbook-escape-prefix-->[#anchor]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.anchors">Anchors</link></entry>
- </row>
- <row>
- <entry>link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[@http://www.boost.org Boost]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.links">Links</link></entry>
- </row>
- <row>
- <entry>anchor link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[link section.anchor Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.anchor_links">Anchor
- links</link></entry>
- </row>
- <row>
- <entry>refentry link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[link xml.refentry Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.refentry_links">refentry
- links</link></entry>
- </row>
- <row>
- <entry>function link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[funcref fully::qualified::function_name Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>class link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[classref fully::qualified::class_name Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>member link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[memberref fully::qualified::member_name Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>enum link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[enumref fully::qualified::enum_name Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>header link</entry><entry><literal>
-<!--quickbook-escape-prefix-->[headerref path/to/header.hpp Link text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.code_links">function,
- class, member, enum or header links</link></entry>
- </row>
- <row>
- <entry>escape</entry><entry><literal>'''escaped text (no processing/formatting)'''</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.escape">Escape</link></entry>
- </row>
- <row>
- <entry>single char escape</entry><entry><literal>\c</literal></entry><entry><link
- linkend="quickbook.syntax.phrase.single_char_escape">Single char escape</link></entry>
- </row>
- <row>
- <entry>images</entry><entry><literal>
-<!--quickbook-escape-prefix-->[$image.jpg]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.phrase.images">Images</link></entry>
- </row>
- <row>
- <entry>begin section</entry><entry><literal>
-<!--quickbook-escape-prefix-->[section The Section Title]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.section">Section</link></entry>
- </row>
- <row>
- <entry>end section</entry><entry><literal>
-<!--quickbook-escape-prefix-->[endsect]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.section">Section</link></entry>
- </row>
- <row>
- <entry>paragraph</entry><entry>No markup. Paragraphs start left-flushed
- and are terminated by two or more newlines.</entry><entry><link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link></entry>
- </row>
- <row>
- <entry>ordered list</entry><entry><literal># one<sbr/> # two<sbr/> #
- three<sbr/> </literal></entry><entry><link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
- lists</link></entry>
- </row>
- <row>
- <entry>unordered list</entry><entry><literal>* one<sbr/> * two<sbr/>
- * three<sbr/> </literal></entry><entry><link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
- lists</link></entry>
- </row>
- <row>
- <entry>code</entry><entry>No markup. Preformatted code starts with a
- space or a tab.</entry><entry><link linkend="quickbook.syntax.block.code">Code</link></entry>
- </row>
- <row>
- <entry>preformatted</entry><entry><literal>
-<!--quickbook-escape-prefix-->[pre preformatted]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.preformatted">Preformatted</link></entry>
- </row>
- <row>
- <entry>block quote</entry><entry><literal>
-<!--quickbook-escape-prefix-->[:sometext...]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.blockquote">Blockquote</link></entry>
- </row>
- <row>
- <entry>heading 1</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h1 Heading 1]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 2</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h2 Heading 2]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 3</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h3 Heading 3]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 4</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h4 Heading 4]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 5</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h5 Heading 5]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>heading 6</entry><entry><literal>
-<!--quickbook-escape-prefix-->[h6 Heading 6]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.headings">Heading</link></entry>
- </row>
- <row>
- <entry>macro</entry><entry><literal>
-<!--quickbook-escape-prefix-->[def macro_identifier some text]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.macros">Macros</link></entry>
- </row>
- <row>
- <entry>blurb</entry><entry><literal>
-<!--quickbook-escape-prefix-->[blurb advertisement or note...]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.blurbs">Blurbs</link></entry>
- </row>
- <row>
- <entry>admonition</entry><entry><literal>
-<!--quickbook-escape-prefix-->[warning Warning text...]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.admonitions">Admonitions</link></entry>
- </row>
- <row>
- <entry>table</entry><entry><literal>[table Title<sbr/> [[a][b][c]]<sbr/>
- [[a][b][c]]<sbr/> ]</literal></entry><entry><link linkend="quickbook.syntax.block.tables">Tables</link></entry>
- </row>
- <row>
- <entry>variablelist</entry><entry><literal>[variablelist Title<sbr/>
- [[a][b]]<sbr/> [[a][b]]<sbr/> ]</literal></entry><entry><link linkend="quickbook.syntax.block.variable_lists">Variable
- Lists</link></entry>
- </row>
- <row>
- <entry>include</entry><entry><literal>
-<!--quickbook-escape-prefix-->[include someother.qbk]<!--quickbook-escape-postfix-->
- </literal></entry><entry><link linkend="quickbook.syntax.block.include">Include</link></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </section>
-</article>
+<?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">
+<article id="quickbook" name="Quickbook" dirname="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <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>
+ <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>)
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <emphasis>WikiWiki</emphasis> style documentation tool
+ </articlepurpose>
+ </articleinfo>
+ <title>Quickbook 1.4</title>
+ <section id="quickbook.intro">
+ <title><link linkend="quickbook.intro"> Introduction</link></title>
+ <blockquote>
+ <para>
+ <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>
+ </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>
+ <para>
+ <ulink url="../quickbook.qbk">quickbook.qbk</ulink>
+ </para>
+ </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>
+ generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ xml, to generate HTML, PostScript and PDF
+ </listitem>
+ <listitem>
+ simple markup to link to Doxygen-generated entities
+ </listitem>
+ <listitem>
+ macro system for simple text substitution
+ </listitem>
+ <listitem>
+ simple markup for italics, bold, preformatted, blurbs, code samples, tables,
+ URLs, anchors, images, etc.
+ </listitem>
+ <listitem>
+ automatic syntax coloring of code samples
+ </listitem>
+ <listitem>
+ CSS support
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.change_log">
+ <title><link linkend="quickbook.change_log"> Change Log</link></title> <anchor
+ id="quickbook.change_log.version_1_3"/>
+ <bridgehead renderas="sect3">
+ <link linkend="quickbook.change_log.version_1_3">Version 1.3</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ Quickbook file inclusion [include].
+ </listitem>
+ <listitem>
+ Better xml output (pretty layout). Check out the generated XML.
+ </listitem>
+ <listitem>
+ Regression testing facility: to make sure your document will always be compatible
+ (full backward compatibility) regardless of changes to QuickBook.
+ </listitem>
+ <listitem>
+ Code cleanup and refactoring.
+ </listitem>
+ <listitem>
+ Allow phrase markup in the doc-info.
+ </listitem>
+ <listitem>
+ Preformatted code blocks via ``code`` (double ticks) allows code in tables
+ and lists, for example.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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>
+ </listitem>
+ <listitem>
+ 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>
+ </listitem>
+ <listitem>
+ Better &amp;nbsp; and whitespace handling in code snippets.
+ </listitem>
+ <listitem>
+ [xinclude] fixes up the relative path to the target XML file when input_directory
+ is not the same as the output_directory.
+ </listitem>
+ <listitem>
+ Allow untitled tables.
+ </listitem>
+ <listitem>
+ Allow phrase markups in section titles.
+ </listitem>
+ <listitem>
+ Allow escaping back to QuickBook from code, code blocks and inline code.
+ </listitem>
+ <listitem>
+ Footnotes, with the [footnote This is the footnote] syntax.
+ </listitem>
+ <listitem>
+ Post-processor bug fix for escaped XML code that it does not recognize.
+ </listitem>
+ <listitem>
+ Replaceable, with the [~replacement] syntax.
+ </listitem>
+ <listitem>
+ Generic Headers
+ </listitem>
+ <listitem>
+ Code changes to allow full recursion (i.e. Collectors and push/pop functions)
+ </listitem>
+ <listitem>
+ Various code cleanup/maintenance
+ </listitem>
+ <listitem>
+ Templates!
+ </listitem>
+ <listitem>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </listitem>
+ <listitem>
+ Allow escape of spaces. The escaped space is removed from the output. Syntax:
+ <code><phrase role="special">\</phrase> </code>.
+ </listitem>
+ <listitem>
+ Nested comments are now allowed.
+ </listitem>
+ <listitem>
+ Quickbook blocks can nest inside comments.
+ </listitem>
+ <listitem>
+ <link linkend="quickbook.syntax.block.import">Import</link> facility.
+ </listitem>
+ <listitem>
+ Callouts on imported code
+ </listitem>
+ <listitem>
+ Simple markups can now span a whole block.
+ </listitem>
+ <listitem>
+ <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.
+ </listitem>
+ <listitem>
+ <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.
+ </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>
+ <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>
+ Simple markups cannot nest. You can combine a simple markup with a nestable
+ markup.
+ </listitem>
+ <listitem>
+ Simple markups cannot contain any other form of quickbook markup.
+ </listitem>
+ <listitem>
+ A non-space character must follow the leading markup
+ </listitem>
+ <listitem>
+ A non-space character must precede the trailing markup
+ </listitem>
+ <listitem>
+ A space or a punctuation must follow the trailing markup
+ </listitem>
+ <listitem>
+ 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: ']'.
+ </listitem>
+ <listitem>
+ 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>.
+ </listitem>
+ </itemizedlist>
+ <table frame="all"> <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"> <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>
+ <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/>
+ </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>
+ <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>
+ <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>
+ book
+ </listitem>
+ <listitem>
+ article
+ </listitem>
+ <listitem>
+ library
+ </listitem>
+ <listitem>
+ chapter
+ </listitem>
+ <listitem>
+ part
+ </listitem>
+ <listitem>
+ appendix
+ </listitem>
+ <listitem>
+ preface
+ </listitem>
+ <listitem>
+ qandadiv
+ </listitem>
+ <listitem>
+ qandaset
+ </listitem>
+ <listitem>
+ reference
+ </listitem>
+ <listitem>
+ set
+ </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>
+ One
+ </listitem>
+ <listitem>
+ Two
+ </listitem>
+ <listitem>
+ Three
+ </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>
+ One
+ </listitem>
+ <listitem>
+ Two
+ </listitem>
+ <listitem>
+ Three
+ <orderedlist>
+ <listitem>
+ Three.a
+ </listitem>
+ <listitem>
+ Three.b
+ </listitem>
+ <listitem>
+ Three.c
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem>
+ Fourth
+ <orderedlist>
+ <listitem>
+ Four.a
+ <orderedlist>
+ <listitem>
+ Four.a.i
+ </listitem>
+ <listitem>
+ Four.a.ii
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem>
+ Five
+ </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>
+ A short item.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ A short item.
+ </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>
+ First
+ </listitem>
+ <listitem>
+ Second
+ </listitem>
+ <listitem>
+ Third
+ </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>
+ One
+ </listitem>
+ <listitem>
+ Two
+ </listitem>
+ <listitem>
+ Three
+ <itemizedlist>
+ <listitem>
+ Three.a
+ </listitem>
+ <listitem>
+ Three.b
+ </listitem>
+ <listitem>
+ Three.c
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ Four
+ </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>
+ 1
+ <itemizedlist>
+ <listitem>
+ 1.a
+ <orderedlist>
+ <listitem>
+ 1.a.1
+ </listitem>
+ <listitem>
+ 1.a.2
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem>
+ 1.b
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ 2
+ <itemizedlist>
+ <listitem>
+ 2.a
+ </listitem>
+ <listitem>
+ 2.b
+ <orderedlist>
+ <listitem>
+ 2.b.1
+ </listitem>
+ <listitem>
+ 2.b.2
+ <itemizedlist>
+ <listitem>
+ 2.b.2.a
+ </listitem>
+ <listitem>
+ 2.b.2.b
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ </itemizedlist>
+ </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>
+ <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="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>
+ <para>
+ </para>
+
+<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>
+ </para>
+ <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>
+ <para>
+ Indents the paragraph. This applies to one paragraph only.
+ </para>
+ </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>
+ <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>
+ <anchor id="quickbook.syntax.block.headings.heading_1"/>
+ <bridgehead renderas="sect1">
+ <link linkend="quickbook.syntax.block.headings.heading_1">Heading
+ 1</link>
+ </bridgehead>
+ <anchor id="quickbook.syntax.block.headings.heading_2"/>
+ <bridgehead renderas="sect2">
+ <link linkend="quickbook.syntax.block.headings.heading_2">Heading
+ 2</link>
+ </bridgehead>
+ <anchor id="quickbook.syntax.block.headings.heading_3"/>
+ <bridgehead renderas="sect3">
+ <link linkend="quickbook.syntax.block.headings.heading_3">Heading
+ 3</link>
+ </bridgehead>
+ <anchor id="quickbook.syntax.block.headings.heading_4"/>
+ <bridgehead renderas="sect4">
+ <link linkend="quickbook.syntax.block.headings.heading_4">Heading
+ 4</link>
+ </bridgehead>
+ <anchor id="quickbook.syntax.block.headings.heading_5"/>
+ <bridgehead renderas="sect5">
+ <link linkend="quickbook.syntax.block.headings.heading_5">Heading
+ 5</link>
+ </bridgehead>
+ <anchor id="quickbook.syntax.block.headings.heading_6"/>
+ <bridgehead renderas="sect6">
+ <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"> <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>
+ NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE
+ </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>
+ <anchor id="quickbook.syntax.block.templates.template_identifier"/>
+ <bridgehead renderas="sect5">
+ <link linkend="quickbook.syntax.block.templates.template_identifier">Template
+ Identifier</link>
+ </bridgehead>
+ <para>
+ Template identifiers can either consist of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ A single character punctuation (a non-alphanumeric printable character)
+ </listitem>
+ </itemizedlist>
+ <anchor id="quickbook.syntax.block.templates.formal_template_arguments"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <anchor id="quickbook.syntax.block.templates.template_body"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <anchor id="quickbook.syntax.block.templates.template_expansion"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <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>
+ </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>
+ <anchor id="quickbook.syntax.block.templates.nullary_templates"/>
+ <bridgehead renderas="sect5">
+ <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>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </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>
+ <anchor id="quickbook.syntax.block.templates.simple_arguments"/>
+ <bridgehead renderas="sect5">
+ <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>
+ Break the last argument into two, at the first space found (<literal>'',
+ '\n', \t' or '\r'</literal>).
+ </listitem>
+ <listitem>
+ Repeat until there are enough arguments or if there are no more
+ spaces found (in which case, an error is reported).
+ </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>
+ <anchor id="quickbook.syntax.block.templates.punctuation_templates"/>
+ <bridgehead renderas="sect5">
+ <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"> <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"> <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"> <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>
+ The __FILENAME__ predefined macro will reflect the name of the file currently
+ being processed.
+ </listitem>
+ <listitem>
+ Any macros defined in the included file are scoped to that file.
+ </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>
+ <anchor id="quickbook.syntax.block.import.example"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
+ function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ lists
+ </listitem>
+ <listitem>
+ etc.
+ </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>
+ <calloutlist></calloutlist>
+ </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 <calloutlist></calloutlist>
+ </para>
+ </para>
+ <anchor id="quickbook.syntax.block.import.code_snippet_markup"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <anchor id="quickbook.syntax.block.import.special_comments"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <anchor id="quickbook.syntax.block.import.callouts"/>
+ <bridgehead renderas="sect5">
+ <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>
+ <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> <!--quickbook-escape-prefix--><phrase role="callout_bug"><co id="quickbook0co" linkends="quickbook0" /></phrase><!--quickbook-escape-postfix-->
+<phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <!--quickbook-escape-prefix--><phrase role="callout_bug"><co id="quickbook1co" linkends="quickbook1" /></phrase><!--quickbook-escape-postfix-->
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="quickbook0co" id="quickbook0"><para> The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
+ for details</ulink> </para></callout><callout arearefs="quickbook1co" id="quickbook1"><para> return 'em, foo-bar man! </para></callout></calloutlist>
+ </para>
+ </para>
+ <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>
+ <para>
+ </para>
+ <blockquote>
+ <para>
+ <para>
+ <emphasis>Section contributed by Julio M. Merino Vidal</emphasis>
+ </para>
+ </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>
+ 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>.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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.
+ </listitem>
+ <listitem>
+ 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>.
+ </listitem>
+ <listitem>
+ 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>.
+ </listitem>
+ <listitem>
+ 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).
+ </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>
+ 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>).
+ </listitem>
+ <listitem>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </listitem>
+ <listitem>
+ 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>.
+ </listitem>
+ <listitem>
+ 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:
+ </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>
+ 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>).
+ </listitem>
+ <listitem>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </listitem>
+ <listitem>
+ 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>.
+ </listitem>
+ <listitem>
+ 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:
+ </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>
+ <para>
+ <emphasis>Section contributed by Dean Michael Berris</emphasis>
+ </para>
+ </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>
+ </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>
+ <anchor id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_"/>
+ <bridgehead renderas="sect3">
+ <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>
+ <para>
+ <emphasis>Faq contributed by Michael Marcin</emphasis>
+ </para>
+ </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<literal>images/my_project_logo.png
+ &lt;xsl:param&gt;boost.image.alt</literal>&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"> <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>
+ <para>
+
+<programlisting><!--quickbook-escape-prefix--># one
+# two
+# three
+<!--quickbook-escape-postfix--></programlisting>
+ </para>
+ </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>
+ <para>
+
+<programlisting><!--quickbook-escape-prefix-->* one
+* two
+* three
+<!--quickbook-escape-postfix--></programlisting>
+ </para>
+ </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>
+ <para>
+
+<programlisting><!--quickbook-escape-prefix-->[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </para>
+ </entry><entry>
+ <para>
+ <link linkend="quickbook.syntax.block.tables">Tables</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ variablelist
+ </para>
+ </entry><entry>
+ <para>
+
+<programlisting><!--quickbook-escape-prefix-->[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </para>
+ </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>
+
\ No newline at end of file

Modified: branches/release/tools/quickbook/test/quickbook-manual.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/quickbook-manual.quickbook (original)
+++ branches/release/tools/quickbook/test/quickbook-manual.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,1225 +1,1981 @@
-[article Quickbook
- [quickbook 1.3]
- [version 1.3]
- [authors [de Guzman, Joel], [Niebler, Eric]]
- [copyright 2002 2004 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 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 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 __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]]
-
-[section:intro Introduction]
-
-[:[*['["Why program by hand in five days what you can spend five years of your
-life automating?]]]\n\n-- 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.
-
-[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) ]'''
-]
-
-[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.
-
-* Simple markups cannot nest. You can combine a simple markup with a nestable 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 line, 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 line.
- We do not want the rest of the document to be rendered bold just because we
- forgot a trailing '*'.
-* 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*]]]
-]
-
-[blurb __note__ 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.]
-
-[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.
-
-[blurb __note__
-Note that 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\]]]]
-]
-
-[blurb __note__ The source mode strings are lowercase.]
-
-[endsect]
-[section line-break]
-
-[pre'''
-[br]
-''']
-
-[blurb __note__ Note that `\n` is now preferred over `[br]`.]
-
-[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 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]
-[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 or enum. 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>
-'''
-
-[blurb __alert__ 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. Note that `\n`
-is now preferred over `[br]`.
-
-[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].
-
-[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)
-
-Macros that are already defined are expanded in source code. Example:
-
-[pre'''
-[def __syntax_highlight__ [@quickbook/highlight.html syntax_highlight]]
-[def __quickbook__ [@index.html quickbook]]
-
- using __quickbook__::__syntax_highlight__;
-''']
-
-Generates:
-
-[def __syntax_highlight__ [@quickbook/highlight.html syntax_highlight]]
-[def __quickbook__ [@index.html quickbook]]
-
- using __quickbook__::__syntax_highlight__;
-
-[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 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 '\]' while 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
-
-[blurb __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 Blurbs]
-
-[pre'''
-[blurb :-) [*An eye catching advertisement or note...]\n\n
- __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...]\n\n
- __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++.
-]
-
-[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 very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- ]
- ]
- [
- [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 very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- A very big cell...A very big cell...A very big cell...
- ]
- ]
- [
- [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 be 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.
-
-As the number of included QuickBook files grows, so too does the
-likelihood of two sections having the same name. Since QuickBook generates
-an anchor for each section based on the section name, it is possible to
-end up with two identically named anchors, leading to link ambiguities.
-To resolve these ambiguities, the [^\[include\]] directive lets you
-specify a document id to use for the included file. You can use it like
-this:
-
-[pre'''
-[include:someid someother.qbk]
-''']
-
-When using this form, all auto-generated anchors will use "someid" as
-a unique prefix. So for instance, if there is a 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]
-[endsect]
-[endsect]
-[section:ref Quick Reference]
-
-[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__]]
- [[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__]]
- [[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] [[^# one\n# two\n# three\n]] [__ordered_lists__]]
- [[unordered list] [[^\* one\n\* two\n\* three\n]] [__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__]]
- [[blurb] [[^'''[blurb advertisement or note...]''']] [__blurbs__]]
- [[admonition] [[^'''[warning Warning text...]''']] [__admonitions__]]
- [[table] [[^[table Title\n \[\[a\]\[b\]\[c\]\]\n \[\[a\]\[b\]\[c\]\]\n\]]] [__tables__]]
- [[variablelist] [[^[variablelist Title\n \[\[a\]\[b\]\]\n \[\[a\]\[b\]\]\n\]]] [__variable_lists__]]
- [[include] [[^'''[include someother.qbk]''']] [__include__]]
-]
-
-[endsect]
+[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]

Copied: branches/release/tools/quickbook/test/templates.gold (from r41096, /trunk/tools/quickbook/test/templates.gold)
==============================================================================
--- /trunk/tools/quickbook/test/templates.gold (original)
+++ branches/release/tools/quickbook/test/templates.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,70 +1,70 @@
-<?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">
-<article id="templates" name="Templates" dirname="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Templates</title>
- <section id="templates.templates">
- <title><link linkend="templates.templates">Templates</link></title>
- <para>
- nullary_arg
- </para>
- <para>
- foo baz
- </para>
- <para>
- <para>
- foo baz
- </para>
- </para>
- <para>
- <para>
- This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
- kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
- </para>
- </para>
- <para>
- <hey>baz</hey>
- </para>
- <para>
- <para>
- This is a complete paragraph. madagascar madagascar madagascar madagascar
- madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
- </para>
- </para>
- <para>
- zoom peanut zoom
- </para>
- <para>
- exactly xanadu
- </para>
- <para>
- wx
- </para>
- <para>
- wxyz wxyz trail
- </para>
- <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>
- <para>
- x<superscript>2</superscript>
- </para>
- <para>
- &alpha;<superscript>2</superscript>
- </para>
- <para>
- x<superscript>2</superscript>
- </para>
- <para>
- got a banana?
- </para>
- </section>
-</article>
+<?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">
+<article id="templates" name="Templates" dirname="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Templates</title>
+ <section id="templates.templates">
+ <title><link linkend="templates.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ <para>
+ foo baz
+ </para>
+ </para>
+ <para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+ <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>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ </section>
+</article>

Copied: branches/release/tools/quickbook/test/templates.quickbook (from r41096, /trunk/tools/quickbook/test/templates.quickbook)
==============================================================================
--- /trunk/tools/quickbook/test/templates.quickbook (original)
+++ branches/release/tools/quickbook/test/templates.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,96 +1,96 @@
-[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]]
-
-[endsect]
+[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]]
+
+[endsect]

Copied: branches/release/tools/quickbook/test/xinclude.gold (from r41096, /trunk/tools/quickbook/test/xinclude.gold)
==============================================================================
--- /trunk/tools/quickbook/test/xinclude.gold (original)
+++ branches/release/tools/quickbook/test/xinclude.gold 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,9 +1,9 @@
-<?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">
-<article id="include" name="Include" dirname="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Include</title>
- <xi:include href="../../../../../../../../../tools/quickbook/test/stub.xml" />
-</article>
+<?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">
+<article id="include" name="Include" dirname="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Include</title>
+ <xi:include href="../../../../../../../../../tools/quickbook/test/stub.xml" />
+</article>

Copied: branches/release/tools/quickbook/test/xinclude.quickbook (from r41096, /trunk/tools/quickbook/test/xinclude.quickbook)
==============================================================================
--- /trunk/tools/quickbook/test/xinclude.quickbook (original)
+++ branches/release/tools/quickbook/test/xinclude.quickbook 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,4 +1,4 @@
-[article Include]
-
-[xinclude stub.xml]
-
+[article Include]
+
+[xinclude stub.xml]
+

Deleted: branches/release/tools/regression/build/Jamfile.v2
==============================================================================
--- branches/release/tools/regression/build/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,41 +0,0 @@
-# Regression test status reporting tools build Jamfile
-
-exe process_jam_log
- :
- ../process_jam_log.cpp ../detail/tiny_xml.cpp
- /boost/filesystem//boost_filesystem
- :
- :
- release
- ;
-
-exe compiler_status
- :
- ../compiler_status.cpp ../detail/tiny_xml.cpp
- /boost/filesystem//boost_filesystem
- :
- :
- release
- ;
-
-install dist-bin
- :
- process_jam_log
- compiler_status
- :
- <install-type>EXE
- <location>../../../dist/bin
- :
- release
- ;
-
-install dist-lib
- :
- process_jam_log
- compiler_status
- :
- <install-type>LIB
- <location>../../../dist/lib
- :
- release
- ;

Modified: branches/release/tools/regression/build/vcide/process_jam_log.vcproj
==============================================================================
--- branches/release/tools/regression/build/vcide/process_jam_log.vcproj (original)
+++ branches/release/tools/regression/build/vcide/process_jam_log.vcproj 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -4,6 +4,7 @@
         Version="7.10"
         Name="process_jam_log"
         ProjectGUID="{9A751791-929F-496A-8DE7-B61020619BFA}"
+ RootNamespace="process_jam_log"
         Keyword="MakeFileProj">
         <Platforms>
                 <Platform
@@ -17,14 +18,16 @@
                         ConfigurationType="0">
                         <Tool
                                 Name="VCNMakeTool"
- BuildCommandLine="cd ..\..\..\..\tools\regression\build
-..\..\jam\src\bin.ntx86\bjam.exe variant=debug
+ BuildCommandLine="cd ..\..\..\..\tools\regression\build
+..\..\jam\src\bin.ntx86\bjam.exe process_jam_log variant=debug
 "
- ReBuildCommandLine="cd ..\..\..\..\tools\regression\build
-..\..\jam\src\bin.ntx86\bjam.exe -a variant=debug
-
+ ReBuildCommandLine="cd ..\..\..\..\tools\regression\build
+call bjam --v2 msvc-7.1 debug clean
+call bjam --v2 msvc-7.1 debug"
+ CleanCommandLine="cd ..\..\..\..\tools\regression\build
+call bjam --v2 msvc-7.1 debug clean
 "
- Output="process_jam_log.exe"/>
+ Output="../../../../bin.v2/tools/regression/build/msvc-7.1/debug/link-static/process_jam_log.exe"/>
                 </Configuration>
                 <Configuration
                         Name="Release|Win32"
@@ -33,9 +36,13 @@
                         ConfigurationType="0">
                         <Tool
                                 Name="VCNMakeTool"
- BuildCommandLine="cd C:\users\misha\Stuff\boost\boost\tools\regression\build"
- ReBuildCommandLine="cd C:\users\misha\Stuff\boost\boost\tools\regression\build"
- Output="process_jam_log.exe"/>
+ BuildCommandLine="cd ..
+..\..\jam\src\bin.ntx86\bjam process_jam_log variant=release link=static"
+ ReBuildCommandLine="cd ..
+..\..\jam\src\bin.ntx86\bjam -a process_jam_log variant=release link=static"
+ CleanCommandLine="cd ..
+..\..\jam\src\bin.ntx86\bjam clean"
+ Output="..\..\..\..\bin.v2\tools\regression\build\msvc-7.1\release\link-static\process_jam_log.exe"/>
                 </Configuration>
         </Configurations>
         <References>
@@ -45,9 +52,6 @@
                         Name="Source Files"
                         Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
                         UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
- <File
- RelativePath="..\..\process_jam_log.cpp">
- </File>
                 </Filter>
                 <Filter
                         Name="Header Files"

Deleted: branches/release/tools/regression/compiler_status.cpp
==============================================================================
--- branches/release/tools/regression/compiler_status.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,975 +0,0 @@
-// Generate Compiler Status HTML from jam regression test output -----------//
-
-// 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)
-
-// See http://www.boost.org/tools/regression/ for documentation.
-
-/*******************************************************************************
-
- This program was designed to work unchanged on all platforms and
- configurations. All output which is platform or configuration dependent
- is obtained from external sources such as the .xml file from
- process_jam_log execution, the tools/build/xxx-tools.jam files, or the
- output of the config_info tests.
-
- Please avoid adding platform or configuration dependencies during
- program maintenance.
-
-*******************************************************************************/
-
-#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/fstream.hpp"
-#include "detail/tiny_xml.hpp"
-namespace fs = boost::filesystem;
-namespace xml = boost::tiny_xml;
-
-#include <cstdlib> // for abort, exit
-#include <string>
-#include <vector>
-#include <set>
-#include <map>
-#include <algorithm>
-#include <iostream>
-#include <fstream>
-#include <ctime>
-#include <stdexcept>
-#include <cassert>
-
-using std::string;
-
-const string pass_msg( "Pass" );
-const string warn_msg( "<i>Warn</i>" );
-const string fail_msg( "<font color=\"#FF0000\"><i>Fail</i></font>" );
-const string note_msg( "<sup>*</sup>" );
-const string missing_residue_msg( "<i>Missing</i>" );
-
-const std::size_t max_compile_msg_size = 10000;
-
-namespace
-{
- fs::path boost_root; // boost-root complete path
- fs::path locate_root; // locate-root (AKA ALL_LOCATE_TARGET) complete path
-
- bool ignore_pass;
- bool no_warn;
- bool no_links;
- bool boost_build_v2;
-
- fs::path jamfile_path;
-
- fs::directory_iterator end_itr;
-
- // It's immportant for reliability that we find the same compilers for each
- // test, and that they match the column header. So save the names at the
- // time column headings are generated.
- std::vector<string> toolsets;
-
- fs::ifstream jamfile;
- fs::ofstream report;
- fs::ofstream links_file;
- string links_name;
-
- fs::path notes_path;
- string notes_html;
-
- fs::path notes_map_path;
- typedef std::multimap< string, string > notes_map; // key is test_name-toolset,
- // value is note bookmark
- notes_map notes;
-
- string specific_compiler; // if running on one toolset only
-
- const string empty_string;
-
- // prefix for library and test hyperlink prefix
- string cvs_root ( "http://boost.cvs.sourceforge.net/" );
- string url_prefix_dir_view( cvs_root + "boost/boost" );
- string url_prefix_checkout_view( cvs_root + "*checkout*/boost/boost" );
- string url_suffix_text_view( "?view=markup&rev=HEAD" );
-
-// build notes_bookmarks from notes HTML -----------------------------------//
-
- void build_notes_bookmarks()
- {
- if ( notes_map_path.empty() ) return;
- fs::ifstream notes_map_file( notes_map_path );
- if ( !notes_map_file )
- {
- std::cerr << "Could not open --notes-map input file: " << notes_map_path.string() << std::endl;
- std::exit( 1 );
- }
- string line;
- while( std::getline( notes_map_file, line ) )
- {
- string::size_type pos = 0;
- if ( (pos = line.find( ',', pos )) == string::npos ) continue;
- string key(line.substr( 0, pos ) );
- string bookmark( line.substr( pos+1 ) );
-
-// std::cout << "inserting \"" << key << "\",\"" << bookmark << "\"\n";
- notes.insert( notes_map::value_type( key, bookmark ) );
- }
- }
-
-// load_notes_html ---------------------------------------------------------//
-
- bool load_notes_html()
- {
- if ( notes_path.empty() ) return false;
- fs::ifstream notes_file( notes_path );
- if ( !notes_file )
- {
- std::cerr << "Could not open --notes input file: " << notes_path.string() << std::endl;
- std::exit( 1 );
- }
- string line;
- bool in_body( false );
- while( std::getline( notes_file, line ) )
- {
- if ( in_body && line.find( "</body>" ) != string::npos ) in_body = false;
- if ( in_body ) notes_html += line;
- else if ( line.find( "<body>" ) ) in_body = true;
- }
- return true;
- }
-
-// relative path between two paths -----------------------------------------//
-
- void relative_path( const fs::path & from, const fs::path & to,
- fs::path & target )
- {
- if ( from.string().size() <= to.string().size() ) return;
- target /= "..";
- relative_path( from.branch_path(), to, target );
- return;
- }
-
-// extract object library name from target directory string ----------------//
-
- string extract_object_library_name( const string & s )
- {
- string t( s );
- string::size_type pos = t.find( "/build/" );
- if ( pos != string::npos ) pos += 7;
- else if ( (pos = t.find( "/test/" )) != string::npos ) pos += 6;
- else return "";
- return t.substr( pos, t.find( "/", pos ) - pos );
- }
-
-// find_file ---------------------------------------------------------------//
-// given a directory to recursively search
-
- bool find_file( const fs::path & dir_path, const string & name,
- fs::path & path_found, const string & ignore_dir_named="" )
- {
- if ( !fs::exists( dir_path ) ) return false;
- for ( fs::directory_iterator itr( dir_path ); itr != end_itr; ++itr )
- if ( fs::is_directory( *itr )
- && itr->leaf() != ignore_dir_named )
- {
- if ( find_file( *itr, name, path_found ) ) return true;
- }
- else if ( itr->leaf() == name )
- {
- path_found = *itr;
- return true;
- }
- return false;
- }
-
-// platform_desc -----------------------------------------------------------//
-// from locate_root/status/bin/config_info.test/xxx/.../config_info.output
-
- string platform_desc()
- {
- string result;
- fs::path dot_output_path;
-
- // the gcc config_info "Detected Platform" sometimes reports "cygwin", so
- // prefer any of the other compilers.
- if ( find_file( locate_root / "bin/boost/status/config_info.test",
- "config_info.output", dot_output_path, "gcc" )
- || find_file( locate_root / "bin/boost/status/config_info.test",
- "config_info.output", dot_output_path )
- || find_file( locate_root / "status/bin/config_info.test",
- "config_info.output", dot_output_path, "gcc" )
- || find_file( locate_root / "status/bin/config_info.test",
- "config_info.output", dot_output_path ) )
- {
- fs::ifstream file( dot_output_path );
- if ( file )
- {
- while( std::getline( file, result ) )
- {
- if ( result.find( "Detected Platform: " ) == 0 )
- {
- result.erase( 0, 19 );
- return result;
- }
- }
- result.clear();
- }
- }
- return result;
- }
-
-// version_desc ------------------------------------------------------------//
-// from locate-root/status/bin/config_info.test/xxx/.../config_info.output
-
- string version_desc( const string & compiler_name )
- {
- string result;
- fs::path dot_output_path;
- if ( find_file( locate_root / "bin/boost/status/config_info.test"
- / compiler_name, "config_info.output", dot_output_path )
- || find_file( locate_root / "status/bin/config_info.test"
- / compiler_name, "config_info.output", dot_output_path ) )
- {
- fs::ifstream file( dot_output_path );
- if ( file )
- {
- if( std::getline( file, result ) )
- {
- string::size_type pos = result.find( "version " );
- if ( pos != string::npos )
- {
- result.erase( 0, pos+8 );
- }
- else result.clear();
- }
- }
- }
- return result;
- }
-
-// compiler_desc -----------------------------------------------------------//
-// from boost-root/tools/build/xxx-tools.jam
-
- string compiler_desc( const string & compiler_name )
- {
- string result;
- fs::path tools_path( boost_root / "tools/build/v1" / (compiler_name
- + "-tools.jam") );
- if ( !fs::exists( tools_path ) )
- tools_path = boost_root / "tools/build" / (compiler_name + "-tools.jam");
- fs::ifstream file( tools_path );
- if ( file )
- {
- while( std::getline( file, result ) )
- {
- if ( result.substr( 0, 3 ) == "#//" )
- {
- result.erase( 0, 3 );
- return result;
- }
- }
- result.clear();
- }
- return result;
- }
-
-// target_directory --------------------------------------------------------//
-// this amounts to a request to find a unique leaf directory
-
- fs::path target_directory( const fs::path & root )
- {
- if ( !fs::exists( root ) ) return fs::path("no-such-path");
- fs::path child;
- for ( fs::directory_iterator itr( root ); itr != end_itr; ++itr )
- {
- if ( fs::is_directory( *itr ) )
- {
- // SunCC creates an internal subdirectory everywhere it writes
- // object files. This confuses the target_directory() algorithm.
- // This patch ignores the SunCC internal directory. Jens Maurer
- if ( (*itr).leaf() == "SunWS_cache" ) continue;
- // SGI does something similar for template instantiations. Jens Maurer
- if( (*itr).leaf() == "ii_files" ) continue;
-
- if ( child.empty() ) child = *itr;
- else
- {
- std::cout << "Warning: only first of two target possibilities will be reported for: \n "
- << root.string() << ": " << child.leaf()
- << " and " << (*itr).leaf() << "\n";
- }
- }
- }
- if ( child.empty() ) return root; // this dir has no children
- return target_directory( child );
- }
-
-// element_content ---------------------------------------------------------//
-
- const string & element_content(
- const xml::element & root, const string & name )
- {
- static string empty_string;
- xml::element_list::const_iterator itr;
- for ( itr = root.elements.begin();
- itr != root.elements.end() && (*itr)->name != name;
- ++itr ) {}
- return itr != root.elements.end() ? (*itr)->content : empty_string;
- }
-
-// find_element ------------------------------------------------------------//
-
- const xml::element empty_element;
-
- const xml::element & find_element(
- const xml::element & root, const string & name )
- {
- xml::element_list::const_iterator itr;
- for ( itr = root.elements.begin();
- itr != root.elements.end() && (*itr)->name != name;
- ++itr ) {}
- return itr != root.elements.end() ? *((*itr).get()) : empty_element;
- }
-
-// attribute_value ----------------------------------------------------------//
-
-const string & attribute_value( const xml::element & element,
- const string & attribute_name )
-{
- static const string empty_string;
- xml::attribute_list::const_iterator atr;
- for ( atr = element.attributes.begin();
- atr != element.attributes.end() && atr->name != attribute_name;
- ++atr ) {}
- return atr == element.attributes.end() ? empty_string : atr->value;
-}
-
-// find_bin_path -----------------------------------------------------------//
-
-// Takes a relative path from boost root to a Jamfile.
-// Returns the directory where the build targets from
-// that Jamfile are located. If not found, emits a warning
-// and returns empty path.
-const fs::path find_bin_path(const string& relative)
-{
- fs::path bin_path;
- if (boost_build_v2)
- {
- bin_path = locate_root / "bin.v2" / relative;
- if (!fs::exists(bin_path))
- {
- std::cerr << "warning: could not find build results for '"
- << relative << "'.\n";
- std::cerr << "warning: tried directory "
- << bin_path.native_directory_string() << "\n";
- bin_path = "";
- }
- }
- else
- {
- bin_path = locate_root / "bin/boost" / relative;
- if (!fs::exists(bin_path))
- {
- bin_path = locate_root / "bin" / relative / "bin";
- if (!fs::exists(bin_path))
- {
- bin_path = fs::path( locate_root / relative / "bin" );
- if (!fs::exists(bin_path))
- {
- bin_path = fs::path( locate_root / "bin/boost/libs" /
- relative.substr( relative.find( '/' )+1 ) );
- }
- }
- }
- if (!fs::exists(bin_path))
- {
- std::cerr << "warning: could not find build results for '"
- << relative << "'.\n";
- bin_path = "";
- }
- }
- return bin_path;
-}
-
-
-// generate_report ---------------------------------------------------------//
-
- // return 0 if nothing generated, 1 otherwise, except 2 if compiler msgs
- int generate_report( const xml::element & db,
- const string & source_library_name,
- const string & test_type,
- const string & test_name, // possibly object library name
- const string & toolset,
- bool pass,
- bool always_show_run_output = false )
- {
- // compile msgs sometimes modified, so make a local copy
- string compile( ((pass && no_warn)
- ? empty_string : element_content( db, "compile" )) );
-
- const string & link( pass ? empty_string : element_content( db, "link" ) );
- const string & run( (pass && !always_show_run_output)
- ? empty_string : element_content( db, "run" ) );
- string lib( (pass ? empty_string : element_content( db, "lib" )) );
-
- // some compilers output the filename even if there are no errors or
- // warnings; detect this if one line of output and it contains no space.
- string::size_type pos = compile.find( '\n', 1 );
- if ( pos != string::npos && compile.size()-pos <= 2
- && compile.find( ' ' ) == string::npos ) compile.clear();
-
- if ( lib.empty()
- && (compile.empty() || test_type == "compile_fail")
- && link.empty() && run.empty() ) return 0;
-
- int result = 1; // some kind of msg for sure
-
- // limit compile message length
- if ( compile.size() > max_compile_msg_size )
- {
- compile.erase( max_compile_msg_size );
- compile += "...\n (remainder deleted because of excessive size)\n";
- }
-
- links_file << "<h2><a name=\""
- << source_library_name << "-" << test_name << "-" << toolset << "\">"
- << source_library_name << " - " << test_name << " - " << toolset << "</a></h2>\n";
-
- if ( !compile.empty() )
- {
- ++result;
- links_file << "<h3>Compiler output:</h3><pre>"
- << compile << "</pre>\n";
- }
- if ( !link.empty() )
- links_file << "<h3>Linker output:</h3><pre>" << link << "</pre>\n";
- if ( !run.empty() )
- links_file << "<h3>Run output:</h3><pre>" << run << "</pre>\n";
-
- // for an object library failure, generate a reference to the object
- // library failure message, and (once only) generate the object
- // library failure message itself
- static std::set< string > failed_lib_target_dirs; // only generate once
- if ( !lib.empty() )
- {
- if ( lib[0] == '\n' ) lib.erase( 0, 1 );
- string object_library_name( extract_object_library_name( lib ) );
-
- // changing the target directory naming scheme breaks
- // extract_object_library_name()
- assert( !object_library_name.empty() );
- if ( object_library_name.empty() )
- std::cerr << "Failed to extract object library name from " << lib << "\n";
-
- links_file << "<h3>Library build failure: </h3>\n"
- "See <a href=\"#"
- << source_library_name << "-"
- << object_library_name << "-" << toolset << "\">"
- << source_library_name << " - "
- << object_library_name << " - " << toolset << "</a>";
-
- if ( failed_lib_target_dirs.find( lib ) == failed_lib_target_dirs.end() )
- {
- failed_lib_target_dirs.insert( lib );
- fs::path pth( locate_root / lib / "test_log.xml" );
- fs::ifstream file( pth );
- if ( file )
- {
- xml::element_ptr db = xml::parse( file, pth.string() );
- generate_report( *db, source_library_name, test_type, object_library_name, toolset, false );
- }
- else
- {
- links_file << "<h2><a name=\""
- << object_library_name << "-" << toolset << "\">"
- << object_library_name << " - " << toolset << "</a></h2>\n"
- "test_log.xml not found\n";
- }
- }
- }
- return result;
- }
-
- // add_notes --------------------------------------------------------------//
-
- void add_notes( const string & key, bool fail, string & sep, string & target )
- {
- notes_map::const_iterator itr = notes.lower_bound( key );
- if ( itr != notes.end() && itr->first == key )
- {
- for ( ; itr != notes.end() && itr->first == key; ++itr )
- {
- string note_desc( itr->second[0] == '-'
- ? itr->second.substr( 1 ) : itr->second );
- if ( fail || itr->second[0] == '-' )
- {
- target += sep;
- sep = ",";
- target += "<a href=\"";
- target += "#";
- target += note_desc;
- target += "\">";
- target += note_desc;
- target += "</a>";
- }
- }
- }
- }
-
- // get_notes -------------------------------------------------------------//
-
- string get_notes( const string & toolset,
- const string & library, const string & test, bool fail )
- {
- string sep;
- string target( "<sup>" );
- add_notes( toolset + "/" + library + "/" + test, fail, sep, target );
- add_notes( "*/" + library + "/" + test, fail, sep, target );
- add_notes( toolset + "/" + library + "/*", fail, sep, target );
- add_notes( "*/" + library + "/*", fail, sep, target );
- if ( target == "<sup>" ) target.clear();
- else target += "</sup>";
- return target;
- }
-
- // do_cell ---------------------------------------------------------------//
-
- bool do_cell( const string & lib_name,
- const fs::path & test_dir,
- const string & test_type,
- const string & test_name,
- const string & toolset,
- string & target,
- bool always_show_run_output )
- // return true if any results except pass_msg
- {
- fs::path target_dir( target_directory( test_dir / toolset ) );
- bool pass = false;
-
- if ( !fs::exists( target_dir / "test_log.xml" ) )
- {
- std::cerr << "Missing jam_log.xml in target:\n "
- << target_dir.string() << "\n";
- target += "<td>" + missing_residue_msg + "</td>";
- return true;
- }
-
- int anything_generated = 0;
- bool note = false;
-
- fs::path pth( target_dir / "test_log.xml" );
- fs::ifstream file( pth );
- if ( !file ) // could not open jam_log.xml
- {
- std::cerr << "Can't open jam_log.xml in target:\n "
- << target_dir.string() << "\n";
- target += "<td>" + missing_residue_msg + "</td>";
- return false;
- }
-
- xml::element_ptr dbp = xml::parse( file, pth.string() );
- const xml::element & db( *dbp );
-
- std::string test_type_base( test_type );
- if ( test_type_base.size() > 5 )
- {
- const string::size_type trailer = test_type_base.size() - 5;
- if ( test_type_base.substr( trailer ) == "_fail" )
- {
- test_type_base.erase( trailer );
- }
- }
- if ( test_type_base.size() > 4 )
- {
- const string::size_type trailer = test_type_base.size() - 4;
- if ( test_type_base.substr( trailer ) == "_pyd" )
- {
- test_type_base.erase( trailer );
- }
- }
- const xml::element & test_type_element( find_element( db, test_type_base ) );
-
- pass = !test_type_element.name.empty()
- && attribute_value( test_type_element, "result" ) != "fail";
-
- if ( !no_links )
- {
- note = attribute_value( test_type_element, "result" ) == "note";
-
- // generate bookmarked report of results, and link to it
- anything_generated
- = generate_report( db, lib_name, test_type, test_name, toolset, pass,
- always_show_run_output || note );
- }
-
- // generate the status table cell pass/warn/fail HTML
- target += "<td>";
- if ( anything_generated != 0 )
- {
- target += "<a href=\"";
- target += links_name;
- target += "#";
- target += lib_name;
- target += "-";
- target += test_name;
- target += "-";
- target += toolset;
- target += "\">";
- target += pass
- ? (anything_generated < 2 ? pass_msg : warn_msg)
- : fail_msg;
- target += "</a>";
- if ( pass && note ) target += note_msg;
- }
- else target += pass ? pass_msg : fail_msg;
-
- // if notes, generate the superscript HTML
- if ( !notes.empty() )
- target += get_notes( toolset, lib_name, test_name, !pass );
-
- target += "</td>";
- return (anything_generated != 0) || !pass;
- }
-
-// do_row ------------------------------------------------------------------//
-
- void do_row(
- const fs::path & test_dir, // locate_root / "status/bin/any_test.test"
- const string & test_name, // "any_test"
- string & target )
- {
- // get library name, test-type, test-program path, etc., from the .xml file
- string lib_name;
- string test_path( test_name ); // test_name is default if missing .test
- string test_type( "unknown" );
- bool always_show_run_output( false );
- fs::path xml_file_path;
- if ( find_file( test_dir, "test_log.xml", xml_file_path ) )
- {
- fs::ifstream file( xml_file_path );
- if ( file )
- {
- xml::element_ptr dbp = xml::parse( file, xml_file_path.string() );
- const xml::element & db( *dbp );
- test_path = attribute_value( db, "test-program" );
- lib_name = attribute_value( db, "library" );
- test_type = attribute_value( db, "test-type" );
- always_show_run_output
- = attribute_value( db, "show-run-output" ) == "true";
- }
- }
-
- // generate the library name, test name, and test type table data
- string::size_type row_start_pos = target.size();
- target += "<tr><td><a href=\"" + url_prefix_dir_view + "/libs/" + lib_name
- + "\">" + lib_name + "</a></td>";
- target += "<td><a href=\"" + url_prefix_checkout_view + "/" + test_path
- + url_suffix_text_view + "\">" + test_name + "</a></td>";
- target += "<td>" + test_type + "</td>";
-
- bool no_warn_save = no_warn;
- //if ( test_type.find( "fail" ) != string::npos ) no_warn = true;
-
- // for each compiler, generate <td>...</td> html
- bool anything_to_report = false;
- for ( std::vector<string>::const_iterator itr=toolsets.begin();
- itr != toolsets.end(); ++itr )
- {
- anything_to_report |= do_cell( lib_name, test_dir, test_type, test_name, *itr, target,
- always_show_run_output );
- }
-
- target += "</tr>";
- if ( ignore_pass && !anything_to_report ) target.erase( row_start_pos );
- no_warn = no_warn_save;
- }
-
-// do_rows_for_sub_tree ----------------------------------------------------//
-
- void do_rows_for_sub_tree(
- const fs::path & bin_dir, std::vector<string> & results )
- {
- for ( fs::directory_iterator itr( bin_dir ); itr != end_itr; ++itr )
- {
- if ( fs::is_directory( *itr )
- && itr->string().find( ".test" ) == (itr->string().size()-5) )
- {
- results.push_back( std::string() );
- do_row( *itr,
- itr->leaf().substr( 0, itr->leaf().size()-5 ),
- results[results.size()-1] );
- }
- }
- }
-
-// do_table_body -----------------------------------------------------------//
-
- void do_table_body( const fs::path & bin_dir )
- {
- // rows are held in a vector so they can be sorted, if desired.
- std::vector<string> results;
-
- // do primary bin directory
- do_rows_for_sub_tree( bin_dir, results );
-
- // do subinclude bin directories
- jamfile.clear();
- jamfile.seekg(0);
- string line;
- while( std::getline( jamfile, line ) )
- {
- bool v2(false);
- string::size_type pos( line.find( "subinclude" ) );
- if ( pos == string::npos ) {
- pos = line.find( "build-project" );
- v2 = true;
- }
- if ( pos != string::npos
- && line.find( '#' ) > pos )
- {
- if (v2)
- pos = line.find_first_not_of( " \t./", pos+13 );
- else
- pos = line.find_first_not_of( " \t./", pos+10 );
-
- if ( pos == string::npos ) continue;
- string subinclude_bin_dir(
- line.substr( pos, line.find_first_of( " \t", pos )-pos ) );
-
- fs::path bin_path = find_bin_path(subinclude_bin_dir);
- if (!bin_path.empty())
- do_rows_for_sub_tree( bin_path, results );
- }
- }
-
-
- std::sort( results.begin(), results.end() );
-
- for ( std::vector<string>::iterator v(results.begin());
- v != results.end(); ++v )
- { report << *v << "\n"; }
- }
-
-// do_table ----------------------------------------------------------------//
-
- void do_table()
- {
- // Find test result locations, trying:
- // - Boost.Build V1 location with ALL_LOCATE_TARGET
- // - Boost.Build V2 location with top-lelve "build-dir"
- // - Boost.Build V1 location without ALL_LOCATE_TARGET
- string relative( fs::initial_path().string() );
- relative.erase( 0, boost_root.string().size()+1 );
- fs::path bin_path = find_bin_path(relative);
-
- report << "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n";
-
- // generate the column headings
-
- report << "<tr><td>Library</td><td>Test Name</td>\n"
- "<td><a href=\"compiler_status.html#test-type\">Test Type</a></td>\n";
-
- fs::directory_iterator itr( bin_path );
- while ( itr != end_itr
- && ((itr->string().find( ".test" ) != (itr->string().size()-5))
- || !fs::is_directory( *itr )))
- ++itr; // bypass chaff
- if ( itr != end_itr )
- {
- fs::directory_iterator compiler_itr( *itr );
- if ( specific_compiler.empty() )
- std::clog << "Using " << itr->string() << " to determine compilers\n";
- for (; compiler_itr != end_itr; ++compiler_itr )
- {
- if ( fs::is_directory( *compiler_itr ) // check just to be sure
- && compiler_itr->leaf() != "test" ) // avoid strange directory (Jamfile bug?)
- {
- if ( specific_compiler.size() != 0
- && specific_compiler != compiler_itr->leaf() ) continue;
- toolsets.push_back( compiler_itr->leaf() );
- string desc( compiler_desc( compiler_itr->leaf() ) );
- string vers( version_desc( compiler_itr->leaf() ) );
- report << "<td>"
- << (desc.size() ? desc : compiler_itr->leaf())
- << (vers.size() ? (string( "<br>" ) + vers ) : string( "" ))
- << "</td>\n";
- }
- }
- }
-
- report << "</tr>\n";
-
- // now the rest of the table body
-
- do_table_body( bin_path );
-
- report << "</table>\n";
- }
-
-} // unnamed namespace
-
-// main --------------------------------------------------------------------//
-
-#define BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE
-#include <boost/test/included/prg_exec_monitor.hpp>
-
-int cpp_main( int argc, char * argv[] ) // note name!
-{
- fs::path comment_path;
- while ( argc > 1 && *argv[1] == '-' )
- {
- if ( argc > 2 && std::strcmp( argv[1], "--compiler" ) == 0 )
- { specific_compiler = argv[2]; --argc; ++argv; }
- else if ( argc > 2 && std::strcmp( argv[1], "--locate-root" ) == 0 )
- { locate_root = fs::path( argv[2], fs::native ); --argc; ++argv; }
- else if ( argc > 2 && std::strcmp( argv[1], "--comment" ) == 0 )
- { comment_path = fs::path( argv[2], fs::native ); --argc; ++argv; }
- else if ( argc > 2 && std::strcmp( argv[1], "--notes" ) == 0 )
- { notes_path = fs::path( argv[2], fs::native ); --argc; ++argv; }
- else if ( argc > 2 && std::strcmp( argv[1], "--notes-map" ) == 0 )
- { notes_map_path = fs::path( argv[2], fs::native ); --argc; ++argv; }
- else if ( std::strcmp( argv[1], "--ignore-pass" ) == 0 ) ignore_pass = true;
- else if ( std::strcmp( argv[1], "--no-warn" ) == 0 ) no_warn = true;
- else if ( std::strcmp( argv[1], "--v2" ) == 0 ) boost_build_v2 = true;
- else if ( argc > 2 && std::strcmp( argv[1], "--jamfile" ) == 0)
- { jamfile_path = fs::path( argv[2], fs::native ); --argc; ++argv; }
- else { std::cerr << "Unknown option: " << argv[1] << "\n"; argc = 1; }
- --argc;
- ++argv;
- }
-
- if ( argc != 3 && argc != 4 )
- {
- std::cerr <<
- "Usage: compiler_status [options...] boost-root status-file [links-file]\n"
- " boost-root is the path to the boost tree root directory.\n"
- " status-file and links-file are paths to the output files.\n"
- "Must be run from directory containing Jamfile\n"
- " options: --compiler name Run for named compiler only\n"
- " --ignore-pass Do not report tests which pass all compilers\n"
- " --no-warn Warnings not reported if test passes\n"
- " --locate-root path Path to ALL_LOCATE_TARGET for bjam;\n"
- " default boost-root.\n"
- " --comment path Path to file containing HTML\n"
- " to be copied into status-file.\n"
- " --notes path Path to file containing HTML\n"
- " to be copied into status-file.\n"
- " --notes-map path Path to file of toolset/test,n lines, where\n"
- " n is number of note bookmark in --notes file.\n"
- " --jamfile path Path to Jamfile. By default \"Jamfile\".\n"
- "Example: compiler_status --compiler gcc /boost-root cs.html cs-links.html\n"
- "Note: Only the leaf of the links-file path and --notes file string are\n"
- "used in status-file HTML links. Thus for browsing, status-file,\n"
- "links-file, and --notes file must all be in the same directory.\n"
- ;
- return 1;
- }
-
- boost_root = fs::path( argv[1], fs::native );
- if ( locate_root.empty() ) locate_root = boost_root;
-
- if (jamfile_path.empty())
- if (boost_build_v2)
- jamfile_path = "Jamfile.v2";
- else
- jamfile_path = "Jamfile";
- jamfile_path = fs::complete( jamfile_path, fs::initial_path() );
- jamfile.open( jamfile_path );
- if ( !jamfile )
- {
- std::cerr << "Could not open Jamfile: " << jamfile_path.native_file_string() << std::endl;
- return 1;
- }
-
- report.open( fs::path( argv[2], fs::native ) );
- if ( !report )
- {
- std::cerr << "Could not open report output file: " << argv[2] << std::endl;
- return 1;
- }
-
- if ( argc == 4 )
- {
- fs::path links_path( argv[3], fs::native );
- links_name = links_path.leaf();
- links_file.open( links_path );
- if ( !links_file )
- {
- std::cerr << "Could not open links output file: " << argv[3] << std::endl;
- return 1;
- }
- }
- else no_links = true;
-
- build_notes_bookmarks();
-
- char run_date[128];
- std::time_t tod;
- std::time( &tod );
- std::strftime( run_date, sizeof(run_date),
- "%X UTC, %A %d %B %Y", std::gmtime( &tod ) );
-
- report << "<html>\n"
- "<head>\n"
- "<title>Boost Compiler Status Automatic Test</title>\n"
- "</head>\n"
- "<body bgcolor=\"#ffffff\" text=\"#000000\">\n"
- "<table border=\"0\">\n"
- "<tr>\n"
- "<td><img border=\"0\" src=\"../boost.png\" width=\"277\" "
- "height=\"86\"></td>\n"
- "<td>\n"
- "<h1>Compiler Status: " + platform_desc() + "</h1>\n"
- "<b>Run Date:</b> "
- << run_date
- << "\n"
- ;
-
- if ( !comment_path.empty() )
- {
- fs::ifstream comment_file( comment_path );
- if ( !comment_file )
- {
- std::cerr << "Could not open \"--comment\" input file: " << comment_path.string() << std::endl;
- return 1;
- }
- char c;
- while ( comment_file.get( c ) ) { report.put( c ); }
- }
-
- report << "</td>\n</table>\n<br>\n";
-
- if ( !no_links )
- {
- links_file
- << "<html>\n"
- "<head>\n"
- "<title>Boost Compiler Status Error Log</title>\n"
- "</head>\n"
- "<body bgcolor=\"#ffffff\" text=\"#000000\">\n"
- "<table border=\"0\">\n"
- "<tr>\n"
- "<td><img border=\"0\" src=\"../boost.png\" width=\"277\" "
- "height=\"86\"></td>\n"
- "<td>\n"
- "<h1>Compiler Status: " + platform_desc() + "</h1>\n"
- "<b>Run Date:</b> "
- << run_date
- << "\n</td>\n</table>\n<br>\n"
- ;
- }
-
- do_table();
-
- if ( load_notes_html() ) report << notes_html << "\n";
-
- report << "</body>\n"
- "</html>\n"
- ;
-
- if ( !no_links )
- {
- links_file
- << "</body>\n"
- "</html>\n"
- ;
- }
- return 0;
-}

Modified: branches/release/tools/regression/index.htm
==============================================================================
--- branches/release/tools/regression/index.htm (original)
+++ branches/release/tools/regression/index.htm 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -5,7 +5,7 @@
 <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
 <meta name="ProgId" content="FrontPage.Editor.Document">
-<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
+<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
 <title>Regression Test Reporting Tools</title>
 </head>
 
@@ -32,12 +32,22 @@
         files.</li>
     <li>Jamfile.v2 - Builds
         process_jam_log and compiler_status executables.</li>
+ <li>Library Status - Runs test
+ programs for one or all boost libraries on
+ your local installation and generates complete tables
+ to show which combinations of libraries, compilers,
+ compiler settings pass and fail at your local installation.</li>
 </ul>
 
 <hr>
 
 <p>Revised <!--webbot bot="Timestamp" startspan s-type="EDITED"
-s-format="%d %B, %Y" -->09 January, 2003<!--webbot bot="Timestamp"
-i-checksum="38582" endspan --></p>
+s-format="%d %B, %Y" -->06 November, 2007<!--webbot bot="Timestamp"
+i-checksum="39367" endspan --></p>
+<p>© Copyright Beman Dawes 2003</p>
+
+<p>Distributed under the Boost Software License, Version 1.0. See
+www.boost.org/LICENSE_1_0.txt</p>
+
 </body>
-</html>
+</html>
\ No newline at end of file

Deleted: branches/release/tools/regression/process_jam_log.cpp
==============================================================================
--- branches/release/tools/regression/process_jam_log.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,801 +0,0 @@
-// process jam regression test output into XML -----------------------------//
-
-// 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)
-
-// See http://www.boost.org/tools/regression for documentation.
-
-#include "detail/tiny_xml.hpp"
-#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/fstream.hpp"
-#include "boost/filesystem/exception.hpp"
-#include "boost/filesystem/convenience.hpp"
-
-#include <iostream>
-#include <string>
-#include <cstring>
-#include <map>
-#include <utility> // for make_pair
-#include <ctime>
-#include <cctype> // for tolower
-
-using std::string;
-namespace xml = boost::tiny_xml;
-namespace fs = boost::filesystem;
-
-#define BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE
-#include <boost/test/included/prg_exec_monitor.hpp>
-
-// options
-
-static bool echo = false;
-static bool create_dirs = false;
-static bool boost_build_v2 = false;
-
-namespace
-{
- struct test_info
- {
- string file_path; // relative boost-root
- string type;
- bool always_show_run_output;
- };
- typedef std::map< string, test_info > test2info_map; // key is test-name
- test2info_map test2info;
-
- fs::path boost_root;
- fs::path locate_root; // ALL_LOCATE_TARGET (or boost_root if none)
-
-// append_html -------------------------------------------------------------//
-
- void append_html( const string & src, string & target )
- {
- // there are a few lines we want to ignore
- if ( src.find( "th target..." ) != string::npos
- || src.find( "cc1plus.exe: warning: changing search order for system directory" ) != string::npos
- || src.find( "cc1plus.exe: warning: as it has already been specified as a non-system directory" ) != string::npos
- ) return;
-
- // on some platforms (e.g. tru64cxx) the following line is a real performance boost
- target.reserve(src.size() * 2 + target.size());
-
- for ( string::size_type pos = 0; pos < src.size(); ++pos )
- {
- if ( src[pos] == '<' ) target += "&lt;";
- else if ( src[pos] == '>' ) target += "&gt;";
- else if ( src[pos] == '&' ) target += "&amp;";
- else target += src[pos];
- }
- }
-
- // timestamp ---------------------------------------------------------------//
-
- string timestamp()
- {
- char run_date[128];
- std::time_t tod;
- std::time( &tod );
- std::strftime( run_date, sizeof(run_date),
- "%Y-%m-%d %X UTC", std::gmtime( &tod ) );
- return string( run_date );
- }
-
-// convert path separators to forward slashes ------------------------------//
-
- void convert_path_separators( string & s )
- {
- for ( string::iterator itr = s.begin(); itr != s.end(); ++itr )
- if ( *itr == '\\' || *itr == '!' ) *itr = '/';
- }
-
-// trim_left ----------------------------------------------------------------//
-
- std::string trim_left( std::string const& s )
- {
- std::string::size_type const pos( s.find_first_not_of(' ') );
- return pos != std::string::npos
- ? s.substr( pos, s.size() - pos + 1 )
- : ""
- ;
- }
-
-
-// split --------------------------------------------------------------------//
-
- std::vector<std::string> split( std::string const& s )
- {
- std::string::size_type const pos( s.find_first_of(' ') );
- std::vector<std::string> result( 1, s.substr( 0, pos ) );
- if ( pos == std::string::npos )
- return result;
-
- std::vector<std::string> const rest( split( trim_left( s.substr( pos, s.size() - pos + 1 ) ) ) );
- result.insert( result.end(), rest.begin(), rest.end() );
- return result;
- }
-
-
-// extract a target directory path from a jam target string ----------------//
-// s may be relative to the initial_path:
-// ..\..\..\libs\foo\build\bin\libfoo.lib\vc7\debug\runtime-link-dynamic\boo.obj
-// s may be absolute:
-// d:\myboost\libs\foo\build\bin\libfoo.lib\vc7\debug\runtime-link-dynamic\boo.obj
-// return path is always relative to the boost directory tree:
-// libs/foo/build/bin/libfs.lib/vc7/debug/runtime-link-dynamic
-
- string target_directory( const string & s )
- {
- string temp( s );
- convert_path_separators( temp );
- temp.erase( temp.find_last_of( "/" ) ); // remove leaf
- temp = split( trim_left( temp ) ).back();
- if ( temp[0] == '.' ) temp.erase( 0, temp.find_first_not_of( "./" ) );
- else temp.erase( 0, locate_root.string().size()+1 );
- if ( echo )
- std::cout << "\ttarget_directory( \"" << s << "\") -> \"" << temp << "\"" << std::endl;
- return temp;
- }
-
- string::size_type target_name_end( const string & s )
- {
- string::size_type pos = s.find( ".test/" );
- if ( pos == string::npos ) pos = s.find( ".dll/" );
- if ( pos == string::npos ) pos = s.find( ".so/" );
- if ( pos == string::npos ) pos = s.find( ".lib/" );
- if ( pos == string::npos ) pos = s.find( ".pyd/" );
- if ( pos == string::npos ) pos = s.find( ".a/" );
- return pos;
- }
-
- string toolset( const string & s )
- {
- string::size_type pos = target_name_end( s );
- if ( pos == string::npos ) pos = s.find( "build/" );
- if ( pos == string::npos ) return "";
- pos = s.find( "/", pos ) + 1;
- return s.substr( pos, s.find( "/", pos ) - pos );
- }
-
- string test_name( const string & s )
- {
- string::size_type pos = target_name_end( s );
- if ( pos == string::npos ) return "";
- string::size_type pos_start = s.rfind( '/', pos ) + 1;
- return s.substr( pos_start,
- (s.find( ".test/" ) != string::npos
- ? pos : s.find( "/", pos )) - pos_start );
- }
-
- // Take a path to a target directory of test, and
- // returns library name corresponding to that path.
- string test_path_to_library_name( string const& path )
- {
- std::string result;
- string::size_type start_pos( path.find( "libs/" ) );
- if ( start_pos != string::npos )
- {
- // The path format is ...libs/functional/hash/test/something.test/....
- // So, the part between "libs" and "test/something.test" can be considered
- // as library name. But, for some libraries tests are located too deep,
- // say numeric/ublas/test/test1 directory, and some libraries have tests
- // in several subdirectories (regex/example and regex/test). So, nested
- // directory may belong to several libraries.
-
- // To disambituate, it's possible to place a 'sublibs' file in
- // a directory. It means that child directories are separate libraries.
- // It's still possible to have tests in the directory that has 'sublibs'
- // file.
-
- std::string interesting;
- start_pos += 5;
- string::size_type end_pos( path.find( ".test/", start_pos ) );
- end_pos = path.rfind('/', end_pos);
- if (path.substr(end_pos - 5, 5) == "/test")
- interesting = path.substr( start_pos, end_pos - 5 - start_pos );
- else
- interesting = path.substr( start_pos, end_pos - start_pos );
-
- // Take slash separate elements until we have corresponding 'sublibs'.
- end_pos = 0;
- for(;;)
- {
- end_pos = interesting.find('/', end_pos);
- if (end_pos == string::npos) {
- result = interesting;
- break;
- }
- result = interesting.substr(0, end_pos);
-
- if ( fs::exists( ( boost_root / "libs" ) / result / "sublibs" ) )
- {
- end_pos = end_pos + 1;
- }
- else
- break;
- }
- }
-
- return result;
- }
-
- // Tries to find target name in the string 'msg', starting from
- // position start.
- // If found, extract the directory name from the target name and
- // stores it in 'dir', and return the position after the target name.
- // Otherwise, returns string::npos.
- string::size_type parse_skipped_msg_aux(const string& msg,
- string::size_type start,
- string& dir)
- {
- dir.clear();
- string::size_type start_pos = msg.find( '<', start );
- if ( start_pos == string::npos ) return string::npos;
- ++start_pos;
- string::size_type end_pos = msg.find( '>', start_pos );
- dir += msg.substr( start_pos, end_pos - start_pos );
- if ( boost_build_v2 )
- {
- // The first letter is a magic value indicating
- // the type of grist.
- convert_path_separators( dir );
- dir.erase( 0, 1 );
- // We need path from root, not from 'status' dir.
- if (dir.find("../") == 0)
- dir.erase(0,3);
- else // dir is always relative to the boost directory tree
- dir.erase( 0, locate_root.string().size()+1 );
- }
- else
- {
- if ( dir[0] == '@' )
- {
- // new style build path, rooted build tree
- convert_path_separators( dir );
- dir.replace( 0, 1, "bin/" );
- }
- else
- {
- // old style build path, integrated build tree
- start_pos = dir.rfind( '!' );
- convert_path_separators( dir );
- string::size_type path_sep_pos = dir.find( '/', start_pos + 1 );
- if ( path_sep_pos != string::npos )
- dir.insert( path_sep_pos, "/bin" );
- else
- {
- // see http://article.gmane.org/gmane.comp.lib.boost.devel/146688;
- // the following code assumes that: a) 'dir' is not empty,
- // b) 'end_pos != string::npos' and c) 'msg' always ends with '...'
- if ( dir[dir.size() - 1] == '@' )
- dir += "/" + msg.substr( end_pos + 1, msg.size() - end_pos - 1 - 3 );
- }
- }
- }
- return end_pos;
- }
-
- // the format of paths is really kinky, so convert to normal form
- // first path is missing the leading "..\".
- // first path is missing "\bin" after "status".
- // second path is missing the leading "..\".
- // second path is missing "\bin" after "build".
- // second path uses "!" for some separators.
- void parse_skipped_msg( const string & msg,
- string & first_dir, string & second_dir )
- {
- string::size_type pos = parse_skipped_msg_aux(msg, 0, first_dir);
- if (pos == string::npos)
- return;
- parse_skipped_msg_aux(msg, pos, second_dir);
- }
-
-// test_log hides database details -----------------------------------------//
-
- class test_log
- : boost::noncopyable
- {
- const string & m_target_directory;
- xml::element_ptr m_root;
- public:
- test_log( const string & target_directory,
- const string & test_name,
- const string & toolset,
- bool force_new_file )
- : m_target_directory( target_directory )
- {
- if ( !force_new_file )
- {
- fs::path pth( locate_root / target_directory / "test_log.xml" );
- fs::ifstream file( pth );
- if ( file ) // existing file
- {
- try
- {
- m_root = xml::parse( file, pth.string() );
- return;
- }
- catch(...)
- {
- // unable to parse existing XML file, fall through
- }
- }
- }
-
- string library_name( test_path_to_library_name( target_directory ) );
-
- test_info info;
- test2info_map::iterator itr( test2info.find( library_name + "/" + test_name ) );
- if ( itr != test2info.end() )
- info = itr->second;
-
- if ( !info.file_path.empty() )
- library_name = test_path_to_library_name( info.file_path );
-
- if ( info.type.empty() )
- {
- if ( target_directory.find( ".lib/" ) != string::npos
- || target_directory.find( ".dll/" ) != string::npos
- || target_directory.find( ".so/" ) != string::npos
- || target_directory.find( ".dylib/" ) != string::npos
- || target_directory.find( "/build/" ) != string::npos
- )
- {
- info.type = "lib";
- }
- else if ( target_directory.find( ".pyd/" ) != string::npos )
- info.type = "pyd";
- }
-
- m_root.reset( new xml::element( "test-log" ) );
- m_root->attributes.push_back(
- xml::attribute( "library", library_name ) );
- m_root->attributes.push_back(
- xml::attribute( "test-name", test_name ) );
- m_root->attributes.push_back(
- xml::attribute( "test-type", info.type ) );
- m_root->attributes.push_back(
- xml::attribute( "test-program", info.file_path ) );
- m_root->attributes.push_back(
- xml::attribute( "target-directory", target_directory ) );
- m_root->attributes.push_back(
- xml::attribute( "toolset", toolset ) );
- m_root->attributes.push_back(
- xml::attribute( "show-run-output",
- info.always_show_run_output ? "true" : "false" ) );
- }
-
- ~test_log()
- {
- fs::path pth( locate_root / m_target_directory / "test_log.xml" );
- if ( create_dirs && !fs::exists( pth.branch_path() ) )
- fs::create_directories( pth.branch_path() );
- fs::ofstream file( pth );
- if ( !file )
- {
- std::cout << "*****Warning - can't open output file: "
- << pth.string() << "\n";
- }
- else xml::write( *m_root, file );
- }
-
- const string & target_directory() const { return m_target_directory; }
-
- void remove_action( const string & action_name )
- // no effect if action_name not found
- {
- xml::element_list::iterator itr;
- for ( itr = m_root->elements.begin();
- itr != m_root->elements.end() && (*itr)->name != action_name;
- ++itr ) {}
- if ( itr != m_root->elements.end() ) m_root->elements.erase( itr );
- }
-
- void add_action( const string & action_name,
- const string & result,
- const string & timestamp,
- const string & content )
- {
- remove_action( action_name );
- xml::element_ptr action( new xml::element(action_name) );
- m_root->elements.push_back( action );
- action->attributes.push_back( xml::attribute( "result", result ) );
- action->attributes.push_back( xml::attribute( "timestamp", timestamp ) );
- action->content = content;
- }
- };
-
-// message_manager maps input messages into test_log actions ---------------//
-
- class message_manager
- : boost::noncopyable
- {
- string m_action_name; // !empty() implies action pending
- // IOW, a start_message awaits stop_message
- string m_target_directory;
- string m_test_name;
- string m_toolset;
-
- bool m_note; // if true, run result set to "note"
- // set false by start_message()
-
- // data needed to stop further compile action after a compile failure
- // detected in the same target directory
- string m_previous_target_directory;
- bool m_compile_failed;
-
- public:
- message_manager() : m_note(false) {}
- ~message_manager() { /*assert( m_action_name.empty() );*/ }
-
- bool note() const { return m_note; }
- void note( bool value ) { m_note = value; }
-
- void start_message( const string & action_name,
- const string & target_directory,
- const string & test_name,
- const string & toolset,
- const string & prior_content )
- {
- assert( !target_directory.empty() );
-
- if ( !m_action_name.empty() ) stop_message( prior_content );
- m_action_name = action_name;
- m_target_directory = target_directory;
- m_test_name = test_name;
- m_toolset = toolset;
- m_note = false;
-
- if ( m_previous_target_directory != target_directory )
- {
- m_previous_target_directory = target_directory;
- m_compile_failed = false;
- }
- }
-
- void stop_message( const string & content )
- {
- if ( m_action_name.empty() ) return;
- stop_message( m_action_name, m_target_directory,
- "succeed", timestamp(), content );
- }
-
- void stop_message( const string & action_name,
- const string & target_directory,
- const string & result,
- const string & timestamp,
- const string & content )
- // the only valid action_names are "compile", "link", "run", "lib"
- {
- // My understanding of the jam output is that there should never be
- // a stop_message that was not preceeded by a matching start_message.
- // That understanding is built into message_manager code.
- assert( m_action_name == action_name );
- assert( m_target_directory == target_directory );
- assert( result == "succeed" || result == "fail" );
-
- // if test_log.xml entry needed
- if ( !m_compile_failed
- || action_name != "compile"
- || m_previous_target_directory != target_directory )
- {
- if ( action_name == "compile"
- && result == "fail" ) m_compile_failed = true;
-
- test_log tl( target_directory,
- m_test_name, m_toolset, action_name == "compile" );
- tl.remove_action( "lib" ); // always clear out lib residue
-
- // dependency removal
- if ( action_name == "lib" )
- {
- tl.remove_action( "compile" );
- tl.remove_action( "link" );
- tl.remove_action( "run" );
- }
- else if ( action_name == "compile" )
- {
- tl.remove_action( "link" );
- tl.remove_action( "run" );
- if ( result == "fail" ) m_compile_failed = true;
- }
- else if ( action_name == "link" )
- {
- tl.remove_action( "run" );
- }
-
- // dependency removal won't work right with random names, so assert
- else { assert( action_name == "run" ); }
-
- // add the "run" stop_message action
- tl.add_action( action_name,
- result == "succeed" && note() ? std::string("note") : result,
- timestamp, content );
- }
-
- m_action_name = ""; // signal no pending action
- m_previous_target_directory = target_directory;
- }
- };
-}
-
-
-// main --------------------------------------------------------------------//
-
-
-int cpp_main( int argc, char ** argv )
-{
- // Turn off synchronization with corresponding C standard library files. This
- // gives a significant speed improvement on platforms where the standard C++
- // streams are implemented using standard C files.
- std::ios::sync_with_stdio(false);
-
- if ( argc <= 1 )
- std::cout << "Usage: bjam [bjam-args] | process_jam_log [--echo] [--create-directories] [--v2] [locate-root]\n"
- "locate-root - the same as the bjam ALL_LOCATE_TARGET\n"
- " parameter, if any. Default is boost-root.\n"
- "create-directories - if the directory for xml file doesn't exists - creates it.\n"
- " usually used for processing logfile on different machine\n";
-
- boost_root = fs::initial_path();
-
- while ( !boost_root.empty()
- && !fs::exists( boost_root / "libs" ) )
- {
- boost_root /= "..";
- }
-
- if ( boost_root.empty() )
- {
- std::cout << "must be run from within the boost-root directory tree\n";
- return 1;
- }
-
- boost_root.normalize();
-
- if ( argc > 1 && std::strcmp( argv[1], "--echo" ) == 0 )
- {
- echo = true;
- --argc; ++argv;
- }
-
-
- if (argc > 1 && std::strcmp( argv[1], "--create-directories" ) == 0 )
- {
- create_dirs = true;
- --argc; ++argv;
- }
-
- if ( argc > 1 && std::strcmp( argv[1], "--v2" ) == 0 )
- {
- boost_build_v2 = true;
- --argc; ++argv;
- }
-
-
- if (argc > 1)
- {
- locate_root = fs::path( argv[1], fs::native );
- if ( !locate_root.is_complete() )
- locate_root = ( fs::initial_path() / locate_root ).normalize();
-
- --argc; ++argv;
- }
- else
- {
- locate_root = boost_root;
- }
-
- std::cout << "boost_root: " << boost_root.string() << '\n'
- << "locate_root: " << locate_root.string() << '\n';
-
- message_manager mgr;
-
- string line;
- string content;
- bool capture_lines = false;
-
- std::istream* input;
- if (argc > 1)
- {
- input = new std::ifstream(argv[1]);
- }
- else
- {
- input = &std::cin;
- }
-
- // This loop looks at lines for certain signatures, and accordingly:
- // * Calls start_message() to start capturing lines. (start_message() will
- // automatically call stop_message() if needed.)
- // * Calls stop_message() to stop capturing lines.
- // * Capture lines if line capture on.
-
- int line_num = 0;
- while ( std::getline( *input, line ) )
- {
- ++line_num;
-
- std::vector<std::string> const line_parts( split( line ) );
- std::string const line_start( line_parts[0] != "...failed"
- ? line_parts[0]
- : line_parts[0] + " " + line_parts[1]
- );
-
- if ( echo )
- {
- std::cout
- << "line " << line_num << ": " << line << "\n"
- << "\tline_start: " << line_start << "\n";
- }
-
- // create map of test-name to test-info
- if ( line_start.find( "boost-test(" ) == 0 )
- {
- string::size_type pos = line.find( '"' );
- string test_name( line.substr( pos+1, line.find( '"', pos+1)-pos-1 ) );
- test_info info;
- info.always_show_run_output
- = line.find( "\"always_show_run_output\"" ) != string::npos;
- info.type = line.substr( 11, line.find( ')' )-11 );
- for (unsigned int i = 0; i!=info.type.size(); ++i )
- { info.type[i] = std::tolower( info.type[i] ); }
- pos = line.find( ':' );
- // the rest of line is missing if bjam didn't know how to make target
- if ( pos + 1 != line.size() )
- {
- info.file_path = line.substr( pos+3,
- line.find( "\"", pos+3 )-pos-3 );
- convert_path_separators( info.file_path );
- if ( info.file_path.find( "libs/libs/" ) == 0 ) info.file_path.erase( 0, 5 );
- if ( test_name.find( "/" ) == string::npos )
- test_name = "/" + test_name;
- test2info.insert( std::make_pair( test_name, info ) );
- // std::cout << test_name << ", " << info.type << ", " << info.file_path << "\n";
- }
- else
- {
- std::cout << "*****Warning - missing test path: " << line << "\n"
- << " (Usually occurs when bjam doesn't know how to make a target)\n";
- }
- continue;
- }
-
- // these actions represent both the start of a new action
- // and the end of a failed action
- else if ( line_start.find( "C++-action" ) != string::npos
- || line_start.find( "vc-C++" ) != string::npos
- || line_start.find( "C-action" ) != string::npos
- || line_start.find( "Cc-action" ) != string::npos
- || line_start.find( "vc-Cc" ) != string::npos
- || line_start.find( ".compile.") != string::npos
- || line_start.find( "compile-") != string::npos
- || line_start.find( "-compile") != string::npos
- || line_start.find( "Link-action" ) != string::npos
- || line_start.find( "vc-Link" ) != string::npos
- || line_start.find( "Archive-action" ) != string::npos
- || line_start.find( ".archive") != string::npos
- || ( line_start.find( ".link") != string::npos &&
- // .linkonce is present in gcc linker messages about
- // unresolved symbols. We don't have to parse those
- line_start.find( ".linkonce" ) == string::npos )
- )
- {
- string action( ( line_start.find( "Link-action" ) != string::npos
- || line_start.find( "vc-Link" ) != string::npos
- || line_start.find( "Archive-action" ) != string::npos
- || line_start.find( ".archive") != string::npos
- || line_start.find( ".link") != string::npos
- )
- ? "link" : "compile"
- );
-
- if ( line_start.find( "...failed " ) != string::npos )
- {
- mgr.stop_message( action, target_directory( line ),
- "fail", timestamp(), content );
- }
- else
- {
- string target_dir( target_directory( line ) );
- mgr.start_message( action, target_dir,
- test_name( target_dir ), toolset( target_dir ), content );
- }
- content = "\n";
- capture_lines = true;
- }
-
- // these actions are only used to stop the previous action
- else if ( line_start.find( "-Archive" ) != string::npos
- || line_start.find( "MkDir" ) == 0 )
- {
- mgr.stop_message( content );
- content.clear();
- capture_lines = false;
- }
-
- else if ( line_start.find( "execute-test" ) != string::npos
- || line_start.find( "capture-output" ) != string::npos )
- {
- if ( line_start.find( "...failed " ) != string::npos )
- {
- mgr.stop_message( "run", target_directory( line ),
- "fail", timestamp(), content );
- content = "\n";
- capture_lines = true;
- }
- else
- {
- string target_dir( target_directory( line ) );
- mgr.start_message( "run", target_dir,
- test_name( target_dir ), toolset( target_dir ), content );
-
- // contents of .output file for content
- capture_lines = false;
- content = "\n";
- fs::ifstream file( locate_root / target_dir
- / (test_name(target_dir) + ".output") );
- if ( file )
- {
- string ln;
- while ( std::getline( file, ln ) )
- {
- if ( ln.find( "<note>" ) != string::npos ) mgr.note( true );
- append_html( ln, content );
- content += "\n";
- }
- }
- }
- }
-
- // bjam indicates some prior dependency failed by a "...skipped" message
- else if ( line_start.find( "...skipped" ) != string::npos
- && line.find( "<directory-grist>" ) == string::npos
- )
- {
- mgr.stop_message( content );
- content.clear();
- capture_lines = false;
-
- if ( line.find( " for lack of " ) != string::npos )
- {
- capture_lines = ( line.find( ".run for lack of " ) == string::npos );
-
- string target_dir;
- string lib_dir;
-
- parse_skipped_msg( line, target_dir, lib_dir );
-
- if ( target_dir != lib_dir ) // it's a lib problem
- {
- mgr.start_message( "lib", target_dir,
- test_name( target_dir ), toolset( target_dir ), content );
- content = lib_dir;
- mgr.stop_message( "lib", target_dir, "fail", timestamp(), content );
- content = "\n";
- }
- }
-
- }
-
- else if ( line_start.find( "**passed**" ) != string::npos
- || line_start.find( "failed-test-file" ) != string::npos
- || line_start.find( "command-file-dump" ) != string::npos )
- {
- mgr.stop_message( content );
- content = "\n";
- capture_lines = true;
- }
-
- else if ( capture_lines ) // hang onto lines for possible later use
- {
- append_html( line, content );;
- content += "\n";
- }
- }
-
- mgr.stop_message( content );
- if (input != &std::cin)
- delete input;
- return 0;
-}

Deleted: branches/release/tools/regression/regression-logs.pl
==============================================================================
--- branches/release/tools/regression/regression-logs.pl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,197 +0,0 @@
-#!/usr/bin/perl
-
-#~ Copyright 2003, Rene Rivera.
-#~ Use, modification and distribution are 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)
-
-use FileHandle;
-use Time::Local;
-
-# Get the whle percent value
-#
-sub percent_value
-{
- my ($count,$total) = @_;
- my $percent = int (($count/$total)*100+0.5);
- if ($count > 0 && $percent == 0) { $percent = 1; }
- if ($count < $total && $percent == 100) { $percent = 99; }
- return $percent;
-}
-
-# Generate item html for the pass column.
-#
-sub result_info_pass
-{
- my ($color,$pass,$warn,$fail,$missing) = @_;
- my $percent = 100-percent_value($fail+$missing,$pass+$warn+$fail+$missing);
- return "<font color=\"$color\"><font size=\"+1\">$percent%</font><br>($warn&nbsp;warnings)</font>";
-}
-
-# Generate item html for the fail column.
-#
-sub result_info_fail
-{
- my ($color,$pass,$warn,$fail,$missing) = @_;
- my $percent = percent_value($fail+$missing,$pass+$warn+$fail+$missing);
- return "<font color=\"$color\"><font size=\"+1\">$percent%</font><br>($fail)</font>";
-}
-
-# Generate an age highlighted run date string.
-# Use as: data_info(run-date-html)
-#
-sub date_info
-{
- my %m = ('January',0,'February',1,'March',2,'April',3,'May',4,'June',5,
- 'July',6,'August',7,'September',8,'October',9,'November',10,'December',11);
- my @d = split(/ |:/,$_[0]);
- my ($hour,$min,$sec,$day,$month,$year) = ($d[0],$d[1],$d[2],$d[4],$m{$d[5]},$d[6]);
- #print "<!-- $hour.$min.$sec.$day.$month.$year -->\n";
- my $test_t = timegm($sec,$min,$hour,$day,$month,$year);
- my $age = time-$test_t;
- my $age_days = $age/(60*60*24);
- #print "<!-- $age_days days old -->\n";
- my $age_html = "<font>";
- if ($age_days <= 2) { }
- elsif ($age_days <= 14) { $age_html = "<font color=\"#FF9900\">"; }
- else { $age_html = "<font color=\"#FF0000\">"; }
- return $age_html.$_[0]."</font>";
-}
-
-# Generate an age string based on the run date.
-# Use as: age_info(run-date-html)
-#
-sub age_info
-{
- my %m = ('January',0,'February',1,'March',2,'April',3,'May',4,'June',5,
- 'July',6,'August',7,'September',8,'October',9,'November',10,'December',11);
- my @d = split(/ |:/,$_[0]);
- my ($hour,$min,$sec,$day,$month,$year) = ($d[0],$d[1],$d[2],$d[4],$m{$d[5]},$d[6]);
- #print "<!-- $hour.$min.$sec.$day.$month.$year -->\n";
- my $test_t = timegm($sec,$min,$hour,$day,$month,$year);
- my $age = time-$test_t;
- my $age_days = $age/(60*60*24);
- #print "<!-- $age_days days old -->\n";
- my $age_html = "<font>";
- if ($age_days <= 2) { }
- elsif ($age_days <= 14) { $age_html = "<font color=\"#FF9900\">"; }
- else { $age_html = "<font color=\"#FF0000\">"; }
- if ($age_days <= 1) { $age_html = $age_html."today"; }
- elsif ($age_days <= 2) { $age_html = $age_html."yesterday"; }
- elsif ($age_days < 14) { my $days = int $age_days; $age_html = $age_html.$days." days"; }
- elsif ($age_days < 7*8) { my $weeks = int $age_days/7; $age_html = $age_html.$weeks." weeks"; }
- else { my $months = int $age_days/28; $age_html = $age_html.$months." months"; }
- return $age_html."</font>";
-}
-
-#~ foreach my $k (sort keys %ENV)
-#~ {
- #~ print "<!-- $k = $ENV{$k} -->\n";
-#~ }
-my $logdir = "$ENV{PWD}";
-#~ my $logdir = "C:\\CVSROOTs\\Boost\\boost\\status";
-opendir LOGS, "$logdir";
-my @logs = grep /.*links[^.]*\.html$/, readdir LOGS;
-closedir LOGS;
-my @bgcolor = ( "bgcolor=\"#EEEEFF\"", "" );
-my $row = 0;
-print "<table>\n";
-print "<tr>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Platform</th>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Run Date</th>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Age</th>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Compilers</th>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Pass</th>\n",
- "<th align=\"left\" bgcolor=\"#DDDDDD\">Fail</th>\n",
- "</tr>\n";
-foreach $l (sort { lc($a) cmp lc($b) } @logs)
-{
- my $log = $l;
- $log =~ s/-links//s;
- my ($spec) = ($log =~ /cs-([^\.]+)/);
- my $fh = new FileHandle;
- if ($fh->open("<$logdir/$log"))
- {
- my $content = join('',$fh->getlines());
- $fh->close;
- my ($status) = ($content =~ /(<h1>Compiler(.(?!<\/td>))+.)/si);
- my ($platform) = ($status =~ /Status: ([^<]+)/si);
- my ($run_date) = ($status =~ /Date:<\/b> ([^<]+)/si);
- $run_date =~ s/, /<br>/g;
- my ($compilers) = ($content =~ /Test Type<\/a><\/t[dh]>((.(?!<\/tr>))+.)/si);
- if ($compilers eq "") { next; }
- $compilers =~ s/-<br>//g;
- $compilers =~ s/<\/td>//g;
- my @compiler = ($compilers =~ /<td>(.*)$/gim);
- my $count = @compiler;
- my @results = ($content =~ /(>Pass<|>Warn<|>Fail<|>Missing<)/gi);
- my $test_count = (scalar @results)/$count;
- my @pass = map { 0 } (1..$count);
- my @warn = map { 0 } (1..$count);
- my @fail = map { 0 } (1..$count);
- my @missing = map { 0 } (1..$count);
- my @total = map { 0 } (1..$count);
- #~ print "<!-- ",
- #~ "pass = ",join(',',@pass)," ",
- #~ "warn = ",join(',',@warn)," ",
- #~ "fail = ",join(',',@fail)," ",
- #~ "missing = ",join(',',@missing)," ",
- #~ "total = ",join(',',@total)," ",
- #~ " -->\n";
- for my $t (1..$test_count)
- {
- my $r0 = (($t-1)*$count);
- my $r1 = (($t-1)*$count+$count-1);
- my @r = @results[(($t-1)*$count)..(($t-1)*$count+$count-1)];
- #~ print "<!-- ",
- #~ "result = ",join(',',@r)," ",
- #~ "range = ",$r0,"..",$r1," (",(scalar @results),")",
- #~ " -->\n";
- for my $c (1..$count)
- {
- if ($r[$c-1] =~ /Pass/i) { ++$pass[$c-1]; }
- elsif ($r[$c-1] =~ /Warn/i) { ++$warn[$c-1]; }
- elsif ($r[$c-1] =~ /Fail/i) { ++$fail[$c-1]; }
- elsif ($r[$c-1] =~ /Missing/i) { ++$missing[$c-1]; }
- ++$total[$c-1];
- }
- }
- #~ print "<!-- ",
- #~ "pass = ",join(',',@pass)," ",
- #~ "warn = ",join(',',@warn)," ",
- #~ "fail = ",join(',',@fail)," ",
- #~ "missing = ",join(',',@missing)," ",
- #~ "total = ",join(',',@total)," ",
- #~ " -->\n";
- for my $comp (1..(scalar @compiler))
- {
- my @lines = split(/<br>/,$compiler[$comp-1]);
- if (@lines > 2) { $compiler[$comp-1] = join(' ',@lines[0..(scalar @lines)-2])."<br>".$lines[(scalar @lines)-1]; }
- }
- print
- "<tr>\n",
- "<td rowspan=\"$count\" valign=\"top\"><font size=\"+1\">$platform</font><br>(<a href=\"./$log\">$spec</a>)</td>\n",
- "<td rowspan=\"$count\" valign=\"top\">",$run_date,"</td>\n",
- "<td rowspan=\"$count\" valign=\"top\">",age_info($run_date),"</td>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",$compiler[0],"</td>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",result_info_pass("#000000",$pass[0],$warn[0],$fail[0],$missing[0]),"</td>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",result_info_fail("#FF0000",$pass[0],$warn[0],$fail[0],$missing[0]),"</td>\n",
- "</tr>\n";
- $row = ($row+1)%2;
- foreach my $c (1..($count-1))
- {
- print
- "<tr>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",$compiler[$c],"</td>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",result_info_pass("#000000",$pass[$c],$warn[$c],$fail[$c],$missing[$c]),"</td>\n",
- "<td valign=\"top\" ",$bgcolor[$row],">",result_info_fail("#FF0000",$pass[$c],$warn[$c],$fail[$c],$missing[$c]),"</td>\n",
- "</tr>\n";
- $row = ($row+1)%2;
- }
- print
- "<tr>\n",
- "<td colspan=\"7\"><hr size=\"1\" noshade></td>\n",
- "</tr>\n";
- }
-}
-print "</table>\n";

Deleted: branches/release/tools/regression/run_tests.sh
==============================================================================
--- branches/release/tools/regression/run_tests.sh 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,191 +0,0 @@
-#!/bin/sh
-#
-# shell script for running the boost regression test suite and generating
-# a html table of results.
-
-# Set the following variables to configure the operation. Variables you
-# should set, i.e. usually required are listed first. Optional variables
-# have reasonable defaults for most situations.
-
-
-### THESE SHOULD BE CHANGED!
-
-#
-# "boost_root" points to the root of you boost installation:
-# This can be either a non-exitent directory or an already complete Boost
-# source tree.
-#
-boost_root="$HOME/CVSROOTs/Boost/boost_regression"
-
-#
-# Wether to fetch the most current Boost code from CVS (yes/no):
-# There are two contexts to use this script in: on an active Boost CVS
-# tree, and on a fresh Boost CVS tree. If "yes" is specified here an attempt
-# to fetch the latest CVS Boost files is made. For an active Boost CVS
-# the CVS connection information is used. If an empty tree is detected
-# the code is fetched with the anonymous read only information.
-#
-cvs_update=no
-
-#
-# "test_tools" are the Boost.Build toolsets to use for building and running the
-# regression tests. Specify a space separated list, of the Boost.Build toolsets.
-# Each will be built and tested in sequence.
-#
-test_tools=gcc
-
-#
-# "toolset" is the Boost.Build toolset to use for building the helper programs.
-# This is usually different than the toolsets one is testing. And this is
-# normally a toolset that corresponds to the compiler built into your platform.
-#
-toolset=gcc
-
-#
-# "comment_path" is the path to an html-file describing the test environment.
-# The content of this file will be embedded in the status pages being produced.
-#
-comment_path="$boost_root/../regression_comment.html"
-#
-# "test_dir" is the relative path to the directory to run the tests in,
-# defaults to "status" and runs all the tests, but could be a sub-directory
-# for example "libs/regex/test" to run the regex tests alone.
-#
-test_dir="status"
-
-
-### DEFAULTS ARE OK FOR THESE.
-
-#
-# "exe_suffix" the suffix used by exectable files:
-# In case your platform requires use of a special suffix for executables specify
-# it here, including the "." if needed. This should not be needed even in Windows
-# like platforms as they will execute without the suffix anyway.
-#
-exe_suffix=
-
-#
-# "bjam" points to your built bjam executable:
-# The location of the binary for running bjam. The default should work
-# under most circumstances.
-#
-bjam="$boost_root/tools/jam/src/bin/bjam$exe_suffix"
-
-#
-# "process_jam_log", and "compiler_status" paths to built helper programs:
-# The location of the executables of the regression help programs. These
-# are built locally so the default should work in most situations.
-#
-process_jam_log="$boost_root/dist/bin/process_jam_log$exe_suffix"
-compiler_status="$boost_root/dist/bin/compiler_status$exe_suffix"
-
-#
-# "boost_build_path" can point to additional locations to find toolset files.
-#
-boost_build_path="$HOME/.boost-build"
-
-
-### NO MORE CONFIGURABLE PARTS.
-
-#
-# Some setup.
-#
-boost_dir=`basename "$boost_root"`
-if test -n "${BOOST_BUILD_PATH}" ; then
- BOOST_BUILD_PATH="$boost_build_path:$BOOST_BUILD_PATH"
-else
- BOOST_BUILD_PATH="$boost_build_path"
-fi
-export BOOST_BUILD_PATH
-
-#
-# STEP 0:
-#
-# Get the source code:
-#
-if test ! -d "$boost_root" ; then
- mkdir -p "$boost_root"
- if test $? -ne 0 ; then
- echo "creation of $boost_root directory failed."
- exit 256
- fi
-fi
-if test $cvs_update = yes ; then
- echo fetching Boost:
- echo "/1 :pserver:anonymous_at_[hidden]:2401/cvsroot/boost A" >> "$HOME/.cvspass"
- cat "$HOME/.cvspass" | sort | uniq > "$HOME/.cvspass"
- cd `dirname "$boost_root"`
- if test -f boost/CVS/Root ; then
- cvs -z3 -d `cat "$boost_dir/CVS/Root"` co -d "$boost_dir" boost
- else
- cvs -z3 -d :pserver:anonymous_at_[hidden]:2401/cvsroot/boost co -d "$boost_dir" boost
- fi
-fi
-
-#
-# STEP 1:
-# rebuild bjam if required:
-#
-echo building bjam:
-cd "$boost_root/tools/jam/src" && \
-LOCATE_TARGET=bin sh ./build.sh
-if test $? != 0 ; then
- echo "bjam build failed."
- exit 256
-fi
-
-#
-# STEP 2:
-# rebuild the regression test helper programs if required:
-#
-echo building regression test helper programs:
-cd "$boost_root/tools/regression/build" && \
-"$bjam" $toolset release
-if test $? != 0 ; then
- echo "helper program build failed."
- exit 256
-fi
-
-#
-# STEP 5:
-# repeat steps 3 and 4 for each additional toolset:
-#
-for tool in $test_tools ; do
-
-#
-# STEP 3:
-# run the regression tests:
-#
-echo running the $tool regression tests:
-cd "$boost_root/$test_dir"
-"$bjam" $tool --dump-tests 2>&1 | tee regress.log
-
-#
-# STEP 4:
-# post process the results:
-#
-echo processing the regression test results for $tool:
-cat regress.log | "$process_jam_log" --v2
-if test $? != 0 ; then
- echo "Failed regression log post processing."
- exit 256
-fi
-
-done
-
-#
-# STEP 6:
-# create the html table:
-#
-uname=`uname`
-echo generating html tables:
-"$compiler_status" --v2 --comment "$comment_path" "$boost_root" cs-$uname.html cs-$uname-links.html
-if test $? != 0 ; then
- echo "Failed HTML result table generation."
- exit 256
-fi
-
-echo "done!"
-
-
-

Modified: branches/release/tools/regression/xsl_reports/boost_wide_report.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/boost_wide_report.py (original)
+++ branches/release/tools/regression/xsl_reports/boost_wide_report.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 
-# Copyright (c) MetaCommunications, Inc. 2003-2005
+# Copyright (c) MetaCommunications, Inc. 2003-2007
 #
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
@@ -188,10 +188,11 @@
                 os.unlink( result )
     
 class merge_xml_action( action ):
- def __init__( self, source, destination, expected_results_file, failures_markup_file ):
+ def __init__( self, source, destination, expected_results_file, failures_markup_file, tag ):
         action.__init__( self, destination )
         self.source_ = source
         self.destination_ = destination
+ self.tag_ = tag
         
         self.expected_results_file_ = expected_results_file
         self.failures_markup_file_ = failures_markup_file
@@ -261,6 +262,7 @@
                 , {
                     "expected_results_file" : self.expected_results_file_
                   , "failures_markup_file": self.failures_markup_file_
+ , "source" : self.tag_
                   }
                 )
 
@@ -304,19 +306,22 @@
         utils.makedirs( os.path.join( os.path.dirname( self.links_file_path_ ), "developer", "output" ) )
         utils.makedirs( os.path.join( os.path.dirname( self.links_file_path_ ), "user", "output" ) )
         utils.log( ' Making test output files...' )
- utils.libxslt(
- utils.log
- , self.source_
- , xsl_path( 'links_page.xsl' )
- , self.links_file_path_
- , {
- 'source': self.tag_
- , 'run_date': self.run_date_
- , 'comment_file': self.comment_file_
- , 'explicit_markup_file': self.failures_markup_file_
- }
- )
-
+ try:
+ utils.libxslt(
+ utils.log
+ , self.source_
+ , xsl_path( 'links_page.xsl' )
+ , self.links_file_path_
+ , {
+ 'source': self.tag_
+ , 'run_date': self.run_date_
+ , 'comment_file': self.comment_file_
+ , 'explicit_markup_file': self.failures_markup_file_
+ }
+ )
+ except Exception, msg:
+ utils.log( ' Skipping "%s" due to errors (%s)' % ( self.source_, msg ) )
+
         open( self.file_path_, "w" ).close()
 
 
@@ -381,7 +386,7 @@
     for a in actions:
         a.run()
    
-def merge_xmls_task( source_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file ):
+def merge_xmls_task( source_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file, tag ):
     utils.log( '' )
     utils.log( 'merge_xmls_task: merging updated XMLs in "%s"...' % source_dir )
     __log__ = 1
@@ -391,7 +396,8 @@
     actions = [ merge_xml_action( os.path.join( processed_dir, os.path.basename( x ) )
                                   , x
                                   , expected_results_file
- , failures_markup_file ) for x in target_files ]
+ , failures_markup_file
+ , tag ) for x in target_files ]
 
     for a in actions:
         a.run()
@@ -484,7 +490,7 @@
         ftp_task( ftp_site, site_path, incoming_dir )
 
     unzip_archives_task( incoming_dir, processed_dir, utils.unzip )
- merge_xmls_task( incoming_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file )
+ merge_xmls_task( incoming_dir, processed_dir, merged_dir, expected_results_file, failures_markup_file, tag )
     make_links_task( merged_dir
                      , output_dir
                      , tag
@@ -666,18 +672,20 @@
 def fix_file_names( dir ):
     """
     The current version of xslproc doesn't correctly handle
- spaces on posix systems. We have to manually go through the
- result set and correct decode encoded spaces (%20).
+ spaces. We have to manually go through the
+ result set and decode encoded spaces (%20).
     """
- if os.name == 'posix':
- for root, dirs, files in os.walk( dir ):
- for file in files:
- if file.find( "%20" ) > -1:
- new_name = file.replace( "%20", " " )
- old_file_path = os.path.join( root, file )
- new_file_path = os.path.join( root, new_name )
- print "renaming %s %s" % ( old_file_path, new_file_path )
- os.rename ( old_file_path, new_file_path )
+ utils.log( 'Fixing encoded file names...' )
+ for root, dirs, files in os.walk( dir ):
+ for file in files:
+ if file.find( "%20" ) > -1:
+ new_name = file.replace( "%20", " " )
+ utils.rename(
+ utils.log
+ , os.path.join( root, file )
+ , os.path.join( root, new_name )
+ )
+
 
 def build_xsl_reports(
           locate_root_dir
@@ -793,7 +801,7 @@
     print 'Usage: %s [options]' % os.path.basename( sys.argv[0] )
     print '''
 \t--locate-root the same as --locate-root in compiler_status
-\t--tag the tag for the results (i.e. 'CVS-HEAD')
+\t--tag the tag for the results (i.e. 'trunk')
 \t--expected-results the file with the results to be compared with
 \t the current run
 \t--failures-markup the file with the failures markup

Modified: branches/release/tools/regression/xsl_reports/email_maintainers.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/email_maintainers.py (original)
+++ branches/release/tools/regression/xsl_reports/email_maintainers.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2005 The Trustees of Indiana University
+# Copyright (C) 2005, 2007 The Trustees of Indiana University
 # Author: Douglas Gregor
 #
 # Distributed under the Boost Software License, Version 1.0. (See
@@ -14,7 +14,7 @@
 import datetime
 import sys
 
-report_author = "Douglas Gregor <dgregor_at_[hidden]>"
+report_author = "Douglas Gregor <dgregor_at_[hidden]>"
 boost_dev_list = "Boost Developer List <boost_at_[hidden]>"
 
 def sorted_keys( dict ):
@@ -150,12 +150,12 @@
             return None
 
         # Build the message header
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
 To: """
         message += self.name + ' <' + self.email + '>'
         message += """
 Reply-To: boost_at_[hidden]
-Subject: Regressions in your Boost libraries as of """
+Subject: Failures in your Boost libraries as of """
         message += str(datetime.date.today()) + " [" + report.branch + "]"
         message += """
 
@@ -204,7 +204,7 @@
     """
     The complete report of all failing test cases.
     """
- def __init__(self, branch = 'HEAD'):
+ def __init__(self, branch = 'trunk'):
         self.branch = branch
         self.date = None
         self.url = None
@@ -287,11 +287,12 @@
 
     def getIssuesEmail(self):
         """
- Retrieve the issues email from MetaComm, trying a few times in
- case something wonky is happening. If we can retrieve the file,
- calls parseIssuesEmail and return True; otherwise, return False.
+ Retrieve the issues email from beta.boost.org, trying a few
+ times in case something wonky is happening. If we can retrieve
+ the file, calls parseIssuesEmail and return True; otherwise,
+ return False.
         """
- base_url = "http://engineering.meta-comm.com/boost-regression/CVS-"
+ base_url = "http://beta.boost.org/development/tests/"
         base_url += self.branch
         base_url += "/developer/";
         got_issues = False
@@ -368,17 +369,15 @@
         Compose a message to send to the Boost developer's
         list. Return the message and return it.
         """
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
 To: boost_at_[hidden]
 Reply-To: boost_at_[hidden]
-Subject: Boost regression notification ("""
-
- message += str(datetime.date.today()) + " [" + branch + "]"
- message += ")"
-
+Subject: [Report] """
+ message += str(self.numFailures()) + " failures on " + branch
+ message += " (" + str(datetime.date.today()) + ")"
         message += """
 
-Boost Regression test failures
+Boost regression test failures
 """
         message += "Report time: " + self.date + """
 
@@ -408,8 +407,7 @@
         message += (str(self.numFailures()) + ' failures in ' +
                     str(len(self.libraries)) + ' libraries')
         if any_broken_platforms:
- diff = self.numFailures() - self.numReportableFailures()
- message += ' (' + str(diff) + ' are from non-broken platforms)'
+ message += ' (' + str(self.numReportableFailures()) + ' are from non-broken platforms)'
         message += '\n'
 
         # Display the number of failures per library
@@ -507,7 +505,7 @@
   if '--send' in sys.argv:
       print "Sending..."
       smtp = smtplib.SMTP('milliways.osl.iu.edu')
- smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
+ smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
                     to_addrs = person[1],
                     msg = message)
       print "Done."
@@ -516,12 +514,12 @@
 # Send a message to the developer's list
 def send_boost_developers_message(branch, maintainers, failing_libraries):
   to_line = 'boost_at_[hidden]'
- from_line = 'Douglas Gregor <dgregor_at_[hidden]>'
+ from_line = 'Douglas Gregor <dgregor_at_[hidden]>'
 
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
 To: boost_at_[hidden]
 Reply-To: boost_at_[hidden]
-Subject: Boost regression notification ("""
+Subject: Boost regression testing notification ("""
 
   message += str(datetime.date.today()) + " [" + branch + "]"
   message += ")"
@@ -567,7 +565,7 @@
 ###############################################################################
 
 # Parse command-line options
-branch = "HEAD"
+branch = "trunk"
 for arg in sys.argv:
     if arg.startswith("--branch="):
         branch = arg[len("--branch="):]
@@ -583,14 +581,14 @@
 if not okay:
     print 'Aborting.'
     if '--send' in sys.argv:
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
- To: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ To: Douglas Gregor <dgregor_at_[hidden]>
         Reply-To: boost_at_[hidden]
         Subject: Regression status script failed on """
         message += str(datetime.date.today()) + " [" + branch + "]"
         smtp = smtplib.SMTP('milliways.osl.iu.edu')
- smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
- to_addrs = 'dgregor_at_[hidden]',
+ smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
+ to_addrs = 'dgregor_at_[hidden]',
                       msg = message)
     sys.exit(1)
 

Modified: branches/release/tools/regression/xsl_reports/make_snapshot.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/make_snapshot.py (original)
+++ branches/release/tools/regression/xsl_reports/make_snapshot.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,5 +1,5 @@
 
-# Copyright (c) MetaCommunications, Inc. 2003-2005
+# Copyright (c) MetaCommunications, Inc. 2003-2007
 #
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
@@ -37,27 +37,24 @@
             os.system( 'rm -f -r "%s"' % path )
 
 
-def cvs_command( user, command ):
- cmd = 'cvs -d:ext:%(user)s_at_[hidden]:/cvsroot/boost -z9 %(command)s' \
- % { 'user': user, 'command': command }
-
- utils.log( 'Executing CVS command "%s"' % cmd )
- rc = os.system( cmd )
+def svn_command( command ):
+ utils.log( 'Executing SVN command "%s"' % command )
+ rc = os.system( command )
     if rc != 0:
- raise Exception( 'CVS command "%s" failed with code %d' % ( cmd, rc ) )
-
+ raise Exception( 'SVN command "%s" failed with code %d' % ( command, rc ) )
 
 
-def cvs_export( working_dir, user, tag ):
- if tag != 'CVS-HEAD':
- command = 'export -r %s boost' % tag
+def svn_export( sources_dir, user, tag ):
+ if user is None or user == 'anonymous':
+ command = 'svn export --force http://svn.boost.org/svn/boost/%s %s' % ( tag, sources_dir )
     else:
- command = 'export -r HEAD boost'
+ command = 'svn export --force --non-interactive --username=%s https://svn.boost.org/svn/boost/%s %s' \
+ % ( user, tag, sources_dir )
 
- os.chdir( working_dir )
- retry(
- cvs_command
- , ( user, command )
+ os.chdir( os.path.basename( sources_dir ) )
+ retry(
+ svn_command
+ , ( command, )
        )
 
 
@@ -67,46 +64,47 @@
         , user
         , site_dir
         ):
+ timestamp = time.time()
+ timestamp_suffix = time.strftime( '%y-%m-%d-%H%M', time.gmtime( timestamp ) )
+
+ tag_suffix = tag.split( '/' )[-1]
+ sources_dir = os.path.join(
+ working_dir
+ , 'boost-%s-%s' % ( tag_suffix, timestamp_suffix )
+ )
 
- sources_dir = os.path.join( working_dir, 'boost' )
     if os.path.exists( sources_dir ):
         utils.log( 'Directory "%s" already exists, cleaning it up...' % sources_dir )
         rmtree( sources_dir )
 
     try:
         os.mkdir( sources_dir )
- utils.log( 'Exporting files from CVS...' )
- cvs_export( working_dir, user, tag )
+ utils.log( 'Exporting files from SVN...' )
+ svn_export( sources_dir, user, tag )
     except:
         utils.log( 'Cleaning up...' )
         rmtree( sources_dir )
         raise
 
- timestamp = time.time()
- timestamped_dir_name = 'boost-%s-%s' % ( tag, time.strftime( '%y-%m-%d-%H%M', time.gmtime( timestamp ) ) )
- timestamped_dir = os.path.join( working_dir, timestamped_dir_name )
-
- utils.log( 'Renaming "%s" to "%s"...' % ( sources_dir, timestamped_dir ) )
- os.rename( sources_dir, timestamped_dir )
 
- tarball_name = 'boost-%s.tar.bz2' % tag
+ tarball_name = 'boost-%s.tar.bz2' % tag_suffix
     tarball_path = os.path.join( working_dir, tarball_name )
 
- utils.log( 'Archiving "%s" to "%s"...' % ( timestamped_dir, tarball_path ) )
+ utils.log( 'Archiving "%s" to "%s"...' % ( sources_dir, tarball_path ) )
     tar = tarfile.open( tarball_path, 'w|bz2' )
     tar.posix = False # see http://tinyurl.com/4ebd8
 
- tar.add( timestamped_dir, timestamped_dir_name )
+ tar.add( sources_dir, os.path.basename( sources_dir ) )
     tar.close()
 
- tarball_timestamp_path = os.path.join( working_dir, 'boost-%s.timestamp' % tag )
+ tarball_timestamp_path = os.path.join( working_dir, 'boost-%s.timestamp' % tag_suffix )
 
     utils.log( 'Writing timestamp into "%s"...' % tarball_timestamp_path )
     timestamp_file = open( tarball_timestamp_path, 'w' )
     timestamp_file.write( '%f' % timestamp )
     timestamp_file.close()
 
- md5sum_path = os.path.join( working_dir, 'boost-%s.md5' % tag )
+ md5sum_path = os.path.join( working_dir, 'boost-%s.md5' % tag_suffix )
     utils.log( 'Writing md5 checksum into "%s"...' % md5sum_path )
     old_dir = os.getcwd()
     os.chdir( os.path.dirname( tarball_path ) )
@@ -123,8 +121,8 @@
         shutil.move( os.path.join( temp_site_dir, tarball_name ), site_dir )
         shutil.move( tarball_timestamp_path, site_dir )
         shutil.move( md5sum_path, site_dir )
- utils.log( 'Removing "%s"...' % timestamped_dir )
- rmtree( timestamped_dir )
+ utils.log( 'Removing "%s"...' % sources_dir )
+ rmtree( sources_dir )
 
 
 def accept_args( args ):
@@ -138,7 +136,8 @@
         ]
         
     options = {
- '--tag': 'CVS-HEAD'
+ '--tag': 'trunk'
+ , '--user': None
         , '--site-dir': None
         }
     
@@ -156,8 +155,8 @@
     print 'Usage: %s [options]' % os.path.basename( sys.argv[0] )
     print '''
 \t--working-dir working directory
-\t--tag snapshot tag (i.e. 'CVS-HEAD')
-\t--user SourceForge user name for a CVS account
+\t--tag snapshot tag (i.e. 'trunk')
+\t--user Boost SVN user ID (optional)
 \t--site-dir site directory to copy the snapshot to (optional)
 '''
 

Modified: branches/release/tools/regression/xsl_reports/report.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/report.py (original)
+++ branches/release/tools/regression/xsl_reports/report.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -71,7 +71,9 @@
             , test_results_file
             , xsl_path( 'add_expected_results.xsl', v2 )
             , extended_test_results
- , { 'expected_results_file': expected_results_file, 'failures_markup_file' : failures_markup_file }
+ , { 'expected_results_file': expected_results_file
+ , 'failures_markup_file' : failures_markup_file
+ , 'source' : tag }
             )
 
     links = os.path.join( output_dir, 'links.html' )

Modified: branches/release/tools/regression/xsl_reports/runner/collect_and_upload_logs.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/runner/collect_and_upload_logs.py (original)
+++ branches/release/tools/regression/xsl_reports/runner/collect_and_upload_logs.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -10,6 +10,9 @@
 import ftplib
 import time
 import stat
+import xml.dom.minidom
+import xmlrpclib
+import httplib
 
 import os.path
 import string
@@ -42,6 +45,136 @@
         utils.log( 'Walking directory "%s" ...' % input_dir )
         os.path.walk( input_dir, process_test_log_files, test_results_writer )
 
+dart_status_from_result = {
+ 'succeed': 'passed',
+ 'fail': 'failed',
+ 'note': 'passed',
+ '': 'notrun'
+ }
+
+dart_project = {
+ 'trunk': 'Boost_HEAD',
+ '': 'Boost_HEAD'
+ }
+
+dart_track = {
+ 'full': 'Nightly',
+ 'incremental': 'Continuous',
+ '': 'Experimental'
+ }
+
+ascii_only_table = ""
+for i in range(0,256):
+ if chr(i) == '\n' or chr(i) == '\r':
+ ascii_only_table += chr(i)
+ elif i < 32 or i >= 0x80:
+ ascii_only_table += '?'
+ else:
+ ascii_only_table += chr(i)
+
+class xmlrpcProxyTransport(xmlrpclib.Transport):
+ def __init__(self, proxy):
+ self.proxy = proxy
+ def make_connection(self, host):
+ self.realhost = host
+ return httplib.HTTP(self.proxy)
+ def send_request(self, connection, handler, request_body):
+ connection.putrequest('POST','http://%s%s' % (self.realhost,handler))
+ def send_host(self, connection, host):
+ connection.putheader('Host',self.realhost)
+
+
+def publish_test_logs(
+ input_dirs,
+ runner_id, tag, platform, comment_file, timestamp, user, source, run_type,
+ dart_server = None,
+ http_proxy = None,
+ **unused
+ ):
+ __log__ = 1
+ utils.log( 'Publishing test logs ...' )
+ dart_rpc = None
+ dart_dom = {}
+
+ def _publish_test_log_files_ ( unused, dir, names ):
+ for file in names:
+ if os.path.basename( file ) == 'test_log.xml':
+ utils.log( 'Publishing test log "%s"' % os.path.join(dir,file) )
+ if dart_server:
+ log_xml = open(os.path.join(dir,file)).read().translate(ascii_only_table)
+ #~ utils.log( '--- XML:\n%s' % log_xml)
+ #~ It seems possible to get an empty XML result file :-(
+ if log_xml == "": continue
+ log_dom = xml.dom.minidom.parseString(log_xml)
+ test = {
+ 'library': log_dom.documentElement.getAttribute('library'),
+ 'test-name': log_dom.documentElement.getAttribute('test-name'),
+ 'toolset': log_dom.documentElement.getAttribute('toolset')
+ }
+ if not test['test-name'] or test['test-name'] == '':
+ test['test-name'] = 'unknown'
+ if not test['toolset'] or test['toolset'] == '':
+ test['toolset'] = 'unknown'
+ if not dart_dom.has_key(test['toolset']):
+ dart_dom[test['toolset']] = xml.dom.minidom.parseString(
+'''<?xml version="1.0" encoding="UTF-8"?>
+<DartSubmission version="2.0" createdby="collect_and_upload_logs.py">
+ <Site>%(site)s</Site>
+ <BuildName>%(buildname)s</BuildName>
+ <Track>%(track)s</Track>
+ <DateTimeStamp>%(datetimestamp)s</DateTimeStamp>
+</DartSubmission>
+''' % {
+ 'site': runner_id,
+ 'buildname': "%s -- %s (%s)" % (platform,test['toolset'],run_type),
+ 'track': dart_track[run_type],
+ 'datetimestamp' : timestamp
+ } )
+ submission_dom = dart_dom[test['toolset']]
+ for node in log_dom.documentElement.childNodes:
+ if node.nodeType == xml.dom.Node.ELEMENT_NODE:
+ if node.firstChild:
+ log_data = xml.sax.saxutils.escape(node.firstChild.data)
+ else:
+ log_data = ''
+ test_dom = xml.dom.minidom.parseString('''<?xml version="1.0" encoding="UTF-8"?>
+<Test>
+ <Name>.Test.Boost.%(tag)s.%(library)s.%(test-name)s.%(type)s</Name>
+ <Status>%(result)s</Status>
+ <Measurement name="Toolset" type="text/string">%(toolset)s</Measurement>
+ <Measurement name="Timestamp" type="text/string">%(timestamp)s</Measurement>
+ <Measurement name="Log" type="text/text">%(log)s</Measurement>
+</Test>
+ ''' % {
+ 'tag': tag,
+ 'library': test['library'],
+ 'test-name': test['test-name'],
+ 'toolset': test['toolset'],
+ 'type': node.nodeName,
+ 'result': dart_status_from_result[node.getAttribute('result')],
+ 'timestamp': node.getAttribute('timestamp'),
+ 'log': log_data
+ })
+ submission_dom.documentElement.appendChild(
+ test_dom.documentElement.cloneNode(1) )
+
+ for input_dir in input_dirs:
+ utils.log( 'Walking directory "%s" ...' % input_dir )
+ os.path.walk( input_dir, _publish_test_log_files_, None )
+ if dart_server:
+ try:
+ rpc_transport = None
+ if http_proxy:
+ rpc_transport = xmlrpcProxyTransport(http_proxy)
+ dart_rpc = xmlrpclib.ServerProxy(
+ 'http://%s/%s/Command/' % (dart_server,dart_project[tag]),
+ rpc_transport )
+ for dom in dart_dom.values():
+ #~ utils.log('Dart XML: %s' % dom.toxml('utf-8'))
+ dart_rpc.Submit.put(xmlrpclib.Binary(dom.toxml('utf-8')))
+ except Exception, e:
+ utils.log('Dart server error: %s' % e)
+
 
 def upload_to_ftp( tag, results_file, ftp_proxy, debug_level ):
     ftp_site = 'fx.meta-comm.com'
@@ -63,8 +196,9 @@
     try:
         ftp.cwd( tag )
     except ftplib.error_perm:
- ftp.mkd( tag )
- ftp.cwd( tag )
+ for dir in tag.split( '/' ):
+ ftp.mkd( dir )
+ ftp.cwd( dir )
 
     f = open( results_file, 'rb' )
     ftp.storbinary( 'STOR %s' % os.path.basename( results_file ), f )
@@ -132,9 +266,20 @@
         , user
         , source
         , run_type
+ , dart_server = None
+ , http_proxy = None
+ , revision = ''
         , **unused
         ):
     
+ timestamp = time.strftime( '%Y-%m-%dT%H:%M:%SZ', read_timestamp( timestamp_file ) )
+
+ if dart_server:
+ publish_test_logs( [ results_dir ],
+ runner_id, tag, platform, comment_file, timestamp, user, source, run_type,
+ dart_server = dart_server,
+ http_proxy = http_proxy )
+
     results_file = os.path.join( results_dir, '%s.xml' % runner_id )
     results_writer = open( results_file, 'w' )
     utils.log( 'Collecting test logs into "%s"...' % results_file )
@@ -147,9 +292,10 @@
               'tag': tag
             , 'platform': platform
             , 'runner': runner_id
- , 'timestamp': time.strftime( '%Y-%m-%dT%H:%M:%SZ', read_timestamp( timestamp_file ) )
+ , 'timestamp': timestamp
             , 'source': source
             , 'run-type': run_type
+ , 'revision': revision
             }
         )
     
@@ -176,6 +322,7 @@
         , debug_level
         , send_bjam_log = False
         , timestamp_file = None
+ , dart_server = None
         , **unused
         ):
 
@@ -202,9 +349,12 @@
         , user
         , source
         , run_type
+ , revision = None
         , ftp_proxy = None
         , debug_level = 0
         , send_bjam_log = False
+ , dart_server = None
+ , http_proxy = None
         , **unused
         ):
     
@@ -218,6 +368,9 @@
         , user
         , source
         , run_type
+ , revision = revision
+ , dart_server = dart_server
+ , http_proxy = http_proxy
         )
     
     upload_logs(
@@ -229,6 +382,7 @@
         , debug_level
         , send_bjam_log
         , timestamp_file
+ , dart_server = dart_server
         )
 
 
@@ -244,21 +398,28 @@
         , 'run-type='
         , 'user='
         , 'ftp-proxy='
+ , 'proxy='
         , 'debug-level='
         , 'send-bjam-log'
         , 'help'
+ , 'dart-server='
+ , 'revision='
         ]
     
     options = {
- '--tag' : 'CVS-HEAD'
+ '--tag' : 'trunk'
         , '--platform' : sys.platform
         , '--comment' : 'comment.html'
         , '--timestamp' : 'timestamp'
         , '--user' : None
- , '--source' : 'CVS'
+ , '--source' : 'SVN'
         , '--run-type' : 'full'
         , '--ftp-proxy' : None
+ , '--proxy' : None
         , '--debug-level' : 0
+ , '--dart-server' : 'beta.boost.org:8081'
+ , '--revision' : None
+
         }
     
     utils.accept_args( args_spec, args, options, usage )
@@ -274,8 +435,11 @@
         , 'source' : options[ '--source' ]
         , 'run_type' : options[ '--run-type' ]
         , 'ftp_proxy' : options[ '--ftp-proxy' ]
+ , 'http_proxy' : options[ '--proxy' ]
         , 'debug_level' : int(options[ '--debug-level' ])
         , 'send_bjam_log' : options.has_key( '--send-bjam-log' )
+ , 'dart_server' : options[ '--dart-server' ]
+ , 'revision ' : options[ '--revision' ]
         }
 
 
@@ -298,16 +462,19 @@
 \t as a timestamp of the run ("timestamp" by default)
 \t--comment an HTML comment file to be inserted in the reports
 \t ("comment.html" by default)
-\t--tag the tag for the results ("CVS-HEAD" by default)
+\t--tag the tag for the results ("trunk" by default)
 \t--user SourceForge user name for a shell account (optional)
-\t--source where Boost sources came from (e.g. "CVS", "tarball",
-\t "anonymous CVS"; "CVS" by default)
+\t--source where Boost sources came from ("SVN" or "tarball";
+\t "SVN" by default)
 \t--run-type "incremental" or "full" ("full" by default)
 \t--send-bjam-log in addition to regular XML results, send in full bjam
 \t log of the regression run
+\t--proxy HTTP proxy server address and port (e.g.
+\t 'http://www.someproxy.com:3128', optional)
 \t--ftp-proxy FTP proxy server (e.g. 'ftpproxy', optional)
 \t--debug-level debugging level; controls the amount of debugging
 \t output printed; 0 by default (no debug output)
+\t--dart-server The dart server to send results to.
 ''' % '\n\t'.join( commands.keys() )
 
     

Modified: branches/release/tools/regression/xsl_reports/runner/default.css
==============================================================================
--- branches/release/tools/regression/xsl_reports/runner/default.css (original)
+++ branches/release/tools/regression/xsl_reports/runner/default.css 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -70,9 +70,6 @@
 div.figure {
   margin-left: 2em }
 
-div.footer, div.header {
- font-size: smaller }
-
 div.sidebar {
   margin-left: 1em ;
   border: medium outset ;
@@ -109,9 +106,6 @@
 h2.subtitle {
   text-align: center }
 
-hr {
- width: 75% }
-
 ol.simple, ul.simple {
   margin-bottom: 1em }
 

Modified: branches/release/tools/regression/xsl_reports/runner/instructions.html
==============================================================================
--- branches/release/tools/regression/xsl_reports/runner/instructions.html (original)
+++ branches/release/tools/regression/xsl_reports/runner/instructions.html 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,525 +1,109 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<html>
+
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
+<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>Running Boost Regression Tests</title>
-<style type="text/css">
-
-/*
-:Author: David Goodger
-:Contact: goodger_at_[hidden]
-:Date: $Date$
-:Revision: $Revision$
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0 }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
-
-.last, .with-subtitle {
- margin-bottom: 0 ! important }
-
-.hidden {
- display: none }
-
-a.toc-backref {
- text-decoration: none ;
- color: black }
-
-blockquote.epigraph {
- margin: 2em 5em ; }
-
-dl.docutils dd {
- margin-bottom: 0.5em }
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
- font-weight: bold }
-*/
-
-div.abstract {
- margin: 2em 5em }
-
-div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
-*/
-
-div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
-
-div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
-
-div.figure {
- margin-left: 2em ;
- margin-right: 2em }
-
-div.footer, div.header {
- clear: both;
- font-size: smaller }
-
-div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
-
-div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
-
-div.sidebar {
- margin-left: 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
-
-div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
-
-div.system-messages {
- margin: 5em }
-
-div.system-messages h1 {
- color: red }
-
-div.system-message {
- border: medium outset ;
- padding: 1em }
-
-div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
-
-div.topic {
- margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
-
-h1.title {
- text-align: center }
-
-h2.subtitle {
- text-align: center }
-
-hr.docutils {
- width: 75% }
-
-img.align-left {
- clear: left }
-
-img.align-right {
- clear: right }
-
-ol.simple, ul.simple {
- margin-bottom: 1em }
-
-ol.arabic {
- list-style: decimal }
-
-ol.loweralpha {
- list-style: lower-alpha }
-
-ol.upperalpha {
- list-style: upper-alpha }
-
-ol.lowerroman {
- list-style: lower-roman }
-
-ol.upperroman {
- list-style: upper-roman }
-
-p.attribution {
- text-align: right ;
- margin-left: 50% }
-
-p.caption {
- font-style: italic }
-
-p.credits {
- font-style: italic ;
- font-size: smaller }
-
-p.label {
- white-space: nowrap }
-
-p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
-
-p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
-
-p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
-
-p.topic-title {
- font-weight: bold }
-
-pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font-family: serif ;
- font-size: 100% }
-
-pre.literal-block, pre.doctest-block {
- margin-left: 2em ;
- margin-right: 2em ;
- background-color: #eeeeee }
-
-span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
-
-span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
-
-span.interpreted {
- font-family: sans-serif }
-
-span.option {
- white-space: nowrap }
-
-span.pre {
- white-space: pre }
-
-span.problematic {
- color: red }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
-
-table.docinfo {
- margin: 2em 4em }
-
-table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
-
-table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
+<link rel="stylesheet" type="text/css" href="../../../../doc/html/minimal.css">
+</head>
 
-tt.docutils {
- background-color: #eeeeee }
+<body>
 
-ul.auto-toc {
- list-style-type: none }
+<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="831">
+ <tr>
+ <td width="277">
+<a href="../../../../index.htm">
+<img src="../../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="277" height="86" border="0"></a></td>
+ <td width="531" align="middle">
+ <font size="7">Running Boost Regression Tests</font>
+ </td>
+ </tr>
+</table>
 
-</style>
-</head>
-<body>
-<div class="document" id="running-boost-regression-tests">
-<h1 class="title">Running Boost Regression Tests</h1>
-<div class="section">
-<h1><a id="requirements" name="requirements">Requirements</a></h1>
-<ul class="simple">
-<li>Python 2.3 or higher</li>
-<li>Some spare disk space (~5 Gb per each tested compiler)</li>
-</ul>
-<p>That's it! You don't even need a CVS client installed.</p>
-</div>
-<div class="section">
-<h1><a id="installation" name="installation">Installation</a></h1>
-<ul class="simple">
-<li>Download regression driver <tt class="docutils literal"><span class="pre">regression.py</span></tt> from <a class="reference" href="http://boost.cvs.sourceforge.net/*checkout*/boost/boost/tools/regression/xsl_reports/runner/regression.py">here</a> (<a class="reference" href="http://tinyurl.com/uufav">http://tinyurl.com/uufav>)
-and put it in the directory where you want all the regression
-test files to be placed.</li>
-</ul>
+<h2>Requirements</h2>
 <ul>
-<li><p class="first"><strong>Optional</strong>: If you already have <tt class="docutils literal"><span class="pre">bjam</span></tt> and/or <tt class="docutils literal"><span class="pre">process_jam_log</span></tt> executables
-you'd like to use, just put them in the same directory with <tt class="docutils literal"><span class="pre">regression.py</span></tt>, e.g.:</p>
-<pre class="literal-block">
-my_boost_regressions/
- regression.py
- bjam<em>[.exe]</em>
-</pre>
-</li>
-</ul>
-</div>
-<div class="section">
-<h1><a id="running-tests" name="running-tests">Running tests</a></h1>
-<p>To start a regression run, simply run <tt class="docutils literal"><span class="pre">regression.py</span></tt> providing it with the following
-two arguments:</p>
-<ul class="simple">
-<li>runner id (something unique of your choice that will identify your
-results in the reports <a class="footnote-reference" href="#runnerid1" id="id2" name="id2">[1]</a>, <a class="footnote-reference" href="#runnerid2" id="id3" name="id3">[2]</a>)</li>
-<li>a particular set of toolsets you want to test with <a class="footnote-reference" href="#toolsets" id="id4" name="id4">[3]</a>.</li>
-</ul>
-<p>For example:</p>
-<pre class="literal-block">
-python regression.py --runner=Metacomm --toolsets=gcc,vc7
-</pre>
-<p>If you are interested in seeing all available options, run <tt class="docutils literal"><span class="pre">python</span> <span class="pre">regression.py</span></tt>
-or <tt class="docutils literal"><span class="pre">python</span> <span class="pre">regression.py</span> <span class="pre">--help</span></tt>. See also the <a class="reference" href="#advanced-use">Advanced use</a> section below.</p>
-<p><strong>Note</strong>: If you are behind a firewall/proxy server, everything should still &quot;just work&quot;.
-In the rare cases when it doesn't, you can explicitly specify the proxy server
-parameters through the <tt class="docutils literal"><span class="pre">--proxy</span></tt> option, e.g.:</p>
-<pre class="literal-block">
-python regression.py ... <strong>--proxy=
http://www.someproxy.com:3128>
-</pre>
-</div>
-<div class="section">
-<h1><a id="details" name="details">Details</a></h1>
-<p>The regression run procedure will:</p>
-<ul class="simple">
-<li>Download the most recent tarball from <a class="reference" href="
http://www.meta-comm.com/engineering/boost/snapshot/">http://www.meta-comm.com/engineering/boost/snapshot/>,
-unpack it in the subdirectory <tt class="docutils literal"><span class="pre">boost</span></tt>.</li>
-<li>Build <tt class="docutils literal"><span class="pre">bjam</span></tt> and <tt class="docutils literal"><span class="pre">process_jam_log</span></tt> if needed. (<tt class="docutils literal"><span class="pre">process_jam_log</span></tt> is an
-utility, which extracts the test results from the log file produced by
-Boost.Build).</li>
-<li>Run regression tests, process and collect the results.</li>
-<li>Upload the results to <a class="reference" href="
ftp://fx.meta-comm.com/boost-regression">ftp://fx.meta-comm.com/boost-regression>.</li>
+ <li>Python 2.3 or later.<br>
+&nbsp;</li>
+ <li>Subversion 1.4 or later.<br>
+&nbsp;</li>
+ <li>At least 5 gigabytes of disk space per compiler to be tested.</li>
 </ul>
-<p>The report merger process running continuously on MetaCommunications site will
-merge all submitted test runs and publish them at
-<a class="reference" href="
http://boost.sourceforge.net/regression-logs/developer">http://boost.sourceforge.net/regression-logs/developer>.</p>
-</div>
-<div class="section">
-<h1><a id="advanced-use" name="advanced-use">Advanced use</a></h1>
-<div class="section">
-<h2><a id="providing-detailed-information-about-your-environment" name="providing-detailed-information-about-your-environment">Providing detailed information about your environment</a></h2>
-<p>Once you have your regression results displayed in the Boost-wide
-reports, you may consider providing a bit more information about
-yourself and your test environment. This additional information will
-be presented in the reports on a page associated with your runner ID.</p>
-<p>By default, the page's content is just a single line coming from the
-<tt class="docutils literal"><span class="pre">comment.html</span></tt> file in your <tt class="docutils literal"><span class="pre">regression.py</span></tt> directory, specifying
-the tested platform. You can put online a more detailed description of
-your environment, such as your hardware configuration, compiler builds,
-and test schedule, by simply altering the file's content. Also, please
-consider providing your name and email address for cases where Boost
-developers have questions specific to your particular set of results.</p>
-</div>
-<div class="section">
-<h2><a id="incremental-runs" name="incremental-runs">Incremental runs</a></h2>
-<p>You can run <tt class="docutils literal"><span class="pre">regression.py</span></tt> in incremental mode <a class="footnote-reference" href="#incremental" id="id5" name="id5">[4]</a> by simply passing
-it an identically named command-line flag:</p>
-<pre class="literal-block">
-python regression.py ... <strong>--incremental</strong>
-</pre>
-</div>
-<div class="section">
-<h2><a id="dealing-with-misbehaved-tests-compilers" name="dealing-with-misbehaved-tests-compilers">Dealing with misbehaved tests/compilers</a></h2>
-<p>Depending on the environment/C++ runtime support library the test is compiled with,
-a test failure/termination may cause an appearance of a dialog window, requiring
-human intervention to proceed. Moreover, the test (or even of the compiler itself)
-can fall into infinite loop, or simply run for too long. To allow <tt class="docutils literal"><span class="pre">regression.py</span></tt>
-to take care of these obstacles, add the <tt class="docutils literal"><span class="pre">--monitored</span></tt> flag to the script
-invocation:</p>
-<pre class="literal-block">
-python regression.py ... <strong>--monitored</strong>
-</pre>
-<p>That's it. Knowing your intentions, the script will be able to automatically deal
-with the listed issues <a class="footnote-reference" href="#monitored" id="id6" name="id6">[5]</a>.</p>
-</div>
-<div class="section">
-<h2><a id="getting-sources-from-cvs" name="getting-sources-from-cvs">Getting sources from CVS</a></h2>
-<p>If you already have a CVS client installed and configured, you might prefer to get
-the sources directly from the Boost CVS repository. To communicate this to the
-script, you just need to pass it your SourceForge user ID using the <tt class="docutils literal"><span class="pre">--user</span></tt>
-option; for instance:</p>
-<pre class="literal-block">
-python regression.py ... <strong>--user=agurtovoy</strong>
-</pre>
-<p>You can also specify the user as <tt class="docutils literal"><span class="pre">anonymous</span></tt>, requesting anonymous CVS access.
-Note, though, that the files obtained this way tend to lag behind the actual CVS
-state by several hours, sometimes up to twelve. By contrast, the tarball the script
-downloads by default is at most one hour behind.</p>
-</div>
-<div class="section">
-<h2><a id="integration-with-a-custom-driver-script" name="integration-with-a-custom-driver-script">Integration with a custom driver script</a></h2>
-<p>Even if you've already been using a custom driver script, and for some
-reason you don't want <tt class="docutils literal"><span class="pre">regression.py</span></tt> to take over of the entire test cycle,
-getting your regression results into <a class="reference" href="
http://www.boost.org/regression-logs/developer/">Boost-wide reports</a> is still easy!</p>
-<p>In fact, it's just a matter of modifying your script to perform two straightforward
-operations:</p>
-<ol class="arabic">
-<li><p class="first"><em>Timestamp file creation</em> needs to be done before the CVS update/checkout.
-The file's location doesn't matter (nor does the content), as long as you know how
-to access it later. Making your script to do something as simple as
-<tt class="docutils literal"><span class="pre">echo</span> <span class="pre">&gt;timestamp</span></tt> would work just fine.</p>
-</li>
-<li><p class="first"><em>Collecting and uploading logs</em> can be done any time after <tt class="docutils literal"><span class="pre">process_jam_log</span></tt>' s
-run, and is as simple as an invocation of the local copy of
-<tt class="docutils literal"><span class="pre">$BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py</span></tt>
-script that was just obtained from the CVS with the rest of the sources.
-You'd need to provide <tt class="docutils literal"><span class="pre">collect_and_upload_logs.py</span></tt> with the following three
-arguments:</p>
-<pre class="literal-block">
---locate-root directory to to scan for &quot;test_log.xml&quot; files
---runner runner ID (e.g. &quot;Metacomm&quot;)
---timestamp path to a file which modification time will be used
- as a timestamp of the run (&quot;timestamp&quot; by default)
-</pre>
-<p>For example, assuming that the run's resulting binaries are in the
-<tt class="docutils literal"><span class="pre">$BOOST_ROOT/bin</span></tt> directory (the default Boost.Build setup), the
-<tt class="docutils literal"><span class="pre">collect_and_upload_logs.py</span></tt> invocation might look like this:</p>
-<pre class="literal-block">
-python $BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py
- --locate-root=$BOOST_ROOT/bin
- --runner=Metacomm
- --timestamp=timestamp
-</pre>
-</li>
+<h2>Step by step instructions</h2>
+<ol>
+ <li>Create a new directory for the branch you want to test.<br>
+&nbsp;</li>
+ <li>Download the
+ <a href="http://svn.boost.org/svn/boost/trunk/tools/regression/src/run.py">
+ run.py</a> script into that directory.<br>
+&nbsp;</li>
+ <li>Run &quot;<code>python run.py [options] [commands]</code>&quot;.</li>
 </ol>
-</div>
-<div class="section">
-<h2><a id="patching-boost-sources" name="patching-boost-sources">Patching Boost sources</a></h2>
-<p>You might encounter an occasional need to make local modifications to
-the Boost codebase before running the tests, without disturbing the
-automatic nature of the regression process. To implement this under
-<tt class="docutils literal"><span class="pre">regression.py</span></tt>:</p>
-<ol class="arabic simple">
-<li>Codify applying the desired modifications to the sources
-located in the <tt class="docutils literal"><span class="pre">./boost</span></tt> subdirectory in a single executable
-script named <tt class="docutils literal"><span class="pre">patch_boost</span></tt> (<tt class="docutils literal"><span class="pre">patch_boost.bat</span></tt> on Windows).</li>
-<li>Place the script in the <tt class="docutils literal"><span class="pre">regression.py</span></tt> directory.</li>
-</ol>
-<p>The driver will check for the existence of the <tt class="docutils literal"><span class="pre">patch_boost</span></tt> script,
-and, if found, execute it after obtaining the Boost sources.</p>
-</div>
-</div>
-<div class="section">
-<h1><a id="feedback" name="feedback">Feedback</a></h1>
-<p>Please send all comments/suggestions regarding this document and the testing procedure
-itself to the <a class="reference" href="http://lists.boost.org/mailman/listinfo.cgi/boost-testing">Boost Testing list</a>.</p>
-</div>
-<div class="section">
-<h1><a id="notes" name="notes">Notes</a></h1>
-<table class="docutils footnote" frame="void" id="runnerid1" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id2" name="runnerid1">[1]</a></td><td>If you are running regressions interlacingly with a different
-set of compilers (e.g. for Intel in the morning and GCC at the end of the day), you need
-to provide a <em>different</em> runner id for each of these runs, e.g. <tt class="docutils literal"><span class="pre">your_name-intel</span></tt>, and
-<tt class="docutils literal"><span class="pre">your_name-gcc</span></tt>.</td></tr>
-</tbody>
-</table>
-<table class="docutils footnote" frame="void" id="runnerid2" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id3" name="runnerid2">[2]</a></td><td>The limitations of the reports' format/medium impose a direct dependency
-between the number of compilers you are testing with and the amount of space available
-for your runner id. If you are running regressions for a single compiler, please make
-sure to choose a short enough id that does not significantly disturb the reports' layout.</td></tr>
-</tbody>
-</table>
-<table class="docutils footnote" frame="void" id="toolsets" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id4" name="toolsets">[3]</a></td><td>If <tt class="docutils literal"><span class="pre">--toolsets</span></tt> option is not provided, the script will try to use the
-platform's default toolset (<tt class="docutils literal"><span class="pre">gcc</span></tt> for most Unix-based systems).</td></tr>
-</tbody>
-</table>
-<table class="docutils footnote" frame="void" id="incremental" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id5" name="incremental">[4]</a></td><td><p class="first">By default, the script runs in what is known as <em>full mode</em>: on
-each <tt class="docutils literal"><span class="pre">regression.py</span></tt> invocation all the files that were left in place by the
-previous run -- including the binaries for the successfully built tests and libraries
--- are deleted, and everything is rebuilt once again from scratch. By contrast, in
-<em>incremental mode</em> the already existing binaries are left intact, and only the
-tests and libraries which source files has changed since the previous run are
-re-built and re-tested.</p>
-<p>The main advantage of incremental runs is a significantly shorter turnaround time,
-but unfortunately they don't always produce reliable results. Some type of changes
-to the codebase (changes to the bjam testing subsystem in particular)
-often require switching to a full mode for one cycle in order to produce
-trustworthy reports.</p>
-<p class="last">As a general guideline, if you can afford it, testing in full mode is preferable.</p>
-</td></tr>
-</tbody>
-</table>
-<table class="docutils footnote" frame="void" id="monitored" rules="none">
-<colgroup><col class="label" /><col /></colgroup>
-<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id6" name="monitored">[5]</a></td><td>Note that at the moment this functionality is available only if you
-are running on a Windows platform. Contributions are welcome!</td></tr>
-</tbody>
-</table>
-</div>
-</div>
-</body>
-</html>
+<dl>
+ <dd>
+ <pre>commands: cleanup, collect-logs, get-source, get-tools, patch,
+regression, setup, show-revision, test, test-clean, test-process,
+test-run, update-source, upload-logs
+
+options:
+ -h, --help show this help message and exit
+ --runner=RUNNER runner ID (e.g. 'Metacomm')
+ --comment=COMMENT an HTML comment file to be inserted in the
+ reports
+ --tag=TAG the tag for the results
+ --toolsets=TOOLSETS comma-separated list of toolsets to test with
+ --incremental do incremental run (do not remove previous
+ binaries)
+ --timeout=TIMEOUT specifies the timeout, in minutes, for a single
+ test run/compilation
+ --bjam-options=BJAM_OPTIONS
+ options to pass to the regression test
+ --bjam-toolset=BJAM_TOOLSET
+ bootstrap toolset for 'bjam' executable
+ --pjl-toolset=PJL_TOOLSET
+ bootstrap toolset for 'process_jam_log'
+ executable
+ --platform=PLATFORM
+ --user=USER Boost SVN user ID
+ --local=LOCAL the name of the boost tarball
+ --force-update=FORCE_UPDATE
+ do an SVN update (if applicable) instead of a
+ clean checkout, even when performing a full run
+ --have-source=HAVE_SOURCE
+ do neither a tarball download nor an SVN update;
+ used primarily for testing script changes
+ --proxy=PROXY HTTP proxy server address and port
+ (e.g.'<a rel="nofollow" href="http://www.someproxy.com:3128'" target="_top">http://www.someproxy.com:3128'</a>)
+ --ftp-proxy=FTP_PROXY
+ FTP proxy server (e.g. 'ftpproxy')
+ --dart-server=DART_SERVER
+ the dart server to send results to
+ --debug-level=DEBUG_LEVEL
+ debugging level; controls the amount of
+ debugging output printed
+ --send-bjam-log send full bjam log of the regression run
+ --mail=MAIL email address to send run notification to
+ --smtp-login=SMTP_LOGIN
+ STMP server address/login information, in the
+ following form:
+ &lt;user&gt;:&lt;password&gt;@&lt;host&gt;[:&lt;port&gt;]
+ --skip-tests=SKIP_TESTS
+ do not run bjam; used for testing script changes</pre>
+ </dd>
+</dl>
+<p>To test trunk use &quot;<code>--tag=trunk</code>&quot; (the default), and to test the
+release use &quot;<code>--tag=branches/release</code>&quot;. Or substitute any Boost tree
+of your choice.</p>
+
+<hr>
+
+<p>© Copyright Rene Rivera, 2007<br>
+Distributed under the Boost Software License, Version 1.0. See
+www.boost.org/LICENSE_1_0.txt</p>
+
+<p>Revised
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->November 14, 2007<!--webbot bot="Timestamp" endspan i-checksum="39589" --> </font>
+</p>
+
+</body>
\ No newline at end of file

Deleted: branches/release/tools/regression/xsl_reports/runner/instructions.rst
==============================================================================
--- branches/release/tools/regression/xsl_reports/runner/instructions.rst 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,252 +0,0 @@
-Running Boost Regression Tests
-==============================
-
-
-Requirements
-------------
-
-* Python 2.3 or higher
-* Some spare disk space (~5 Gb per each tested compiler)
-
-That's it! You don't even need a CVS client installed.
-
-Installation
-------------
-
-* Download regression driver ``regression.py`` from here__ (http://tinyurl.com/uufav)
- and put it in the directory where you want all the regression
- test files to be placed.
-
-__ http://boost.cvs.sourceforge.net/*checkout*/boost/boost/tools/regression/xsl_reports/runner/regression.py
-
-
-* **Optional**: If you already have ``bjam`` and/or ``process_jam_log`` executables
- you'd like to use, just put them in the same directory with ``regression.py``, e.g.:
-
- .. parsed-literal::
-
- my_boost_regressions/
- regression.py
- bjam\ *[.exe]*
-
-
-Running tests
--------------
-
-To start a regression run, simply run ``regression.py`` providing it with the following
-two arguments:
-
-- runner id (something unique of your choice that will identify your
- results in the reports [#runnerid1]_, [#runnerid2]_)
-
-- a particular set of toolsets you want to test with [#toolsets]_.
-
-For example::
-
- python regression.py --runner=Metacomm --toolsets=gcc,vc7
-
-
-If you are interested in seeing all available options, run ``python regression.py``
-or ``python regression.py --help``. See also the `Advanced use`_ section below.
-
-**Note**: If you are behind a firewall/proxy server, everything should still "just work".
-In the rare cases when it doesn't, you can explicitly specify the proxy server
-parameters through the ``--proxy`` option, e.g.:
-
-.. parsed-literal::
-
- python regression.py ... **--proxy=http://www.someproxy.com:3128**
-
-
-Details
--------
-
-The regression run procedure will:
-
-* Download the most recent tarball from http://www.meta-comm.com/engineering/boost/snapshot/,
- unpack it in the subdirectory ``boost``.
-
-* Build ``bjam`` and ``process_jam_log`` if needed. (``process_jam_log`` is an
- utility, which extracts the test results from the log file produced by
- Boost.Build).
-
-* Run regression tests, process and collect the results.
-
-* Upload the results to ftp://fx.meta-comm.com/boost-regression.
-
-
-The report merger process running continuously on MetaCommunications site will
-merge all submitted test runs and publish them at
-http://boost.sourceforge.net/regression-logs/developer.
-
-
-Advanced use
-------------
-
-Providing detailed information about your environment
-.....................................................
-
-Once you have your regression results displayed in the Boost-wide
-reports, you may consider providing a bit more information about
-yourself and your test environment. This additional information will
-be presented in the reports on a page associated with your runner ID.
-
-By default, the page's content is just a single line coming from the
-``comment.html`` file in your ``regression.py`` directory, specifying
-the tested platform. You can put online a more detailed description of
-your environment, such as your hardware configuration, compiler builds,
-and test schedule, by simply altering the file's content. Also, please
-consider providing your name and email address for cases where Boost
-developers have questions specific to your particular set of results.
-
-
-Incremental runs
-................
-
-You can run ``regression.py`` in incremental mode [#incremental]_ by simply passing
-it an identically named command-line flag:
-
-.. parsed-literal::
-
- python regression.py ... **--incremental**
-
-
-Dealing with misbehaved tests/compilers
-.......................................
-
-Depending on the environment/C++ runtime support library the test is compiled with,
-a test failure/termination may cause an appearance of a dialog window, requiring
-human intervention to proceed. Moreover, the test (or even of the compiler itself)
-can fall into infinite loop, or simply run for too long. To allow ``regression.py``
-to take care of these obstacles, add the ``--monitored`` flag to the script
-invocation:
-
-.. parsed-literal::
-
- python regression.py ... **--monitored**
-
-
-That's it. Knowing your intentions, the script will be able to automatically deal
-with the listed issues [#monitored]_.
-
-
-Getting sources from CVS
-........................
-
-If you already have a CVS client installed and configured, you might prefer to get
-the sources directly from the Boost CVS repository. To communicate this to the
-script, you just need to pass it your SourceForge user ID using the ``--user``
-option; for instance:
-
-.. parsed-literal::
-
- python regression.py ... **--user=agurtovoy**
-
-You can also specify the user as ``anonymous``, requesting anonymous CVS access.
-Note, though, that the files obtained this way tend to lag behind the actual CVS
-state by several hours, sometimes up to twelve. By contrast, the tarball the script
-downloads by default is at most one hour behind.
-
-
-Integration with a custom driver script
-.......................................
-
-Even if you've already been using a custom driver script, and for some
-reason you don't want ``regression.py`` to take over of the entire test cycle,
-getting your regression results into `Boost-wide reports`__ is still easy!
-
-In fact, it's just a matter of modifying your script to perform two straightforward
-operations:
-
-1. *Timestamp file creation* needs to be done before the CVS update/checkout.
- The file's location doesn't matter (nor does the content), as long as you know how
- to access it later. Making your script to do something as simple as
- ``echo >timestamp`` would work just fine.
-
-2. *Collecting and uploading logs* can be done any time after ``process_jam_log``' s
- run, and is as simple as an invocation of the local copy of
- ``$BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py``
- script that was just obtained from the CVS with the rest of the sources.
- You'd need to provide ``collect_and_upload_logs.py`` with the following three
- arguments::
-
- --locate-root directory to to scan for "test_log.xml" files
- --runner runner ID (e.g. "Metacomm")
- --timestamp path to a file which modification time will be used
- as a timestamp of the run ("timestamp" by default)
-
- For example, assuming that the run's resulting binaries are in the
- ``$BOOST_ROOT/bin`` directory (the default Boost.Build setup), the
- ``collect_and_upload_logs.py`` invocation might look like this::
-
- python $BOOST_ROOT/tools/regression/xsl_reports/runner/collect_and_upload_logs.py
- --locate-root=$BOOST_ROOT/bin
- --runner=Metacomm
- --timestamp=timestamp
-
-
-__ http://www.boost.org/regression-logs/developer/
-
-
-Patching Boost sources
-......................
-
-You might encounter an occasional need to make local modifications to
-the Boost codebase before running the tests, without disturbing the
-automatic nature of the regression process. To implement this under
-``regression.py``:
-
-1. Codify applying the desired modifications to the sources
- located in the ``./boost`` subdirectory in a single executable
- script named ``patch_boost`` (``patch_boost.bat`` on Windows).
-
-2. Place the script in the ``regression.py`` directory.
-
-The driver will check for the existence of the ``patch_boost`` script,
-and, if found, execute it after obtaining the Boost sources.
-
-
-Feedback
---------
-
-Please send all comments/suggestions regarding this document and the testing procedure
-itself to the `Boost Testing list`__.
-
-__ http://lists.boost.org/mailman/listinfo.cgi/boost-testing
-
-
-Notes
------
-
-.. [#runnerid1] If you are running regressions interlacingly with a different
- set of compilers (e.g. for Intel in the morning and GCC at the end of the day), you need
- to provide a *different* runner id for each of these runs, e.g. ``your_name-intel``, and
- ``your_name-gcc``.
-
-.. [#runnerid2] The limitations of the reports' format/medium impose a direct dependency
- between the number of compilers you are testing with and the amount of space available
- for your runner id. If you are running regressions for a single compiler, please make
- sure to choose a short enough id that does not significantly disturb the reports' layout.
-
-.. [#toolsets] If ``--toolsets`` option is not provided, the script will try to use the
- platform's default toolset (``gcc`` for most Unix-based systems).
-
-.. [#incremental] By default, the script runs in what is known as *full mode*: on
- each ``regression.py`` invocation all the files that were left in place by the
- previous run -- including the binaries for the successfully built tests and libraries
- -- are deleted, and everything is rebuilt once again from scratch. By contrast, in
- *incremental mode* the already existing binaries are left intact, and only the
- tests and libraries which source files has changed since the previous run are
- re-built and re-tested.
-
- The main advantage of incremental runs is a significantly shorter turnaround time,
- but unfortunately they don't always produce reliable results. Some type of changes
- to the codebase (changes to the bjam testing subsystem in particular)
- often require switching to a full mode for one cycle in order to produce
- trustworthy reports.
-
- As a general guideline, if you can afford it, testing in full mode is preferable.
-
-.. [#monitored] Note that at the moment this functionality is available only if you
- are running on a Windows platform. Contributions are welcome!
-

Modified: branches/release/tools/regression/xsl_reports/runner/regression.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/runner/regression.py (original)
+++ branches/release/tools/regression/xsl_reports/runner/regression.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -32,9 +32,9 @@
 xsl_reports_dir = os.path.join( boost_root, 'tools', 'regression', 'xsl_reports' )
 timestamp_path = os.path.join( regression_root, 'timestamp' )
 
-cvs_command_line = 'cvs -z9 %(command)s'
-cvs_ext_command_line = 'cvs -d:ext:%(user)s_at_[hidden]:/cvsroot/boost -z9 %(command)s'
-cvs_pserver_command_line = 'cvs -d:pserver:%(user)s_at_[hidden]:/cvsroot/boost -z9 %(command)s'
+svn_anonymous_command_line = 'svn %(command)s'
+svn_command_line = 'svn --non-interactive --username=%(user)s %(command)s'
+
 
 bjam = {}
 process_jam_log = {}
@@ -43,10 +43,10 @@
 if sys.platform == 'win32':
     bjam[ 'name' ] = 'bjam.exe'
     bjam[ 'build_cmd' ] = lambda toolset, v2: bjam_build_script_cmd( 'build.bat %s' % toolset )
- bjam[ 'is_supported_toolset' ] = lambda x: x in [ 'borland', 'como', 'gcc', 'gcc-nocygwin' \
- , 'intel-win32', 'metrowerks', 'mingw' \
- , 'msvc', 'vc7' \
- ]
+ bjam[ 'is_supported_toolset' ] = lambda x: x in [ \
+ 'borland', 'como', 'gcc', 'gcc-nocygwin', 'intel-win32', 'metrowerks', 'mingw', \
+ 'msvc', 'vc7', 'vc8' \
+ ]
     process_jam_log[ 'name' ] = 'process_jam_log.exe'
 
     def default_toolset(v2):
@@ -60,11 +60,10 @@
 else:
     bjam[ 'name' ] = 'bjam'
     bjam[ 'build_cmd' ] = lambda toolset, v2: bjam_build_script_cmd( './build.sh %s' % toolset )
- bjam[ 'is_supported_toolset' ] = lambda x: x in [ 'acc', 'como', 'darwin', 'gcc' \
- , 'intel-linux', 'kcc', 'kylix' \
- , 'mipspro', 'sunpro', 'tru64cxx' \
- , 'vacpp'\
- ]
+ bjam[ 'is_supported_toolset' ] = lambda x: x in [ \
+ 'acc', 'como', 'darwin', 'gcc', 'intel-linux', 'kcc', 'kylix', 'mipspro', \
+ 'pathscale', 'pgi', 'qcc', 'sun', 'sunpro', 'tru64cxx', 'vacpp' \
+ ]
     process_jam_log[ 'name' ] = 'process_jam_log'
     process_jam_log[ 'default_toolset' ] = lambda x: 'gcc'
     patch_boost_name = 'patch_boost'
@@ -175,6 +174,7 @@
 
 
 def tarball_name_for_tag( tag, timestamp = False ):
+ tag = tag.split( '/' )[-1]
     if not timestamp: return 'boost-%s.tar.bz2' % tag
     else: return 'boost-%s.timestamp' % tag
 
@@ -182,7 +182,7 @@
 def download_boost_tarball( destination, tag, proxy, timestamp_only = False ):
     tarball_name = tarball_name_for_tag( tag, timestamp_only )
     tarball_path = os.path.join( destination, tarball_name )
- tarball_url = 'http://engineering.meta-comm.com/boost/snapshot/%s' % tarball_name
+ tarball_url = 'http://beta.boost.org/development/snapshot.php/%s' % tag
 
     log( 'Downloading "%s" to "%s"...' % ( tarball_url, os.path.dirname( tarball_path ) ) )
     if os.path.exists( tarball_path ):
@@ -256,38 +256,32 @@
     os.rename( boost_dir, boost_root )
 
 
-def cvs_command( user, command ):
- if user is None:
- cmd = cvs_command_line % { 'command': command }
- elif user == 'anonymous':
- cmd = cvs_pserver_command_line % { 'user': user, 'command': command }
+def svn_command( user, command ):
+ if user is None or user == 'anonymous':
+ cmd = svn_anonymous_command_line % { 'command': command }
     else:
- cmd = cvs_ext_command_line % { 'user': user, 'command': command }
+ cmd = svn_command_line % { 'user': user, 'command': command }
 
- log( 'Executing CVS command "%s"' % cmd )
+ log( 'Executing SVN command "%s"' % cmd )
     rc = os.system( cmd )
     if rc != 0:
- raise Exception( 'CVS command "%s" failed with code %d' % ( cmd, rc ) )
+ raise Exception( 'SVN command "%s" failed with code %d' % ( cmd, rc ) )
 
 
-def cvs_checkout( user, tag, args ):
- if tag != 'CVS-HEAD':
- command = 'checkout -r %s boost' % tag
- else:
- command = 'checkout boost'
+def svn_repository_url( user, tag ):
+ if user != 'anonymous': return 'https://svn.boost.org/svn/boost/%s' % tag
+ else: return 'http://svn.boost.org/svn/boost/%s' % tag
 
- os.chdir( regression_root )
- cvs_command( user, command )
 
+def svn_checkout( user, tag, args ):
+ command = 'co %s boost' % svn_repository_url( user, tag )
+ os.chdir( regression_root )
+ svn_command( user, command )
 
-def cvs_update( user, tag, args ):
- if tag != 'CVS-HEAD':
- command = 'update -dPA -r %s' % tag
- else:
- command = 'update -dPA'
 
- os.chdir( os.path.join( regression_root, 'boost' ) )
- cvs_command( user, command )
+def svn_update( user, tag, args ):
+ os.chdir( boost_root )
+ svn_command( user, 'update' )
 
 
 def format_time( t ):
@@ -331,7 +325,7 @@
 
     if user is not None:
         retry(
- cvs_checkout
+ svn_checkout
             , ( user, tag, args )
             )
     else:
@@ -342,11 +336,11 @@
 
 
 def update_source( user, tag, proxy, args, **unused ):
- if user is not None or os.path.exists( os.path.join( boost_root, 'CVS' ) ):
+ if user is not None or os.path.exists( os.path.join( boost_root, '.svn' ) ):
         open( timestamp_path, 'w' ).close()
- log( 'Updating sources from CVS (%s)...' % timestamp() )
+ log( 'Updating sources from SVN (%s)...' % timestamp() )
         retry(
- cvs_update
+ svn_update
             , ( user, tag, args )
             )
     else:
@@ -472,6 +466,7 @@
             log( 'Warning: Test monitoring is not supported on this platform (yet).' )
             log( ' Please consider contributing this piece!' )
 
+
 def bjam_build_script_cmd( cmd ):
     env_setup_key = 'BJAM_ENVIRONMENT_SETUP'
     if os.environ.has_key( env_setup_key ):
@@ -483,9 +478,11 @@
 def bjam_command( toolsets, v2 ):
     build_path = regression_root
     if build_path[-1] == '\\': build_path += '\\'
+
     v2_option = ""
     if v2:
         v2_option = "--v2"
+
     result = '"%s" %s "-sBOOST_BUILD_PATH=%s" "-sBOOST_ROOT=%s"'\
         % (
             tool_path( bjam, v2 )
@@ -494,7 +491,7 @@
           , boost_root
           )
 
- if not toolsets is None:
+ if toolsets:
         if v2:
             result += ' ' + string.join(string.split( toolsets, ',' ), ' ' )
         else:
@@ -604,6 +601,7 @@
         if monitored:
             stop_build_monitor()
 
+
 def build_book( **kargs ):
     # To do
     # 1. PDF generation
@@ -629,6 +627,8 @@
         , user
         , comment
         , incremental
+ , dart_server
+ , ftp_proxy
         , args
         , **unused
         ):
@@ -649,13 +649,26 @@
     else: run_type = 'full'
 
     source = 'tarball'
- cvs_root_file = os.path.join( boost_root, 'CVS', 'root' )
- if os.path.exists( cvs_root_file ):
- if string.split( open( cvs_root_file ).readline(), '@' )[0] == ':pserver:anonymous':
- source = 'anonymous CVS'
- else:
- source = 'CVS'
-
+ revision = ''
+ svn_root_file = os.path.join( boost_root, '.svn' )
+ svn_info_file = os.path.join( boost_root, 'svn_info.txt' )
+ if os.path.exists( svn_root_file ):
+ source = 'SVN'
+ svn_command( 'user', 'info --xml ' + boost_root + ' >' + svn_info_file )
+
+ if os.path.exists( svn_info_file ):
+ f = open( svn_info_file, 'r' )
+ svn_info = f.read()
+ f.close()
+ i = svn_info.find( 'Revision:' )
+ if i < 0: i = svn_info.find( 'revision=' ) # --xml format
+ if i >= 0:
+ i += 10
+ while svn_info[i] >= '0' and svn_info[i] <= '9':
+ revision += svn_info[i]
+ i += 1
+
+
     from runner import collect_logs
     collect_logs(
           regression_results
@@ -667,8 +680,12 @@
         , user
         , source
         , run_type
+ , dart_server
+ , ftp_proxy
+ , revision
         )
 
+
 def collect_book( **unused ):
     log( 'Collecting files for BoostBook into "%s"...' % boostbook_archive_name )
     import zipfile
@@ -682,9 +699,11 @@
         for name in names:
             path = os.path.join( dirname, name )
             if not os.path.isdir( path ):
- boostbook_archive.write( path, path[ len(html_root) + 1: ] )
+ boostbook_archive.write( path, path[ len( html_root ) + 1: ] )
+
     os.path.walk( html_root, add_files, None )
     
+
 def upload_logs(
           tag
         , runner
@@ -692,35 +711,36 @@
         , ftp_proxy
         , debug_level
         , send_bjam_log
+ , dart_server
         , **unused
         ):
     import_utils()
     from runner import upload_logs
     retry(
           upload_logs
- , ( regression_results, runner, tag, user, ftp_proxy, debug_level, send_bjam_log, timestamp_path )
+ , ( regression_results, runner, tag, user, ftp_proxy, debug_level,
+ send_bjam_log, timestamp_path, dart_server )
         )
 
+
 def upload_book( tag, runner, ftp_proxy, debug_level, **unused ):
     import_utils()
     from runner import upload_to_ftp
     upload_to_ftp( tag, boostbook_archive_name, ftp_proxy, debug_level )
-
+
+
 def update_itself( tag, **unused ):
     source = os.path.join( xsl_reports_dir, 'runner', os.path.basename( sys.argv[0] ) )
     self = os.path.join( regression_root, os.path.basename( sys.argv[0] ) )
-
+
+ # Through revision 38985, the update copy was not done if
+ # os.stat(self).st_mtime > os.stat(source).st_mtime. This was not
+ # reliable on all systems, so the copy is now done unconditionally.
+ log( ' Saving a backup copy of the current script...' )
+ os.chmod( self, stat.S_IWRITE ) # Win32 workaround
+ shutil.move( self, '%s~' % self )
     log( 'Updating %s from %s...' % ( self, source ) )
- log( ' Checking modification dates...' )
- if os.stat( self ).st_mtime > os.stat( source ).st_mtime:
- log( 'Warning: The current version of script appears to be newer than the source.' )
- log( ' Update skipped.' )
- else:
- log( ' Saving a backup copy of the current script...' )
- os.chmod( self, stat.S_IWRITE ) # Win32 workaround
- shutil.move( self, '%s~' % self )
- log( ' Replacing %s with a newer version...' % self )
- shutil.copy2( source, self )
+ shutil.copy2( source, self )
 
 
 def send_mail( smtp_login, mail, subject, msg = '', debug_level = 0 ):
@@ -761,6 +781,8 @@
         , incremental
         , send_bjam_log
         , force_update
+ , have_source
+ , skip_tests
         , monitored
         , timeout
         , mail = None
@@ -769,6 +791,7 @@
         , ftp_proxy = None
         , debug_level = 0
         , v2 = 1
+ , dart_server = None
         , args = []
         ):
 
@@ -792,6 +815,8 @@
             log( 'Tag: "%s"' % tag )
 
             unpack_tarball( local, regression_root )
+ elif have_source:
+ if not incremental: cleanup( [ 'bin' ] )
         else:
             if incremental or force_update:
                 if not incremental: cleanup( [ 'bin' ] )
@@ -802,16 +827,18 @@
 
         setup( comment, toolsets, book, bjam_toolset, pjl_toolset, monitored, proxy,
                v2, [] )
+
         # Not specifying --toolset in command line is not enough
         # that would mean to use Boost.Build default ones
         # We can skip test only we were explictly
         # told to have no toolsets in command line "--toolset="
- if toolsets != '': # --toolset=,
- test( toolsets, bjam_options, monitored, timeout, v2, [] )
- collect_logs( tag, runner, platform, user, comment, incremental, [] )
- upload_logs( tag, runner, user, ftp_proxy, debug_level, send_bjam_log )
+ if toolsets != '': # --toolset=,
+ if not skip_tests: test( toolsets, bjam_options, monitored, timeout, v2, [] )
+ collect_logs( tag, runner, platform, user, comment, incremental, dart_server, proxy, [] )
+ upload_logs( tag, runner, user, ftp_proxy, debug_level, send_bjam_log, dart_server )
+
         if book:
- build_book()
+ build_book()
             collect_book()
             upload_book( tag, runner, ftp_proxy, debug_level )
 
@@ -847,7 +874,7 @@
 
     import re
     re_keyword_value = re.compile( r'^\$\w+:\s+(.*)\s+\$$' )
- print '\n\tResivion: %s' % re_keyword_value.match( revision ).group( 1 )
+ print '\n\tRevision: %s' % re_keyword_value.match( revision ).group( 1 )
     print '\tLast modified on: %s\n' % re_keyword_value.match( modified ).group( 1 )
 
 
@@ -872,15 +899,18 @@
         , 'debug-level='
         , 'incremental'
         , 'force-update'
+ , 'have-source'
+ , 'skip-tests'
         , 'dont-send-bjam-log'
         , 'monitored'
         , 'help'
         , 'v2'
         , 'v1'
+ , 'dart-server='
         ]
 
     options = {
- '--tag' : 'CVS-HEAD'
+ '--tag' : 'trunk'
         , '--local' : None
         , '--platform' : platform_name()
         , '--user' : None
@@ -896,6 +926,7 @@
         , '--proxy' : None
         , '--debug-level' : 0
         , '--ftp-proxy' : None
+ , '--dart-server' : 'beta.boost.org:8081'
         }
 
     ( option_pairs, other_args ) = getopt.getopt( args, '', args_spec )
@@ -920,6 +951,8 @@
         , 'incremental' : options.has_key( '--incremental' )
         , 'send_bjam_log' : not options.has_key( '--dont-send-bjam-log' )
         , 'force_update' : options.has_key( '--force-update' )
+ , 'have_source' : options.has_key( '--have-source' )
+ , 'skip_tests' : options.has_key( '--skip-tests' )
         , 'monitored' : options.has_key( '--monitored' )
         , 'timeout' : options[ '--timeout' ]
         , 'mail' : options[ '--mail' ]
@@ -928,6 +961,7 @@
         , 'ftp_proxy' : options[ '--ftp-proxy' ]
         , 'debug_level' : int(options[ '--debug-level' ])
         , 'v2' : not options.has_key( '--v1' )
+ , 'dart_server' : options[ '--dart-server' ]
         , 'args' : other_args
         }
 
@@ -956,20 +990,23 @@
 
 Options:
 \t--runner runner ID (e.g. 'Metacomm')
-\t--tag the tag for the results ('CVS-HEAD' by default)
+\t--tag the tag for the results ('trunk' by default)
 \t--local the name of the boost tarball
 \t--comment an HTML comment file to be inserted in the reports
 \t ('comment.html' by default)
 \t--incremental do incremental run (do not remove previous binaries)
 \t--dont-send-bjam-log
 \t do not send full bjam log of the regression run
-\t--force-update do a CVS update (if applicable) instead of a clean
+\t--force-update do an SVN update (if applicable) instead of a clean
 \t checkout, even when performing a full run
+\t--have-source do neither a tarball download nor an SVN update;
+\t used primarily for testing script changes
+\t--skip-tests do no run bjam; used for testing script changes
 \t--monitored do a monitored run
 \t--timeout specifies the timeout, in minutes, for a single test
 \t run/compilation (enforced only in monitored runs, 5 by
 \t default)
-\t--user SourceForge user name for a shell/CVS account (optional)
+\t--user Boost SVN user ID (optional)
 \t--toolsets comma-separated list of toolsets to test with (optional)
 \t--book build BoostBook (optional)
 \t--bjam-options options to pass to the regression test (optional)
@@ -986,6 +1023,7 @@
 \t output printed; 0 by default (no debug output)
 \t--v1 Use Boost.Build V1
 \t--v2 Use Boost.Build V2 (default)
+\t--dart-server The dart server to send results to.
 ''' % '\n\t'.join( commands.keys() )
 
     print 'Example:\n\t%s --runner=Metacomm\n' % os.path.basename( sys.argv[0] )

Modified: branches/release/tools/regression/xsl_reports/test/common.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/test/common.py (original)
+++ branches/release/tools/regression/xsl_reports/test/common.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -91,7 +91,8 @@
 
 
 def make_expicit_failure_markup( num_of_libs, num_of_toolsets, num_of_tests ):
- g = xml.sax.saxutils.XMLGenerator( open( "explicit-failures-markup.xml", "w" ) )
+ g = xml.sax.saxutils.XMLGenerator( open( "explicit-failures-markup.xml", "w" ), "utf-8" )
+ g.startDocument()
     g.startElement( "explicit-failures-markup", {} );
 
     # required toolsets
@@ -108,7 +109,7 @@
                 if i_toolset % 2 == 1:
                     g.startElement( "toolset", { "name": make_toolset_name( i_toolset ) } )
                     g.endElement( "toolset" )
- g.startElement( "note", { "author": "T. Test" } )
+ g.startElement( "note", { "author": u"T. T\xe8st" } )
             g.characters( "Test note" )
             g.endElement( "note" )
             g.endElement( "mark-unusable" )
@@ -145,7 +146,7 @@
                     g.startElement( "toolset", { "name": make_toolset_name( 2 ) } )
                     g.endElement( "toolset" )
 
- g.startElement( "note", { "author": "V. Annotated" } )
+ g.startElement( "note", { "author": u"V. Ann\xf3tated" } )
                     g.characters( "Some thoughtful note" )
                     g.endElement( "note" )
                     
@@ -156,6 +157,7 @@
             
         
     g.endElement( "explicit-failures-markup" )
+ g.endDocument()
 
 
 def make_expected_results( num_of_libs, num_of_toolsets, num_of_tests ):

Modified: branches/release/tools/regression/xsl_reports/test/generate_test_results.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/test/generate_test_results.py (original)
+++ branches/release/tools/regression/xsl_reports/test/generate_test_results.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -51,8 +51,9 @@
         os.makedirs( results_directory )
 
     for i_runner in range( 0, num_of_runners ):
- runner_id = "runner_%02d" % i_runner
- g = xml.sax.saxutils.XMLGenerator( open( os.path.join( results_directory, runner_id + ".xml" ), "w" ) )
+ runner_id = "runner %02d" % i_runner
+ g = xml.sax.saxutils.XMLGenerator( open( os.path.join( results_directory, runner_id + ".xml" ), "w" ), "utf-8" )
+ g.startDocument()
         if i_runner % 2:
             platform = "Win32"
         else:
@@ -63,6 +64,7 @@
                                       , "timestamp": common.format_timestamp(
                                                           time.gmtime( time.time() - i_runner * 24*60*60 )
                                                         )
+ , "revision": '%d' % ( 7000 + i_runner )
                                       , "source": test_run_source( i_runner )
                                       , "run-type": test_run_type( i_runner )
                                       } )
@@ -92,7 +94,7 @@
                 continue
                 
             for i_toolset in range( num_of_toolsets ):
- toolset_name = "toolset_%02d" % ( i_toolset )
+ toolset_name = "toolset %02d" % ( i_toolset )
 
                 if num_of_runners - 1 == i_runner and i_toolset % 2:
                     continue
@@ -129,7 +131,7 @@
                                               , show_run_output = show_run_output
                                               , variant = variant )
         g.endElement( "test-run" )
-
+ g.endDocument()
 
 
 

Modified: branches/release/tools/regression/xsl_reports/test/test.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/test/test.py (original)
+++ branches/release/tools/regression/xsl_reports/test/test.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -25,7 +25,7 @@
     , comment_file = os.path.abspath( "comment.html" )
     , results_dir = os.path.abspath( "results" )
     , output_dir = os.path.abspath( "output" )
- , reports = [ "x", "ds", "dd", "dsr", "ddr", "us", "ud", "usr", "udr" ]
+ , reports = [ "i", "x", "ds", "dd", "dsr", "ddr", "us", "ud", "usr", "udr" ]
     , warnings = [ 'Warning text 1', 'Warning text 2' ]
     , extended_test_results = os.path.abspath( "output/extended_test_results.xml" )
     , dont_collect_logs = 1

Modified: branches/release/tools/regression/xsl_reports/utils/__init__.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/utils/__init__.py (original)
+++ branches/release/tools/regression/xsl_reports/utils/__init__.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -6,6 +6,7 @@
 from libxslt import *
 from log import *
 from makedirs import *
+from rename import *
 from tar import *
 from zip import *
 

Modified: branches/release/tools/regression/xsl_reports/utils/libxslt.py
==============================================================================
--- branches/release/tools/regression/xsl_reports/utils/libxslt.py (original)
+++ branches/release/tools/regression/xsl_reports/utils/libxslt.py 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,13 +1,20 @@
 
+# Copyright (c) MetaCommunications, Inc. 2003-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 utils.makedirs
+import utils.rename
 import os.path
 import os
 import sys
 
 
-def xslt_param( path ):
+def xslt_param( path, replace_spaces = 1 ):
     path = path.replace( '\\', '/' )
- if sys.platform == 'win32':
+ if sys.platform == 'win32' and replace_spaces:
         path = path.replace( ' ', '%20' )
     return path
 
@@ -35,3 +42,8 @@
     if rc != 0:
         raise Exception( '"%s" failed with return code %d' % ( transform_command, rc ) )
 
+ output_file = xslt_param( output_file, 0 )
+ xlst_output_file = xslt_param( output_file )
+ if output_file != xlst_output_file and os.path.exists( xlst_output_file ):
+ utils.rename( log, xlst_output_file, output_file )
+

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -23,6 +23,7 @@
       
     <xsl:param name="expected_results_file"/>
     <xsl:param name="failures_markup_file"/>
+ <xsl:param name="source"/>
     <xsl:variable name="expected_results" select="document( $expected_results_file )" />
 
     <func:function name="meta:is_test_log_complete">
@@ -168,8 +169,8 @@
                         <note>
                             <span class="auto-note">
                                 This test case was explicitly marked up in
- <a href="http://cvs.sourceforge.net/viewcvs.py/boost/boost/status/explicit-failures-markup.xml">
- status/explicit-failures-markup.xml</a> file in the Boost CVS as "expected to fail",
+ <a href="http://svn.boost.org/svn/boost/{$source}/status/explicit-failures-markup.xml">
+ status/explicit-failures-markup.xml</a> file in the Boost SVN as "expected to fail",
                                 but is passing. Please consult the notes/output below for more details.
                             </span>
                         </note>
@@ -189,8 +190,8 @@
                                 <note>
                                     <span class="auto-note">
                                         This failure was explicitly marked as expected in
- <a href="http://cvs.sourceforge.net/viewcvs.py/boost/boost/status/explicit-failures-markup.xml">
- status/explicit-failures-markup.xml</a> file in the Boost CVS.
+ <a href="http://svn.boost.org/svn/boost/{$source}/status/explicit-failures-markup.xml">
+ status/explicit-failures-markup.xml</a> file in the Boost SVN.
                                         Please contact the library author(s)/maintainer(s) for the explanation of this markup.
                                     </span>
                                 </note>

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/common.xsl
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/common.xsl (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/common.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -65,7 +65,8 @@
                                     timestamp="{@timestamp}"
                                     platform="{@platform}"
                                     run-type="{@run-type}"
- source="{@source}">
+ source="{@source}"
+ revision="{@revision}">
                             
                                     <comment><xsl:value-of select="comment"/></comment>
                                     <xsl:variable name="not_ordered_toolsets" select="set:distinct( .//test-log[ meta:is_test_log_a_test_case(.) and meta:show_toolset( @toolset, $release ) ]/@toolset ) "/>
@@ -465,6 +466,16 @@
         <tr>
             <td colspan="{$colspan}">&#160;</td>
             <xsl:for-each select="$run_toolsets//runs/run[ count(toolset) > 0 ]">
+ <td colspan="{count(toolset)}" class="revision">
+ rev <xsl:value-of select="@revision"/>
+ </td>
+ </xsl:for-each>
+ <td colspan="{$colspan}">&#160;</td>
+ </tr>
+
+ <tr>
+ <td colspan="{$colspan}">&#160;</td>
+ <xsl:for-each select="$run_toolsets//runs/run[ count(toolset) > 0 ]">
                 <xsl:variable name="timestamp_diff" select="meta:timestamp_difference( @timestamp, $run_date )"/>
                 <xsl:variable name="age" select="meta:iif( $timestamp_diff &lt; 30, $timestamp_diff, 30 )"/>
                 <td colspan="{count(toolset)}" class="timestamp">

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/html/master.css
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/html/master.css (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/html/master.css 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -579,7 +579,12 @@
 {
     font-size: 1.5em;
     font-weight: bold;
+}
+
+div.log-test-header
+{
     border-bottom: 1px solid black;
+ margin-bottom: 5pt;
 }
 
 div.notes-title

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/issues_page.xsl
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/issues_page.xsl (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/issues_page.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -178,7 +178,7 @@
                   <xsl:variable name="test_program" select="$library_tests[@test-name = $test_name]/@test-program"/>
                   <tr>
                     <td class="test-name">
- <a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost/boost/{$test_program}" class="test-link" target="_top">
+ <a href="http://svn.boost.org/svn/boost/{$source}/{$test_program}" class="test-link" target="_top">
                         <xsl:value-of select="$test_name"/>
                       </a>
                     </td>
@@ -226,7 +226,7 @@
 This report lists all regression test failures on release platforms.
 
 Detailed report:
- http://engineering.meta-comm.com/boost-regression/>
+
http://boost.org/regression/>
         <xsl:value-of select="$source"/>
         <xsl:text>/developer/issues.html
 

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/links_page.xsl
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/links_page.xsl (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/links_page.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -35,6 +35,8 @@
 
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
     <xsl:variable name="runner_id" select="test-run/@runner"/>
+ <xsl:variable name="revision" select="test-run/@revision"/>
+ <xsl:variable name="timestamp" select="test-run/@timestamp"/>
 
     <!-- runs / toolsets -->
     <xsl:variable name="run_toolsets" select="meta:test_structure( /, 'no' )"/>
@@ -99,6 +101,8 @@
                     <xsl:with-param name="path" select="$variants_file_path"/>
                     <xsl:with-param name="test_logs" select="$toolset/*"/>
                     <xsl:with-param name="runner_id" select="$runner_id"/>
+ <xsl:with-param name="revision" select="$revision"/>
+ <xsl:with-param name="timestamp" select="$timestamp"/>
                 </xsl:call-template>
 
                 <xsl:for-each select="str:tokenize( string( ' |_release' ), '|')">
@@ -127,6 +131,8 @@
                         <xsl:with-param name="path" select="$log_file_path"/>
                         <xsl:with-param name="test_log" select="$test_log"/>
                         <xsl:with-param name="runner_id" select="$runner_id"/>
+ <xsl:with-param name="revision" select="$revision"/>
+ <xsl:with-param name="timestamp" select="$timestamp"/>
                     </xsl:call-template>
                     
                     <xsl:for-each select="str:tokenize( string( ' |_release' ), '|')">
@@ -151,7 +157,7 @@
         <xsl:param name="test_logs"/>
         <xsl:variable name="libs" select="set:distinct( $test_logs/@library )"/>
         <xsl:variable name="fragment">
- <runner runner_id="{$test_logs[1]/../@runner}">
+ <runner runner_id="{$test_logs[1]/../@runner}" revision="{$test_logs[1]/../@revision}" timestamp="{$test_logs[1]/../@timestamp}">
                 <xsl:for-each select="$libs">
                     <xsl:variable name="library_name" select="."/>
                     <xsl:variable name="library_test_logs" select="$test_logs[@library=$library_name]"/>
@@ -221,6 +227,8 @@
         <xsl:param name="path"/>
         <xsl:param name="test_logs"/>
         <xsl:param name="runner_id"/>
+ <xsl:param name="revision"/>
+ <xsl:param name="timestamp"/>
         <xsl:message> Writing variants file <xsl:value-of select="$path"/></xsl:message>
         <exsl:document href="{$path}"
             method="html"
@@ -230,6 +238,7 @@
             
             <html>
                 <xsl:variable name="component" select="meta:output_page_header( $test_logs[1], $runner_id )"/>
+ <xsl:variable name="age" select="meta:timestamp_difference( $timestamp, $run_date )"/>
 
                 <head>
                     <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
@@ -237,12 +246,16 @@
                 </head>
 
                 <body>
- <div>
+ <div class="log-test-header">
                         <div class="log-test-title">
                             Test output: <xsl:value-of select="$component"/>
                         </div>
+ <div><span class="timestamp-{$age}">
+ Rev <xsl:value-of select="$revision"/> /
+ <xsl:value-of select="meta:format_timestamp( $timestamp )"/>
+ </span></div>
                     </div>
-
+
                     <div>
                         <b>Report Time: </b> <xsl:value-of select="meta:format_timestamp( $run_date )"/>
                     </div>
@@ -275,6 +288,8 @@
         <xsl:param name="path"/>
         <xsl:param name="test_log"/>
         <xsl:param name="runner_id"/>
+ <xsl:param name="revision"/>
+ <xsl:param name="timestamp"/>
         <xsl:message> Writing log file document <xsl:value-of select="$path"/></xsl:message>
 
         <exsl:document href="{$path}"
@@ -285,6 +300,7 @@
                         
             <html>
                 <xsl:variable name="component" select="meta:output_page_header( $test_log, $runner_id )"/>
+ <xsl:variable name="age" select="meta:timestamp_difference( $timestamp, $run_date )"/>
 
                 <head>
                     <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
@@ -292,10 +308,16 @@
                 </head>
                 
                 <body>
- <div class="log-test-title">
- Test output: <xsl:value-of select="$component"/>
+ <div class="log-test-header">
+ <div class="log-test-title">
+ Test output: <xsl:value-of select="$component"/>
+ </div>
+ <div><span class="timestamp-{$age}">
+ Rev <xsl:value-of select="$revision"/> /
+ <xsl:value-of select="meta:format_timestamp( $timestamp )"/>
+ </span></div>
                     </div>
-
+
                     <div>
                         <b>Report Time: </b> <xsl:value-of select="meta:format_timestamp( $run_date )"/>
                     </div>
@@ -353,8 +375,8 @@
 
 
     <xsl:template name="write_test_results_reference_file">
- <xsl:param name="$path"/>
- <xsl:param name="$log_file_path"/>
+ <xsl:param name="path"/>
+ <xsl:param name="log_file_path"/>
         <xsl:message> Writing log frame document <xsl:value-of select="$path"/></xsl:message>
         <exsl:document href="{$path}"
             method="html"

Modified: branches/release/tools/regression/xsl_reports/xsl/v2/result_page.xsl
==============================================================================
--- branches/release/tools/regression/xsl_reports/xsl/v2/result_page.xsl (original)
+++ branches/release/tools/regression/xsl_reports/xsl/v2/result_page.xsl 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
 
-Copyright MetaCommunications, Inc. 2003-2004.
+Copyright MetaCommunications, Inc. 2003-2007.
 
 Distributed under the Boost Software License, Version 1.0. (See
 accompanying file LICENSE_1_0.txt or copy at
@@ -173,11 +173,11 @@
                     <xsl:choose>
                         <xsl:when test="$mode='user'">
                             The purpose of this report is to help a user to find out whether a particular library
- works on the particular compiler(s). For CVS "health report", see
+ works on the particular compiler(s). For SVN "health report", see
                             <a href="../{$alternate_mode}/index.html" target="_top">developer summary</a>.
                         </xsl:when>
                         <xsl:when test="$mode='developer'">
- Provides Boost developers with visual indication of the CVS "health". For user-level
+ Provides Boost developers with visual indication of the SVN "health". For user-level
                             report, see
user summary.
                         </xsl:when>
                     </xsl:choose>
@@ -595,7 +595,7 @@
 
         <xsl:variable name="test_header">
         <td class="test-name">
- <a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost/boost/{$test_program}" class="test-link" target="_top">
+ <a href="http://svn.boost.org/svn/boost/{$source}/{$test_program}" class="test-link" target="_top">
                 <xsl:value-of select="$test_name"/>
             </a>
         </td>

Deleted: branches/release/tools/release/user-config.jam
==============================================================================
--- branches/release/tools/release/user-config.jam 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,73 +0,0 @@
-# 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 file is used to configure your Boost.Build installation. Please read
-# the user manual to find out where to put it.
-
-# Toolset declarations are most important in this file. The tell Boost.Build
-# what compilers are available and where to look for them. The first toolset
-# will become "default" one.
-# Some important libraries can also be configured.
-# Uncomment relevant parts to suite your local configuration and preferences.
-
-import toolset : using ;
-
-# 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 in standard location
-# and PATH).
-# using msvc ;
-
-# 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 locatioh of both headers and libraries
-# using stlport : /usr/include/stlport : /usr/lib ;
-
-
-# QT configuration
-
-# Configure, assuming QTDIR gives the installation prefix
-# using qt ;
-
-# Configure with explicit installation prefix
-# using qt : /usr/opt/qt ;
-
-# xsltproc (from libxslt) configuration
-using xsltproc ;
-
-# BoostBook configuration
-# using boostbook ;
- using boostbook : C:/Progra~1/docbook-xsl/docbook-xsl-1.66.1
- : C:/Progra~1/docbook/4.2
- ;
- using doxygen : C:/Progra~1/doxygen/bin/doxygen.exe ;
-
- using fop : C:/PROGRA~1/fop/FOP-02~1.4
- : C:/WINDOWS/system32/java.exe
- ;
-
-
-
-
-
-
-
-

Modified: branches/release/tools/wave/build/Jamfile.v2
==============================================================================
--- branches/release/tools/wave/build/Jamfile.v2 (original)
+++ branches/release/tools/wave/build/Jamfile.v2 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -11,18 +11,18 @@
 project
     :
     requirements
-# <link>static
-# <runtime-link>static
-# <threading>single
     ;
 
 exe wave
     :
     ../cpp.cpp
- /boost/wave//boost_wave
- /boost/program_options//boost_program_options
- /boost/filesystem//boost_filesystem
- /boost/serialization//boost_serialization
+ /boost//wave
+ /boost//program_options
+ /boost//filesystem
+ /boost//serialization
+ /boost//system
+ /boost//thread
+ /boost//date_time
     :
 # <debug-symbols>on
     :

Modified: branches/release/tools/wave/cpp.cpp
==============================================================================
--- branches/release/tools/wave/cpp.cpp (original)
+++ branches/release/tools/wave/cpp.cpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -8,8 +8,9 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-#define BOOST_WAVE_SERIALIZATION 1 // enable serialization
-#define BOOST_WAVE_BINARY_SERIALIZATION 1 // use binary archives
+#define BOOST_WAVE_SERIALIZATION 0 // enable serialization
+#define BOOST_WAVE_BINARY_SERIALIZATION 0 // use binary archives
+#define BOOST_WAVE_XML_SERIALIZATION 1 // use XML archives
 
 #include "cpp.hpp" // global configuration
 
@@ -38,6 +39,11 @@
 #include <boost/archive/binary_oarchive.hpp>
 typedef boost::archive::binary_iarchive iarchive;
 typedef boost::archive::binary_oarchive oarchive;
+#elif BOOST_WAVE_XML_SERIALIZATION != 0
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/archive/xml_oarchive.hpp>
+typedef boost::archive::xml_iarchive iarchive;
+typedef boost::archive::xml_oarchive oarchive;
 #else
 #include <boost/archive/text_iarchive.hpp>
 #include <boost/archive/text_oarchive.hpp>
@@ -459,12 +465,13 @@
 #endif
                 ifstream ifs (state_file.string().c_str(), mode);
                 if (ifs.is_open()) {
+ using namespace boost::serialization;
                     iarchive ia(ifs);
                     string version;
                     
- ia >> version; // load version
+ ia >> make_nvp("version", version); // load version
                     if (version == CPP_VERSION_FULL_STR)
- ia >> ctx; // load the internal tables from disc
+ ia >> make_nvp("state", ctx); // load the internal tables from disc
                     else {
                         cerr << "wave: detected version mismatch while loading state, state was not loaded." << endl;
                         cerr << " loaded version: " << version << endl;
@@ -507,10 +514,11 @@
                     // this is non-fatal
                 }
                 else {
+ using namespace boost::serialization;
                     oarchive oa(ofs);
                     string version(CPP_VERSION_FULL_STR);
- oa << version; // write version
- oa << ctx; // write the internal tables to disc
+ oa << make_nvp("version", version); // write version
+ oa << make_nvp("state", ctx); // write the internal tables to disc
                 }
             }
         }
@@ -521,6 +529,79 @@
 #endif
     }
 
+ ///////////////////////////////////////////////////////////////////////////
+ // list all defined macros
+ bool list_macro_names(context_type const& ctx, std::string filename)
+ {
+ // open file for macro names listing
+ std::ofstream macronames_out;
+ fs::path macronames_file (filename, fs::native);
+
+ if (macronames_file != "-") {
+ macronames_file = fs::complete(macronames_file);
+ fs::create_directories(macronames_file.branch_path());
+ macronames_out.open(macronames_file.string().c_str());
+ if (!macronames_out.is_open()) {
+ cerr << "wave: could not open file for macro name listing: "
+ << macronames_file.string() << endl;
+ return false;
+ }
+ }
+ else {
+ macronames_out.copyfmt(cout);
+ macronames_out.clear(cout.rdstate());
+ static_cast<std::basic_ios<char> &>(macronames_out).rdbuf(cout.rdbuf());
+ }
+
+ // simply list all defined macros and its definitions
+ typedef context_type::const_name_iterator name_iterator;
+ name_iterator end = ctx.macro_names_end();
+ for (name_iterator it = ctx.macro_names_begin(); it != end; ++it)
+ {
+ typedef std::vector<context_type::token_type> parameters_type;
+
+ bool has_pars = false;
+ bool predef = false;
+ context_type::position_type pos;
+ parameters_type pars;
+ context_type::token_sequence_type def;
+
+ if (ctx.get_macro_definition(*it, has_pars, predef, pos, pars, def))
+ {
+ macronames_out << *it;
+ if (has_pars) {
+ // list the parameter names for function style macros
+ macronames_out << "(";
+ parameters_type::const_iterator pend = pars.end();
+ for (parameters_type::const_iterator pit = pars.begin();
+ pit != pend; /**/)
+ {
+ macronames_out << (*pit).get_value();
+ if (++pit != pend)
+ macronames_out << ", ";
+ }
+ macronames_out << ")";
+ }
+ macronames_out << "=";
+
+ // print the macro definition
+ context_type::token_sequence_type::const_iterator dend = def.end();
+ for (context_type::token_sequence_type::const_iterator dit = def.begin();
+ dit != dend; ++dit)
+ {
+ macronames_out << (*dit).get_value();
+ }
+
+ // predefined macros get a 'P' appended
+ if (predef)
+ macronames_out << " (P)";
+
+ macronames_out << std::endl;
+ }
+ }
+ return true;
+ }
+
 ///////////////////////////////////////////////////////////////////////////////
 } // anonymous namespace
 
@@ -658,6 +739,10 @@
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
                  | boost::wave::support_option_include_guard_detection
 #endif
+#if BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES != 0
+ | boost::wave::support_option_emit_pragma_directives
+#endif
+ | boost::wave::support_option_insert_whitespace
                 ));
         }
         else if (vm.count("variadics")) {
@@ -698,7 +783,19 @@
             ctx.set_language(
                 boost::wave::enable_emit_line_directives(ctx.get_language(),
                     lineopt != 0));
+ }
 
+ // control whether whitespace should be inserted to disambiguate output
+ if (vm.count("disambiguate")) {
+ int disambiguateopt = vm["disambiguate"].as<int>();
+ if (0 != disambiguateopt && 1 != disambiguateopt) {
+ cerr << "wave: bogus value for --disambiguate command line option: "
+ << disambiguateopt << endl;
+ return -1;
+ }
+ ctx.set_language(
+ boost::wave::enable_insert_whitespace(ctx.get_language(),
+ disambiguateopt != 0));
         }
 
     // add include directories to the system include search paths
@@ -865,7 +962,7 @@
             cerr << "wave: ignoring the command line option 'state', "
                  << "use it in interactive mode only." << endl;
         }
-
+
     // >>>>>>>>>>>>> The actual preprocessing happens here. <<<<<<<<<<<<<<<<<<<
     // loop over the input lines if reading from stdin, otherwise this loop
     // will be executed once
@@ -892,8 +989,7 @@
 
                     // print out the current token value
                         if (allow_output) {
- if (output.rdstate() & (std::ios::badbit | std::ios::failbit | std::ios::eofbit))
- {
+ if (!output.good()) {
                                 cerr << "wave: problem writing to the current "
                                      << "output file" << endl;
                                 cerr << report_iostate_error(output.rdstate());
@@ -914,6 +1010,7 @@
                 // some preprocessing error
                     if (is_interactive || boost::wave::is_recoverable(e)) {
                         error_count += report_error_message(ctx, e);
+ ++first; // advance to the next token
                     }
                     else {
                         throw; // re-throw for non-recoverable errors
@@ -925,6 +1022,7 @@
                         boost::wave::cpplexer::is_recoverable(e))
                     {
                         error_count += report_error_message(e);
+ ++first; // advance to the next token
                     }
                     else {
                         throw; // re-throw for non-recoverable errors
@@ -935,6 +1033,12 @@
 
         if (is_interactive)
             save_state(vm, ctx); // write the internal tables to disc
+
+ // list all defined macros at the end of the preprocessing
+ if (vm.count("macronames")) {
+ if (!list_macro_names(ctx, vm["macronames"].as<string>()))
+ return -1;
+ }
     }
     catch (boost::wave::cpp_exception const &e) {
     // some preprocessing error
@@ -1029,6 +1133,8 @@
 #endif
             ("listincludes,l", po::value<string>(),
                 "list names of included files to a file [arg] or to stdout [-]")
+ ("macronames,m", po::value<string>(),
+ "list all defined macros to a file [arg] or to stdout [-]")
             ("preserve,p", po::value<int>()->default_value(0),
                 "preserve whitespace\n"
                             "0: no whitespace is preserved (default),\n"
@@ -1038,6 +1144,11 @@
                 "control the generation of #line directives\n"
                             "0: no #line directives are generated,\n"
                             "1: #line directives will be emitted (default)")
+ ("disambiguate", po::value<int>()->default_value(1),
+ "control whitespace insertion to disambiguate\n"
+ "consecutive tokens\n"
+ "0: no additional whitespace is generated,\n"
+ "1: whitespace is used to disambiguate output (default)")
             ("extended,x", "enable the #pragma wave system() directive")
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
             ("noguard,G", "disable include guard detection")

Modified: branches/release/tools/wave/cpp_version.hpp
==============================================================================
--- branches/release/tools/wave/cpp_version.hpp (original)
+++ branches/release/tools/wave/cpp_version.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -19,7 +19,7 @@
 
 #define CPP_VERSION_FULL_STR BOOST_PP_STRINGIZE(CPP_VERSION_FULL)
                                      
-#define CPP_VERSION_DATE 20060919L
-#define CPP_VERSION_DATE_STR "20060919"
+#define CPP_VERSION_DATE 20070111L
+#define CPP_VERSION_DATE_STR "20070111"
 
 #endif // !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED)

Modified: branches/release/tools/wave/trace_macro_expansion.hpp
==============================================================================
--- branches/release/tools/wave/trace_macro_expansion.hpp (original)
+++ branches/release/tools/wave/trace_macro_expansion.hpp 2007-11-15 11:31:06 EST (Thu, 15 Nov 2007)
@@ -16,6 +16,7 @@
 
 #include <ostream>
 #include <string>
+#include <stack>
 
 #include <boost/assert.hpp>
 #include <boost/config.hpp>
@@ -60,27 +61,28 @@
 // disabled
 //
 ///////////////////////////////////////////////////////////////////////////////
-class no_pragma_system_exception :
+class bad_pragma_exception :
     public boost::wave::preprocess_exception
 {
 public:
     enum error_code {
- pragma_system_not_enabled = boost::wave::preprocess_exception::last_error_number + 1
+ pragma_system_not_enabled = boost::wave::preprocess_exception::last_error_number + 1,
+ pragma_mismatched_push_pop,
     };
     
- no_pragma_system_exception(char const *what_, error_code code, int line_,
+ bad_pragma_exception(char const *what_, error_code code, int line_,
         int column_, char const *filename_) throw()
     : boost::wave::preprocess_exception(what_,
             (boost::wave::preprocess_exception::error_code)code, line_,
             column_, filename_)
     {
     }
- ~no_pragma_system_exception() throw() {}
+ ~bad_pragma_exception() throw() {}
     
     
     virtual char const *what() const throw()
     {
- return "boost::wave::no_pragma_system_exception";
+ return "boost::wave::bad_pragma_exception";
     }
     virtual bool is_recoverable() const throw()
     {
@@ -93,12 +95,26 @@
     
     static char const *error_text(int code)
     {
- return "the directive '#pragma wave system()' was not enabled, use the "
- "-x command line argument to enable the execution of";
+ switch(code) {
+ case pragma_system_not_enabled:
+ return "the directive '#pragma wave system()' was not enabled, use the "
+ "-x command line argument to enable the execution of";
+
+ case pragma_mismatched_push_pop:
+ return "unbalanced #pragma push/pop in input file(s) for option";
+ }
+ return "Unknown exception";
     }
     static boost::wave::util::severity severity_level(int code)
     {
- return boost::wave::util::severity_remark;
+ switch(code) {
+ case pragma_system_not_enabled:
+ return boost::wave::util::severity_remark;
+
+ case pragma_mismatched_push_pop:
+ return boost::wave::util::severity_error;
+ }
+ return boost::wave::util::severity_fatal;
     }
     static char const *severity_text(int code)
     {
@@ -146,29 +162,55 @@
     
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'expanding_function_like_macro' is called, whenever a
+ // The function 'expanding_function_like_macro' is called whenever a
     // function-like macro is to be expanded.
     //
- // The 'macrodef' parameter marks the position, where the macro to expand
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
+ // The parameter 'macrodef' marks the position, where the macro to expand
     // is defined.
- // The 'formal_args' parameter holds the formal arguments used during the
+ //
+ // The parameter 'formal_args' holds the formal arguments used during the
     // definition of the macro.
- // The 'definition' parameter holds the macro definition for the macro to
+ //
+ // The parameter 'definition' holds the macro definition for the macro to
     // trace.
     //
- // The 'macrocall' parameter marks the position, where this macro invoked.
- // The 'arguments' parameter holds the macro arguments used during the
+ // The parameter 'macro_call' marks the position, where this macro invoked.
+ //
+ // The parameter 'arguments' holds the macro arguments used during the
     // invocation of the macro
     //
+ // The parameters 'seqstart' and 'seqend' point into the input token
+ // stream allowing to access the whole token sequence comprising the macro
+ // invocation (starting with the opening parenthesis and ending after the
+ // closing one).
+ //
     ///////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ // old signature
     template <typename ContainerT>
     void expanding_function_like_macro(
         TokenT const &macrodef, std::vector<TokenT> const &formal_args,
         ContainerT const &definition,
         TokenT const &macrocall, std::vector<ContainerT> const &arguments)
     {
- if (!enabled_macro_tracing()) return;
-
+ if (!enabled_macro_tracing())
+ return;
+#else
+ // new signature
+ template <typename ContextT, typename ContainerT, typename IteratorT>
+ bool
+ expanding_function_like_macro(ContextT const& ctx,
+ TokenT const &macrodef, std::vector<TokenT> const &formal_args,
+ ContainerT const &definition,
+ TokenT const &macrocall, std::vector<ContainerT> const &arguments,
+ IteratorT const& seqstart, IteratorT const& seqend)
+ {
+ if (!enabled_macro_tracing())
+ return false;
+#endif
         if (0 == get_level()) {
         // output header line
         BOOST_WAVE_OSSTREAM stream;
@@ -240,27 +282,48 @@
             close_trace_body();
         }
         open_trace_body();
+
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
+ return false;
+#endif
     }
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'expanding_object_like_macro' is called, whenever a
+ // The function 'expanding_object_like_macro' is called whenever a
     // object-like macro is to be expanded .
     //
- // The 'macrodef' parameter marks the position, where the macro to expand
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
+ // The parameter 'macrodef' marks the position, where the macro to expand
     // is defined.
- // The 'definition' parameter holds the macro definition for the macro to
+ //
+ // The definition 'definition' holds the macro definition for the macro to
     // trace.
     //
- // The 'macrocall' parameter marks the position, where this macro invoked.
+ // The parameter 'macrocall' marks the position, where this macro invoked.
     //
     ///////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ // old signature
     template <typename ContainerT>
     void expanding_object_like_macro(TokenT const &macrodef,
         ContainerT const &definition, TokenT const &macrocall)
     {
- if (!enabled_macro_tracing()) return;
-
+ if (!enabled_macro_tracing())
+ return;
+#else
+ // new signature
+ template <typename ContextT, typename ContainerT>
+ bool
+ expanding_object_like_macro(ContextT const& ctx,
+ TokenT const &macrodef, ContainerT const &definition,
+ TokenT const &macrocall)
+ {
+ if (!enabled_macro_tracing())
+ return false;
+#endif
         if (0 == get_level()) {
         // output header line
         BOOST_WAVE_OSSTREAM stream;
@@ -282,19 +345,33 @@
             output(BOOST_WAVE_GETSTRING(stream));
         }
         open_trace_body();
+
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
+ return false;
+#endif
     }
     
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'expanded_macro' is called, whenever the expansion of a
+ // The function 'expanded_macro' is called whenever the expansion of a
     // macro is finished but before the rescanning process starts.
     //
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
     // The parameter 'result' contains the token sequence generated as the
     // result of the macro expansion.
     //
     ///////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ // old signature
     template <typename ContainerT>
     void expanded_macro(ContainerT const &result)
+#else
+ // new signature
+ template <typename ContextT, typename ContainerT>
+ void expanded_macro(ContextT const& ctx,ContainerT const &result)
+#endif
     {
         if (!enabled_macro_tracing()) return;
         
@@ -307,15 +384,25 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'rescanned_macro' is called, whenever the rescanning of a
+ // The function 'rescanned_macro' is called whenever the rescanning of a
     // macro is finished.
     //
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
     // The parameter 'result' contains the token sequence generated as the
     // result of the rescanning.
     //
     ///////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ // old signature
     template <typename ContainerT>
     void rescanned_macro(ContainerT const &result)
+#else
+ // new signature
+ template <typename ContextT, typename ContainerT>
+ void rescanned_macro(ContextT const& ctx,ContainerT const &result)
+#endif
     {
         if (!enabled_macro_tracing() || get_level() == 0)
             return;
@@ -332,15 +419,17 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'interpret_pragma' is called, whenever a #pragma wave
- // directive is found, which isn't known to the core Wave library.
+ // The function 'interpret_pragma' is called whenever a #pragma command
+ // directive is found which isn't known to the core Wave library, where
+ // command is the value defined as the BOOST_WAVE_PRAGMA_KEYWORD constant
+ // which defaults to "wave".
     //
     // The parameter 'ctx' is a reference to the context object used for
     // instantiating the preprocessing iterators by the user.
     //
     // The parameter 'pending' may be used to push tokens back into the input
     // stream, which are to be used as the replacement text for the whole
- // #pragma wave() directive.
+ // #pragma directive.
     //
     // The parameter 'option' contains the name of the interpreted pragma.
     //
@@ -387,10 +476,11 @@
             if (!enable_system_command) {
             // if the #pragma wave system() directive is not enabled, throw
             // a corresponding error (actually its a remark),
- BOOST_WAVE_THROW(no_pragma_system_exception,
+ BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
                     pragma_system_not_enabled,
                     boost::wave::util::impl::as_string(values).c_str(),
                     act_token.get_position());
+ return false;
             }
             
         // try to spawn the given argument as a system command and return the
@@ -399,9 +489,10 @@
         }
         if (option.get_value() == "stop") {
         // stop the execution and output the argument
- BOOST_WAVE_THROW(preprocess_exception, error_directive,
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception, error_directive,
                 boost::wave::util::impl::as_string(values).c_str(),
                 act_token.get_position());
+ return false;
         }
         if (option.get_value() == "option") {
         // handle different options
@@ -412,9 +503,12 @@
         
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'opened_include_file' is called, whenever a file referred
+ // The function 'opened_include_file' is called whenever a file referred
     // by an #include directive was successfully located and opened.
     //
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
     // The parameter 'filename' contains the file system path of the
     // opened file (this is relative to the directory of the currently
     // processed file or a absolute path depending on the paths given as the
@@ -426,10 +520,21 @@
     // found as a result of a #include <...> directive.
     //
     ///////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ // old signature
     void
     opened_include_file(std::string const &relname, std::string const &absname,
         std::size_t include_depth, bool is_system_include)
     {
+#else
+ // new signature
+ template <typename ContextT>
+ void
+ opened_include_file(ContextT const& ctx, std::string const &relname,
+ std::string const &absname, bool is_system_include)
+ {
+ std::size_t include_depth = ctx.get_max_include_nesting_depth();
+#endif
         if (enabled_include_tracing()) {
             // print indented filename
             for (std::size_t i = 0; i < include_depth; ++i)
@@ -446,8 +551,8 @@
 
     ///////////////////////////////////////////////////////////////////////////
     //
- // The function 'may_skip_whitespace' is called, will be called by the
- // library, whenever a token is about to be returned to the calling
+ // The function 'may_skip_whitespace' will be called by the
+ // library whenever a token is about to be returned to the calling
     // application.
     //
     // The parameter 'ctx' is a reference to the context object used for
@@ -470,18 +575,62 @@
     //
     ///////////////////////////////////////////////////////////////////////////
     template <typename ContextT>
- bool may_skip_whitespace(ContextT const &ctx, TokenT &token, bool &skipped_newline)
+ bool may_skip_whitespace(ContextT const &ctx, TokenT &token,
+ bool &skipped_newline)
     {
         return this->base_type::may_skip_whitespace(ctx, token, skipped_newline) ?
             !preserve_whitespace : false;
     }
 
+ ///////////////////////////////////////////////////////////////////////////
+ //
+ // The function 'throw_exception' will be called by the library whenever a
+ // preprocessing exception occurs.
+ //
+ // The parameter 'ctx' is a reference to the context object used for
+ // instantiating the preprocessing iterators by the user.
+ //
+ // The parameter 'e' is the exception object containing detailed error
+ // information.
+ //
+ // The default behavior is to call the function boost::throw_exception.
+ //
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename ContextT>
+ void
+ throw_exception(ContextT const& ctx, boost::wave::preprocess_exception const& e)
+ {
+#if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
+ if (!is_import_directive_error(e))
+ boost::throw_exception(e);
+#else
+ boost::throw_exception(e);
+#endif
+ }
+ using base_type::throw_exception;
+
 protected:
+#if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
+ ///////////////////////////////////////////////////////////////////////////
+ // Avoid throwing an error from a #import directive
+ bool is_import_directive_error(boost::wave::preprocess_exception const& e)
+ {
+ using namespace boost::wave;
+ if (e.get_errorcode() != preprocess_exception::ill_formed_directive)
+ return false;
+
+ // the error string is formatted as 'severity: error: directive'
+ std::string error(e.description());
+ std::string::size_type p = error.find_last_of(":");
+ return p != std::string::npos && error.substr(p+2) == "import";
+ }
+#endif
+
     ///////////////////////////////////////////////////////////////////////////
     // Interpret the different Wave specific pragma directives/operators
     template <typename ContextT, typename ContainerT>
     bool
- interpret_pragma_trace(ContextT const &/*ctx*/, ContainerT const &values,
+ interpret_pragma_trace(ContextT& ctx, ContainerT const &values,
         typename ContextT::token_type const &act_token)
     {
         typedef typename ContextT::token_type token_type;
@@ -520,53 +669,96 @@
                 option_str += boost::wave::util::impl::as_string(values);
                 option_str += ")";
             }
- BOOST_WAVE_THROW(preprocess_exception, ill_formed_pragma_option,
- option_str.c_str(), act_token.get_position());
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception,
+ ill_formed_pragma_option, option_str.c_str(),
+ act_token.get_position());
+ return false;
         }
         return true;
     }
 
     ///////////////////////////////////////////////////////////////////////////
- // interpret the pragma wave option(preserve: [0|1|2]) directive
- template <typename ContextT, typename IteratorT>
- bool
- interpret_pragma_option_preserve(ContextT &ctx, IteratorT &it,
- IteratorT end, typename ContextT::token_type const &act_token)
+ // interpret the pragma wave option(preserve: [0|1|2|push|pop]) directive
+ template <typename ContextT>
+ static bool
+ interpret_pragma_option_preserve_set(int mode, bool &preserve_whitespace,
+ ContextT &ctx)
     {
- using namespace boost::wave;
-
- token_id id = util::impl::skip_whitespace(it, end);
- if (T_COLON == id)
- id = util::impl::skip_whitespace(it, end);
-
- if (T_PP_NUMBER != id)
- return false;
-
- using namespace std; // some platforms have atoi in namespace std
- switch(atoi((*it).get_value().c_str())) {
+ switch(mode) {
         case 0:
             preserve_whitespace = false;
             ctx.set_language(
                 enable_preserve_comments(ctx.get_language(), false),
                 false);
             break;
-
+
         case 2:
             preserve_whitespace = true;
- /* fall through */
+ /* fall through */
         case 1:
             ctx.set_language(
                 enable_preserve_comments(ctx.get_language()),
                 false);
             break;
-
+
         default:
- return false;
+ return false;
         }
         return true;
     }
+
+ template <typename ContextT, typename IteratorT>
+ bool
+ interpret_pragma_option_preserve(ContextT &ctx, IteratorT &it,
+ IteratorT end, typename ContextT::token_type const &act_token)
+ {
+ using namespace boost::wave;
+
+ token_id id = util::impl::skip_whitespace(it, end);
+ if (T_COLON == id)
+ id = util::impl::skip_whitespace(it, end);
+
+ // implement push/pop
+ if (T_IDENTIFIER == id) {
+ if ((*it).get_value() == "push") {
+ // push current preserve option onto the internal option stack
+ if (preserve_whitespace) {
+ if (need_preserve_comments(ctx.get_language()))
+ preserve_options.push(2);
+ else
+ preserve_options.push(1);
+ }
+ else {
+ preserve_options.push(0);
+ }
+ return true;
+ }
+ else if ((*it).get_value() == "pop") {
+ // test for mismatched push/pop #pragmas
+ if (preserve_options.empty()) {
+ BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
+ pragma_mismatched_push_pop, "preserve",
+ act_token.get_position());
+ }
+
+ // pop output preserve from the internal option stack
+ bool result = interpret_pragma_option_preserve_set(
+ preserve_options.top(), preserve_whitespace, ctx);
+ line_options.pop();
+ return result;
+ }
+ return false;
+ }
+
+ if (T_PP_NUMBER != id)
+ return false;
+
+ using namespace std; // some platforms have atoi in namespace std
+ return interpret_pragma_option_preserve_set(
+ atoi((*it).get_value().c_str()), preserve_whitespace, ctx);
+ }
     
- // interpret the pragma wave option(line: [0|1]) directive
+ // interpret the pragma wave option(line: [0|1|push|pop]) directive
     template <typename ContextT, typename IteratorT>
     bool
     interpret_pragma_option_line(ContextT &ctx, IteratorT &it,
@@ -578,6 +770,31 @@
         if (T_COLON == id)
             id = util::impl::skip_whitespace(it, end);
         
+ // implement push/pop
+ if (T_IDENTIFIER == id) {
+ if ((*it).get_value() == "push") {
+ // push current line option onto the internal option stack
+ line_options.push(need_emit_line_directives(ctx.get_language()));
+ return true;
+ }
+ else if ((*it).get_value() == "pop") {
+ // test for mismatched push/pop #pragmas
+ if (line_options.empty()) {
+ BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
+ pragma_mismatched_push_pop, "line",
+ act_token.get_position());
+ }
+
+ // pop output line from the internal option stack
+ ctx.set_language(
+ enable_emit_line_directives(ctx.get_language(), line_options.top()),
+ false);
+ line_options.pop();
+ return true;
+ }
+ return false;
+ }
+
         if (T_PP_NUMBER != id)
             return false;
             
@@ -593,7 +810,49 @@
         return false;
     }
 
- // interpret the pragma wave option(output: ["filename"|null]) directive
+ // interpret the pragma wave option(output: ["filename"|null|default|push|pop])
+ // directive
+ template <typename ContextT>
+ bool
+ interpret_pragma_option_output_open(boost::filesystem::path &fpath,
+ ContextT& ctx, typename ContextT::token_type const &act_token)
+ {
+ namespace fs = boost::filesystem;
+
+ // ensure all directories for this file do exist
+ fs::create_directories(fpath.branch_path());
+
+ // figure out, whether the file to open was last accessed by us
+ std::ios::openmode mode = std::ios::out;
+ if (fs::exists(fpath) && fs::last_write_time(fpath) >= started_at)
+ mode = (std::ios::openmode)(std::ios::out | std::ios::app);
+
+ // close the current file
+ if (outputstrm.is_open())
+ outputstrm.close();
+
+ // open the new file
+ outputstrm.open(fpath.string().c_str(), mode);
+ if (!outputstrm.is_open()) {
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception,
+ could_not_open_output_file,
+ fpath.string().c_str(), act_token.get_position());
+ return false;
+ }
+ generate_output = true;
+ current_outfile = fpath;
+ return true;
+ }
+
+ bool interpret_pragma_option_output_close(bool generate)
+ {
+ if (outputstrm.is_open())
+ outputstrm.close();
+ current_outfile = boost::filesystem::path();
+ generate_output = generate;
+ return true;
+ }
+
     template <typename ContextT, typename IteratorT>
     bool
     interpret_pragma_option_output(ContextT &ctx, IteratorT &it,
@@ -609,6 +868,7 @@
         if (T_COLON == id)
             id = util::impl::skip_whitespace(it, end);
         
+ bool result = false;
         if (T_STRINGLIT == id) {
             namespace fs = boost::filesystem;
             
@@ -617,71 +877,72 @@
                 util::impl::unescape_lit(fname.substr(1, fname.size()-2)).c_str(),
                 fs::native);
             fpath = fs::complete(fpath, ctx.get_current_directory());
-
- // close the current file
- if (outputstrm.is_open())
- outputstrm.close();
+ result = interpret_pragma_option_output_open(fpath, ctx, act_token);
+ }
+ else if (T_IDENTIFIER == id) {
+ if ((*it).get_value() == "null") {
+ // suppress all output from this point on
+ result = interpret_pragma_option_output_close(false);
+ }
+ else if ((*it).get_value() == "push") {
+ // initialize the current_outfile, if appropriate
+ if (output_options.empty() && current_outfile.empty() &&
+ !default_outfile.empty() && default_outfile != "-")
+ {
+ current_outfile = fs::complete(default_outfile,
+ ctx.get_current_directory());
+ }
 
- // ensure all directories for this file do exist
- fs::create_directories(fpath.branch_path());
-
- // figure out, whether the file to open was last accessed by us
- std::ios::openmode mode = std::ios::out;
- if (fs::exists(fpath) && fs::last_write_time(fpath) >= started_at)
- mode = (std::ios::openmode)(std::ios::out | std::ios::app);
-
- // open the new file
- outputstrm.open(fpath.string().c_str(), mode);
- if (!outputstrm.is_open()) {
- BOOST_WAVE_THROW(preprocess_exception, could_not_open_output_file,
- fpath.string().c_str(), act_token.get_position());
- }
- generate_output = true;
- return true;
- }
- if (T_IDENTIFIER == id && (*it).get_value() == "null") {
- // suppress all output from this point on
- if (outputstrm.is_open())
- outputstrm.close();
- generate_output = false;
- return true;
+ // push current output option onto the internal option stack
+ output_options.push(
+ output_option_type(generate_output, current_outfile));
+ result = true;
+ }
+ else if ((*it).get_value() == "pop") {
+ // test for mismatched push/pop #pragmas
+ if (output_options.empty()) {
+ BOOST_WAVE_THROW_CTX(ctx, bad_pragma_exception,
+ pragma_mismatched_push_pop, "output",
+ act_token.get_position());
+ return false;
+ }
+
+ // pop output option from the internal option stack
+ output_option_type const& opts = output_options.top();
+ generate_output = opts.first;
+ current_outfile = opts.second;
+ if (!current_outfile.empty()) {
+ // re-open the last file
+ result = interpret_pragma_option_output_open(current_outfile,
+ ctx, act_token);
+ }
+ else {
+ // either no output or generate to std::cout
+ result = interpret_pragma_option_output_close(generate_output);
+ }
+ output_options.pop();
+ }
         }
- if (T_DEFAULT == id) {
+ else if (T_DEFAULT == id) {
         // re-open the default output given on command line
- if (outputstrm.is_open())
- outputstrm.close();
-
             if (!default_outfile.empty()) {
                 if (default_outfile == "-") {
                 // the output was suppressed on the command line
- generate_output = false;
+ result = interpret_pragma_option_output_close(false);
                 }
                 else {
                 // there was a file name on the command line
- fs::path fpath(default_outfile, fs::native);
-
- // figure out, whether the file to open was last accessed by us
- std::ios::openmode mode = std::ios::out;
- if (fs::exists(fpath) && fs::last_write_time(fpath) >= started_at)
- mode = (std::ios::openmode)(std::ios::out | std::ios::app);
-
- // open the new file
- outputstrm.open(fpath.string().c_str(), mode);
- if (!outputstrm.is_open()) {
- BOOST_WAVE_THROW(preprocess_exception,
- could_not_open_output_file, fpath.string().c_str(),
- act_token.get_position());
- }
- generate_output = true;
+ fs::path fpath(default_outfile, fs::native);
+ result = interpret_pragma_option_output_open(fpath, ctx,
+ act_token);
                 }
             }
             else {
             // generate the output to std::cout
- generate_output = true;
+ result = interpret_pragma_option_output_close(true);
             }
- return true;
         }
- return false;
+ return result;
     }
 
     ///////////////////////////////////////////////////////////////////////////
@@ -703,17 +964,17 @@
             
             token_type const &value = *it;
             if (value.get_value() == "preserve") {
- // #pragma wave option(preserve: [0|1|2])
+ // #pragma wave option(preserve: [0|1|2|push|pop])
                 valid_option = interpret_pragma_option_preserve(ctx, it, end,
                     act_token);
             }
             else if (value.get_value() == "line") {
- // #pragma wave option(line: [0|1])
+ // #pragma wave option(line: [0|1|push|pop])
                 valid_option = interpret_pragma_option_line(ctx, it, end,
                     act_token);
             }
             else if (value.get_value() == "output") {
- // #pragma wave option(output: ["filename"|null])
+ // #pragma wave option(output: ["filename"|null|default|push|pop])
                 valid_option = interpret_pragma_option_output(ctx, it, end,
                     act_token);
             }
@@ -727,8 +988,10 @@
                     option_str += util::impl::as_string(values);
                     option_str += ")";
                 }
- BOOST_WAVE_THROW(preprocess_exception, ill_formed_pragma_option,
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception,
+ ill_formed_pragma_option,
                     option_str.c_str(), act_token.get_position());
+ return false;
             }
             
             token_id id = util::impl::skip_whitespace(it, end);
@@ -742,7 +1005,7 @@
     // interpret the #pragma wave system() directive
     template <typename ContextT, typename ContainerT>
     bool
- interpret_pragma_system(ContextT const &ctx, ContainerT &pending,
+ interpret_pragma_system(ContextT& ctx, ContainerT &pending,
         ContainerT const &values,
         typename ContextT::token_type const &act_token)
     {
@@ -762,18 +1025,21 @@
         string_type error_str("unable to spawn command: ");
         
             error_str += native_cmd;
- BOOST_WAVE_THROW(preprocess_exception, ill_formed_pragma_option,
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception,
+ ill_formed_pragma_option,
                 error_str.c_str(), act_token.get_position());
+ return false;
         }
         
     // rescan the content of the stdout_file and insert it as the
     // _Pragma replacement
         typedef typename ContextT::lexer_type lexer_type;
         typedef typename ContextT::input_policy_type input_policy_type;
- typedef boost::wave::iteration_context<lexer_type, input_policy_type>
+ typedef boost::wave::iteration_context<
+ ContextT, lexer_type, input_policy_type>
             iteration_context_type;
 
- iteration_context_type iter_ctx(stdout_file.c_str(),
+ iteration_context_type iter_ctx(ctx, stdout_file.c_str(),
         act_token.get_position(), ctx.get_language());
     ContainerT pragma;
 
@@ -876,10 +1142,16 @@
     bool enable_system_command; // enable #pragma wave system() command
     bool preserve_whitespace; // enable whitespace preservation
     bool& generate_output; // allow generated tokens to be streamed to output
- std::string const& default_outfile; // name of the output file given on command line
+ std::string const& default_outfile; // name of the output file given on command line
+ boost::filesystem::path current_outfile; // name of the current output file
     
     stop_watch elapsed_time; // trace timings
     std::time_t started_at; // time, this process was started at
+
+ typedef std::pair<bool, boost::filesystem::path> output_option_type;
+ std::stack<output_option_type> output_options; // output option stack
+ std::stack<int> line_options; // line option stack
+ std::stack<int> preserve_options; // preserve option stack
 };
 
 #undef BOOST_WAVE_GETSTRING


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk