diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-11 21:58:04 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-11 21:58:04 +0200 |
commit | 277d5fcb3b378089c0f3390a0b4d1b529075958a (patch) | |
tree | dfc70f3636c3e4192785c4e052986383a3761a5c /Source/Kernel/Shell | |
parent | 4f1c0997990e719ac1a1cfcb80a7437009c46b7b (diff) | |
download | Melon-277d5fcb3b378089c0f3390a0b4d1b529075958a.tar.gz Melon-277d5fcb3b378089c0f3390a0b4d1b529075958a.zip |
SimpleList now implements removeOnce(const T& value);
This methods searches for value in the list and removes it from
the list. Only the first occurrence will be removed.
Diffstat (limited to 'Source/Kernel/Shell')
-rw-r--r-- | Source/Kernel/Shell/KernelShell.class.cpp | 12 | ||||
-rw-r--r-- | Source/Kernel/Shell/KernelShell.class.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Source/Kernel/Shell/KernelShell.class.cpp b/Source/Kernel/Shell/KernelShell.class.cpp index 3d76ee0..4232cd9 100644 --- a/Source/Kernel/Shell/KernelShell.class.cpp +++ b/Source/Kernel/Shell/KernelShell.class.cpp @@ -15,8 +15,8 @@ u32int shellRun(void* ks) { return ret; } -KernelShell::KernelShell(DirectoryNode* cwd) { - m_vt = new ScrollableVT(15, 76, 200, SHELL_FGCOLOR, SHELL_BGCOLOR); +void KernelShell::setup(DirectoryNode* cwd, VirtualTerminal *vt) { + m_vt = vt; ((ScrollableVT*)m_vt)->map(9); Kbd::setFocus(m_vt); m_cwd = cwd; @@ -25,6 +25,14 @@ KernelShell::KernelShell(DirectoryNode* cwd) { m_instances++; } +KernelShell::KernelShell(DirectoryNode* cwd, VirtualTerminal* vt) { + setup(cwd, vt); +} + +KernelShell::KernelShell(DirectoryNode* cwd) { + setup(cwd, new ScrollableVT(15, 76, 200, SHELL_FGCOLOR, SHELL_BGCOLOR)); +} + KernelShell::~KernelShell() { delete m_vt; m_instances--; diff --git a/Source/Kernel/Shell/KernelShell.class.h b/Source/Kernel/Shell/KernelShell.class.h index 182aa66..39e1ebd 100644 --- a/Source/Kernel/Shell/KernelShell.class.h +++ b/Source/Kernel/Shell/KernelShell.class.h @@ -34,7 +34,10 @@ class KernelShell { void uptime(Vector<String>& args); void part(Vector<String>& args); + void setup(DirectoryNode* cwd, VirtualTerminal *vt); + public: + KernelShell(DirectoryNode* cwd, VirtualTerminal *vt); KernelShell(DirectoryNode* cwd); static u32int getInstances() { return m_instances; } |