From 1686b2b903a7cd8298212711cd8fe13d85a82c23 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 28 Nov 2011 11:34:50 +0100 Subject: [PATCH] Removed hello program. --- Makefile | 2 +- hello/.gitignore | 7 ------- hello/Makefile | 26 -------------------------- hello/hello.cpp | 38 -------------------------------------- 4 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 hello/.gitignore delete mode 100644 hello/Makefile delete mode 100644 hello/hello.cpp diff --git a/Makefile b/Makefile index f18fde64..c2cc5d84 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif REMOTE=192.168.2.6 REMOTEUSER=sortie REMOTECOPYDIR:=/home/$(REMOTEUSER)/Desktop/MaxsiOS -MODULES=libmaxsi hello games mkinitrd utils sortix +MODULES=libmaxsi games mkinitrd utils sortix VERSION=0.5dev DEBNAME:=sortix_$(VERSION)_$(CPU) diff --git a/hello/.gitignore b/hello/.gitignore deleted file mode 100644 index 92830b70..00000000 --- a/hello/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.o -*.tmp -*.bin -*.iso -*.so -*.a -hello diff --git a/hello/Makefile b/hello/Makefile deleted file mode 100644 index e97ee186..00000000 --- a/hello/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Set up variables such that we can easily cross-compile. -OSROOT=.. -include ../crosscompilemakefile.mak - -INITRDDIR:=../initrd -LOCALBINARIES:=\ -hello \ - -BINARIES:=$(addprefix $(INITRDDIR)/,$(LOCALBINARIES)) - -all: install - -install: $(LOCALBINARIES) - cp $(LOCALBINARIES) $(INITRDDIR) - rm -f $(LOCALBINARIES) - -%: %.cpp - $(CXX) $(CPPFLAGS) $(CXXFLAGS) -O2 -c $< -o $@.o - $(LD) $(LDFLAGS) $@.o -o $@ $(LIBS) - -sh: mxsh - cp $< $@ - -clean: - rm -f $(BINARIES) $(LOCALBINARIES) *.o - diff --git a/hello/hello.cpp b/hello/hello.cpp deleted file mode 100644 index 5ddc8a87..00000000 --- a/hello/hello.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - printf("\e[m\e[0J"); - printf("Hello World: Welcome to Sortix! This is a program running in user-space.\n" - "This program is a probably the worst text editor ever made.\n" - "You are currently using the buggy USA keyboard layout.\n" - "This terminal is controlled using ANSI Escape Sequences:\n" - " - Type \e[32mESC 2 J\e[m to clear the screen\n" - ); - - bool lastwasesc = false; - - while (true) - { - unsigned method = System::Keyboard::POLL; - uint32_t codepoint = System::Keyboard::ReceiveKeystroke(method); - - if ( codepoint == 0 ) { continue; } - if ( codepoint & Maxsi::Keyboard::DEPRESSED ) { continue; } - if ( codepoint == Maxsi::Keyboard::UP ) { printf("\e[A"); continue; } - if ( codepoint == Maxsi::Keyboard::DOWN ) { printf("\e[B"); continue; } - if ( codepoint == Maxsi::Keyboard::RIGHT ) { printf("\e[C"); continue; } - if ( codepoint == Maxsi::Keyboard::LEFT ) { printf("\e[D"); continue; } - if ( codepoint == Maxsi::Keyboard::ESC ) { printf("\e["); lastwasesc = true; continue; } - if ( lastwasesc && codepoint == '[' ) { continue; } - if ( codepoint >= 0x80 ) { continue; } - - char msg[2]; msg[0] = codepoint; msg[1] = '\0'; - printf(msg); - lastwasesc = false; - } - - return 0; -} -