Date: Thu, 16 Mar 2017 19:45:01 +0100 From: Oliver Pinter <oliver.pinter@hardenedbsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: Bruce Evans <bde@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r315418 - in head/sys/teken: . libteken Message-ID: <CAPQ4ffvWtZ4fRMOP6_KKHmmy2aPsZ%2BiLFQ5zQB6XWM8LAiNAag@mail.gmail.com> In-Reply-To: <20170317040832.N26977@besplex.bde.org> References: <201703161640.v2GGes8N033822@repo.freebsd.org> <20170317040832.N26977@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/16/17, Bruce Evans <brde@optusnet.com.au> wrote: > On Thu, 16 Mar 2017, Bruce Evans wrote: > >> Log: >> Add teken_256to16() to convert xterm-256 256-color codes to xterm >> 16-color >> codes. This will be used to fix bright colors. >> >> Improve teken_256to8(). Use a lookup table instead of calculations. >> The >> ... > > A shell script for printing some text color maps is attached. Also a > sloppier one for printing some CSI sequences. > > The first one can easily be translated to xterm sequences. I used syscons > F and G sequences to print bright colors with sc and vt since pure xterm > bright colors are too broken to display themselves without bold hacks. > The F and G sequences generate bold hacks in the kernel, and further > complications are needed to turn these off to test if bright colors > are fixed. Real xterm doesn't fake bold using brightness, so bold > hacks on dark characters don't work for it. > > The first one needs the user to load a cp437 font for syscons and a > unicode font for vt. The script doesn't load a font since it is too > hard to restore or reset fonts. Similarly for colors. > > Run the first one on a kernel without this commit to see the old color > map. It looked just wrong (unstructured) before I found a good > tabular format to print it. I then wrote "improved" maps based on > expanding the 2x2x2 and 3x3x3 maps. These were too simple. Some of > the comments/printfs are out of date and still refer to this expansion. If I'm not wrong, these scripts where made on OS X. They use \r\n line endings, and this triggers random cryptic runtime errors: op@opn /tmp> sh -x sc-vt-CSI + printf $'\\033[m\r' + printf $'\\033[x\r' sc-vt-CSI: 5: Syntax error: word unexpected The simple fix is to delete the '\r's from the scripts: cat sc-vt-CSI | tr -d '\r' > trans.sh op > > Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffvWtZ4fRMOP6_KKHmmy2aPsZ%2BiLFQ5zQB6XWM8LAiNAag>