00001 #include <stdio.h>
00002 #include <stdlib.h>
00003
00004
00005 void clrscr(void)
00006 {
00007 printf("\033[2J");
00008 }
00009
00010 void goxy(int x, int y)
00011 {
00012 printf("\033[%d;%dH", y, x);
00013 }
00014
00015 void hilight(void)
00016 {
00017 printf("\033[1m");
00018 }
00019
00020 void underline(void)
00021 {
00022 printf("\033[4m");
00023 }
00024
00025 void blink(void)
00026 {
00027 printf("\033[5m");
00028 }
00029
00030 void reverse(void)
00031 {
00032 printf("\033[7m");
00033 }
00034
00035 void invisible(void)
00036 {
00037 printf("\033[8m");
00038 }
00039
00040 void norm(void)
00041 {
00042 printf("\033[0m");
00043 }
00044
00045
00046
00047 void up(int x)
00048 {
00049 if (x)
00050 printf("\033[%dA", x);
00051 else
00052 printf("\033[A");
00053 }
00054
00055 void down(int x)
00056 {
00057 if (x)
00058 printf("\033[%dB", x);
00059 else
00060 printf("\033[B");
00061 }
00062
00063 void left(int x)
00064 {
00065 if (x)
00066 printf("\033[%dD", x);
00067 else
00068 printf("\033[D");
00069 }
00070
00071 void right(int x)
00072 {
00073 if (x)
00074 printf("\033[%dC", x);
00075 else
00076 printf("\033[C");
00077 }
00078