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

@ -32,8 +32,6 @@
#include <Filter.h>
#include <format.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
CmdUnique::CmdUnique ()
{
@ -63,13 +61,13 @@ int CmdUnique::execute (std::string& output)
std::string attribute {};
// Just the first arg.
auto words = context.cli2.getWords ();
auto words = Context::getContext ().cli2.getWords ();
if (words.size () == 0)
throw std::string ("An attribute must be specified. See 'task _columns'.");
attribute = words[0];
std::string canonical;
if (! context.cli2.canonicalize (canonical, "attribute", attribute))
if (! Context::getContext ().cli2.canonicalize (canonical, "attribute", attribute))
throw std::string ("You must specify an attribute or UDA.");
// Find the unique set of matching tasks.
@ -92,7 +90,7 @@ int CmdUnique::execute (std::string& output)
for (auto& value : values)
output += value + '\n';
context.headers.clear ();
Context::getContext ().headers.clear ();
return 0;
}