Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59547 - in branches/quickbook-1.5-spirit2: . test
From: daniel_james_at_[hidden]
Date: 2010-02-07 04:05:35


Author: danieljames
Date: 2010-02-07 04:05:32 EST (Sun, 07 Feb 2010)
New Revision: 59547
URL: http://svn.boost.org/trac/boost/changeset/59547

Log:
Fix ids in included files.
Text files modified:
   branches/quickbook-1.5-spirit2/actions.cpp | 12 ++++++++----
   branches/quickbook-1.5-spirit2/actions_class.cpp | 1 +
   branches/quickbook-1.5-spirit2/actions_class.hpp | 1 +
   branches/quickbook-1.5-spirit2/test/include_1_5.quickbook | 2 +-
   4 files changed, 11 insertions(+), 5 deletions(-)

Modified: branches/quickbook-1.5-spirit2/actions.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/actions.cpp (original)
+++ branches/quickbook-1.5-spirit2/actions.cpp 2010-02-07 04:05:32 EST (Sun, 07 Feb 2010)
@@ -98,12 +98,18 @@
         // The doc_info in the file has been parsed. Here's what we'll do
         // *before* anything else.
 
+ if (!info.doc_title.empty())
+ actions.doc_title = info.doc_title;
+
         if (info.doc_id.empty())
             info.doc_id = detail::make_identifier(
- info.doc_title.begin(),info.doc_title.end());
+ actions.doc_title.begin(),actions.doc_title.end());
+
+ if(actions.doc_id.empty())
+ actions.doc_id = info.doc_id;
 
         if (info.doc_dirname.empty() && info.doc_type == "library")
- info.doc_dirname = info.doc_id;
+ info.doc_dirname = actions.doc_id;
 
         if (info.doc_last_revision.empty())
         {
@@ -120,8 +126,6 @@
             info.doc_last_revision = strdate;
         }
 
- if(!info.doc_id.empty()) actions.doc_id = info.doc_id;
-
         // if we're ignoring the document info, we're done.
         if (ignore_docinfo)
         {

Modified: branches/quickbook-1.5-spirit2/actions_class.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/actions_class.cpp (original)
+++ branches/quickbook-1.5-spirit2/actions_class.cpp 2010-02-07 04:05:32 EST (Sun, 07 Feb 2010)
@@ -23,6 +23,7 @@
     actions::actions(char const* filein_, fs::path const& outdir_, string_stream& out_)
     // header info
         : doc_id()
+ , doc_title()
 
     // main output stream
         , phrase(out_)

Modified: branches/quickbook-1.5-spirit2/actions_class.hpp
==============================================================================
--- branches/quickbook-1.5-spirit2/actions_class.hpp (original)
+++ branches/quickbook-1.5-spirit2/actions_class.hpp 2010-02-07 04:05:32 EST (Sun, 07 Feb 2010)
@@ -35,6 +35,7 @@
         static int const max_template_depth = 100;
 
         std::string doc_id;
+ std::string doc_title;
 
     // main output stream
         collector phrase;

Modified: branches/quickbook-1.5-spirit2/test/include_1_5.quickbook
==============================================================================
--- branches/quickbook-1.5-spirit2/test/include_1_5.quickbook (original)
+++ branches/quickbook-1.5-spirit2/test/include_1_5.quickbook 2010-02-07 04:05:32 EST (Sun, 07 Feb 2010)
@@ -5,4 +5,4 @@
 
 [include include-sub.quickbook]
 [include include-sub2.quickbook]
-[include:foo include-sub2.quickbook]
\ No newline at end of file
+[include:foo include-sub2.quickbook]


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