Commit debfe27a authored by Ian Bell's avatar Ian Bell

REFORM DEB_OUT. Cosmetic code style changes only.

[git-p4: depot-paths = "//ReForm/ReForm/main/Base/": change = 10606]
parent c0c9c5d0
......@@ -9,6 +9,9 @@
// and manner of such use.
#include "DebUtils.hh"
#ifdef DEB_ON
#include <string>
#include <fstream>
#include <time.h>
......@@ -16,17 +19,15 @@
#include <iostream>
#include <map>
#ifdef DEB_ON
#define LOCAL_PROC static
LOCAL_PROC bool is_html_filename(const char* const str)
namespace { // LOCAL_PROC
bool is_html_filename(const char* const str)
{
const char* dot = strchr(str, '.');
if (dot == nullptr) return false;
++dot;
return (!strncmp(dot, "htm", 3)) || (!strncmp(dot, "HTM", 3)) ;
}
}
namespace ReForm {
......@@ -365,7 +366,6 @@ public:
{
// translate the esoteric characters used in IGM DEB_out
if (_c == '') // -62
return;
......@@ -412,18 +412,16 @@ public:
}
const char * double_format() const
const char* double_format() const
{
if (double_format_.empty())
{
return "%.17g";
}
return double_format_.c_str();
}
void set_double_format(const char * const str)
void set_double_format(const char* const str)
{
if (str==nullptr)
if (str == nullptr)
double_format_.clear();
else
double_format_ = str;
......@@ -445,9 +443,9 @@ public:
if (is_html()) print_direct("</FONT>");
break;
case DebCommand::END_ERR :
// Powerdown DEB_error font
// if (is_html()) print_direct("</BLINK>");
// fall through
// Powerdown DEB_error font
// if (is_html()) print_direct("</BLINK>");
// fall through
case DebCommand::END_LF :
if (is_html()) print_direct("</FONT>");
line_break();
......@@ -777,9 +775,9 @@ DebStream& DebEnter::stream(const int _warn, const bool _print)
{
if (impl->is_html())
{
bool is_deb_error = (_warn==2);
bool is_deb_error = (_warn == 2);
// DEB_error font powerup goes here. BLINK is deprecated sadly.
// if (is_deb_error) impl->print_direct("<BLINK>");
// if (is_deb_error) impl->print_direct("<BLINK>");
int col = impl->get_module_color(module_);
if (is_deb_error) col = 0xFF0000; // RED
char buffer[256];
......@@ -948,7 +946,7 @@ DebStream& DebStream::get_global(int _warn)
{
_warn;
// TODO: Replace with a Singleton?? ThreadArray??
#if 1
#if 1
static DebStream g_ds__("reform_deb_out.txt");
#else
static DebStream g_ds__("reform_deb_out.htm");
......@@ -999,18 +997,18 @@ DebStream& operator<<(DebStream& _ds, const DebCommand& _co)
// DebController member funcs (currently all static)
// ==================================================
void DebController::set_module_level(const char * _mod , const int _lev)
void DebController::set_module_level(const char* _mod , const int _lev)
{
DebStream::get_global().dfile()->set_module_level(_mod, _lev);
}
void DebController::set_double_format(const char * _fmt)
void DebController::set_double_format(const char* _fmt)
{
DebStream::get_global().dfile()->set_double_format(_fmt);
}
int DebController::module_level(const char * _mod)
int DebController::module_level(const char* _mod)
{
return DebStream::get_global().dfile()->module_level(_mod);
}
......
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