src/ansi.h

Go to the documentation of this file.
00001 
00002 /* ansi.h */
00003 
00004 /* $Id: ansi.h,v 1.1 2005/06/13 20:50:46 murrayma Exp $ */
00005 
00006 /* ANSI control codes for various neat-o terminal effects
00007  *
00008  * Some older versions of Ultrix don't appear to be able to
00009  * handle these escape sequences. If lowercase 'a's are being
00010  * stripped from @doings, and/or the output of the ANSI flag
00011  * is screwed up, you have the Ultrix problem.
00012  *
00013  * To fix the ANSI problem, try replacing the '\x1B' with '\033'.
00014  * To fix the problem with 'a's, replace all occurrences of '\a'
00015  * in the code with '\07'.
00016  *
00017  */
00018 
00019 #ifndef OLD_ANSI
00020 
00021 #define BEEP_CHAR     '\07'
00022 #define ESC_CHAR      '\033'
00023 
00024 #define ANSI_NORMAL   "\033[0m"
00025 
00026 #define ANSI_HILITE   "\033[1m"
00027 #define ANSI_INVERSE  "\033[7m"
00028 #define ANSI_BLINK    "\033[5m"
00029 #define ANSI_UNDER    "\033[4m"
00030 
00031 #define ANSI_INV_BLINK         "\033[7;5m"
00032 #define ANSI_INV_HILITE        "\033[1;7m"
00033 #define ANSI_BLINK_HILITE      "\033[1;5m"
00034 #define ANSI_INV_BLINK_HILITE  "\033[1;5;7m"
00035 
00036 /* Foreground colors */
00037 
00038 #define ANSI_BLACK      "\033[30m"
00039 #define ANSI_RED        "\033[31m"
00040 #define ANSI_GREEN      "\033[32m"
00041 #define ANSI_YELLOW     "\033[33m"
00042 #define ANSI_BLUE       "\033[34m"
00043 #define ANSI_MAGENTA    "\033[35m"
00044 #define ANSI_CYAN       "\033[36m"
00045 #define ANSI_WHITE      "\033[37m"
00046 
00047 /* Background colors */
00048 
00049 #define ANSI_BBLACK     "\033[40m"
00050 #define ANSI_BRED       "\033[41m"
00051 #define ANSI_BGREEN     "\033[42m"
00052 #define ANSI_BYELLOW    "\033[43m"
00053 #define ANSI_BBLUE      "\033[44m"
00054 #define ANSI_BMAGENTA   "\033[45m"
00055 #define ANSI_BCYAN      "\033[46m"
00056 #define ANSI_BWHITE     "\033[47m"
00057 
00058 #else
00059 
00060 #define BEEP_CHAR     '\07'
00061 #define ESC_CHAR      '\033'
00062 
00063 #define ANSI_NORMAL   "\033[0m"
00064 
00065 #define ANSI_HILITE   "\033[1m"
00066 #define ANSI_INVERSE  "\033[7m"
00067 #define ANSI_BLINK    "\033[5m"
00068 #define ANSI_UNDER    "\033[4m"
00069 
00070 #define ANSI_INV_BLINK         "\033[7;5m"
00071 #define ANSI_INV_HILITE        "\033[1;7m"
00072 #define ANSI_BLINK_HILITE      "\033[1;5m"
00073 #define ANSI_INV_BLINK_HILITE  "\033[1;5;7m"
00074 
00075 /* Foreground colors */
00076 
00077 #define ANSI_BLACK      "\033[30m"
00078 #define ANSI_RED        "\033[31m"
00079 #define ANSI_GREEN      "\033[32m"
00080 #define ANSI_YELLOW     "\033[33m"
00081 #define ANSI_BLUE       "\033[34m"
00082 #define ANSI_MAGENTA    "\033[35m"
00083 #define ANSI_CYAN       "\033[36m"
00084 #define ANSI_WHITE      "\033[37m"
00085 
00086 /* Background colors */
00087 
00088 #define ANSI_BBLACK     "\033[40m"
00089 #define ANSI_BRED       "\033[41m"
00090 #define ANSI_BGREEN     "\033[42m"
00091 #define ANSI_BYELLOW    "\033[43m"
00092 #define ANSI_BBLUE      "\033[44m"
00093 #define ANSI_BMAGENTA   "\033[45m"
00094 #define ANSI_BCYAN      "\033[46m"
00095 #define ANSI_BWHITE     "\033[47m"
00096 
00097 #endif

Generated on Mon May 28 04:25:18 2007 for BattletechMUX by  doxygen 1.4.7