*BSD News Article 18818


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!col.hp.com!csn!copper!aspen.craycos.com!scott
From: scott@craycos.com (Scott Bolte)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Problem with pk 0.2.4 with a "mono VGA" monitor
Summary: needs new termcap entry for monchrome
Keywords: mono VGA termcap
Message-ID: <1993Jul24.024908.27448@craycos.com>
Date: 24 Jul 93 02:49:08 GMT
References: <CAIIK8.n4v@sugar.NeoSoft.COM>
Organization: Cray Computer Corporation
Lines: 66


	I spent an embarrassing long time working on the white on white
	standout mode problem. There was a hint a week and a half ago
	that changing DEF_SO_M_AT in codvr/co_hdr.h would address a
	similar (or identical) problem. It was only after that
	approached failed to produce any results that I started to
	think.

	On looking at the code it became clear that DEF_SO_M_AT was a
	dead end. It is not used at all in the related code.  In
	codvr/co_pc3.c there is a case statement for terminal escape
	codes. The standout mode in the new pc3 termcap entry sets
	"vp->so_at" using parameters from the escape sequence, not from
	a constant.

	The stock termcap entry ended up setting "vp->so_at" to 0x17.
	I did not dig further to see how 0x17 would be used. Or what it
	means. (Beyond white on white of course :-) But I did find a
	more reasonable setting (0x10) given a monochrome monitor.
	Working backwards I came up with the sequence found in the
	termcap entry below.

pc3mono|IBM PC 386BSD Console with monochrome monitor:\
	:so=\E[0;1r\E[1m:tc=pc3:

		Scott

	P.S. Here is a perl script that will show different highlight
	     modes on a monochrome monitor.

#!/usr/bin/perl

$seqs{'restore'}	= "\033[m";

$seqs{'                           black on light'}	= "\033[0;1r\033[1m";
$seqs{'                           light on black'}	= "\033[0;0r\033[0m";
$seqs{'blinking                   black on light'}	= "\033[0;9r\033[1m";
$seqs{'          underline        light on black'}	= "\033[1;0r\033[1m";
$seqs{'                           light on light'}	= "\033[1;7r\033[1m";
$seqs{'blinking  underline        light on black'}	= "\033[1;8r\033[1m";
$seqs{'                           light on black'}	= "\033[2;0r\033[0m";
$seqs{'          underline       bright on black'}	= "\033[9;0r\033[1m";
$seqs{'                          bright on light'}	= "\033[9;7r\033[1m";
$seqs{'blinking  underline       bright on black'}	= "\033[9;8r\033[1m";
$seqs{'blinking                  bright on light'}	= "\033[9;9r\033[1m";
$seqs{'                          bright on black'}	= "\033[10;0r\033[2m";
$seqs{'blinking                  bright on black'}	= "\033[10;8r\033[2m";
$seqs{'termcap defined standout mode            '}	= "\033[7;1r\033[7m";

foreach $key (sort(keys(%seqs))) {
	next if $key eq 'restore';
	$s = $seqs{$key};
	$_ = $s;
	$pos1 = 511;
	$pos2 = 511;
	$pos3 = 511;
	($pos1, $pos2, $pos3) = /.\[(\d+);(\d+)r.\[(\d+)m/;
	printf("%-40s ${s}this is a test$seqs{'restore'} %03o %03o %03o.\n",
		 $key, $pos1, $pos2, $pos3);
}
exit(0);
-- 
___________________________________________________________________________
Scott Bolte                 scott@craycos.com               +1 719 540 4186
Cray Computer Corporation, 1110 Bayfield Drive, Colorado Springs, CO  80906
	     As anyone here will tell you: I speak for myself.