51 lines
732 B
C
51 lines
732 B
C
#include "termstuff.h"
|
|
#include "stdio.h"
|
|
|
|
void clear(){
|
|
putchar(0x1b);
|
|
putchar(0x5b);
|
|
putchar(0x48);
|
|
putchar(0x1b);
|
|
putchar(0x5b);
|
|
putchar(0x32);
|
|
putchar(0x4a);
|
|
putchar(0x1b);
|
|
putchar(0x5b);
|
|
putchar(0x33);
|
|
putchar(0x4a);
|
|
}
|
|
|
|
void escapeStart(){
|
|
putchar('\033');
|
|
putchar('[');
|
|
}
|
|
|
|
void escapeEnd() {
|
|
putchar('m');
|
|
}
|
|
|
|
void white() {
|
|
escapeStart();
|
|
putchar('3');
|
|
putchar('7');
|
|
putchar(';');
|
|
putchar('4');
|
|
putchar('0');
|
|
escapeEnd();
|
|
}
|
|
|
|
void black() {
|
|
escapeStart();
|
|
putchar('3');
|
|
putchar('0');
|
|
putchar(';');
|
|
putchar('4');
|
|
putchar('7');
|
|
escapeEnd();
|
|
}
|
|
|
|
void original() {
|
|
escapeStart();
|
|
putchar('0');
|
|
escapeEnd();
|
|
} |