#include "config.h" #include #include #include #include #include #include #include #if HAVE_NCURSES_H #include #else #include #endif #if HAVE_TERMIO_H #include #endif #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H #include #endif #include #ifdef HAVE_GETOPT_H #include #endif /* Small utility for setting the color. Usage: set_color COLOR where COLOR is either an integer from 0 to seven or one of the strings in the col array. */ #define COLORS (sizeof(col)/sizeof(char *)) char *col[]= { "black", "red", "green", "brown", "yellow", "blue", "magenta", "purple", "cyan", "white", "normal" } ; int col_idx[]= { 0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8 } ; void print_help(); int translate_color( char *str ) { char *endptr; int color; if( !str ) return -1; color = strtol( str, &endptr, 10 ); if(endptr<=str) { int i; color = -1; for( i=0; i