From e2d5d79bbc90d73f709953f04b2b0d1faac4d43e Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Wed, 23 Dec 2009 19:19:55 +0100 Subject: Changed the way virtual terminal commands are handled These commands include those for moving the cursor, showing/hiding it, changing the color, ... --- Source/Applications/Demos/GOL.cpp | 2 +- Source/Applications/Demos/Makefile | 2 +- Source/Applications/PaperWork/Makefile | 2 +- Source/Applications/Shell/Applets/rot13 | Bin 73404 -> 0 bytes Source/Applications/Shell/Makefile | 6 +++--- Source/Applications/Shell/Shell-fs.class.cpp | 10 ++++------ 6 files changed, 10 insertions(+), 12 deletions(-) delete mode 100755 Source/Applications/Shell/Applets/rot13 (limited to 'Source/Applications') diff --git a/Source/Applications/Demos/GOL.cpp b/Source/Applications/Demos/GOL.cpp index ba9cb1c..48d728b 100644 --- a/Source/Applications/Demos/GOL.cpp +++ b/Source/Applications/Demos/GOL.cpp @@ -45,7 +45,7 @@ int GOL::run() { } } } - outvt.moveCursor(0, 0); + outvt << MVT::movecsr(0, 0); outvt.write(tmp.toString()); //BYPASS buffering outvt<< "Press Ctrl+h for help" << FLUSH; diff --git a/Source/Applications/Demos/Makefile b/Source/Applications/Demos/Makefile index e66acce..82489ba 100644 --- a/Source/Applications/Demos/Makefile +++ b/Source/Applications/Demos/Makefile @@ -7,7 +7,7 @@ CXX = g++ CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND LD = ld -LDFLAGS = -T ../../Library/Link.ld -L ../../Library +LDFLAGS = -T ../../Library/App.ld -L ../../Library Applications = asmdemo cxxdemo GOL diff --git a/Source/Applications/PaperWork/Makefile b/Source/Applications/PaperWork/Makefile index 8d079ec..5c379fb 100644 --- a/Source/Applications/PaperWork/Makefile +++ b/Source/Applications/PaperWork/Makefile @@ -4,7 +4,7 @@ CXX = g++ CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND LD = ld -LDFLAGS = -T ../../Library/Link.ld -L ../../Library -Map Map.txt +LDFLAGS = -T ../../Library/App.ld -L ../../Library -Map Map.txt Objects = PaperWork.o OutFile = PaperWork diff --git a/Source/Applications/Shell/Applets/rot13 b/Source/Applications/Shell/Applets/rot13 deleted file mode 100755 index 0399a6f..0000000 Binary files a/Source/Applications/Shell/Applets/rot13 and /dev/null differ diff --git a/Source/Applications/Shell/Makefile b/Source/Applications/Shell/Makefile index e972dfb..4efe01e 100644 --- a/Source/Applications/Shell/Makefile +++ b/Source/Applications/Shell/Makefile @@ -4,7 +4,7 @@ CXX = g++ CXXFLAGS = -nostartfiles -nostdlib -ffreestanding -fno-exceptions -fno-rtti -I ../../Library/Common -I ../../Library/Interface -I ../../Library/Userland -D THIS_IS_MELON_USERLAND LD = ld -LDFLAGS = -T ../../Library/Link.ld -L ../../Library +LDFLAGS = -T ../../Library/App.ld -L ../../Library Objects = Shell.class.o \ Shell-fs.class.o @@ -31,8 +31,8 @@ Applets/%: Applets/%.o clean: echo "* Removing object files..." - rm -rf *.o + rm -rf *.o Applets/*.o mrproper: clean echo "* Removing applications..." - rm -rf $(OutFile) + rm -rf $(OutFile) $(Applets) diff --git a/Source/Applications/Shell/Shell-fs.class.cpp b/Source/Applications/Shell/Shell-fs.class.cpp index 30faaf7..23af339 100644 --- a/Source/Applications/Shell/Shell-fs.class.cpp +++ b/Source/Applications/Shell/Shell-fs.class.cpp @@ -28,13 +28,11 @@ void Shell::ls(Vector& args) { if (((p >> i) & 1) == 0) perm[8 - i] = "-"; } if (n.type() == NT_FILE) { - outvt << " FILE " << perm << " " << n.getName() << FLUSH; - outvt.setCsrCol(30); - outvt << (s32int)n.getLength() << " bytes.\n"; + outvt << " FILE " << perm << " " << n.getName(); + outvt << MVT::setcsrcol(35) << (s32int)n.getLength() << " bytes.\n"; } else if (n.type() == NT_DIRECTORY) { - outvt << " DIR " << perm << " " << n.getName() << "/" << FLUSH; - outvt.setCsrCol(30); - outvt << (s32int)n.getLength() << " items.\n"; + outvt << " DIR " << perm << " " << n.getName() << "/"; + outvt << MVT::setcsrcol(35) << (s32int)n.getLength() << " items.\n"; } } } -- cgit v1.2.3