33 #include "main/evaluator.h" 36 #include <clib/dos_protos.h> 38 AmigaShellConsole::AmigaShellConsole(
const char* prompt) :
39 ConsoleBase(prompt), exit(
false)
41 line =
new char[linesize];
44 AmigaShellConsole::~AmigaShellConsole()
49 void AmigaShellConsole::Start()
65 Evaluator* evaluator =
new Evaluator(line);
66 evaluator->Evaluate();
67 const char* out = evaluator->GetResult();
68 Write(Output(), (APTR)out, StrLen(out));
74 void AmigaShellConsole::Exit()
79 void AmigaShellConsole::ReadLine()
82 FGets(Input(), line, linesize);
85 void AmigaShellConsole::WriteString(
const char* string)
87 Write(Output(), (APTR)string, StrLen(string));
91 void AmigaShellConsole::WriteString(
const char* string,
unsigned int length)
93 Write(Output(), (APTR)string, length);
97 void AmigaShellConsole::SetPrompt(
const char* string)
99 ConsoleBase::SetPrompt(string);