diff options
Diffstat (limited to '3rdParty/Boost/src/tools')
| -rw-r--r-- | 3rdParty/Boost/src/tools/bcp/add_dependent_lib.cpp | 6 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/tools/bcp/copy_path.cpp | 43 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/tools/bcp/fileview.cpp | 7 |
3 files changed, 29 insertions, 27 deletions
diff --git a/3rdParty/Boost/src/tools/bcp/add_dependent_lib.cpp b/3rdParty/Boost/src/tools/bcp/add_dependent_lib.cpp index bb1818a..41cc597 100644 --- a/3rdParty/Boost/src/tools/bcp/add_dependent_lib.cpp +++ b/3rdParty/Boost/src/tools/bcp/add_dependent_lib.cpp @@ -82,5 +82,5 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st "[^\\(\\);{}]*" // argument list "\\)" - "\\s*" + "\\s*(?:BOOST[_A-Z]+\\s*)?" "\\{" // start of definition "|" @@ -94,5 +94,5 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st "[^\\(\\);{}]*" // argument list "\\)" - "\\s*" + "\\s*(?:BOOST[_A-Z]+\\s*)?" "\\{" // start of definition ")" // end branch reset @@ -136,5 +136,5 @@ static void init_library_scanner(const fs::path& p, bool cvs_mode, const std::st // List of function names goes here... const char* e3 = - ")\\s*\\([^;()]*\\)\\s*;)"; + ")\\s*\\([^;()]*\\)\\s*(?:BOOST[_A-Z]+\\s*)?;)"; std::string class_name_list; diff --git a/3rdParty/Boost/src/tools/bcp/copy_path.cpp b/3rdParty/Boost/src/tools/bcp/copy_path.cpp index 497dcd5..ded5d18 100644 --- a/3rdParty/Boost/src/tools/bcp/copy_path.cpp +++ b/3rdParty/Boost/src/tools/bcp/copy_path.cpp @@ -2,6 +2,6 @@ * * Copyright (c) 2003 Dr John Maddock - * Use, modification and distribution is subject to the - * Boost Software License, Version 1.0. (See accompanying file + * 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) * @@ -14,4 +14,5 @@ #include "fileview.hpp" #include <boost/filesystem/operations.hpp> +#include <boost/filesystem/fstream.hpp> #include <boost/regex.hpp> #include <fstream> @@ -21,5 +22,5 @@ struct get_new_library_name -{ +{ get_new_library_name(const std::string& n) : m_new_name(n) {} template <class I> @@ -64,5 +65,5 @@ void bcp_implementation::copy_path(const fs::path& p) v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).c_str()); + boost::filesystem::ifstream is((m_boost_path / p)); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); @@ -77,9 +78,9 @@ void bcp_implementation::copy_path(const fs::path& p) v2.clear(); - std::ofstream os; + boost::filesystem::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).c_str(), std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::out); os.write(&*v1.begin(), v1.size()); os.close(); @@ -90,5 +91,5 @@ void bcp_implementation::copy_path(const fs::path& p) v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).c_str()); + boost::filesystem::ifstream is((m_boost_path / p)); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); @@ -110,9 +111,9 @@ void bcp_implementation::copy_path(const fs::path& p) v2.clear(); - std::ofstream os; + boost::filesystem::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).c_str(), std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::out); os.write(&*v1.begin(), v1.size()); os.close(); @@ -122,5 +123,5 @@ void bcp_implementation::copy_path(const fs::path& p) // // v1 hold the current content, v2 is temp buffer. - // Each time we do a search and replace the new content + // Each time we do a search and replace the new content // ends up in v2: we then swap v1 and v2, and clear v2. // @@ -128,5 +129,5 @@ void bcp_implementation::copy_path(const fs::path& p) v1.clear(); v2.clear(); - std::ifstream is((m_boost_path / p).c_str()); + boost::filesystem::ifstream is((m_boost_path / p)); std::copy(std::istreambuf_iterator<char>(is), std::istreambuf_iterator<char>(), std::back_inserter(v1)); @@ -171,5 +172,5 @@ void bcp_implementation::copy_path(const fs::path& p) static const boost::regex namespace_alias( /* - "namespace\\s+" + m_namespace_name + + "namespace\\s+" + m_namespace_name + "\\s*" "(" @@ -192,5 +193,5 @@ void bcp_implementation::copy_path(const fs::path& p) */ /* - "(namespace\\s+" + m_namespace_name + + "(namespace\\s+" + m_namespace_name + "\\s*\\{.*" "\\})([^\\{\\};]*)\\z" @@ -199,5 +200,5 @@ void bcp_implementation::copy_path(const fs::path& p) "(adstl|phoenix|rapidxml)?(\\s*\\{)" ); - regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_alias, + regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_alias, "$1 $3$4 {} $1 (?4$4:boost) = $3$4; $1$2$3$4$5", boost::regex_constants::format_all); std::swap(v1, v2); @@ -205,9 +206,9 @@ void bcp_implementation::copy_path(const fs::path& p) } - std::ofstream os; + boost::filesystem::ofstream os; if(m_unix_lines) - os.open((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::binary | std::ios_base::out); else - os.open((m_dest_path / p).c_str(), std::ios_base::out); + os.open((m_dest_path / p), std::ios_base::out); if(v1.size()) os.write(&*v1.begin(), v1.size()); @@ -216,9 +217,9 @@ void bcp_implementation::copy_path(const fs::path& p) else if(m_unix_lines && !is_binary_file(p)) { - std::ifstream is((m_boost_path / p).c_str()); + boost::filesystem::ifstream is((m_boost_path / p)); std::istreambuf_iterator<char> isi(is); std::istreambuf_iterator<char> end; - std::ofstream os((m_dest_path / p).c_str(), std::ios_base::binary | std::ios_base::out); + boost::filesystem::ofstream os((m_dest_path / p), std::ios_base::binary | std::ios_base::out); std::ostreambuf_iterator<char> osi(os); diff --git a/3rdParty/Boost/src/tools/bcp/fileview.cpp b/3rdParty/Boost/src/tools/bcp/fileview.cpp index 54b3758..36e7850 100644 --- a/3rdParty/Boost/src/tools/bcp/fileview.cpp +++ b/3rdParty/Boost/src/tools/bcp/fileview.cpp @@ -2,6 +2,6 @@ * * Copyright (c) 2003 Dr John Maddock - * Use, modification and distribution is subject to the - * Boost Software License, Version 1.0. (See accompanying file + * 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) * @@ -10,4 +10,5 @@ #include "fileview.hpp" +#include <boost/filesystem/fstream.hpp> #include <vector> #include <algorithm> @@ -58,5 +59,5 @@ void fileview::open(const boost::filesystem::path& p) { cow(); - std::ifstream is(p.c_str()); + boost::filesystem::ifstream is(p); if(!is) { |
Swift