diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
commit | 07a73aea7acbf0d9f9182bc3557583aa17af0000 (patch) | |
tree | 983e7b70b4d836c4050b8f350d7bd1e7250058b4 /Source/Applications | |
parent | a804601188be682ce87e6a9591286e8c8ab2817d (diff) | |
download | Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.tar.gz Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.zip |
[not really working] Started work on OStream
Diffstat (limited to 'Source/Applications')
-rw-r--r-- | Source/Applications/PaperWork/PaperWork.cpp | 9 | ||||
-rw-r--r-- | Source/Applications/Shell/Shell-fs.class.cpp | 4 | ||||
-rw-r--r-- | Source/Applications/Shell/Shell.class.cpp | 2 | ||||
-rw-r--r-- | Source/Applications/Shell/main.cpp | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/Source/Applications/PaperWork/PaperWork.cpp b/Source/Applications/PaperWork/PaperWork.cpp index 4f9cb0e..ac6f26d 100644 --- a/Source/Applications/PaperWork/PaperWork.cpp +++ b/Source/Applications/PaperWork/PaperWork.cpp @@ -1,6 +1,7 @@ #include <App/ShellApp.proto.h> #define DEFAULT_SHELL "/Applications/Shell/Shell.app" +#define PAPERWORK_PATH "/System/Applications/PaperWork.app" class PaperWork : public ShellApp { public: @@ -20,7 +21,7 @@ int PaperWork::run() { if (act == "init") { while (1) { - Process p = Process::run("/System/Applications/PaperWork.app"); + Process p = Process::run(PAPERWORK_PATH); if (p.valid()) { p.setInVT(invt); p.setOutVT(outvt); @@ -35,15 +36,15 @@ int PaperWork::run() { outvt << "Logging in to Melon\n"; String user, pw; while (1) { - outvt << "Username: "; + outvt << "Username: " << FLUSH; user = invt.readLine(); - outvt << "Password: "; + outvt << "Password: " << FLUSH; pw = invt.readLine(false); if (!Process::get().authenticatePW(user, pw)) { outvt << "Authentication failed.\n\n"; continue; } - outvt << "What shell to run [" << sFlag("shell") << "]? "; + outvt << "What shell to run [" << sFlag("shell") << "]? "<< FLUSH; String sh = invt.readLine(); if (sh == "") sh = sFlag("shell"); Process p = Process::run(sh); diff --git a/Source/Applications/Shell/Shell-fs.class.cpp b/Source/Applications/Shell/Shell-fs.class.cpp index 150b877..30faaf7 100644 --- a/Source/Applications/Shell/Shell-fs.class.cpp +++ b/Source/Applications/Shell/Shell-fs.class.cpp @@ -28,11 +28,11 @@ void Shell::ls(Vector<String>& args) { if (((p >> i) & 1) == 0) perm[8 - i] = "-"; } if (n.type() == NT_FILE) { - outvt << " FILE " << perm << " " << n.getName(); + outvt << " FILE " << perm << " " << n.getName() << FLUSH; outvt.setCsrCol(30); outvt << (s32int)n.getLength() << " bytes.\n"; } else if (n.type() == NT_DIRECTORY) { - outvt << " DIR " << perm << " " << n.getName() << "/"; + outvt << " DIR " << perm << " " << n.getName() << "/" << FLUSH; outvt.setCsrCol(30); outvt << (s32int)n.getLength() << " items.\n"; } diff --git a/Source/Applications/Shell/Shell.class.cpp b/Source/Applications/Shell/Shell.class.cpp index 3d406c8..bfbf631 100644 --- a/Source/Applications/Shell/Shell.class.cpp +++ b/Source/Applications/Shell/Shell.class.cpp @@ -25,7 +25,7 @@ int Shell::run() { cwd = FS::cwdNode(); while (1) { - outvt << "{" << cwd.getName() << "}: "; + outvt << "{" << cwd.getName() << "}: " << FLUSH; String s = invt.readLine(); if (s.empty()) continue; while (s[0] == WChar(" ") or s[0] == WChar("\t")) { diff --git a/Source/Applications/Shell/main.cpp b/Source/Applications/Shell/main.cpp deleted file mode 100644 index 66c4269..0000000 --- a/Source/Applications/Shell/main.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "Shell.ns.h" - -int main(const Vector<String>& args) { - return Shell::run(); -} |