conspy applet
Denys Vlasenko
vda.linux at googlemail.com
Wed Jun 23 19:35:35 UTC 2010
On Mon, Jun 21, 2010 at 10:56 AM, Pascal Bellard
<pascal.bellard at ads-lu.com> wrote:
> Hello,
>
>> I added conspy to miscutils (util-linux does not seem to be the right
>> place).
>
> A 159 bytes (i386) shrink for conspy applet.
Applied, thanks.
I noticed a problem by "fb+512char font" combination.
I use this program to print all colors:
#!/bin/sh
printf "\033[0m" # clear all
for i in 0 1 2 3 4 5 6 7; do
for j in 0 1 2 3 4 5 6 7; do
printf "\033[4${i};3${j}m<>"
done
printf "\033[1m" # bright text
for j in 0 1 2 3 4 5 6 7; do
printf "\033[4${i};3${j}m<>"
done
printf "\033[0m\n" # clear all, and go to next line
done
and it looks ok on the console, but conspy's
colors are all messed up. It does not seem to be a conspy
fault. Rather, the attribute bytes in /dev/vcsa are wrong:
# cat /dev/vcsa2 | hexdump -C
and I see:
00000000 41 c8 20 08 3c 00 3e 00 3c 08 3e 08 3c 04 3e 04 |A. .<.>.<.>.<.>.|
00000010 3c 0c 3e 0c 3c 02 3e 02 3c 0a 3e 0a 3c 06 3e 06 |<.>.<.>.<.>.<.>.|
00000020 3c 0e 3e 0e 3c 10 3e 10 3c 18 3e 18 3c 14 3e 14 |<.>.<.>.<.>.<.>.|
00000030 3c 1c 3e 1c 3c 12 3e 12 3c 1a 3e 1a 3c 16 3e 16 |<.>.<.>.<.>.<.>.|
00000040 3c 1e 3e 1e 20 0e 20 0e 20 0e 20 0e 20 0e 20 0e |<.>. . . . . . .|
00000050 20 0e 20 0e 20 0e 20 0e 20 0e 20 0e 20 0e 20 0e | . . . . . . . .|
Let's look at second "<>" one which is red text on black.
In /dev/vcsa2 dump, it's 3c 08 3e 08.
But "red test on black" should be 01, not 08!
Then green one has 04 instead of 02.
And so on.
Looks like attribute bytes have their bit order reversed!
On my home machine where I have real text console (not framebuffer),
conspy colors look correctly. I also have 256-char font there.
I don't know whether it is caused by fb or by 512-char font.
I suspect fb. Will experiment a bit more.
--
vda
More information about the busybox
mailing list