#include <stdio.h>
const char *mytext[] = {"this has ` , $ percent \% and ' while", "so \%d ____^H^H^H^Hmany"};
const char col_reset[] = "\e[0m";
const char *rownames[7] = {"regular", "bold", "underline", "background", "highbckgrnd", "hightext", "boldhightxt"};
const char *prt_col[][8]={ // 0-black 1-red 2-grn 3-yel 4-blu 5-mag 6-cyn 7-white
{"\e[0;30m", "\e[0;31m", "\e[0;32m", "\e[0;33m", "\e[0;34m", "\e[0;35m", "\e[0;36m", "\e[0;37m"}, // 0 regular text
{"\e[1;30m", "\e[1;31m", "\e[1;32m", "\e[1;33m", "\e[1;34m", "\e[1;35m", "\e[1;36m", "\e[1;37m"}, // 1 regular bold text
{"\e[4;30m", "\e[4;31m", "\e[4;32m", "\e[4;33m", "\e[4;34m", "\e[4;35m", "\e[4;36m", "\e[4;37m"}, // 2 regular underline text
{"\e[40m", "\e[41m", "\e[42m", "\e[43m", "\e[44m", "\e[45m", "\e[46m", "\e[47m"}, // 3 regular background
{"\e[0;100m", "\e[0;101m", "\e[0;102m", "\e[0;103m", "\e[0;104m", "\e[0;105m", "\e[0;106m", "\e[0;107m"}, // 4 high intensity underground
{"\e[0;90m", "\e[0;91m", "\e[0;92m", "\e[0;93m", "\e[0;94m", "\e[0;95m", "\e[0;96m", "\e[0;97m"}, // 5 high intensity text
{"\e[1;90m", "\e[1;91m", "\e[1;92m", "\e[1;93m", "\e[1;94m", "\e[1;95m", "\e[1;96m", "\e[1;97m"} // 6 bold high intensity text
};
int main() {
int i,j;
for (i=0;i<8;i++) {
printf ("\n%d\n", i);
for (j=0; j < 7; j++) printf ("%15s : %s>%s<>%s<%s\n",rownames[j],prt_col[j][i],mytext[0], mytext[1], col_reset);
};
// test with marsaglia constants (should print prime numbers)
printf ("%5d %5d %5d", (18000<<16)-1, (18000<<15)-1, (18030<<16)-1);
}