diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-23 19:19:55 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-23 19:19:55 +0100 |
commit | e2d5d79bbc90d73f709953f04b2b0d1faac4d43e (patch) | |
tree | bde6f928e3a45ef66f4056cbc932bc21fe44cb31 /Source/Kernel/Shell | |
parent | 7ede286ebcb845fe4bfdfb948c6073573b01c3cb (diff) | |
download | Melon-e2d5d79bbc90d73f709953f04b2b0d1faac4d43e.tar.gz Melon-e2d5d79bbc90d73f709953f04b2b0d1faac4d43e.zip |
Changed the way virtual terminal commands are handled
These commands include those for moving the cursor, showing/hiding it,
changing the color, ...
Diffstat (limited to 'Source/Kernel/Shell')
-rw-r--r-- | Source/Kernel/Shell/KernelShell-fs.class.cpp | 6 | ||||
-rw-r--r-- | Source/Kernel/Shell/KernelShell-sys.class.cpp | 6 | ||||
-rw-r--r-- | Source/Kernel/Shell/KernelShell.class.cpp | 6 |
3 files changed, 6 insertions, 12 deletions
diff --git a/Source/Kernel/Shell/KernelShell-fs.class.cpp b/Source/Kernel/Shell/KernelShell-fs.class.cpp index c389d45..ee72e25 100644 --- a/Source/Kernel/Shell/KernelShell-fs.class.cpp +++ b/Source/Kernel/Shell/KernelShell-fs.class.cpp @@ -21,12 +21,10 @@ void KernelShell::ls(Vector<String>& args) { FSNode* n = d->getChild(i); if (n->type() == NT_FILE) { FileNode* f = (FileNode*)n; - *m_vt << " - FILE\t" << f->getName(); - m_vt->setCursorCol(30); + *m_vt << " - FILE\t" << f->getName() << MVT::setcsrcol(30); *m_vt << (s32int)f->getLength() << " bytes.\n"; } else if (n->type() == NT_DIRECTORY) { - *m_vt << " - DIR\t" << n->getName() << "/"; - m_vt->setCursorCol(30); + *m_vt << " - DIR\t" << n->getName() << "/" << MVT::setcsrcol(30); *m_vt << (s32int)n->getLength() << " items.\n"; } } diff --git a/Source/Kernel/Shell/KernelShell-sys.class.cpp b/Source/Kernel/Shell/KernelShell-sys.class.cpp index b1ab274..a5d6f76 100644 --- a/Source/Kernel/Shell/KernelShell-sys.class.cpp +++ b/Source/Kernel/Shell/KernelShell-sys.class.cpp @@ -11,8 +11,7 @@ void KernelShell::devices(Vector<String>& args) { Vector<Device*> dev = Dev::findDevices(); *m_vt << " - Detected devices :\n"; for (u32int i = 0; i < dev.size(); i++) { - *m_vt << " - " << dev[i]->getClass(); - m_vt->setCursorCol(25); + *m_vt << " - " << dev[i]->getClass() << MVT::setcsrcol(25); *m_vt << dev[i]->getName() << "\n"; } } @@ -47,8 +46,7 @@ void KernelShell::part(Vector<String>& args) { if (Part::devices[i] == 0) { *m_vt << "[none]\n"; } else { - *m_vt << Part::devices[i]->getClass(); - m_vt->setCursorCol(33); + *m_vt << Part::devices[i]->getClass() << MVT::setcsrcol(33); *m_vt << Part::devices[i]->getName() << "\n"; for (u32int j = 0; j < Part::partitions.size(); j++) { if (Part::partitions[j]->getDevice() == Part::devices[i]) { diff --git a/Source/Kernel/Shell/KernelShell.class.cpp b/Source/Kernel/Shell/KernelShell.class.cpp index 9fec9c7..399211d 100644 --- a/Source/Kernel/Shell/KernelShell.class.cpp +++ b/Source/Kernel/Shell/KernelShell.class.cpp @@ -70,11 +70,9 @@ u32int KernelShell::run() { }; while (1) { - m_vt->setColor(KVT_LIGHTCOLOR); - *m_vt << VFS::path(m_cwd) << " # "; - m_vt->setColor(KVT_ENTRYCOLOR); + *m_vt << MVT::setfgcolor(KVT_LIGHTCOLOR) << VFS::path(m_cwd) << " # " << MVT::setfgcolor(KVT_ENTRYCOLOR); Vector<String> tokens = m_vt->readLine().split(" "); - m_vt->setColor(KVT_FGCOLOR); + *m_vt << MVT::setfgcolor(KVT_FGCOLOR); if (tokens[0] == "help") { *m_vt << " - Command list for integrated kernel shell:\n"; *m_vt << " - help shows this help screen\n"; |