From 08c4d4bdfed175839075ac4fa537e519fd945383 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 28 May 2011 17:53:58 -0400 Subject: [PATCH] Build - Fixed more case-sensitivity problems, and missing include files. --- src/Arguments.cpp | 1 + src/commands/CmdIDs.cpp | 6 +++--- src/commands/CmdIDs.h | 4 ++-- src/commands/CmdInfo.cpp | 14 +++++++------- src/commands/Command.cpp | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Arguments.cpp b/src/Arguments.cpp index 07ca94600..c2d259d46 100644 --- a/src/Arguments.cpp +++ b/src/Arguments.cpp @@ -26,6 +26,7 @@ //////////////////////////////////////////////////////////////////////////////// #include +#include #include #include #include diff --git a/src/commands/CmdIDs.cpp b/src/commands/CmdIDs.cpp index 152007f51..0b55ed213 100644 --- a/src/commands/CmdIDs.cpp +++ b/src/commands/CmdIDs.cpp @@ -29,12 +29,12 @@ #include #include #include -#include +#include extern Context context; //////////////////////////////////////////////////////////////////////////////// -CmdIds::CmdIds () +CmdIDs::CmdIDs () { _keyword = "ids"; _usage = "task ids []"; @@ -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 tasks; diff --git a/src/commands/CmdIDs.h b/src/commands/CmdIDs.h index e7cda3a7c..4a8432125 100644 --- a/src/commands/CmdIDs.h +++ b/src/commands/CmdIDs.h @@ -31,10 +31,10 @@ #include #include -class CmdIds : public Command +class CmdIDs : public Command { public: - CmdIds (); + CmdIDs (); int execute (const std::string&, std::string&); }; diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 17db82647..38f3cc2f9 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -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)); diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 57ae001d1..dc81659f3 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ void Command::factory (std::map & 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;