freebsd-dev/sys
Ed Schouten b4b1c5169d Replace syscons terminal renderer by a new renderer that uses libteken.
Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
  do experiments with placing `xterm-color' in /etc/ttys. Because we
  only implement a subset of features of xterm, this may cause
  artifacts. We should consider extending libteken, because in my
  opinion xterm is the way to go. Some missing features:

  - Keypad application mode (DECKPAM)
  - Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
  we cannot go into the debugger anymore if we fail them. I've done
  development of this library almost entirely in userspace. In
  sys/dev/syscons/teken there are two applications that can be helpful
  when debugging the code:

  - teken_demo: a terminal emulator that can be started from a regular
    xterm that emulates a terminal using libteken. This application can
    be very useful to debug any rendering issues.

  - teken_stress: a stress testing application that emulates random
    terminal output. libteken has literally survived multiple terabytes
    of random input.

- libteken also includes support for UTF-8, but unfortunately our input
  layer and font renderer don't support this. If users want to
  experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
  teken.h. If you recompile your kernel or the teken_demo application,
  you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
  syscons renderer, which supports some form of localised input. Maybe
  we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
  years. It hasn't survived the `struct proc' -> `struct thread'
  conversion.

- To prevent confusion among people that want to hack on libteken:
  unlike syscons, the state machines that parse the escape sequences are
  machine generated. This means that if you want to add new escape
  sequences, you have to add an entry to the `sequences' file. This will
  cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
  accident. They should be reported to me, so I can fix them.

Discussed on:	current@, hackers@
Discussed with:	philip (at 25C3)
2009-01-01 13:26:53 +00:00
..
amd64 Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't 2008-12-30 20:13:20 +00:00
arm Include std.ixp425 for "cpu" and comment out duplicate memory map 2008-12-28 11:04:24 +00:00
boot A number of small changes to make the 'save choice to disk' safer, 2008-12-30 09:40:50 +00:00
bsm Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, both 2008-12-31 11:12:24 +00:00
cam Add quirk for the Storcase InfoStation 12bay 2008-12-23 09:11:05 +00:00
cddl Put the MIPS support back in after it was removed in r185029. 2008-12-04 16:31:08 +00:00
compat Push down Giant inside sysctl. Also add some more assertions to the code. 2008-12-29 12:58:45 +00:00
conf Replace syscons terminal renderer by a new renderer that uses libteken. 2009-01-01 13:26:53 +00:00
contrib Check for ipprotosw.h more precisely. 2008-12-23 16:49:07 +00:00
crypto Avoid 256 integer divisions per rc4_init() call. Replace it with using 2008-12-16 13:58:37 +00:00
ddb Collect N identical (or near identical) mkdumpheader() implementations into 2008-10-01 22:08:53 +00:00
dev Replace syscons terminal renderer by a new renderer that uses libteken. 2009-01-01 13:26:53 +00:00
fs Add a VOP_VPTOCNP implementation for pseudofs which covers file systems 2008-12-30 21:49:39 +00:00
gdb
geom - Fix an issue with access permissions to underlying disks used by a gvinum 2008-12-27 14:32:39 +00:00
gnu According to phk@, VOP_STRATEGY should never, _ever_, return 2008-12-16 21:13:11 +00:00
i386 Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't 2008-12-30 20:25:49 +00:00
ia64 AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them. 2008-12-17 06:56:58 +00:00
isa Allow device hints to wire the unit numbers of devices. 2008-11-18 21:01:54 +00:00
kern Don't clobber sysctl_root()'s error number. 2009-01-01 00:19:51 +00:00
kgssapi Call svc_freereq() before returning from the service proc. 2008-11-12 15:31:05 +00:00
libkern Add simple locking for the in-kernel iconv code. Translation operations 2008-12-05 21:19:24 +00:00
mips First pass at 64-bit elf support 2008-12-31 07:38:04 +00:00
modules unbreak the build. Decoupled the USB2's NDIS build from the default 2008-12-27 12:23:22 +00:00
net This checkin addresses a couple of issues: 2008-12-26 19:45:24 +00:00
net80211 mark discovered neighbors QoS capable if they advertise wme 2008-12-31 21:29:09 +00:00
netatalk Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netgraph shave about 7% off the overhead of ng_ether by using per-hook 2008-12-25 09:02:55 +00:00
netinet For consistency use LLE_IS_VALID() in this 4th place that is actually 2008-12-28 21:18:01 +00:00
netinet6 This checkin addresses a couple of issues: 2008-12-26 19:45:24 +00:00
netipsec Like in the rest of the file and the network stack use inp as 2008-12-27 23:24:59 +00:00
netipx Add missing "goto set_head" for SO_IPX_CHECKSUM; otherwise we fall through 2008-12-11 10:29:35 +00:00
netnatm Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netncp Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netsmb Implement device cloning for /dev/nsmb, the netsmb control pseudo-device. 2008-11-03 14:23:15 +00:00
nfs
nfs4client Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
nfsclient Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
nfsserver Handle VFS_VGET() failing with an error other than EOPNOTSUPP in addition 2008-12-16 04:34:09 +00:00
nlm Don't call svc_freereq() before svc_freeargs(). 2008-11-12 15:30:30 +00:00
opencrypto Don't hang if encrypting/decrypting using struct iovecs where one of the 2008-10-30 16:11:07 +00:00
pc98 Replace syscons terminal renderer by a new renderer that uses libteken. 2009-01-01 13:26:53 +00:00
pccard
pci Since we don't request reset for rlphy(4), the link state 'UP' 2008-12-22 00:53:47 +00:00
powerpc Modularize the Open Firmware client interface to allow run-time switching 2008-12-20 00:33:10 +00:00
rpc Add a missing call to mtx_destroy(). 2008-11-12 12:21:18 +00:00
security Fix white space botch: use carriage returns rather than tabs. 2008-12-31 23:22:45 +00:00
sparc64 - According to comments in OpenBSD, E{2,4}50 tend to have fragile 2008-12-22 15:34:06 +00:00
sun4v Missed the sun4v update to ofw_machdep.h in the OFW modularization commit. 2008-12-20 15:11:00 +00:00
sys Back out a non-style(9) change from r186668 to unbreak the kernels. 2009-01-01 12:14:39 +00:00
tools Remove some unused and broken code that attempted to not invoke locking 2008-11-03 19:57:40 +00:00
ufs Do not busy twice the mount point where a quota operation is performed. 2008-12-18 12:01:53 +00:00
vm Resurrect shared map locks allowing greater concurrency during some map 2009-01-01 00:31:46 +00:00
xdr Use the remote address for access control, not the local address. This fixes 2008-11-13 14:36:52 +00:00
xen merge 186535, 186537, and 186538 from releng_7_xen 2008-12-29 06:31:03 +00:00
Makefile