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

@ -30,13 +30,14 @@
#include <cstring>
#include <Context.h>
Context context;
////////////////////////////////////////////////////////////////////////////////
int main (int argc, const char** argv)
{
int status {0};
Context globalContext;
Context::setContext (&globalContext);
// Lightweight version checking that doesn't require initialization or any I/O.
if (argc == 2 && !strcmp (argv[1], "--version"))
{
@ -46,9 +47,9 @@ int main (int argc, const char** argv)
{
try
{
status = context.initialize (argc, argv);
status = Context::getContext ().initialize (argc, argv);
if (status == 0)
status = context.run ();
status = Context::getContext ().run ();
}
catch (const std::string& error)