Commit adba32e6 authored by Ian Bell's avatar Ian Bell

DEBUG. Fixed missing line breaks in console ourpu8t of DEB_line and DEB_warning.

[git-p4: depot-paths = "//ReForm/ReForm/main/Base/": change = 11603]
parent c4ed49d7
...@@ -385,6 +385,12 @@ public: ...@@ -385,6 +385,12 @@ public:
current_.append(&_c, 1); current_.append(&_c, 1);
} }
void print_to_ostream(const char* const _s, std::ostream& os)
{
os << _s;
}
void print(const char* const _s, bool _fork = true) void print(const char* const _s, bool _fork = true)
{ {
if (_s != nullptr) if (_s != nullptr)
...@@ -398,9 +404,9 @@ public: ...@@ -398,9 +404,9 @@ public:
if (_fork) if (_fork)
{ {
if (fork_to_cout()) if (fork_to_cout())
std::cout << _s; print_to_ostream(_s, std::cout);
if (fork_to_cerr()) if (fork_to_cerr())
std::cerr << _s; print_to_ostream(_s, std::cerr);
} }
} }
} }
...@@ -449,7 +455,15 @@ public: ...@@ -449,7 +455,15 @@ public:
// fall through // fall through
case Command::END_LF : case Command::END_LF :
if (is_html()) print_direct("</FONT>"); if (is_html()) print_direct("</FONT>");
line_break(); line_break();
// line_break() does not fork to cout or cerr
// so do so explicitly.
if (fork_to_cout())
std::cout << "\n";
if (fork_to_cerr())
std::cerr << "\n";
break; break;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment