Make ms_errors local to its file.

This commit is contained in:
Daniel James
2015-12-19 14:08:30 +00:00
parent c8fa513bc4
commit dece082a87
3 changed files with 11 additions and 9 deletions

View File

@@ -25,12 +25,15 @@
#include <sys/cygwin.h>
#endif
namespace quickbook {
extern bool ms_errors;
}
namespace quickbook {
namespace detail {
namespace {
bool ms_errors = false;
}
void set_ms_errors(bool x) {
ms_errors = x;
}
// This is used for converting paths to UTF-8 on cygin.
// Might be better not to use a windows
@@ -113,7 +116,7 @@ namespace detail {
// https://en.wikipedia.org/wiki/File_URI_scheme
std::string file_path_to_url(fs::path const& x)
{
// TODO: Maybe should throw an exception if this doesn't understand the path.
// TODO: Maybe some kind of error if this doesn't understand the path.
// TODO: Might need a special cygwin implementation.
// TODO: What if x.has_root_name() && !x.has_root_directory()?
// TODO: What does Boost.Filesystem do for '//localhost/c:/path'?