mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Portability: Updated to make main re-entrant()
- New INSTALL instructions to emscripten, and AUTHORS for contribution.
This commit is contained in:
parent
cae3f06b7d
commit
7af6db4c17
112 changed files with 960 additions and 1147 deletions
|
@ -32,8 +32,6 @@
|
|||
#include <Filter.h>
|
||||
#include <format.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdUnique::CmdUnique ()
|
||||
{
|
||||
|
@ -63,13 +61,13 @@ int CmdUnique::execute (std::string& output)
|
|||
std::string attribute {};
|
||||
|
||||
// Just the first arg.
|
||||
auto words = context.cli2.getWords ();
|
||||
auto words = Context::getContext ().cli2.getWords ();
|
||||
if (words.size () == 0)
|
||||
throw std::string ("An attribute must be specified. See 'task _columns'.");
|
||||
attribute = words[0];
|
||||
|
||||
std::string canonical;
|
||||
if (! context.cli2.canonicalize (canonical, "attribute", attribute))
|
||||
if (! Context::getContext ().cli2.canonicalize (canonical, "attribute", attribute))
|
||||
throw std::string ("You must specify an attribute or UDA.");
|
||||
|
||||
// Find the unique set of matching tasks.
|
||||
|
@ -92,7 +90,7 @@ int CmdUnique::execute (std::string& output)
|
|||
for (auto& value : values)
|
||||
output += value + '\n';
|
||||
|
||||
context.headers.clear ();
|
||||
Context::getContext ().headers.clear ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue