Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86646 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2013-11-12 04:16:40


Author: danieljames
Date: 2013-11-12 04:16:39 EST (Tue, 12 Nov 2013)
New Revision: 86646
URL: http://svn.boost.org/trac/boost/changeset/86646

Log:
Rename input_ strings and functions.

Text files modified:
   trunk/tools/quickbook/src/native_text.cpp | 8 ++--
   trunk/tools/quickbook/src/native_text.hpp | 19 +++++++------
   trunk/tools/quickbook/src/quickbook.cpp | 56 ++++++++++++++++++++--------------------
   3 files changed, 42 insertions(+), 41 deletions(-)

Modified: trunk/tools/quickbook/src/native_text.cpp
==============================================================================
--- trunk/tools/quickbook/src/native_text.cpp Tue Nov 12 04:16:18 2013 (r86645)
+++ trunk/tools/quickbook/src/native_text.cpp 2013-11-12 04:16:39 EST (Tue, 12 Nov 2013) (r86646)
@@ -70,12 +70,12 @@
 #endif
 
 #if QUICKBOOK_WIDE_PATHS
- std::string input_to_utf8(input_string const& x)
+ std::string command_line_to_utf8(command_line_string const& x)
     {
         return to_utf8(x);
     }
 #else
- std::string input_to_utf8(input_string const& x)
+ std::string command_line_to_utf8(command_line_string const& x)
     {
         return x;
     }
@@ -105,7 +105,7 @@
 #endif
 
 #if QUICKBOOK_CYGWIN_PATHS
- fs::path input_to_path(input_string const& path)
+ fs::path command_line_to_path(command_line_string const& path)
     {
         cygwin_conv_path_t flags = CCP_POSIX_TO_WIN_W | CCP_RELATIVE;
 
@@ -140,7 +140,7 @@
         return std::string(result.get());
     }
 #else
- fs::path input_to_path(input_string const& path)
+ fs::path command_line_to_path(command_line_string const& path)
     {
         return fs::path(path);
     }

Modified: trunk/tools/quickbook/src/native_text.hpp
==============================================================================
--- trunk/tools/quickbook/src/native_text.hpp Tue Nov 12 04:16:18 2013 (r86645)
+++ trunk/tools/quickbook/src/native_text.hpp 2013-11-12 04:16:39 EST (Tue, 12 Nov 2013) (r86646)
@@ -8,8 +8,8 @@
 
 // For handling native strings and streams.
 
-#if !defined(BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP)
-#define BOOST_QUICKBOOK_DETAIL_INPUT_PATH_HPP
+#if !defined(BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP)
+#define BOOST_QUICKBOOK_DETAIL_NATIVE_TEXT_HPP
 
 #include <boost/config.hpp>
 #include <boost/filesystem/path.hpp>
@@ -53,7 +53,8 @@
 
         // 'generic': Paths in quickbook source and the generated boostbook.
         // Always UTF-8.
- // 'input': Paths (or other parameters) from the command line and
+ // 'command_line':
+ // Paths (or other parameters) from the command line and
         // possibly other sources in the future. Wide strings on
         // normal windows, UTF-8 for cygwin and other platforms
         // (hopefully).
@@ -64,11 +65,11 @@
         // platforms (again, hopefully).
     
 #if QUICKBOOK_WIDE_PATHS
- typedef std::wstring input_string;
- typedef boost::wstring_ref input_string_ref;
+ typedef std::wstring command_line_string;
+ typedef boost::wstring_ref command_line_string_ref;
 #else
- typedef std::string input_string;
- typedef boost::string_ref input_string_ref;
+ typedef std::string command_line_string;
+ typedef boost::string_ref command_line_string_ref;
 #endif
 
         // A light wrapper around C++'s streams that gets things right
@@ -113,8 +114,8 @@
         };
 
 
- std::string input_to_utf8(input_string const&);
- fs::path input_to_path(input_string const&);
+ std::string command_line_to_utf8(command_line_string const&);
+ fs::path command_line_to_path(command_line_string const&);
     
         std::string path_to_generic(fs::path const&);
         fs::path generic_to_path(boost::string_ref);

Modified: trunk/tools/quickbook/src/quickbook.cpp
==============================================================================
--- trunk/tools/quickbook/src/quickbook.cpp Tue Nov 12 04:16:18 2013 (r86645)
+++ trunk/tools/quickbook/src/quickbook.cpp 2013-11-12 04:16:39 EST (Tue, 12 Nov 2013) (r86646)
@@ -255,7 +255,7 @@
         using boost::program_options::notify;
         using boost::program_options::positional_options_description;
         
- using quickbook::detail::input_string;
+ using quickbook::detail::command_line_string;
 
         // First thing, the filesystem should record the current working directory.
         fs::initial_path<fs::path>();
@@ -283,27 +283,27 @@
             ("no-self-linked-headers", "stop headers linking to themselves")
             ("indent", PO_VALUE<int>(), "indent spaces")
             ("linewidth", PO_VALUE<int>(), "line width")
