mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Build
- Fixed more case-sensitivity problems, and missing include files.
This commit is contained in:
parent
17f3717871
commit
08c4d4bdfe
5 changed files with 15 additions and 14 deletions
|
@ -26,6 +26,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <sys/select.h>
|
||||
#include <Context.h>
|
||||
#include <Nibbler.h>
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
#include <Context.h>
|
||||
#include <main.h>
|
||||
#include <util.h>
|
||||
#include <CmdIds.h>
|
||||
#include <CmdIDs.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdIds::CmdIds ()
|
||||
CmdIDs::CmdIDs ()
|
||||
{
|
||||
_keyword = "ids";
|
||||
_usage = "task ids [<filter>]";
|
||||
|
@ -44,7 +44,7 @@ CmdIds::CmdIds ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int CmdIds::execute (const std::string& command_line, std::string& output)
|
||||
int CmdIDs::execute (const std::string& command_line, std::string& output)
|
||||
{
|
||||
// Scan the pending tasks, applying any filter.
|
||||
std::vector <Task> tasks;
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
#include <string>
|
||||
#include <Command.h>
|
||||
|
||||
class CmdIds : public Command
|
||||
class CmdIDs : public Command
|
||||
{
|
||||
public:
|
||||
CmdIds ();
|
||||
CmdIDs ();
|
||||
int execute (const std::string&, std::string&);
|
||||
};
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
row = view.addRow ();
|
||||
view.set (row, 0, "Recur until");
|
||||
|
||||
Date dt (atoi (task->get ("until").c_str ()));
|
||||
Date dt (stdtol (task->get ("until").c_str (), NULL, 10));
|
||||
std::string format = context.config.get ("reportdateformat");
|
||||
if (format == "")
|
||||
format = context.config.get ("dateformat");
|
||||
|
@ -222,7 +222,7 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
{
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, "Waiting until");
|
||||
Date dt (atoi (task->get ("wait").c_str ()));
|
||||
Date dt (strtol (task->get ("wait").c_str (), NULL, 10));
|
||||
view.set (row, 1, dt.toString (context.config.get ("dateformat")));
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
{
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, "Start");
|
||||
Date dt (atoi (task->get ("start").c_str ()));
|
||||
Date dt (strtol (task->get ("start").c_str (), NULL, 10));
|
||||
view.set (row, 1, dt.toString (context.config.get ("dateformat")));
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
{
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, "End");
|
||||
Date dt (atoi (task->get ("end").c_str ()));
|
||||
Date dt (strtol (task->get ("end").c_str (), NULL, 10));
|
||||
view.set (row, 1, dt.toString (context.config.get ("dateformat")));
|
||||
}
|
||||
|
||||
|
@ -266,14 +266,14 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
// entry
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, "Entered");
|
||||
Date dt (atoi (task->get ("entry").c_str ()));
|
||||
Date dt (strtol (task->get ("entry").c_str (), NULL, 10));
|
||||
std::string entry = dt.toString (context.config.get ("dateformat"));
|
||||
|
||||
std::string age;
|
||||
std::string created = task->get ("entry");
|
||||
if (created.length ())
|
||||
{
|
||||
Date dt (atoi (created.c_str ()));
|
||||
Date dt (strtol (created.c_str (), NULL, 10));
|
||||
age = Duration (now - dt).format ();
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ int CmdInfo::execute (const std::string& command_line, std::string& output)
|
|||
{
|
||||
int row = journal.addRow ();
|
||||
|
||||
Date timestamp (atoi (when.substr (5).c_str ()));
|
||||
Date timestamp (strtol (when.substr (5).c_str (), NULL, 10));
|
||||
journal.set (row, 0, timestamp.toString (context.config.get ("dateformat")));
|
||||
|
||||
Task before (previous.substr (4));
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <CmdExec.h>
|
||||
#include <CmdHelp.h>
|
||||
#include <CmdHistory.h>
|
||||
#include <CmdIds.h>
|
||||
#include <CmdIDs.h>
|
||||
#include <CmdInfo.h>
|
||||
#include <CmdInstall.h>
|
||||
#include <CmdLogo.h>
|
||||
|
@ -74,7 +74,7 @@ void Command::factory (std::map <std::string, Command*>& all)
|
|||
c = new CmdHelp (); all[c->keyword ()] = c;
|
||||
c = new CmdHistoryMonthly (); all[c->keyword ()] = c;
|
||||
c = new CmdHistoryAnnual (); all[c->keyword ()] = c;
|
||||
c = new CmdIds (); all[c->keyword ()] = c;
|
||||
c = new CmdIDs (); all[c->keyword ()] = c;
|
||||
c = new CmdInfo (); all[c->keyword ()] = c;
|
||||
c = new CmdInstall (); all[c->keyword ()] = c;
|
||||
c = new CmdLogo (); all[c->keyword ()] = c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue