summaryrefslogtreecommitdiff
path: root/tools/bcp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /tools/bcp
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-f2541bb90af059680aa7036f315f052175999355.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'tools/bcp')
-rw-r--r--tools/bcp/add_path.cpp34
-rw-r--r--tools/bcp/copy_path.cpp2
-rw-r--r--tools/bcp/scan_licence.cpp32
3 files changed, 35 insertions, 33 deletions
diff --git a/tools/bcp/add_path.cpp b/tools/bcp/add_path.cpp
index 3643bdb6c..c3c792b12 100644
--- a/tools/bcp/add_path.cpp
+++ b/tools/bcp/add_path.cpp
@@ -193,6 +193,14 @@ void bcp_implementation::add_file(const fs::path& p)
//
static const std::pair<fs::path, fs::path>
specials[] = {
+ std::pair<fs::path, fs::path>("boost/atomic/capabilities.hpp", "boost/atomic/detail"),
+ std::pair<fs::path, fs::path>("boost/chrono/chrono.hpp", "libs/chrono/src"),
+ std::pair<fs::path, fs::path>("boost/chrono/chrono.hpp", "libs/chrono/build"),
+ std::pair<fs::path, fs::path>("boost/cerrno.hpp", "libs/system/build"),
+ std::pair<fs::path, fs::path>("boost/cerrno.hpp", "libs/system/src"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/system"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/cerrno.hpp"),
+ std::pair<fs::path, fs::path>("libs/thread/build", "boost/chrono"),
std::pair<fs::path, fs::path>("boost/filesystem/convenience.hpp", "boost/filesystem.hpp"),
std::pair<fs::path, fs::path>("boost/filesystem/exception.hpp", "boost/filesystem.hpp"),
std::pair<fs::path, fs::path>("boost/filesystem/fstream.hpp", "boost/filesystem.hpp"),
@@ -202,22 +210,16 @@ static const std::pair<fs::path, fs::path>
std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v2"),
std::pair<fs::path, fs::path>("boost/filesystem.hpp", "libs/filesystem/v3"),
std::pair<fs::path, fs::path>("boost/config.hpp", "boost/config"),
- std::pair<fs::path, fs::path>("tools/build/allyourbase.jam", "Jamrules"),
- std::pair<fs::path, fs::path>("tools/build/allyourbase.jam", "project-root.jam"),
- std::pair<fs::path, fs::path>("tools/build/allyourbase.jam", "boost-build.jam"),
- std::pair<fs::path, fs::path>("tools/build/v1/allyourbase.jam", "Jamrules"),
- std::pair<fs::path, fs::path>("tools/build/v1/allyourbase.jam", "project-root.jam"),
- std::pair<fs::path, fs::path>("tools/build/v1/allyourbase.jam", "boost-build.jam"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "Jamrules"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "project-root.jam"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "boost-build.jam"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "Jamfile.v2"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "boostcpp.jam"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "bootstrap.bat"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "bootstrap.sh"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "Jamroot"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "INSTALL"),
- std::pair<fs::path, fs::path>("tools/build/v2/boost-build.jam", "LICENSE_1_0.txt"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "Jamrules"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "project-root.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "boost-build.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "Jamfile.v2"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "boostcpp.jam"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "bootstrap.bat"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "bootstrap.sh"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "Jamroot"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "INSTALL"),
+ std::pair<fs::path, fs::path>("tools/build/boost-build.jam", "LICENSE_1_0.txt"),
std::pair<fs::path, fs::path>("boost/preprocessor/iterate.hpp", "boost/preprocessor/iteration"),
std::pair<fs::path, fs::path>("boost/preprocessor/slot/slot.hpp", "boost/preprocessor/slot/detail"),
std::pair<fs::path, fs::path>("boost/function.hpp", "boost/function/detail"),
diff --git a/tools/bcp/copy_path.cpp b/tools/bcp/copy_path.cpp
index ded5d181c..29f6e796b 100644
--- a/tools/bcp/copy_path.cpp
+++ b/tools/bcp/copy_path.cpp
@@ -151,7 +151,7 @@ void bcp_implementation::copy_path(const fs::path& p)
"|"
"()boost(_asio_detail_posix_thread_function|_regex_free_static_mutex)"
"|"
- "()(lw_thread_routine|at_thread_exit|on_process_enter|on_process_exit|on_thread_enter|on_thread_exit|tss_cleanup_implemented)"
+ "()\\<(lw_thread_routine|at_thread_exit|on_process_enter|on_process_exit|on_thread_enter|on_thread_exit|tss_cleanup_implemented)\\>"
"|"
"(BOOST_CLASS_REQUIRE4?[^;]*)boost((?:_\\w+)?\\s*,)"
"|"
diff --git a/tools/bcp/scan_licence.cpp b/tools/bcp/scan_licence.cpp
index c061583a2..4dc461c14 100644
--- a/tools/bcp/scan_licence.cpp
+++ b/tools/bcp/scan_licence.cpp
@@ -1,8 +1,8 @@
/*
*
* 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)
*
*/
@@ -27,7 +27,7 @@ context_before_license(const fileview& v, fileview::const_iterator start,
{
char last_char = '\0';
while (start != v.begin() && context_lines >= 0) {
- if ((*start == '\r') || (*start == '\n')
+ if (((*start == '\r') || (*start == '\n'))
&& ((last_char == *start) || ((last_char != '\r') && (last_char != '\n'))))
--context_lines;
@@ -48,7 +48,7 @@ context_after_license(const fileview& v, fileview::const_iterator end,
{
char last_char = '\0';
while (end != v.end() && context_lines >= 0) {
- if (*end == '\r' || *end == '\n'
+ if ((*end == '\r' || *end == '\n')
&& (last_char == *end || (last_char != '\r' && last_char != '\n')))
--context_lines;
@@ -79,7 +79,7 @@ find_prefix(const fileview& v, fileview::const_iterator start_of_line)
return std::string(start_of_line, first_noncomment_char);
}
-static std::string
+static std::string
html_escape(fileview::const_iterator first, fileview::const_iterator last)
{
std::string result;
@@ -110,7 +110,7 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
int author_count = 0;
int nonbsl_author_count = 0;
bool has_non_bsl_license = false;
- fileview::const_iterator start_of_license = v.begin(),
+ fileview::const_iterator start_of_license = v.begin(),
end_of_license = v.end();
bool start_in_middle_of_line = false;
@@ -122,7 +122,7 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
start_of_license = m[0].first;
end_of_license = m[0].second;
- if (is_non_bsl_license(i) && i < licenses.second - 1)
+ if (is_non_bsl_license(i) && i < licenses.second - 1)
has_non_bsl_license = true;
// add this license to the list:
@@ -137,9 +137,9 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
{
#if 0
// Not dealing with copyrights because we don't have the years
- if ((*cpy)[0].first < start_of_license)
+ if ((*cpy)[0].first < start_of_license)
start_of_license = (*cpy)[0].first;
- if ((*cpy)[0].second > end_of_license)
+ if ((*cpy)[0].second > end_of_license)
end_of_license = (*cpy)[0].second;
#endif
@@ -161,7 +161,7 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
m_author_data[name].insert(p);
++author_count;
- // If this is not the Boost Software License (license 0), and the author hasn't given
+ // If this is not the Boost Software License (license 0), and the author hasn't given
// blanket permission, note this for the report.
if (has_non_bsl_license
&& m_bsl_authors.find(name) == m_bsl_authors.end()) {
@@ -199,12 +199,12 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
if (has_non_bsl_license) {
bool converted = false;
- if (nonbsl_author_count == 0
+ if (nonbsl_author_count == 0
&& license_count == 1) {
// Grab a few lines of context
- fileview::const_iterator context_start =
+ fileview::const_iterator context_start =
context_before_license(v, start_of_license);
- fileview::const_iterator context_end =
+ fileview::const_iterator context_end =
context_after_license(v, end_of_license);
// TBD: For files that aren't C++ code, this will have to
@@ -213,14 +213,14 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
// Create enough information to permit manual verification of
// the correctness of the transformation
- std::string before_conversion =
+ std::string before_conversion =
html_escape(context_start, start_of_license);
before_conversion += "<b>";
before_conversion += html_escape(start_of_license, end_of_license);
before_conversion += "</b>";
before_conversion += html_escape(end_of_license, context_end);
- std::string after_conversion =
+ std::string after_conversion =
html_escape(context_start, start_of_license);
if (start_in_middle_of_line)
after_conversion += '\n';
@@ -233,7 +233,7 @@ void bcp_implementation::scan_license(const fs::path& p, const fileview& v)
after_conversion += "</b>";
after_conversion += html_escape(end_of_license, context_end);
- m_converted_to_bsl[p] =
+ m_converted_to_bsl[p] =
std::make_pair(before_conversion, after_conversion);
// Perform the actual conversion