diff options
author | nyan <nyan@FreeBSD.org> | 2005-05-15 08:04:46 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2005-05-15 08:04:46 +0000 |
commit | 48b73d4b528269c3ed4b91bd9cfb84eb8ec68f27 (patch) | |
tree | aac3982acdcf992f882f823a971b32704d8904e2 /usr.sbin | |
parent | 4625befb2c72cf0a31b5187eab6dfb8104a07c12 (diff) | |
download | FreeBSD-src-48b73d4b528269c3ed4b91bd9cfb84eb8ec68f27.zip FreeBSD-src-48b73d4b528269c3ed4b91bd9cfb84eb8ec68f27.tar.gz |
A foreground color number on pc98 console is 7 not 15.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 9081751..577b127 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -653,15 +653,27 @@ show_info(char *arg) static void test_frame(void) { - int i; + int i, cur_mode, fore; + + fore = 15; + + if (ioctl(0, CONS_GET, &cur_mode) < 0) + err(1, "must be on a virtual console"); + switch (cur_mode) { + case M_PC98_80x25: + case M_PC98_80x30: + fore = 7; + break; + } fprintf(stdout, "\e[=0G\n\n"); for (i=0; i<8; i++) { - fprintf(stdout, "\e[=15F\e[=0G %2d \e[=%dF%-16s" - "\e[=15F\e[=0G %2d \e[=%dF%-16s " - "\e[=15F %2d \e[=%dGBACKGROUND\e[=0G\n", - i, i, legal_colors[i], i+8, i+8, - legal_colors[i+8], i, i); + fprintf(stdout, "\e[=%dF\e[=0G %2d \e[=%dF%-16s" + "\e[=%dF\e[=0G %2d \e[=%dF%-16s " + "\e[=%dF %2d \e[=%dGBACKGROUND\e[=0G\n", + fore, i, i, legal_colors[i], + fore, i+8, i+8, legal_colors[i+8], + fore, i, i); } fprintf(stdout, "\e[=%dF\e[=%dG\e[=%dH\e[=%dI\n", info.mv_norm.fore, info.mv_norm.back, |