1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:17:45 +00:00

Add save/unsave cursor escape sequences.

Also added a little terminal test program called /bin/tst.
This commit is contained in:
Andreas Kling 2018-10-28 01:44:53 +02:00
parent ea6221dd06
commit 43475f248b
6 changed files with 41 additions and 5 deletions

1
Userland/.gitignore vendored
View file

@ -12,3 +12,4 @@ hostname
cat
uname
clear
tst

View file

@ -11,7 +11,8 @@ OBJS = \
hostname.o \
cat.o \
uname.o \
clear.o
clear.o \
tst.o
APPS = \
id \
@ -26,7 +27,8 @@ APPS = \
hostname \
cat \
uname \
clear
clear \
tst
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib
@ -85,6 +87,9 @@ uname: uname.o
clear: clear.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
tst: tst.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<

11
Userland/tst.cpp Normal file
View file

@ -0,0 +1,11 @@
#include <LibC/stdio.cpp>
int main(int argc, char** argv)
{
printf("Counting to 100000: \033[s");
for (unsigned i = 0; i <= 100000; ++i) {
printf("\033[u\033[s%u", i);
}
printf("\n");
return 0;
}