[BRLTTY] Linux screen driver.
Dave Mielke
Dave at mielke.cc
Tue Feb 26 06:44:32 EST 2019
Are you able to test a patch? If so, could you please let me know if the
attached patch (screen-lx1.patch) fixes the charset= parameter?
--
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc | Ottawa, Ontario | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada K2A 1H7 |
-------------- next part --------------
diff --git a/Drivers/Screen/Linux/screen.c b/Drivers/Screen/Linux/screen.c
index 255e090bf..1ee51c98c 100644
--- a/Drivers/Screen/Linux/screen.c
+++ b/Drivers/Screen/Linux/screen.c
@@ -1086,25 +1086,29 @@ readScreenRow (int row, size_t size, ScreenCharacter *characters, int *offsets)
}
}
- while (vga != end) {
- if (character) {
- character->attributes = ((*vga & unshiftedAttributesMask) |
- ((*vga & shiftedAttributesMask) >> 1)) >> 8;
+ while (vga < end) {
+ wint_t wc;
- if (text) {
- character->text = *text++;
- } else {
- uint16_t position = *vga & 0XFF;
- if (*vga & fontAttributesMask) position |= 0X100;
+ if (text) {
+ wc = *text++;
+ } else {
+ uint16_t position = *vga & 0XFF;
+ if (*vga & fontAttributesMask) position |= 0X100;
+ wc = convertCharacter(&translationTable[position]);
+ }
- wint_t wc = convertCharacter(&translationTable[position]);
- character->text = (wc != WEOF)? wc: WC_C(' ');
+ if (wc != WEOF) {
+ if (character) {
+ character->attributes = ((*vga & unshiftedAttributesMask) |
+ ((*vga & shiftedAttributesMask) >> 1)) >> 8;
+
+ character->text = wc;
+ character += 1;
}
- character += 1;
+ if (offsets) offsets[column++] = vga - vgaBuffer;
}
- if (offsets) offsets[column++] = vga - vgaBuffer;
vga += 1;
}
More information about the BRLTTY
mailing list