- ("input-file", PO_VALUE<input_string>(), "input file")
- ("output-file", PO_VALUE<input_string>(), "output file")
- ("output-deps", PO_VALUE<input_string>(), "output dependency file")
+ ("input-file", PO_VALUE<command_line_string>(), "input file")
+ ("output-file", PO_VALUE<command_line_string>(), "output file")
+ ("output-deps", PO_VALUE<command_line_string>(), "output dependency file")
             ("debug", "debug mode (for developers)")
             ("ms-errors", "use Microsoft Visual Studio style error & warn message format")
- ("include-path,I", PO_VALUE< std::vector<input_string> >(), "include path")
- ("define,D", PO_VALUE< std::vector<input_string> >(), "define macro")
- ("image-location", PO_VALUE<input_string>(), "image location")
+ ("include-path,I", PO_VALUE< std::vector<command_line_string> >(), "include path")
+ ("define,D", PO_VALUE< std::vector<command_line_string> >(), "define macro")
+ ("image-location", PO_VALUE<command_line_string>(), "image location")
         ;
 
         hidden.add_options()
             ("expect-errors",
                 "Succeed if the input file contains a correctly handled "
                 "error, fail otherwise.")
- ("xinclude-base", PO_VALUE<input_string>(),
+ ("xinclude-base", PO_VALUE<command_line_string>(),
                 "Generate xincludes as if generating for this target "
                 "directory.")
- ("output-deps-format", PO_VALUE<input_string>(),
+ ("output-deps-format", PO_VALUE<command_line_string>(),
              "Comma separated list of formatting options for output-deps, "
              "options are: escaped, checked")
- ("output-checked-locations", PO_VALUE<input_string>(),
+ ("output-checked-locations", PO_VALUE<command_line_string>(),
              "Writes a file listing all the file locations that were "
              "checked, starting with '+' if they were found, or '-' "
              "if they weren't.\n"
@@ -421,24 +421,24 @@
         if (vm.count("include-path"))
         {
             boost::transform(
- vm["include-path"].as<std::vector<input_string> >(),
+ vm["include-path"].as<std::vector<command_line_string> >(),
                 std::back_inserter(quickbook::include_path),
- quickbook::detail::input_to_path);
+ quickbook::detail::command_line_to_path);
         }
 
         quickbook::preset_defines.clear();
         if (vm.count("define"))
         {
             boost::transform(
- vm["define"].as<std::vector<input_string> >(),
+ vm["define"].as<std::vector<command_line_string> >(),
                 std::back_inserter(quickbook::preset_defines),
- quickbook::detail::input_to_utf8);
+ quickbook::detail::command_line_to_utf8);
         }
 
         if (vm.count("input-file"))
         {
- fs::path filein = quickbook::detail::input_to_path(
- vm["input-file"].as<input_string>());
+ fs::path filein = quickbook::detail::command_line_to_path(
+ vm["input-file"].as<command_line_string>());
             fs::path fileout;
 
             bool default_output = true;
@@ -446,16 +446,16 @@
             if (vm.count("output-deps"))
             {
                 parse_document_options.deps_out =
- quickbook::detail::input_to_path(
- vm["output-deps"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["output-deps"].as<command_line_string>());
                 default_output = false;
             }
 
             if (vm.count("output-deps-format"))
             {
                 std::string format_flags =
- quickbook::detail::input_to_utf8(
- vm["output-deps-format"].as<input_string>());
+ quickbook::detail::command_line_to_utf8(
+ vm["output-deps-format"].as<command_line_string>());
 
                 std::vector<std::string> flag_names;
                 boost::algorithm::split(flag_names, format_flags,
@@ -488,15 +488,15 @@
             if (vm.count("output-checked-locations"))
             {
                 parse_document_options.locations_out =
- quickbook::detail::input_to_path(
- vm["output-checked-locations"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["output-checked-locations"].as<command_line_string>());
                 default_output = false;
             }
 
             if (vm.count("output-file"))
             {
- fileout = quickbook::detail::input_to_path(
- vm["output-file"].as<input_string>());
+ fileout = quickbook::detail::command_line_to_path(
+ vm["output-file"].as<command_line_string>());
             }
             else if (default_output)
             {
@@ -507,8 +507,8 @@
             if (vm.count("xinclude-base"))
             {
                 parse_document_options.xinclude_base =
- quickbook::detail::input_to_path(
- vm["xinclude-base"].as<input_string>());
+ quickbook::detail::command_line_to_path(
+ vm["xinclude-base"].as<command_line_string>());
             }
             else
             {
@@ -528,8 +528,8 @@
 
             if (vm.count("image-location"))
             {
- quickbook::image_location = quickbook::detail::input_to_path(
- vm["image-location"].as<input_string>());
+ quickbook::image_location = quickbook::detail::command_line_to_path(
+ vm["image-location"].as<command_line_string>());
             }
             else
             {


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