Portability: Updated to make main re-entrant()

- New INSTALL instructions to emscripten, and AUTHORS for contribution.
This commit is contained in:
Mark Scannell
2018-01-31 19:45:07 -05:00
committed by Paul Beckingham
parent cae3f06b7d
commit 7af6db4c17
112 changed files with 960 additions and 1147 deletions

View File

@@ -36,8 +36,6 @@
#include <shared.h>
#include <util.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
CmdUDAs::CmdUDAs ()
{
@@ -61,7 +59,7 @@ int CmdUDAs::execute (std::string& output)
std::stringstream out;
std::vector <std::string> udas;
for (auto& name : context.config)
for (auto& name : Context::getContext ().config)
{
if (name.first.substr (0, 4) == "uda." &&
name.first.find (".type") != std::string::npos)
@@ -84,7 +82,7 @@ int CmdUDAs::execute (std::string& output)
// Render a list of UDA name, type, label, allowed values,
// possible default value, and finally the usage count.
Table table;
table.width (context.getWidth ());
table.width (Context::getContext ().getWidth ());
table.add ("Name");
table.add ("Type");
table.add ("Label");
@@ -95,10 +93,10 @@ int CmdUDAs::execute (std::string& output)
for (auto& uda : udas)
{
std::string type = context.config.get ("uda." + uda + ".type");
std::string label = context.config.get ("uda." + uda + ".label");
std::string values = context.config.get ("uda." + uda + ".values");
std::string defval = context.config.get ("uda." + uda + ".default");
std::string type = Context::getContext ().config.get ("uda." + uda + ".type");
std::string label = Context::getContext ().config.get ("uda." + uda + ".label");
std::string values = Context::getContext ().config.get ("uda." + uda + ".values");
std::string defval = Context::getContext ().config.get ("uda." + uda + ".default");
if (label == "")
label = uda;
@@ -137,7 +135,7 @@ int CmdUDAs::execute (std::string& output)
{
for (auto& att : i.data)
if (att.first.substr (0, 11) != "annotation_" &&
context.columns.find (att.first) == context.columns.end ())
Context::getContext ().columns.find (att.first) == Context::getContext ().columns.end ())
orphans[att.first]++;
}
@@ -145,7 +143,7 @@ int CmdUDAs::execute (std::string& output)
{
// Display the orphans and their counts.
Table orphanTable;
orphanTable.width (context.getWidth ());
orphanTable.width (Context::getContext ().getWidth ());
orphanTable.add ("Orphan UDA");
orphanTable.add ("Usage Count");
setHeaderUnderline (orphanTable);
@@ -190,7 +188,7 @@ CmdCompletionUDAs::CmdCompletionUDAs ()
int CmdCompletionUDAs::execute (std::string& output)
{
std::vector <std::string> udas;
for (auto& name : context.config)
for (auto& name : Context::getContext ().config)
{
if (name.first.substr (0, 4) == "uda." &&
name.first.find (".type") != std::string::npos)