/*************************************************************************************************************************************/
/* */
/* I N V E R S I O N V I D E O D ' U N E C H A I N E D E C A R A C T E R E S : */
/* */
/* */
/* Author of '$xtc/InvVideo.01$c' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 20060609182506). */
/* */
/*************************************************************************************************************************************/
#define K_ESC \
0x1b \
/* Caractere <ESCAPE>. */
#define Reset \
"[0m"
#define Reverse \
"[41;33;7m"
/* Demande de caractere jaune ("41") sur fond rouge ("33") puis inversion ("7"), ce qui */
/* fait des caracteres rouge sur un fond jaune (ce qui equivaut a ""43;31" au passage...). */
#include <stdio.h>
main()
{
printf("normal%c%s=inverse=%c%snormal\n",K_ESC,Reverse,K_ESC,Reset);
/* Liste des differentes chaines d'echappement du type "<ESC>[Xm" ou 'X' designe une ou */
/* plusieurs des chaines suivantes (separees par un ";" lorsqu'il y en a plusieurs...) : */
/* */
/* 0 Reset all attributes */
/* 1 Bright */
/* 2 Dim */
/* 4 Underscore */
/* 5 Blink */
/* 7 Reverse */
/* 8 Hidden */
/* */
/* 30 Black (Foreground Colours) */
/* 31 Red (Foreground Colours) */
/* 32 Green (Foreground Colours) */
/* 33 Yellow (Foreground Colours) */
/* 34 Blue (Foreground Colours) */
/* 35 Magenta (Foreground Colours) */
/* 36 Cyan (Foreground Colours) */
/* 37 White (Foreground Colours) */
/* */
/* 40 Black (Background Colours) */
/* 41 Red (Background Colours) */
/* 42 Green (Background Colours) */
/* 43 Yellow (Background Colours) */
/* 44 Blue (Background Colours) */
/* 45 Magenta (Background Colours) */
/* 46 Cyan (Background Colours) */
/* 47 White (Background Colours) */
/* */
}