Portability: Updated to make main re-entrant()
- New INSTALL instructions to emscripten, and AUTHORS for contribution.
This commit is contained in:
committed by
Paul Beckingham
parent
cae3f06b7d
commit
7af6db4c17
@@ -56,8 +56,6 @@
|
||||
#include <shared.h>
|
||||
#include <format.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Supports the complete column definition:
|
||||
//
|
||||
@@ -106,7 +104,7 @@ Column* Column::factory (const std::string& name, const std::string& report)
|
||||
else if (column_name == "wait") c = new ColumnWait ();
|
||||
|
||||
// UDA.
|
||||
else if (context.config.has ("uda." + column_name + ".type"))
|
||||
else if (Context::getContext ().config.has ("uda." + column_name + ".type"))
|
||||
c = Column::uda (column_name);
|
||||
|
||||
else
|
||||
@@ -156,7 +154,7 @@ void Column::uda (std::map <std::string, Column*>& all)
|
||||
// For each UDA, instantiate and initialize ColumnUDA.
|
||||
std::set <std::string> udas;
|
||||
|
||||
for (const auto& i : context.config)
|
||||
for (const auto& i : Context::getContext ().config)
|
||||
{
|
||||
if (i.first.substr (0, 4) == "uda.")
|
||||
{
|
||||
@@ -181,9 +179,9 @@ void Column::uda (std::map <std::string, Column*>& all)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column* Column::uda (const std::string& name)
|
||||
{
|
||||
auto type = context.config.get ("uda." + name + ".type");
|
||||
auto label = context.config.get ("uda." + name + ".label");
|
||||
auto values = context.config.get ("uda." + name + ".values");
|
||||
auto type = Context::getContext ().config.get ("uda." + name + ".type");
|
||||
auto label = Context::getContext ().config.get ("uda." + name + ".label");
|
||||
auto values = Context::getContext ().config.get ("uda." + name + ".values");
|
||||
|
||||
if (type == "string")
|
||||
{
|
||||
@@ -251,7 +249,7 @@ void Column::renderHeader (
|
||||
int width,
|
||||
Color& color)
|
||||
{
|
||||
if (context.verbose ("label") &&
|
||||
if (Context::getContext ().verbose ("label") &&
|
||||
_label != "")
|
||||
{
|
||||
// Create a basic label.
|
||||
@@ -263,8 +261,8 @@ void Column::renderHeader (
|
||||
Color c = color;
|
||||
|
||||
// Now underline the header, or add a dashed line.
|
||||
if (context.color () &&
|
||||
context.config.getBoolean ("fontunderline"))
|
||||
if (Context::getContext ().color () &&
|
||||
Context::getContext ().config.getBoolean ("fontunderline"))
|
||||
{
|
||||
c.blend (Color (Color::nocolor, Color::nocolor, true, false, false));
|
||||
lines.push_back (c.colorize (leftJustify (header, width)));
|
||||
|
||||
Reference in New Issue
Block a user