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

@ -34,8 +34,6 @@
#include <utf8.h>
#include <stdlib.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
ColumnUDAString::ColumnUDAString ()
{
@ -84,7 +82,7 @@ void ColumnUDAString::measure (Task& task, unsigned int& minimum, unsigned int&
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -113,7 +111,7 @@ void ColumnUDAString::render (
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -165,7 +163,7 @@ void ColumnUDANumeric::measure (Task& task, unsigned int& minimum, unsigned int&
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -190,7 +188,7 @@ void ColumnUDANumeric::render (
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -244,18 +242,18 @@ void ColumnUDADate::measure (Task& task, unsigned int& minimum, unsigned int& ma
// rc.dateformat.report
// rc.dateformat
Datetime date ((time_t) strtol (value.c_str (), NULL, 10));
auto format = context.config.get ("report." + _report + ".dateformat");
auto format = Context::getContext ().config.get ("report." + _report + ".dateformat");
if (format == "")
format = context.config.get ("dateformat.report");
format = Context::getContext ().config.get ("dateformat.report");
if (format == "")
format = context.config.get ("dateformat");
format = Context::getContext ().config.get ("dateformat");
minimum = maximum = Datetime::length (format);
}
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -281,19 +279,19 @@ void ColumnUDADate::render (
// rc.report.<report>.dateformat
// rc.dateformat.report
// rc.dateformat.
auto format = context.config.get ("report." + _report + ".dateformat");
auto format = Context::getContext ().config.get ("report." + _report + ".dateformat");
if (format == "")
{
format = context.config.get ("dateformat.report");
format = Context::getContext ().config.get ("dateformat.report");
if (format == "")
format = context.config.get ("dateformat");
format = Context::getContext ().config.get ("dateformat");
}
renderStringLeft (lines, width, color, Datetime ((time_t) strtol (value.c_str (), NULL, 10)).toString (format));
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -347,7 +345,7 @@ void ColumnUDADuration::measure (Task& task, unsigned int& minimum, unsigned int
{
if (task.has (_name))
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";
@ -375,7 +373,7 @@ void ColumnUDADuration::render (
}
else if (_style == "indicator")
{
auto indicator = context.config.get ("uda." + _name + ".indicator");
auto indicator = Context::getContext ().config.get ("uda." + _name + ".indicator");
if (indicator == "")
indicator = "U";