Date: Tue, 25 Nov 2008 19:46:50 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 153552 for review Message-ID: <200811251946.mAPJkoO7003078@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153552 Change 153552 by ed@ed_dull on 2008/11/25 19:46:27 As an experiment, add libteken to the syscons source code. What's libteken? Our syscons driver uses a terminal type called cons25. There's nothing wrong with cons25, but the problem is that it isn't really compatible with other systems out there. For example, I SSH to my HP2626 switch from syscons, it won't work. libteken is an attempt to emulate an xterm-color. Eventually we should also place the UTF-8 handling inside libteken. libteken is simply a library that converts input (output from, say, a TTY) to drawing commands that can be used by syscons. There are a couple of reasons why we want to put this in a library: - Having a well-defined API that doesn't depend on syscons itself allows me to easily develop this in userspace. I've got a simple application built with ncurses that emulates a terminal inside xterm itself. - It's hard to do right. There are always very small edge cases that can mess up the rendering. If we only write it once, we could for example teach window(1) how to use it as well. - If we ever get multiple console drivers, it's only a matter of building on top of libteken to get the terminal emulation working properly. So why did I choose xterm-color? It seems like this is the most commonly used terminal type. There are a lot of terminal-emulators that already use xterm-color. Even Mac OS X's Terminal.app just uses it. It's probably the safest approach. libteken is hardly finished. There are a lot of loose ends. The reason why I'm adding it to the MPSAFE TTY branch already is because I want to find out how efficient it is right now and if it can be fitted inside the syscons code. Affected files ... .. //depot/projects/mpsafetty/sys/conf/files#27 edit .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken.c#1 add .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken.h#1 add .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_internal.h#1 add .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_state.c#1 add .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_subr.c#1 add Differences ... ==== //depot/projects/mpsafetty/sys/conf/files#27 (text+ko) ==== @@ -1270,6 +1270,9 @@ dev/syscons/star/star_saver.c optional star_saver dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc +dev/syscons/teken/teken.c optional sc +dev/syscons/teken/teken_state.c optional sc +dev/syscons/teken/teken_subr.c optional sc dev/syscons/warp/warp_saver.c optional warp_saver dev/tdfx/tdfx_linux.c optional tdfx_linux tdfx compat_linux dev/tdfx/tdfx_pci.c optional tdfx pci
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811251946.mAPJkoO7003078>