On Wed, 9 Jun 2021, Samuel Thibault wrote:
Ok, but I don't think the Linux console is actually able to record these colors. So Speakup would not be able to read them anyway since the information is not available.
I believe it is. I have screen built with --enable-256-colors and I had someone sighted verify that there are more than 16 colors on the screen using the attached script.
I also attached a diff of the changes I made so far. As I said, I'm not a developer and I don't even know C, so please be gentle. <grin>
I named the colors above 16 rgb000 to rgb239, as speakup doesn't follow the ordering of the escape sequences. I.E. 30=black 31=red 32=green 33=yellow, 34=blue 35=magenta 36=cyan 37=white
But the order is black blue green cyan red magenta yellow whiteSpeakup is speaking the rgb### values, but I don't know if they are correct, given the different ordering, as there are some peculiarities. For example, \003[30m is reported as white instead of black. So, I think my changes likely messed something else up.
Before I go ahead and map all the rgb### placemarkers to colors, I want to make sure I didn't mess up speakup in the process.
Can you let me know what you think? Are you able to see the color output of the 256-colors.sh script?
Btw, my diff is against speakup 3.1.6, as I'm still using an old kernel. Thanks! Trevor
Attachment:
256-colors.sh
Description: Bourne shell script
diff -ur speakup-3.1.6.orig/drivers/staging/speakup/i18n.c speakup-3.1.6/drivers/staging/speakup/i18n.c --- speakup-3.1.6.orig/drivers/staging/speakup/i18n.c 2013-08-17 12:55:57.025060236 -0400 +++ speakup-3.1.6/drivers/staging/speakup/i18n.c 2021-06-08 10:32:07.606216387 -0400 @@ -88,6 +88,254 @@ [MSG_COLOR_YELLOW] = "yellow", [MSG_COLOR_WHITE] = "white", [MSG_COLOR_GREY] = "grey", + [MSG_COLOR_BRIGHTBLUE] = "bright blue", + [MSG_COLOR_BRIGHTGREEN] = "bright green", + [MSG_COLOR_BRIGHTCYAN] = "bright cyan", + [MSG_COLOR_BRIGHTRED] = "bright red", + [MSG_COLOR_BRIGHTMAGENTA] = "bright magenta", + [MSG_COLOR_BRIGHTYELLOW] = "bright yellow", + [MSG_COLOR_BRIGHTWHITE] = "bright white", + [MSG_COLOR_RGB000] = "rgb000", + [MSG_COLOR_RGB001] = "rgb001", + [MSG_COLOR_RGB002] = "rgb002", + [MSG_COLOR_RGB003] = "rgb003", + [MSG_COLOR_RGB004] = "rgb004", + [MSG_COLOR_RGB005] = "rgb005", + [MSG_COLOR_RGB006] = "rgb006", + [MSG_COLOR_RGB007] = "rgb007", + [MSG_COLOR_RGB008] = "rgb008", + [MSG_COLOR_RGB009] = "rgb009", + [MSG_COLOR_RGB010] = "rgb010", + [MSG_COLOR_RGB011] = "rgb011", + [MSG_COLOR_RGB012] = "rgb012", + [MSG_COLOR_RGB013] = "rgb013", + [MSG_COLOR_RGB014] = "rgb014", + [MSG_COLOR_RGB015] = "rgb015", + [MSG_COLOR_RGB016] = "rgb016", + [MSG_COLOR_RGB017] = "rgb017", + [MSG_COLOR_RGB018] = "rgb018", + [MSG_COLOR_RGB019] = "rgb019", + [MSG_COLOR_RGB020] = "rgb020", + [MSG_COLOR_RGB021] = "rgb021", + [MSG_COLOR_RGB022] = "rgb022", + [MSG_COLOR_RGB023] = "rgb023", + [MSG_COLOR_RGB024] = "rgb024", + [MSG_COLOR_RGB025] = "rgb025", + [MSG_COLOR_RGB026] = "rgb026", + [MSG_COLOR_RGB027] = "rgb027", + [MSG_COLOR_RGB028] = "rgb028", + [MSG_COLOR_RGB029] = "rgb029", + [MSG_COLOR_RGB030] = "rgb030", + [MSG_COLOR_RGB031] = "rgb031", + [MSG_COLOR_RGB032] = "rgb032", + [MSG_COLOR_RGB033] = "rgb033", + [MSG_COLOR_RGB034] = "rgb034", + [MSG_COLOR_RGB035] = "rgb035", + [MSG_COLOR_RGB036] = "rgb036", + [MSG_COLOR_RGB037] = "rgb037", + [MSG_COLOR_RGB038] = "rgb038", + [MSG_COLOR_RGB039] = "rgb039", + [MSG_COLOR_RGB040] = "rgb040", + [MSG_COLOR_RGB041] = "rgb041", + [MSG_COLOR_RGB042] = "rgb042", + [MSG_COLOR_RGB043] = "rgb043", + [MSG_COLOR_RGB044] = "rgb044", + [MSG_COLOR_RGB045] = "rgb045", + [MSG_COLOR_RGB046] = "rgb046", + [MSG_COLOR_RGB047] = "rgb047", + [MSG_COLOR_RGB048] = "rgb048", + [MSG_COLOR_RGB049] = "rgb049", + [MSG_COLOR_RGB050] = "rgb050", + [MSG_COLOR_RGB051] = "rgb051", + [MSG_COLOR_RGB052] = "rgb052", + [MSG_COLOR_RGB053] = "rgb053", + [MSG_COLOR_RGB054] = "rgb054", + [MSG_COLOR_RGB055] = "rgb055", + [MSG_COLOR_RGB056] = "rgb056", + [MSG_COLOR_RGB057] = "rgb057", + [MSG_COLOR_RGB058] = "rgb058", + [MSG_COLOR_RGB059] = "rgb059", + [MSG_COLOR_RGB060] = "rgb060", + [MSG_COLOR_RGB061] = "rgb061", + [MSG_COLOR_RGB062] = "rgb062", + [MSG_COLOR_RGB063] = "rgb063", + [MSG_COLOR_RGB064] = "rgb064", + [MSG_COLOR_RGB065] = "rgb065", + [MSG_COLOR_RGB066] = "rgb066", + [MSG_COLOR_RGB067] = "rgb067", + [MSG_COLOR_RGB068] = "rgb068", + [MSG_COLOR_RGB069] = "rgb069", + [MSG_COLOR_RGB070] = "rgb070", + [MSG_COLOR_RGB071] = "rgb071", + [MSG_COLOR_RGB072] = "rgb072", + [MSG_COLOR_RGB073] = "rgb073", + [MSG_COLOR_RGB074] = "rgb074", + [MSG_COLOR_RGB075] = "rgb075", + [MSG_COLOR_RGB076] = "rgb076", + [MSG_COLOR_RGB077] = "rgb077", + [MSG_COLOR_RGB078] = "rgb078", + [MSG_COLOR_RGB079] = "rgb079", + [MSG_COLOR_RGB080] = "rgb080", + [MSG_COLOR_RGB081] = "rgb081", + [MSG_COLOR_RGB082] = "rgb082", + [MSG_COLOR_RGB083] = "rgb083", + [MSG_COLOR_RGB084] = "rgb084", + [MSG_COLOR_RGB085] = "rgb085", + [MSG_COLOR_RGB086] = "rgb086", + [MSG_COLOR_RGB087] = "rgb087", + [MSG_COLOR_RGB088] = "rgb088", + [MSG_COLOR_RGB089] = "rgb089", + [MSG_COLOR_RGB090] = "rgb090", + [MSG_COLOR_RGB091] = "rgb091", + [MSG_COLOR_RGB092] = "rgb092", + [MSG_COLOR_RGB093] = "rgb093", + [MSG_COLOR_RGB094] = "rgb094", + [MSG_COLOR_RGB095] = "rgb095", + [MSG_COLOR_RGB096] = "rgb096", + [MSG_COLOR_RGB097] = "rgb097", + [MSG_COLOR_RGB098] = "rgb098", + [MSG_COLOR_RGB099] = "rgb099", + [MSG_COLOR_RGB100] = "rgb100", + [MSG_COLOR_RGB101] = "rgb101", + [MSG_COLOR_RGB102] = "rgb102", + [MSG_COLOR_RGB103] = "rgb103", + [MSG_COLOR_RGB104] = "rgb104", + [MSG_COLOR_RGB105] = "rgb105", + [MSG_COLOR_RGB106] = "rgb106", + [MSG_COLOR_RGB107] = "rgb107", + [MSG_COLOR_RGB108] = "rgb108", + [MSG_COLOR_RGB109] = "rgb109", + [MSG_COLOR_RGB110] = "rgb110", + [MSG_COLOR_RGB111] = "rgb111", + [MSG_COLOR_RGB112] = "rgb112", + [MSG_COLOR_RGB113] = "rgb113", + [MSG_COLOR_RGB114] = "rgb114", + [MSG_COLOR_RGB115] = "rgb115", + [MSG_COLOR_RGB116] = "rgb116", + [MSG_COLOR_RGB117] = "rgb117", + [MSG_COLOR_RGB118] = "rgb118", + [MSG_COLOR_RGB119] = "rgb119", + [MSG_COLOR_RGB120] = "rgb120", + [MSG_COLOR_RGB121] = "rgb121", + [MSG_COLOR_RGB122] = "rgb122", + [MSG_COLOR_RGB123] = "rgb123", + [MSG_COLOR_RGB124] = "rgb124", + [MSG_COLOR_RGB125] = "rgb125", + [MSG_COLOR_RGB126] = "rgb126", + [MSG_COLOR_RGB127] = "rgb127", + [MSG_COLOR_RGB128] = "rgb128", + [MSG_COLOR_RGB129] = "rgb129", + [MSG_COLOR_RGB130] = "rgb130", + [MSG_COLOR_RGB131] = "rgb131", + [MSG_COLOR_RGB132] = "rgb132", + [MSG_COLOR_RGB133] = "rgb133", + [MSG_COLOR_RGB134] = "rgb134", + [MSG_COLOR_RGB135] = "rgb135", + [MSG_COLOR_RGB136] = "rgb136", + [MSG_COLOR_RGB137] = "rgb137", + [MSG_COLOR_RGB138] = "rgb138", + [MSG_COLOR_RGB139] = "rgb139", + [MSG_COLOR_RGB140] = "rgb140", + [MSG_COLOR_RGB141] = "rgb141", + [MSG_COLOR_RGB142] = "rgb142", + [MSG_COLOR_RGB143] = "rgb143", + [MSG_COLOR_RGB144] = "rgb144", + [MSG_COLOR_RGB145] = "rgb145", + [MSG_COLOR_RGB146] = "rgb146", + [MSG_COLOR_RGB147] = "rgb147", + [MSG_COLOR_RGB148] = "rgb148", + [MSG_COLOR_RGB149] = "rgb149", + [MSG_COLOR_RGB150] = "rgb150", + [MSG_COLOR_RGB151] = "rgb151", + [MSG_COLOR_RGB152] = "rgb152", + [MSG_COLOR_RGB153] = "rgb153", + [MSG_COLOR_RGB154] = "rgb154", + [MSG_COLOR_RGB155] = "rgb155", + [MSG_COLOR_RGB156] = "rgb156", + [MSG_COLOR_RGB157] = "rgb157", + [MSG_COLOR_RGB158] = "rgb158", + [MSG_COLOR_RGB159] = "rgb159", + [MSG_COLOR_RGB160] = "rgb160", + [MSG_COLOR_RGB161] = "rgb161", + [MSG_COLOR_RGB162] = "rgb162", + [MSG_COLOR_RGB163] = "rgb163", + [MSG_COLOR_RGB164] = "rgb164", + [MSG_COLOR_RGB165] = "rgb165", + [MSG_COLOR_RGB166] = "rgb166", + [MSG_COLOR_RGB167] = "rgb167", + [MSG_COLOR_RGB168] = "rgb168", + [MSG_COLOR_RGB169] = "rgb169", + [MSG_COLOR_RGB170] = "rgb170", + [MSG_COLOR_RGB171] = "rgb171", + [MSG_COLOR_RGB172] = "rgb172", + [MSG_COLOR_RGB173] = "rgb173", + [MSG_COLOR_RGB174] = "rgb174", + [MSG_COLOR_RGB175] = "rgb175", + [MSG_COLOR_RGB176] = "rgb176", + [MSG_COLOR_RGB177] = "rgb177", + [MSG_COLOR_RGB178] = "rgb178", + [MSG_COLOR_RGB179] = "rgb179", + [MSG_COLOR_RGB180] = "rgb180", + [MSG_COLOR_RGB181] = "rgb181", + [MSG_COLOR_RGB182] = "rgb182", + [MSG_COLOR_RGB183] = "rgb183", + [MSG_COLOR_RGB184] = "rgb184", + [MSG_COLOR_RGB185] = "rgb185", + [MSG_COLOR_RGB186] = "rgb186", + [MSG_COLOR_RGB187] = "rgb187", + [MSG_COLOR_RGB188] = "rgb188", + [MSG_COLOR_RGB189] = "rgb189", + [MSG_COLOR_RGB190] = "rgb190", + [MSG_COLOR_RGB191] = "rgb191", + [MSG_COLOR_RGB192] = "rgb192", + [MSG_COLOR_RGB193] = "rgb193", + [MSG_COLOR_RGB194] = "rgb194", + [MSG_COLOR_RGB195] = "rgb195", + [MSG_COLOR_RGB196] = "rgb196", + [MSG_COLOR_RGB197] = "rgb197", + [MSG_COLOR_RGB198] = "rgb198", + [MSG_COLOR_RGB199] = "rgb199", + [MSG_COLOR_RGB200] = "rgb200", + [MSG_COLOR_RGB201] = "rgb201", + [MSG_COLOR_RGB202] = "rgb202", + [MSG_COLOR_RGB203] = "rgb203", + [MSG_COLOR_RGB204] = "rgb204", + [MSG_COLOR_RGB205] = "rgb205", + [MSG_COLOR_RGB206] = "rgb206", + [MSG_COLOR_RGB207] = "rgb207", + [MSG_COLOR_RGB208] = "rgb208", + [MSG_COLOR_RGB209] = "rgb209", + [MSG_COLOR_RGB210] = "rgb210", + [MSG_COLOR_RGB211] = "rgb211", + [MSG_COLOR_RGB212] = "rgb212", + [MSG_COLOR_RGB213] = "rgb213", + [MSG_COLOR_RGB214] = "rgb214", + [MSG_COLOR_RGB215] = "rgb215", + [MSG_COLOR_RGB216] = "rgb216", + [MSG_COLOR_RGB217] = "rgb217", + [MSG_COLOR_RGB218] = "rgb218", + [MSG_COLOR_RGB219] = "rgb219", + [MSG_COLOR_RGB220] = "rgb220", + [MSG_COLOR_RGB221] = "rgb221", + [MSG_COLOR_RGB222] = "rgb222", + [MSG_COLOR_RGB223] = "rgb223", + [MSG_COLOR_RGB224] = "rgb224", + [MSG_COLOR_RGB225] = "rgb225", + [MSG_COLOR_RGB226] = "rgb226", + [MSG_COLOR_RGB227] = "rgb227", + [MSG_COLOR_RGB228] = "rgb228", + [MSG_COLOR_RGB229] = "rgb229", + [MSG_COLOR_RGB230] = "rgb230", + [MSG_COLOR_RGB231] = "rgb231", + [MSG_COLOR_RGB232] = "rgb232", + [MSG_COLOR_RGB233] = "rgb233", + [MSG_COLOR_RGB234] = "rgb234", + [MSG_COLOR_RGB235] = "rgb235", + [MSG_COLOR_RGB236] = "rgb236", + [MSG_COLOR_RGB237] = "rgb237", + [MSG_COLOR_RGB238] = "rgb238", + [MSG_COLOR_RGB239] = "rgb239", + /* Names of key states. */ [MSG_STATE_DOUBLE] = "double", diff -ur speakup-3.1.6.orig/drivers/staging/speakup/i18n.h speakup-3.1.6/drivers/staging/speakup/i18n.h --- speakup-3.1.6.orig/drivers/staging/speakup/i18n.h 2013-08-17 12:55:57.025060236 -0400 +++ speakup-3.1.6/drivers/staging/speakup/i18n.h 2021-06-08 09:58:41.842752680 -0400 @@ -92,7 +92,254 @@ MSG_COLOR_YELLOW, MSG_COLOR_WHITE, MSG_COLOR_GREY, - MSG_COLORS_END = MSG_COLOR_GREY, + MSG_COLOR_BRIGHTBLUE, + MSG_COLOR_BRIGHTGREEN, + MSG_COLOR_BRIGHTCYAN, + MSG_COLOR_BRIGHTRED, + MSG_COLOR_BRIGHTMAGENTA, + MSG_COLOR_BRIGHTYELLOW, + MSG_COLOR_BRIGHTWHITE, + MSG_COLOR_RGB000, + MSG_COLOR_RGB001, + MSG_COLOR_RGB002, + MSG_COLOR_RGB003, + MSG_COLOR_RGB004, + MSG_COLOR_RGB005, + MSG_COLOR_RGB006, + MSG_COLOR_RGB007, + MSG_COLOR_RGB008, + MSG_COLOR_RGB009, + MSG_COLOR_RGB010, + MSG_COLOR_RGB011, + MSG_COLOR_RGB012, + MSG_COLOR_RGB013, + MSG_COLOR_RGB014, + MSG_COLOR_RGB015, + MSG_COLOR_RGB016, + MSG_COLOR_RGB017, + MSG_COLOR_RGB018, + MSG_COLOR_RGB019, + MSG_COLOR_RGB020, + MSG_COLOR_RGB021, + MSG_COLOR_RGB022, + MSG_COLOR_RGB023, + MSG_COLOR_RGB024, + MSG_COLOR_RGB025, + MSG_COLOR_RGB026, + MSG_COLOR_RGB027, + MSG_COLOR_RGB028, + MSG_COLOR_RGB029, + MSG_COLOR_RGB030, + MSG_COLOR_RGB031, + MSG_COLOR_RGB032, + MSG_COLOR_RGB033, + MSG_COLOR_RGB034, + MSG_COLOR_RGB035, + MSG_COLOR_RGB036, + MSG_COLOR_RGB037, + MSG_COLOR_RGB038, + MSG_COLOR_RGB039, + MSG_COLOR_RGB040, + MSG_COLOR_RGB041, + MSG_COLOR_RGB042, + MSG_COLOR_RGB043, + MSG_COLOR_RGB044, + MSG_COLOR_RGB045, + MSG_COLOR_RGB046, + MSG_COLOR_RGB047, + MSG_COLOR_RGB048, + MSG_COLOR_RGB049, + MSG_COLOR_RGB050, + MSG_COLOR_RGB051, + MSG_COLOR_RGB052, + MSG_COLOR_RGB053, + MSG_COLOR_RGB054, + MSG_COLOR_RGB055, + MSG_COLOR_RGB056, + MSG_COLOR_RGB057, + MSG_COLOR_RGB058, + MSG_COLOR_RGB059, + MSG_COLOR_RGB060, + MSG_COLOR_RGB061, + MSG_COLOR_RGB062, + MSG_COLOR_RGB063, + MSG_COLOR_RGB064, + MSG_COLOR_RGB065, + MSG_COLOR_RGB066, + MSG_COLOR_RGB067, + MSG_COLOR_RGB068, + MSG_COLOR_RGB069, + MSG_COLOR_RGB070, + MSG_COLOR_RGB071, + MSG_COLOR_RGB072, + MSG_COLOR_RGB073, + MSG_COLOR_RGB074, + MSG_COLOR_RGB075, + MSG_COLOR_RGB076, + MSG_COLOR_RGB077, + MSG_COLOR_RGB078, + MSG_COLOR_RGB079, + MSG_COLOR_RGB080, + MSG_COLOR_RGB081, + MSG_COLOR_RGB082, + MSG_COLOR_RGB083, + MSG_COLOR_RGB084, + MSG_COLOR_RGB085, + MSG_COLOR_RGB086, + MSG_COLOR_RGB087, + MSG_COLOR_RGB088, + MSG_COLOR_RGB089, + MSG_COLOR_RGB090, + MSG_COLOR_RGB091, + MSG_COLOR_RGB092, + MSG_COLOR_RGB093, + MSG_COLOR_RGB094, + MSG_COLOR_RGB095, + MSG_COLOR_RGB096, + MSG_COLOR_RGB097, + MSG_COLOR_RGB098, + MSG_COLOR_RGB099, + MSG_COLOR_RGB100, + MSG_COLOR_RGB101, + MSG_COLOR_RGB102, + MSG_COLOR_RGB103, + MSG_COLOR_RGB104, + MSG_COLOR_RGB105, + MSG_COLOR_RGB106, + MSG_COLOR_RGB107, + MSG_COLOR_RGB108, + MSG_COLOR_RGB109, + MSG_COLOR_RGB110, + MSG_COLOR_RGB111, + MSG_COLOR_RGB112, + MSG_COLOR_RGB113, + MSG_COLOR_RGB114, + MSG_COLOR_RGB115, + MSG_COLOR_RGB116, + MSG_COLOR_RGB117, + MSG_COLOR_RGB118, + MSG_COLOR_RGB119, + MSG_COLOR_RGB120, + MSG_COLOR_RGB121, + MSG_COLOR_RGB122, + MSG_COLOR_RGB123, + MSG_COLOR_RGB124, + MSG_COLOR_RGB125, + MSG_COLOR_RGB126, + MSG_COLOR_RGB127, + MSG_COLOR_RGB128, + MSG_COLOR_RGB129, + MSG_COLOR_RGB130, + MSG_COLOR_RGB131, + MSG_COLOR_RGB132, + MSG_COLOR_RGB133, + MSG_COLOR_RGB134, + MSG_COLOR_RGB135, + MSG_COLOR_RGB136, + MSG_COLOR_RGB137, + MSG_COLOR_RGB138, + MSG_COLOR_RGB139, + MSG_COLOR_RGB140, + MSG_COLOR_RGB141, + MSG_COLOR_RGB142, + MSG_COLOR_RGB143, + MSG_COLOR_RGB144, + MSG_COLOR_RGB145, + MSG_COLOR_RGB146, + MSG_COLOR_RGB147, + MSG_COLOR_RGB148, + MSG_COLOR_RGB149, + MSG_COLOR_RGB150, + MSG_COLOR_RGB151, + MSG_COLOR_RGB152, + MSG_COLOR_RGB153, + MSG_COLOR_RGB154, + MSG_COLOR_RGB155, + MSG_COLOR_RGB156, + MSG_COLOR_RGB157, + MSG_COLOR_RGB158, + MSG_COLOR_RGB159, + MSG_COLOR_RGB160, + MSG_COLOR_RGB161, + MSG_COLOR_RGB162, + MSG_COLOR_RGB163, + MSG_COLOR_RGB164, + MSG_COLOR_RGB165, + MSG_COLOR_RGB166, + MSG_COLOR_RGB167, + MSG_COLOR_RGB168, + MSG_COLOR_RGB169, + MSG_COLOR_RGB170, + MSG_COLOR_RGB171, + MSG_COLOR_RGB172, + MSG_COLOR_RGB173, + MSG_COLOR_RGB174, + MSG_COLOR_RGB175, + MSG_COLOR_RGB176, + MSG_COLOR_RGB177, + MSG_COLOR_RGB178, + MSG_COLOR_RGB179, + MSG_COLOR_RGB180, + MSG_COLOR_RGB181, + MSG_COLOR_RGB182, + MSG_COLOR_RGB183, + MSG_COLOR_RGB184, + MSG_COLOR_RGB185, + MSG_COLOR_RGB186, + MSG_COLOR_RGB187, + MSG_COLOR_RGB188, + MSG_COLOR_RGB189, + MSG_COLOR_RGB190, + MSG_COLOR_RGB191, + MSG_COLOR_RGB192, + MSG_COLOR_RGB193, + MSG_COLOR_RGB194, + MSG_COLOR_RGB195, + MSG_COLOR_RGB196, + MSG_COLOR_RGB197, + MSG_COLOR_RGB198, + MSG_COLOR_RGB199, + MSG_COLOR_RGB200, + MSG_COLOR_RGB201, + MSG_COLOR_RGB202, + MSG_COLOR_RGB203, + MSG_COLOR_RGB204, + MSG_COLOR_RGB205, + MSG_COLOR_RGB206, + MSG_COLOR_RGB207, + MSG_COLOR_RGB208, + MSG_COLOR_RGB209, + MSG_COLOR_RGB210, + MSG_COLOR_RGB211, + MSG_COLOR_RGB212, + MSG_COLOR_RGB213, + MSG_COLOR_RGB214, + MSG_COLOR_RGB215, + MSG_COLOR_RGB216, + MSG_COLOR_RGB217, + MSG_COLOR_RGB218, + MSG_COLOR_RGB219, + MSG_COLOR_RGB220, + MSG_COLOR_RGB221, + MSG_COLOR_RGB222, + MSG_COLOR_RGB223, + MSG_COLOR_RGB224, + MSG_COLOR_RGB225, + MSG_COLOR_RGB226, + MSG_COLOR_RGB227, + MSG_COLOR_RGB228, + MSG_COLOR_RGB229, + MSG_COLOR_RGB230, + MSG_COLOR_RGB231, + MSG_COLOR_RGB232, + MSG_COLOR_RGB233, + MSG_COLOR_RGB234, + MSG_COLOR_RGB235, + MSG_COLOR_RGB236, + MSG_COLOR_RGB237, + MSG_COLOR_RGB238, + MSG_COLOR_RGB239, + MSG_COLORS_END = MSG_COLOR_RGB239, MSG_STATES_START, MSG_STATE_DOUBLE = MSG_STATES_START, diff -ur speakup-3.1.6.orig/drivers/staging/speakup/main.c speakup-3.1.6/drivers/staging/speakup/main.c --- speakup-3.1.6.orig/drivers/staging/speakup/main.c 2013-08-17 12:55:57.025060236 -0400 +++ speakup-3.1.6/drivers/staging/speakup/main.c 2021-06-08 09:59:41.996666450 -0400 @@ -262,7 +262,7 @@ .notifier_call = vt_notifier_call, }; -static unsigned char get_attributes(u16 *pos) +static unsigned char get_attributes(u32 *pos) { return (u_char) (scr_readw(pos) >> 8); } @@ -273,7 +273,7 @@ spk_y = spk_cy = vc->vc_y; spk_pos = spk_cp = vc->vc_pos; spk_old_attr = spk_attr; - spk_attr = get_attributes((u_short *) spk_pos); + spk_attr = get_attributes((u32 *) spk_pos); } static void bleep(u_short val) @@ -392,13 +392,17 @@ static void say_attributes(struct vc_data *vc) { - int fg = spk_attr & 0x0f; + /* Use 256 colors instead of 16 */ +// int fg = spk_attr & 0x0f; + int fg = spk_attr & 0xff; int bg = spk_attr >> 4; + /* Use i18n colors instead of bright if (fg > 8) { synth_printf("%s ", spk_msg_get(MSG_BRIGHT)); fg -= 8; - } + } */ synth_printf("%s", spk_msg_get(MSG_COLORS_START + fg)); +// synth_printf(", fg is %d ", fg); if (bg > 7) { synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING)); bg -= 8; @@ -457,12 +461,12 @@ synth_buffer_add(SPACE); } -static u16 get_char(struct vc_data *vc, u16 * pos, u_char * attribs) +static u32 get_char(struct vc_data *vc, u32 * pos, u_char * attribs) { - u16 ch = ' '; + u32 ch = ' '; if (vc && pos) { - u16 w = scr_readw(pos); - u16 c = w & 0xff; + u32 w = scr_readw(pos); + u32 c = w & 0xff; if (w & vc->vc_hi_font_mask) c |= 0x100; @@ -1245,6 +1249,7 @@ int i; /* First, free any non-default */ + /* Use 256 colors */ for (i = 0; i < 256; i++) { if ((spk_characters[i] != NULL) && (spk_characters[i] != spk_default_chars[i])) @@ -1532,7 +1537,7 @@ { int i; int vc_num = vc->vc_num; - for (i = 0; i < 8; i++) + for (i = 0; i < 256; i++) speakup_console[vc_num]->ht.highsize[i] = 0; } @@ -1541,15 +1546,15 @@ int i, bg; int cc; int vc_num = vc->vc_num; - u16 ch; - u16 *start = (u16 *) vc->vc_origin; + u32 ch; + u32 *start = (u32 *) vc->vc_origin; - for (i = 0; i < 8; i++) + for (i = 0; i < 256; i++) speakup_console[vc_num]->ht.bgcount[i] = 0; for (i = 0; i < vc->vc_rows; i++) { - u16 *end = start + vc->vc_cols * 2; - u16 *ptr; + u32 *end = start + vc->vc_cols * 2; + u32 *ptr; for (ptr = start; ptr < end; ptr++) { ch = get_attributes(ptr); bg = (ch & 0x70) >> 4; @@ -1559,7 +1564,7 @@ } cc = 0; - for (i = 0; i < 8; i++) + for (i = 0; i < 256; i++) if (speakup_console[vc_num]->ht.bgcount[i] > 0) cc++; return cc; @@ -1568,14 +1573,14 @@ static int get_highlight_color(struct vc_data *vc) { int i, j; - unsigned int cptr[8], tmp; + unsigned int cptr[256], tmp; int vc_num = vc->vc_num; - for (i = 0; i < 8; i++) + for (i = 0; i < 256; i++) cptr[i] = i; for (i = 0; i < 7; i++) - for (j = i + 1; j < 8; j++) + for (j = i + 1; j < 256; j++) if (speakup_console[vc_num]->ht.bgcount[cptr[i]] > speakup_console[vc_num]->ht.bgcount[cptr[j]]) { tmp = cptr[i]; @@ -1583,7 +1588,7 @@ cptr[j] = tmp; } - for (i = 0; i < 8; i++) + for (i = 0; i < 256; i++) if (speakup_console[vc_num]->ht.bgcount[cptr[i]] != 0) if (speakup_console[vc_num]->ht.highsize[cptr[i]] > 0) return cptr[i]; diff -ur speakup-3.1.6.orig/drivers/staging/speakup/spk_types.h speakup-3.1.6/drivers/staging/speakup/spk_types.h --- speakup-3.1.6.orig/drivers/staging/speakup/spk_types.h 2013-08-17 12:55:57.029059935 -0400 +++ speakup-3.1.6/drivers/staging/speakup/spk_types.h 2021-06-07 22:10:38.101383870 -0400 @@ -56,11 +56,11 @@ /* Count of each background color */ unsigned int bgcount[8]; /* Buffer for characters drawn with each background color */ - char highbuf[8][COLOR_BUFFER_SIZE]; + char highbuf[256][COLOR_BUFFER_SIZE]; /* Current index into highbuf */ - unsigned int highsize[8]; + unsigned int highsize[256]; /* Reading Position for each color */ - u_long rpos[8], rx[8], ry[8]; + u_long rpos[256], rx[256], ry[256]; /* Real Cursor Y Position */ ulong cy; };