mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 06:37:20 +02:00
Code Cleanup
- Eliminated "itask" interactive mode code.
This commit is contained in:
parent
4c7c8cf195
commit
139e55fca3
3 changed files with 1 additions and 36 deletions
|
@ -50,7 +50,6 @@ public:
|
||||||
void initialize2 (int, char**); // all startup
|
void initialize2 (int, char**); // all startup
|
||||||
void initialize (); // for reinitializing
|
void initialize (); // for reinitializing
|
||||||
int run (); // task classic
|
int run (); // task classic
|
||||||
int interactive (); // task interactive (not implemented)
|
|
||||||
int dispatch (std::string&); // command handler dispatch
|
int dispatch (std::string&); // command handler dispatch
|
||||||
void shadow (); // shadow file update
|
void shadow (); // shadow file update
|
||||||
|
|
||||||
|
|
|
@ -25,26 +25,14 @@
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//#include <iostream>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
//#include <pwd.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
//#include <stdlib.h>
|
|
||||||
//#include <string.h>
|
|
||||||
#include "Context.h"
|
#include "Context.h"
|
||||||
//#include "text.h"
|
|
||||||
//#include "util.h"
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
#include "../cmake.h"
|
#include "../cmake.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
int Context::interactive ()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int Context::getWidth ()
|
int Context::getWidth ()
|
||||||
{
|
{
|
||||||
|
|
24
src/main.cpp
24
src/main.cpp
|
@ -64,29 +64,7 @@ int main (int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.initialize (argc, argv);
|
context.initialize (argc, argv);
|
||||||
|
status = context.run ();
|
||||||
/* From old 2.0.0
|
|
||||||
std::string::size_type task = context.program.find ("/task");
|
|
||||||
std::string::size_type t = context.program.find ("/t");
|
|
||||||
std::string::size_type cal = context.program.find ("/cal");
|
|
||||||
|
|
||||||
if (context.program != "task" &&
|
|
||||||
context.program != "t" &&
|
|
||||||
context.program != "cal" &&
|
|
||||||
(task == std::string::npos || context.program.length () != task + 5) &&
|
|
||||||
(t == std::string::npos || context.program.length () != t + 2) &&
|
|
||||||
(cal == std::string::npos || context.program.length () != cal + 4))
|
|
||||||
status = context.handleInteractive ();
|
|
||||||
else
|
|
||||||
status = context.run ();
|
|
||||||
*/
|
|
||||||
|
|
||||||
std::string::size_type itask = context.program.find ("/itask");
|
|
||||||
if (context.program == "itask" ||
|
|
||||||
(itask != std::string::npos && context.program.length () == itask + 5))
|
|
||||||
status = context.interactive ();
|
|
||||||
else
|
|
||||||
status = context.run ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (std::string& error)
|
catch (std::string& error)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue