Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63921 - in branches/release/tools/quickbook: . detail
From: daniel_james_at_[hidden]
Date: 2010-07-12 07:08:44


Author: danieljames
Date: 2010-07-12 07:08:43 EDT (Mon, 12 Jul 2010)
New Revision: 63921
URL: http://svn.boost.org/trac/boost/changeset/63921

Log:
Redo previous merge.

Looks like there were some changes in my release repository that were
accidentally included.

Properties modified:
   branches/release/tools/quickbook/ (props changed)
Text files modified:
   branches/release/tools/quickbook/detail/actions.cpp | 33 ++++++++-------------------------
   branches/release/tools/quickbook/detail/utils.cpp | 7 +++++++
   branches/release/tools/quickbook/detail/utils.hpp | 11 +++++++++++
   3 files changed, 26 insertions(+), 25 deletions(-)

Modified: branches/release/tools/quickbook/detail/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions.cpp (original)
+++ branches/release/tools/quickbook/detail/actions.cpp 2010-07-12 07:08:43 EDT (Mon, 12 Jul 2010)
@@ -30,23 +30,6 @@
     char const* quickbook_get_time = "__quickbook_get_time__";
 
     namespace {
- char filter_identifier_char(char ch)
- {
- if (!std::isalnum(static_cast<unsigned char>(ch)))
- ch = '_';
- return static_cast<char>(std::tolower(static_cast<unsigned char>(ch)));
- }
-
- template <typename Iterator>
- inline std::string
- make_identifier(Iterator const& first, Iterator const& last)
- {
- std::string out_name;
- for (Iterator i = first; i != last; ++i)
- out_name += filter_identifier_char(*i);
- return out_name;
- }
-
         std::string fully_qualified_id(std::string const& library_id,
             std::string const& qualified_section_id,
             std::string const& section_id)
@@ -115,7 +98,7 @@
         {
             out << "<anchor id=\""
                 << section_id << '.'
- << make_identifier(str.begin(), str.end())
+ << detail::make_identifier(str.begin(), str.end())
                 << "\" />"
                 << pre << str << post
                 ;
@@ -123,8 +106,8 @@
         else // version 1.3 and above
         {
             std::string id = qbk_version_n >= 106 ?
- make_identifier(first, last) :
- make_identifier(str.begin(), str.end());
+ detail::make_identifier(first, last) :
+ detail::make_identifier(str.begin(), str.end());
 
             std::string anchor =
                 fully_qualified_id(library_id, qualified_section_id, id);
@@ -150,8 +133,8 @@
         phrase.swap(str);
 
         std::string id = qbk_version_n >= 106 ?
- make_identifier(first, last) :
- make_identifier(str.begin(), str.end());
+ detail::make_identifier(first, last) :
+ detail::make_identifier(str.begin(), str.end());
 
         std::string anchor =
             fully_qualified_id(library_id, qualified_section_id, id);
@@ -1055,7 +1038,7 @@
             else if(has_title) {
                 table_id = fully_qualified_id(actions.doc_id,
                     actions.qualified_section_id,
- make_identifier(first, last));
+ detail::make_identifier(first, last));
             }
         }
 
@@ -1143,7 +1126,7 @@
     void begin_section_action::operator()(iterator first, iterator last) const
     {
         section_id = element_id.empty() ?
- make_identifier(first, last) :
+ detail::make_identifier(first, last) :
             element_id;
 
         if (section_level != 0)
@@ -1531,7 +1514,7 @@
         // *before* anything else.
 
         if (actions.doc_id.empty())
- actions.doc_id = make_identifier(
+ actions.doc_id = detail::make_identifier(
                 actions.doc_title.begin(),actions.doc_title.end());
 
         if (actions.doc_dirname.empty() && actions.doc_type == "library")

Modified: branches/release/tools/quickbook/detail/utils.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/utils.cpp (original)
+++ branches/release/tools/quickbook/detail/utils.cpp 2010-07-12 07:08:43 EDT (Mon, 12 Jul 2010)
@@ -51,6 +51,13 @@
         out << ch;
     }
 
+ char filter_identifier_char(char ch)
+ {
+ if (!std::isalnum(static_cast<unsigned char>(ch)))
+ ch = '_';
+ return static_cast<char>(std::tolower(static_cast<unsigned char>(ch)));
+ }
+
     // un-indent a code segment
     void unindent(std::string& program)
     {

Modified: branches/release/tools/quickbook/detail/utils.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/utils.hpp (original)
+++ branches/release/tools/quickbook/detail/utils.hpp 2010-07-12 07:08:43 EDT (Mon, 12 Jul 2010)
@@ -21,6 +21,17 @@
     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
+ make_identifier(Iterator const& first, Iterator const& last)
+ {
+ std::string out_name;
+ for (Iterator i = first; i != last; ++i)
+ out_name += filter_identifier_char(*i);
+ return out_name;
+ }
 
     template <typename T>
     struct var_wrapper


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