Commit 6be0f5a4 authored by Ian Bell's avatar Ian Bell

DEBUG. Removed residual DEB_mesh_out definition from DebOut.hh. Simplified...

DEBUG. Removed residual DEB_mesh_out definition from DebOut.hh. Simplified other DEB_out macros to DEB_out_if(true,... . Corrected a bug in is_html_filename() pertaining to paths containing . .

[git-p4: depot-paths = "//ReForm/ReForm/main/Base/": change = 10767]
parent d0813459
......@@ -40,22 +40,16 @@
#define DEB_only( CC ) CC
#define DEB_out(LL, AA ) { if (deb.permission(LL)) \
{ deb.stream() << AA << deb.end(); } }
#define DEB_out(LL, AA ) DEB_out_if(true, LL, AA)
#define DEB_out_if( CC, LL, AA ) { if (deb.permission(LL) && (CC)) \
{ deb.stream() << AA << deb.end(); } }
#define DEB_warning(LL, AA ) { if (deb.permission(LL, 1)) \
{ deb.stream(1) << "WARNING: " << AA << deb.end_lf(); } }
#define DEB_warning(LL, AA ) DEB_warning_if(true, LL, AA)
#define DEB_warning_if( CC, LL, AA ) { if (deb.permission(LL, 1) && (CC)) \
{ deb.stream(1) << "WARNING: " << AA << deb.end_lf(); } }
#define DEB_mesh_out_if( CC, LL, FF, MM ){ if (deb.permission(LL, 2) && (CC)) \
{ deb.stream(3) << deb.mesh(FF, MM) ; } }
// TODO: implement Deb.mesh() filename and mesh holding class and assocated
// DebStream streamer
#define DEB_error(AA) { if (deb.permission(0, 1) )\
{ deb.stream(2) << "ERROR: " << AA << deb.end_err(); } }
......
......@@ -23,7 +23,7 @@ namespace { // LOCAL_PROC
bool is_html_filename(const char* const str)
{
if (str == nullptr) return false;
const char* dot = strchr(str, '.');
const char* dot = strrchr(str, '.');
if (dot == nullptr) return false;
++dot;
return (!strncmp(dot, "htm", 3)) || (!strncmp(dot, "HTM", 3)) ;
......@@ -569,7 +569,7 @@ public:
if (is_html()) str.append("<BR>");
str.append("\n");
}
}
}
void footer()
{
......@@ -737,7 +737,11 @@ public:
// Don't set a TEST module colour here because Test is not part of Reform
}
~DebFile() {}
~DebFile()
{
// The closing of the primary DEB_out file is a good place to flush and close
// any subsidary DEB files
}
}; // endclass DebFile
......
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