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,7 +36,6 @@
#include <format.h>
#include <utf8.h>
extern Context context;
extern Task& contextTask;
////////////////////////////////////////////////////////////////////////////////
@@ -47,7 +46,7 @@ ColumnRecur::ColumnRecur ()
_label = "Recur";
_modifiable = true;
_styles = {"duration", "indicator"};
_examples = {"weekly", context.config.get ("recurrence.indicator")};
_examples = {"weekly", Context::getContext ().config.get ("recurrence.indicator")};
}
////////////////////////////////////////////////////////////////////////////////
@@ -58,7 +57,7 @@ void ColumnRecur::setStyle (const std::string& value)
Column::setStyle (value);
if (_style == "indicator" && _label == "Recur")
_label = _label.substr (0, context.config.get ("recurrence.indicator").length ());
_label = _label.substr (0, Context::getContext ().config.get ("recurrence.indicator").length ());
}
////////////////////////////////////////////////////////////////////////////////
@@ -75,7 +74,7 @@ void ColumnRecur::measure (Task& task, unsigned int& minimum, unsigned int& maxi
}
else if (_style == "indicator")
{
minimum = maximum = utf8_width (context.config.get ("recurrence.indicator"));
minimum = maximum = utf8_width (Context::getContext ().config.get ("recurrence.indicator"));
}
}
}
@@ -94,7 +93,7 @@ void ColumnRecur::render (
renderStringRight (lines, width, color, Duration (task.get (_name)).formatISO ());
else if (_style == "indicator")
renderStringRight (lines, width, color, context.config.get ("recurrence.indicator"));
renderStringRight (lines, width, color, Context::getContext ().config.get ("recurrence.indicator"));
}
}
@@ -122,7 +121,7 @@ void ColumnRecur::modify (Task& task, const std::string& value)
{
// Store the raw value, for 'recur'.
std::string label = " MODIFICATION ";
context.debug (label + _name + " <-- '" + value + '\'');
Context::getContext ().debug (label + _name + " <-- '" + value + '\'');
task.set (_name, value);
}
else