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

@ -27,8 +27,6 @@
#include <cmake.h>
#include <Context.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
// Returns a Boolean indicator as to whether a nag message was generated, so
// that commands can control the number of nag messages displayed (ie one is
@ -42,18 +40,18 @@ bool nag (Task& task)
if (task.hasTag ("nonag"))
return false;
auto msg = context.config.get ("nag");
auto msg = Context::getContext ().config.get ("nag");
if (msg != "")
{
// Scan all pending, non-recurring tasks.
auto pending = context.tdb2.pending.get_tasks ();
auto pending = Context::getContext ().tdb2.pending.get_tasks ();
for (auto& t : pending)
{
if ((t.getStatus () == Task::pending ||
t.getStatus () == Task::waiting) &&
t.urgency () > task.urgency ())
{
context.footnote (msg);
Context::getContext ().footnote (msg);
return true;
}
}