Portability: Updated to make main re-entrant()
- New INSTALL instructions to emscripten, and AUTHORS for contribution.
This commit is contained in:
committed by
Paul Beckingham
parent
cae3f06b7d
commit
7af6db4c17
@@ -37,8 +37,6 @@
|
||||
#include <util.h>
|
||||
#include <main.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdSummary::CmdSummary ()
|
||||
{
|
||||
@@ -62,7 +60,7 @@ CmdSummary::CmdSummary ()
|
||||
int CmdSummary::execute (std::string& output)
|
||||
{
|
||||
int rc = 0;
|
||||
bool showAllProjects = context.config.getBoolean ("summary.all.projects");
|
||||
bool showAllProjects = Context::getContext ().config.getBoolean ("summary.all.projects");
|
||||
|
||||
// Apply filter.
|
||||
handleUntil ();
|
||||
@@ -132,7 +130,7 @@ int CmdSummary::execute (std::string& output)
|
||||
|
||||
// Create a table for output.
|
||||
Table view;
|
||||
view.width (context.getWidth ());
|
||||
view.width (Context::getContext ().getWidth ());
|
||||
view.add ("Project");
|
||||
view.add ("Remaining", false);
|
||||
view.add ("Avg age", false);
|
||||
@@ -142,10 +140,10 @@ int CmdSummary::execute (std::string& output)
|
||||
|
||||
Color bar_color;
|
||||
Color bg_color;
|
||||
if (context.color ())
|
||||
if (Context::getContext ().color ())
|
||||
{
|
||||
bar_color = Color (context.config.get ("color.summary.bar"));
|
||||
bg_color = Color (context.config.get ("color.summary.background"));
|
||||
bar_color = Color (Context::getContext ().config.get ("color.summary.bar"));
|
||||
bg_color = Color (Context::getContext ().config.get ("color.summary.background"));
|
||||
}
|
||||
|
||||
int barWidth = 30;
|
||||
@@ -183,7 +181,7 @@ int CmdSummary::execute (std::string& output)
|
||||
|
||||
std::string bar;
|
||||
std::string subbar;
|
||||
if (context.color ())
|
||||
if (Context::getContext ().color ())
|
||||
{
|
||||
bar += bar_color.colorize (std::string ( completedBar, ' '));
|
||||
bar += bg_color.colorize (std::string (barWidth - completedBar, ' '));
|
||||
|
||||
Reference in New Issue
Block a user