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
@@ -34,8 +34,6 @@
|
||||
#include <format.h>
|
||||
#include <shared.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdColor::CmdColor ()
|
||||
{
|
||||
@@ -59,13 +57,13 @@ int CmdColor::execute (std::string& output)
|
||||
|
||||
// Get the non-attribute, non-fancy command line arguments.
|
||||
auto legend = false;
|
||||
auto words = context.cli2.getWords ();
|
||||
auto words = Context::getContext ().cli2.getWords ();
|
||||
for (auto& word : words)
|
||||
if (closeEnough ("legend", word))
|
||||
legend = true;
|
||||
|
||||
std::stringstream out;
|
||||
if (context.color ())
|
||||
if (Context::getContext ().color ())
|
||||
{
|
||||
// If the description contains 'legend', show all the colors currently in
|
||||
// use.
|
||||
@@ -74,13 +72,13 @@ int CmdColor::execute (std::string& output)
|
||||
out << "\nHere are the colors currently in use:\n";
|
||||
|
||||
Table view;
|
||||
view.width (context.getWidth ());
|
||||
if (context.config.getBoolean ("color"))
|
||||
view.width (Context::getContext ().getWidth ());
|
||||
if (Context::getContext ().config.getBoolean ("color"))
|
||||
view.forceColor ();
|
||||
view.add ("Color");
|
||||
view.add ("Definition");
|
||||
|
||||
for (auto& item : context.config)
|
||||
for (auto& item : Context::getContext ().config)
|
||||
{
|
||||
// Skip items with 'color' in their name, that are not referring to
|
||||
// actual colors.
|
||||
@@ -88,7 +86,7 @@ int CmdColor::execute (std::string& output)
|
||||
item.first != "color" &&
|
||||
item.first.find ("color") == 0)
|
||||
{
|
||||
Color color (context.config.get (item.first));
|
||||
Color color (Context::getContext ().config.get (item.first));
|
||||
int row = view.addRow ();
|
||||
view.set (row, 0, item.first, color);
|
||||
view.set (row, 1, item.second, color);
|
||||
|
||||
Reference in New Issue
Block a user