From e42fc368672e8c3f1d30fbbd7f1903e3baa69b7a Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 13 Nov 2009 05:54:55 +0000 Subject: Switch the default terminal emulation style to xterm for most platforms. Right now syscons(4) uses a cons25-style terminal emulator. The disadvantages of that are: - Little compatibility with embedded devices with serial interfaces. - Bad bandwidth efficiency, mainly because of the lack of scrolling regions. - A very hard transition path to support for modern character sets like UTF-8. Our terminal emulation library, libteken, has been supporting xterm-style terminal emulation for months, so flip the switch and make everyone use an xterm-style console driver. I still have to enable this on i386. Right now pc98 and i386 share the same /etc/ttys file. I'm not going to switch pc98, because it uses its own Kanji-capable cons25 emulator. IMPORTANT: What to do if things go wrong (i.e. graphical artifacts): - Run the application inside script(1), try to reduce the problem and send me the log file. - In the mean time, you can run `vidcontrol -T cons25' and `export TERM=cons25' so you can run applications the same way you did before. You can also build your kernel with `options TEKEN_CONS25' to make all virtual terminals use the cons25 emulator by default. Discussed on: current@ --- sys/dev/syscons/scterm-teken.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sys/dev/syscons') diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index 12b040e201f2d..fe8a18642d40b 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -50,6 +50,15 @@ __FBSDID("$FreeBSD$"); #include +#if defined(TEKEN_XTERM) && defined(TEKEN_CONS25) +#error "xterm and cons25 are mutually exclusive." +#endif + +/* XXX: Use cons25 on i386, for compatibility with pc98. */ +#if defined(__i386__) && !defined(TEKEN_XTERM) && !defined(TEKEN_CONS25) +#define TEKEN_CONS25 +#endif + static void scteken_revattr(unsigned char, teken_attr_t *); static unsigned int scteken_attr(const teken_attr_t *); @@ -132,9 +141,9 @@ scteken_init(scr_stat *scp, void **softc, int code) #ifndef TEKEN_UTF8 teken_set_8bit(&ts->ts_teken); #endif /* !TEKEN_UTF8 */ -#ifndef TEKEN_XTERM +#ifdef TEKEN_CONS25 teken_set_cons25(&ts->ts_teken); -#endif /* !TEKEN_XTERM */ +#endif /* TEKEN_CONS25 */ tp.tp_row = scp->ysize; tp.tp_col = scp->xsize; -- cgit v1.3