/***************************************************************************** Gestionnaire de terminal Unix: ansi.h (c) Pierre ADRIAANS 1994 ------------------------------------------------------------------------------ Controle de l'ecran par sequences ANSI. *****************************************************************************/ #ifndef _ANSI_H_ #define _ANSI_H_ /* Attributs d'affichage */ #define BLACK 0 #define RED 1 #define GREEN 2 #define YELLOW 3 #define BLUE 4 #define MAGENTA 5 #define CYAN 6 #define WHITE 7 #define BLACK_B 8 #define RED_B 9 #define GREEN_B 10 #define YELLOW_B 11 #define BLUE_B 12 #define MAGENTA_B 13 #define CYAN_B 14 #define WHITE_B 15 #define STD_ATT 10 #define NORMAL 0,STD_ATT #define BOLD 1,STD_ATT #define UNDERLINED 4,STD_ATT #define BLINK 5,STD_ATT #define REVERSE 7,STD_ATT #define INVISIBLE 8,STD_ATT #define G_NORMAL 0 #define G_BOLD 1 #define G_UNDERLINED 4 #define G_BLINK 5 #define G_REVERSE 7 #define G_INVISIBLE 8 #define ESC 27 /* Controle de l'ecran */ #define Cls() printf("%c[2J%c[%d;%dH",ESC,ESC,1,1) #define MoveCurs(Lig,Col) printf("%c[%d;%dH",ESC,Lig,Col) #define CursorUp(Row) printf("%c[%dA",ESC,Row) #define CursorDown(Row) printf("%c[%dB",ESC,Row) #define CursorRight(Row) printf("%c[%dC",ESC,Row) #define CursorLeft(Row) printf("%c[%dD",ESC,Row) #endif