From 0c3ae37f525eceade8dc047e551f5c9cb33faeb1 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Tue, 4 Dec 2012 11:42:24 +0100 Subject: [PATCH] Updating libcurses, libterminfo and terminfo. The three are updated together as they are tightly coupled. Change-Id: I9e1f07b6adc6e8ae10833e6f1402f8472d2d34b8 --- commands/less/less/screen.c | 2 +- commands/tget/tget.c | 9 +- distrib/sets/lists/minix/mi | 212 ++++-- docs/UPDATING | 8 + lib/libcurses/Makefile | 7 +- lib/libcurses/acs.c | 8 +- lib/libcurses/addbytes.c | 4 +- lib/libcurses/addchnstr.c | 15 +- lib/libcurses/addnstr.c | 13 +- lib/libcurses/chgat.c | 9 +- lib/libcurses/clrtobot.c | 15 +- lib/libcurses/clrtoeol.c | 10 +- lib/libcurses/color.c | 20 +- lib/libcurses/cr_put.c | 6 +- lib/libcurses/curs_set.c | 7 +- lib/libcurses/curses.3 | 8 +- lib/libcurses/curses.h | 12 +- lib/libcurses/curses_chgat.3 | 4 +- lib/libcurses/curses_inch.3 | 11 +- lib/libcurses/curses_input.3 | 14 +- lib/libcurses/curses_print.3 | 11 +- lib/libcurses/curses_private.h | 4 +- lib/libcurses/curses_screen.3 | 14 +- lib/libcurses/curses_standout.3 | 12 +- lib/libcurses/curses_termcap.3 | 30 +- lib/libcurses/curses_window.3 | 18 +- lib/libcurses/erase.c | 13 +- lib/libcurses/get_wch.c | 6 +- lib/libcurses/getch.c | 31 +- lib/libcurses/getstr.c | 46 +- lib/libcurses/inchstr.c | 21 +- lib/libcurses/instr.c | 9 +- lib/libcurses/keymap.h | 8 +- lib/libcurses/longname.c | 88 --- lib/libcurses/meta.c | 6 +- lib/libcurses/mvwin.c | 56 +- lib/libcurses/printw.c | 6 +- lib/libcurses/refresh.c | 45 +- lib/libcurses/scanw.c | 6 +- lib/libcurses/setterm.c | 17 +- lib/libcurses/shlib_version | 6 + lib/libcurses/tstp.c | 36 +- lib/libcurses/tty.c | 99 ++- lib/libterminfo/Makefile | 37 +- lib/libterminfo/Makefile.hash | 32 + lib/libterminfo/compile.c | 30 +- lib/libterminfo/compiled_terms.c | 595 --------------- lib/libterminfo/curterm.c | 79 +- lib/libterminfo/genhash | 10 +- lib/libterminfo/genterms | 9 +- lib/libterminfo/genthash | 14 +- lib/libterminfo/hash.c | 705 ----------------- lib/libterminfo/minix-config.inc | 5 - lib/libterminfo/setupterm.c | 8 +- lib/libterminfo/shlib_version | 3 + lib/libterminfo/term.c | 126 ++-- lib/libterminfo/term.h | 36 +- lib/libterminfo/term_private.h | 20 +- lib/libterminfo/termcap.3 | 18 +- lib/libterminfo/termcap.c | 187 ++++- lib/libterminfo/termcap.h | 7 +- lib/libterminfo/termcap_hash.c | 163 ---- lib/libterminfo/terminfo.3 | 35 +- lib/libterminfo/terminfo.5.in | 22 +- lib/libterminfo/tparm.c | 108 ++- releasetools/nbsd_ports | 6 +- share/terminfo/Makefile | 16 +- share/terminfo/terminfo | 1208 ++++++++++++++++++++++-------- tools/tic/Makefile | 2 - 69 files changed, 1952 insertions(+), 2511 deletions(-) delete mode 100644 lib/libcurses/longname.c create mode 100644 lib/libterminfo/Makefile.hash delete mode 100644 lib/libterminfo/compiled_terms.c delete mode 100644 lib/libterminfo/hash.c delete mode 100644 lib/libterminfo/minix-config.inc delete mode 100644 lib/libterminfo/termcap_hash.c diff --git a/commands/less/less/screen.c b/commands/less/less/screen.c index 84d513b70..65ce5d79a 100644 --- a/commands/less/less/screen.c +++ b/commands/less/less/screen.c @@ -1337,7 +1337,7 @@ get_term() */ static int costcount; -typedef void (*tputfunc)(int); +typedef int (*tputfunc)(int); /*ARGSUSED*/ static int diff --git a/commands/tget/tget.c b/commands/tget/tget.c index e09009b20..fc1158de3 100644 --- a/commands/tget/tget.c +++ b/commands/tget/tget.c @@ -7,11 +7,6 @@ #include #include -void fputchar(int c) -{ - putchar(c); -} - void usage(void) { fprintf(stderr, @@ -70,7 +65,7 @@ int main(int argc, char **argv) excode= 1; } else { excode= 0; - tputs(str, 0, fputchar); + tputs(str, 0, putchar); } } else if (strcmp(option, "-goto") == 0) { @@ -85,7 +80,7 @@ int main(int argc, char **argv) excode= 1; } else { excode= 0; - tputs(tgoto(cm, col, line), 0, fputchar); + tputs(tgoto(cm, col, line), 0, putchar); } } else if (strcmp(option, "-echo") == 0) { diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 60ef01fb9..80bc07446 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -1,4 +1,5 @@ -. minix-sys + + ./bin/cat minix-sys ./bin/cd minix-sys ./bin/chmod minix-sys @@ -42,6 +43,7 @@ ./bin/shutdown minix-sys ./bin/sync minix-sys ./bin/sysenv minix-sys +./bin/tar minix-sys ./bin/test minix-sys ./bin/true minix-sys ./bin/umask minix-sys @@ -52,7 +54,22 @@ ./boot/minix_default minix-sys ./boot/minix minix-sys ./boot minix-sys +./boot/minix/.temp/kernel minix-sys +./boot/minix/.temp minix-sys +./boot/minix/.temp/mod01_ds minix-sys +./boot/minix/.temp/mod02_rs minix-sys +./boot/minix/.temp/mod03_pm minix-sys +./boot/minix/.temp/mod04_sched minix-sys +./boot/minix/.temp/mod05_vfs minix-sys +./boot/minix/.temp/mod06_memory minix-sys +./boot/minix/.temp/mod07_log minix-sys +./boot/minix/.temp/mod08_tty minix-sys +./boot/minix/.temp/mod09_mfs minix-sys +./boot/minix/.temp/mod10_vm minix-sys +./boot/minix/.temp/mod11_pfs minix-sys +./boot/minix/.temp/mod12_init minix-sys ./dev minix-sys +./dev/mouse minix-sys ./etc/boot.cfg.default minix-sys ./etc/defaults/minix.rc.conf minix-sys ./etc/defaults minix-sys @@ -104,12 +121,27 @@ ./etc/ttys minix-sys ./etc/utmp minix-sys ./home minix-sys +./lib/cpp minix-sys ./libexec/ld-elf.so.1 minix-sys ./libexec/ld.elf_so minix-sys ./libexec minix-sys ./lib minix-sys -./lib/cpp minix-sys +. minix-sys ./mnt minix-sys +./multiboot/kernel minix-sys +./multiboot minix-sys +./multiboot/mod01_ds minix-sys +./multiboot/mod02_rs minix-sys +./multiboot/mod03_pm minix-sys +./multiboot/mod04_sched minix-sys +./multiboot/mod05_vfs minix-sys +./multiboot/mod06_memory minix-sys +./multiboot/mod07_log minix-sys +./multiboot/mod08_tty minix-sys +./multiboot/mod09_mfs minix-sys +./multiboot/mod10_vm minix-sys +./multiboot/mod11_pfs minix-sys +./multiboot/mod12_init minix-sys ./proc minix-sys ./root/.ashrc minix-sys ./root/.exrc minix-sys @@ -168,6 +200,7 @@ ./usr/bin/bzip2recover minix-sys ./usr/bin/cal minix-sys ./usr/bin/cawf minix-sys +./usr/bin/cc minix-sys ./usr/bin/cdprobe minix-sys ./usr/bin/checkhier minix-sys obsolete ./usr/bin/chfn minix-sys @@ -186,6 +219,7 @@ ./usr/bin/co minix-sys ./usr/bin/comm minix-sys ./usr/bin/compress minix-sys +./usr/bin/cpio minix-sys ./usr/bin/cprofalyze minix-sys ./usr/bin/crc minix-sys ./usr/bin/cron minix-sys @@ -287,6 +321,9 @@ ./usr/bin/make minix-sys ./usr/bin/mandoc minix-sys ./usr/bin/man minix-sys +./usr/bin/md2 minix-sys +./usr/bin/md4 minix-sys +./usr/bin/md5 minix-sys ./usr/bin/mesg minix-sys ./usr/bin/mined minix-sys ./usr/bin/ministat minix-sys @@ -341,6 +378,7 @@ ./usr/bin/rev minix-sys ./usr/bin/rget minix-sys ./usr/bin/rlogin minix-sys +./usr/bin/rmd160 minix-sys ./usr/bin/rotate minix-sys ./usr/bin/rput minix-sys ./usr/bin/rsh minix-sys @@ -348,6 +386,7 @@ ./usr/bin/screendump minix-sys ./usr/bin/sed minix-sys ./usr/bin/seq minix-sys +./usr/bin/sha1 minix-sys ./usr/bin/shar minix-sys ./usr/bin/shutdown minix-sys ./usr/bin/sleep minix-sys @@ -359,6 +398,7 @@ ./usr/bin/sprofdiff minix-sys ./usr/bin/srccrc minix-sys ./usr/bin/stat minix-sys +./usr/bin/strip minix-sys ./usr/bin/stty minix-sys ./usr/bin/su minix-sys ./usr/bin/sum minix-sys @@ -369,6 +409,7 @@ ./usr/bin/syslogd minix-sys ./usr/bin/sz minix-sys ./usr/bin/tail minix-sys +./usr/bin/tar minix-sys ./usr/bin/tcpd minix-sys ./usr/bin/tcpdp minix-sys ./usr/bin/tcpstat minix-sys @@ -398,8 +439,8 @@ ./usr/bin/uue minix-sys ./usr/bin/uuencode minix-sys ./usr/bin/version minix-sys -./usr/bin/vol minix-sys ./usr/bin/vi minix-sys +./usr/bin/vol minix-sys ./usr/bin/wc minix-sys ./usr/bin/whereis minix-sys ./usr/bin/which minix-sys @@ -481,6 +522,7 @@ ./usr/include/disktab.h minix-sys ./usr/include/dlfcn.h minix-sys ./usr/include/elfdefinitions.h minix-sys +./usr/include/elf.h minix-sys ./usr/include/env.h minix-sys ./usr/include/err.h minix-sys ./usr/include/errno.h minix-sys @@ -507,6 +549,7 @@ ./usr/include/i386/archtypes.h minix-sys ./usr/include/i386/asm.h minix-sys ./usr/include/i386/bios.h minix-sys +./usr/include/i386/bootinfo.h minix-sys ./usr/include/i386/bswap.h minix-sys ./usr/include/i386/byte_swap.h minix-sys ./usr/include/i386/cdefs.h minix-sys @@ -547,12 +590,14 @@ ./usr/include/i386/pci_intel.h minix-sys ./usr/include/i386/pci_sis.h minix-sys ./usr/include/i386/pci_via.h minix-sys +./usr/include/i386/pio.h minix-sys ./usr/include/i386/ports.h minix-sys ./usr/include/i386/profile.h minix-sys +./usr/include/i386/rwlock.h minix-sys ./usr/include/i386/setjmp.h minix-sys ./usr/include/i386/signal.h minix-sys ./usr/include/i386/stackframe.h minix-sys -./usr/include/i386/stdarg.h minix-sys +./usr/include/i386/stdarg.h minix-sys obsolete ./usr/include/i386/types.h minix-sys ./usr/include/i386/vm.h minix-sys ./usr/include/i386/vmparam.h minix-sys @@ -574,6 +619,7 @@ ./usr/include/link.h minix-sys ./usr/include/locale.h minix-sys ./usr/include/login_cap.h minix-sys +./usr/include/lwp.h minix-sys ./usr/include/lzma/base.h minix-sys ./usr/include/lzma/bcj.h minix-sys ./usr/include/lzma/block.h minix-sys @@ -798,6 +844,7 @@ ./usr/include/sys/cdefs_aout.h minix-sys ./usr/include/sys/cdefs_elf.h minix-sys ./usr/include/sys/cdefs.h minix-sys +./usr/include/sys/condvar.h minix-sys ./usr/include/sys/ctype_bits.h minix-sys ./usr/include/sys/ctype_inline.h minix-sys ./usr/include/sys/dirent.h minix-sys @@ -821,6 +868,7 @@ ./usr/include/sys/featuretest.h minix-sys ./usr/include/sys/file.h minix-sys ./usr/include/sys/float_ieee754.h minix-sys +./usr/include/sys/fstypes.h minix-sys ./usr/include/sys/gcq.h minix-sys ./usr/include/sys/gmon.h minix-sys ./usr/include/sys/hash.h minix-sys @@ -844,6 +892,7 @@ ./usr/include/sys/localedef.h minix-sys ./usr/include/sys/lock.h minix-sys ./usr/include/syslog.h minix-sys +./usr/include/sys/lwp.h minix-sys ./usr/include/sys/md4.h minix-sys ./usr/include/sys/md5.h minix-sys ./usr/include/sys minix-sys @@ -863,6 +912,7 @@ ./usr/include/sys/reboot.h minix-sys ./usr/include/sys/resource.h minix-sys ./usr/include/sys/rmd160.h minix-sys +./usr/include/sys/rwlock.h minix-sys ./usr/include/sys/select.h minix-sys ./usr/include/sys/sem.h minix-sys ./usr/include/sys/sha1.h minix-sys @@ -872,9 +922,11 @@ ./usr/include/sys/signal.h minix-sys ./usr/include/sys/sigtypes.h minix-sys ./usr/include/sys/socket.h minix-sys +./usr/include/sys/specificdata.h minix-sys ./usr/include/sys/statfs.h minix-sys ./usr/include/sys/stat.h minix-sys ./usr/include/sys/statvfs.h minix-sys +./usr/include/sys/stdarg.h minix-sys ./usr/include/sys/stdint.h minix-sys ./usr/include/sys/svrctl.h minix-sys ./usr/include/sys/sysctl.h minix-sys @@ -883,6 +935,7 @@ ./usr/include/sys/termios.h minix-sys ./usr/include/sys/time.h minix-sys ./usr/include/sys/times.h minix-sys +./usr/include/sys/tls.h minix-sys ./usr/include/sys/tree.h minix-sys ./usr/include/sys/ttycom.h minix-sys ./usr/include/sys/ttydefaults.h minix-sys @@ -949,12 +1002,16 @@ ./usr/include/wchar.h minix-sys ./usr/include/wctype.h minix-sys ./usr/include/wordexp.h minix-sys +./usr/include/x86/bootinfo.h minix-sys +./usr/include/x86/cpu.h minix-sys ./usr/include/x86/float.h minix-sys ./usr/include/x86/ieeefp.h minix-sys ./usr/include/x86/ieee.h minix-sys ./usr/include/x86/math.h minix-sys ./usr/include/x86 minix-sys ./usr/include/x86/mutex.h minix-sys +./usr/include/x86/pio.h minix-sys +./usr/include/x86/rwlock.h minix-sys ./usr/include/zconf.h minix-sys ./usr/include/zlib.h minix-sys ./usr/lib/cawf/common minix-sys @@ -967,8 +1024,9 @@ ./usr/lib/cawf/ms.mac minix-sys ./usr/lib/compat_minix.pc minix-sys ./usr/lib/cpp minix-sys +./usr/lib/crontab minix-sys ./usr/lib/crt0.o minix-sys -./usr/lib/crt1.o minix-sys +./usr/lib/crt1.o minix-sys obsolete ./usr/lib/crtbegin.o minix-sys ./usr/lib/crtbeginS.o minix-sys ./usr/lib/crtbeginT.o minix-sys @@ -1127,6 +1185,7 @@ ./usr/lib/librefuse.so.0.0 minix-sys ./usr/lib/librefuse.so.0 minix-sys ./usr/lib/librefuse.so minix-sys +./usr/lib/librmt.a minix-sys ./usr/lib/libsffs.a minix-sys ./usr/lib/libsffs_pic.a minix-sys ./usr/lib/libsys.a minix-sys @@ -1302,6 +1361,9 @@ ./usr/man/man1/make.1 minix-sys ./usr/man/man1/man.1 minix-sys ./usr/man/man1/mandoc.1 minix-sys +./usr/man/man1/md2.1 minix-sys +./usr/man/man1/md4.1 minix-sys +./usr/man/man1/md5.1 minix-sys ./usr/man/man1/mesg.1 minix-sys ./usr/man/man1/ministat.1 minix-sys ./usr/man/man1 minix-sys @@ -1349,6 +1411,7 @@ ./usr/man/man1/rget.1 minix-sys ./usr/man/man1/rlogin.1 minix-sys ./usr/man/man1/rm.1 minix-sys +./usr/man/man1/rmd160.1 minix-sys ./usr/man/man1/rmdir.1 minix-sys ./usr/man/man1/rsh.1 minix-sys ./usr/man/man1/rz.1 minix-sys @@ -1357,6 +1420,7 @@ ./usr/man/man1/set.1 minix-sys ./usr/man/man1/setvar.1 minix-sys ./usr/man/man1/sh.1 minix-sys +./usr/man/man1/sha1.1 minix-sys ./usr/man/man1/shar.1 minix-sys ./usr/man/man1/shift.1 minix-sys ./usr/man/man1/sleep.1 minix-sys @@ -1923,6 +1987,7 @@ ./usr/man/man3/cpuset_set.3 minix-sys ./usr/man/man3/cpuset_size.3 minix-sys ./usr/man/man3/cpuset_zero.3 minix-sys +./usr/man/man3/cpxattr.3 minix-sys ./usr/man/man3/creal.3 minix-sys ./usr/man/man3/crealf.3 minix-sys ./usr/man/man3/creall.3 minix-sys @@ -1993,6 +2058,7 @@ ./usr/man/man3/dbm_open.3 minix-sys ./usr/man/man3/dbm_store.3 minix-sys ./usr/man/man3/dbopen.3 minix-sys +./usr/man/man3/define_key.3 minix-sys ./usr/man/man3/def_prog_mode.3 minix-sys ./usr/man/man3/def_shell_mode.3 minix-sys ./usr/man/man3/dehumanize_number.3 minix-sys @@ -2130,12 +2196,16 @@ ./usr/man/man3/expf.3 minix-sys ./usr/man/man3/expm1.3 minix-sys ./usr/man/man3/expm1f.3 minix-sys -./usr/man/man3/extattr.3 minix-sys +./usr/man/man3/extattr.3 minix-sys obsolete +./usr/man/man3/extattr_copy_fd.3 minix-sys +./usr/man/man3/extattr_copy_file.3 minix-sys +./usr/man/man3/extattr_copy_link.3 minix-sys ./usr/man/man3/extattr_namespace_to_string.3 minix-sys ./usr/man/man3/extattr_string_to_namespace.3 minix-sys ./usr/man/man3/fabs.3 minix-sys ./usr/man/man3/fabsf.3 minix-sys ./usr/man/man3/fclose.3 minix-sys +./usr/man/man3/fcpxattr.3 minix-sys ./usr/man/man3/fdim.3 minix-sys ./usr/man/man3/fdimf.3 minix-sys ./usr/man/man3/fdiml.3 minix-sys @@ -2194,12 +2264,14 @@ ./usr/man/man3/fparseln.3 minix-sys ./usr/man/man3/fpclassify.3 minix-sys ./usr/man/man3/fpgetmask.3 minix-sys +./usr/man/man3/fpgetprec.3 minix-sys ./usr/man/man3/fpgetround.3 minix-sys ./usr/man/man3/fpgetsticky.3 minix-sys ./usr/man/man3/fp_nquery.3 minix-sys ./usr/man/man3/fp_resstat.3 minix-sys ./usr/man/man3/fprintf.3 minix-sys ./usr/man/man3/fpsetmask.3 minix-sys +./usr/man/man3/fpsetprec.3 minix-sys ./usr/man/man3/fpsetround.3 minix-sys ./usr/man/man3/fpsetsticky.3 minix-sys ./usr/man/man3/fpurge.3 minix-sys @@ -2213,6 +2285,7 @@ ./usr/man/man3/freeifaddrs.3 minix-sys ./usr/man/man3/freopen.3 minix-sys ./usr/man/man3/frexp.3 minix-sys +./usr/man/man3/fropen2.3 minix-sys ./usr/man/man3/fropen.3 minix-sys ./usr/man/man3/fscanf.3 minix-sys ./usr/man/man3/fseek.3 minix-sys @@ -2231,8 +2304,10 @@ ./usr/man/man3/ftw.3 minix-sys ./usr/man/man3/fullname.3 minix-sys ./usr/man/man3/funlockfile.3 minix-sys +./usr/man/man3/funopen2.3 minix-sys ./usr/man/man3/funopen.3 minix-sys ./usr/man/man3/fwide.3 minix-sys +./usr/man/man3/fwopen2.3 minix-sys ./usr/man/man3/fwopen.3 minix-sys ./usr/man/man3/fwprintf.3 minix-sys ./usr/man/man3/fwrite.3 minix-sys @@ -2277,10 +2352,10 @@ ./usr/man/man3/getbegx.3 minix-sys ./usr/man/man3/getbegy.3 minix-sys ./usr/man/man3/getbkgd.3 minix-sys -./usr/man/man3/getbootfile.3 minix-sys +./usr/man/man3/getbootfile.3 minix-sys obsolete ./usr/man/man3/getbsize.3 minix-sys ./usr/man/man3/getc.3 minix-sys -./usr/man/man3/getcap.3 minix-sys +./usr/man/man3/getcap.3 minix-sys obsolete ./usr/man/man3/getch.3 minix-sys ./usr/man/man3/getchar.3 minix-sys ./usr/man/man3/getchar_unlocked.3 minix-sys @@ -2337,6 +2412,8 @@ ./usr/man/man3/getpary.3 minix-sys ./usr/man/man3/getparyx.3 minix-sys ./usr/man/man3/getpass.3 minix-sys +./usr/man/man3/getpassfd.3 minix-sys +./usr/man/man3/getpass_r.3 minix-sys ./usr/man/man3/getpeereid.3 minix-sys ./usr/man/man3/getprogname.3 minix-sys ./usr/man/man3/getprotobyname.3 minix-sys @@ -2383,7 +2460,9 @@ ./usr/man/man3/has_ic.3 minix-sys ./usr/man/man3/has_il.3 minix-sys ./usr/man/man3/hcreate.3 minix-sys +./usr/man/man3/hcreate_r.3 minix-sys ./usr/man/man3/hdestroy.3 minix-sys +./usr/man/man3/hdestroy_r.3 minix-sys ./usr/man/man3/heapsort.3 minix-sys ./usr/man/man3/herror.3 minix-sys ./usr/man/man3/hesiod.3 minix-sys obsolete @@ -2395,6 +2474,7 @@ ./usr/man/man3/hline.3 minix-sys ./usr/man/man3/hostalias.3 minix-sys ./usr/man/man3/hsearch.3 minix-sys +./usr/man/man3/hsearch_r.3 minix-sys ./usr/man/man3/hstrerror.3 minix-sys ./usr/man/man3/htonl.3 minix-sys ./usr/man/man3/htons.3 minix-sys @@ -2529,6 +2609,7 @@ ./usr/man/man3/l64a_r.3 minix-sys ./usr/man/man3/labs.3 minix-sys ./usr/man/man3/lcong48.3 minix-sys +./usr/man/man3/lcpxattr.3 minix-sys ./usr/man/man3/ldexp.3 minix-sys ./usr/man/man3/ldiv.3 minix-sys ./usr/man/man3/leaveok.3 minix-sys @@ -2616,6 +2697,20 @@ ./usr/man/man3/MD2Init.3 minix-sys ./usr/man/man3/MD2Transform.3 minix-sys ./usr/man/man3/MD2Update.3 minix-sys +./usr/man/man3/md4.3 minix-sys +./usr/man/man3/MD4Data.3 minix-sys +./usr/man/man3/MD4End.3 minix-sys +./usr/man/man3/MD4File.3 minix-sys +./usr/man/man3/MD4Final.3 minix-sys +./usr/man/man3/MD4Init.3 minix-sys +./usr/man/man3/MD4Update.3 minix-sys +./usr/man/man3/md5.3 minix-sys +./usr/man/man3/MD5Data.3 minix-sys +./usr/man/man3/MD5End.3 minix-sys +./usr/man/man3/MD5File.3 minix-sys +./usr/man/man3/MD5Final.3 minix-sys +./usr/man/man3/MD5Init.3 minix-sys +./usr/man/man3/MD5Update.3 minix-sys ./usr/man/man3/mdoc.3 minix-sys ./usr/man/man3/membar_consumer.3 minix-sys ./usr/man/man3/membar_enter.3 minix-sys @@ -2717,6 +2812,7 @@ ./usr/man/man3/ntoa.3 minix-sys ./usr/man/man3/ntohl.3 minix-sys ./usr/man/man3/ntohs.3 minix-sys +./usr/man/man3/nvis.3 minix-sys ./usr/man/man3/offtime.3 minix-sys ./usr/man/man3/offtime_r.3 minix-sys ./usr/man/man3/opendir.3 minix-sys @@ -2746,6 +2842,27 @@ ./usr/man/man3/posix2time_z.3 minix-sys ./usr/man/man3/posix_memalign.3 minix-sys ./usr/man/man3/posix_openpt.3 minix-sys +./usr/man/man3/posix_spawn.3 minix-sys +./usr/man/man3/posix_spawnattr_destroy.3 minix-sys +./usr/man/man3/posix_spawnattr_getflags.3 minix-sys +./usr/man/man3/posix_spawnattr_getpgroup.3 minix-sys +./usr/man/man3/posix_spawnattr_getschedparam.3 minix-sys +./usr/man/man3/posix_spawnattr_getschedpolicy.3 minix-sys +./usr/man/man3/posix_spawnattr_getsigdefault.3 minix-sys +./usr/man/man3/posix_spawnattr_getsigmask.3 minix-sys +./usr/man/man3/posix_spawnattr_init.3 minix-sys +./usr/man/man3/posix_spawnattr_setflags.3 minix-sys +./usr/man/man3/posix_spawnattr_setpgroup.3 minix-sys +./usr/man/man3/posix_spawnattr_setschedparam.3 minix-sys +./usr/man/man3/posix_spawnattr_setschedpolicy.3 minix-sys +./usr/man/man3/posix_spawnattr_setsigdefault.3 minix-sys +./usr/man/man3/posix_spawnattr_setsigmask.3 minix-sys +./usr/man/man3/posix_spawn_file_actions_addclose.3 minix-sys +./usr/man/man3/posix_spawn_file_actions_adddup2.3 minix-sys +./usr/man/man3/posix_spawn_file_actions_addopen.3 minix-sys +./usr/man/man3/posix_spawn_file_actions_destroy.3 minix-sys +./usr/man/man3/posix_spawn_file_actions_init.3 minix-sys +./usr/man/man3/posix_spawnp.3 minix-sys ./usr/man/man3/pow.3 minix-sys ./usr/man/man3/powf.3 minix-sys ./usr/man/man3/p_query.3 minix-sys @@ -3029,6 +3146,7 @@ ./usr/man/man3/RMD160Init.3 minix-sys ./usr/man/man3/RMD160Transform.3 minix-sys ./usr/man/man3/RMD160Update.3 minix-sys +./usr/man/man3/rmtops.3 minix-sys ./usr/man/man3/round.3 minix-sys ./usr/man/man3/roundf.3 minix-sys ./usr/man/man3/rresvport.3 minix-sys @@ -3167,6 +3285,7 @@ ./usr/man/man3/snprintb.3 minix-sys ./usr/man/man3/snprintb_m.3 minix-sys ./usr/man/man3/snprintf.3 minix-sys +./usr/man/man3/snvis.3 minix-sys ./usr/man/man3/sockatmark.3 minix-sys ./usr/man/man3/sprintf.3 minix-sys ./usr/man/man3/sqrt.3 minix-sys @@ -3213,11 +3332,17 @@ ./usr/man/man3/strncpy.3 minix-sys ./usr/man/man3/strndup.3 minix-sys ./usr/man/man3/strnlen.3 minix-sys +./usr/man/man3/strnunvis.3 minix-sys +./usr/man/man3/strnunvisx.3 minix-sys +./usr/man/man3/strnvis.3 minix-sys +./usr/man/man3/strnvisx.3 minix-sys ./usr/man/man3/strpbrk.3 minix-sys ./usr/man/man3/strptime.3 minix-sys ./usr/man/man3/strrchr.3 minix-sys ./usr/man/man3/strsep.3 minix-sys ./usr/man/man3/strsignal.3 minix-sys +./usr/man/man3/strsnvis.3 minix-sys +./usr/man/man3/strsnvisx.3 minix-sys ./usr/man/man3/strspn.3 minix-sys ./usr/man/man3/strstr.3 minix-sys ./usr/man/man3/strsuftoll.3 minix-sys @@ -3281,6 +3406,7 @@ ./usr/man/man3/tempnam.3 minix-sys ./usr/man/man3/termcap.3 minix-sys ./usr/man/man3/terminfo.3 minix-sys +./usr/man/man3/termname.3 minix-sys ./usr/man/man3/tfind.3 minix-sys ./usr/man/man3/tgetent.3 minix-sys ./usr/man/man3/tgetflag.3 minix-sys @@ -3302,9 +3428,11 @@ ./usr/man/man3/timeout.3 minix-sys ./usr/man/man3/times.3 minix-sys ./usr/man/man3/timezone.3 minix-sys +./usr/man/man3/tiparm.3 minix-sys ./usr/man/man3/ti_putp.3 minix-sys ./usr/man/man3/ti_puts.3 minix-sys ./usr/man/man3/ti_setupterm.3 minix-sys +./usr/man/man3/ti_tiparm.3 minix-sys ./usr/man/man3/tmpfile.3 minix-sys ./usr/man/man3/tmpnam.3 minix-sys ./usr/man/man3/toascii.3 minix-sys @@ -3316,8 +3444,8 @@ ./usr/man/man3/towctrans.3 minix-sys ./usr/man/man3/towlower.3 minix-sys ./usr/man/man3/towupper.3 minix-sys -./usr/man/man3/t_parm.3 minix-sys ./usr/man/man3/tparm.3 minix-sys +./usr/man/man3/t_parm.3 minix-sys obsolete ./usr/man/man3/tputs.3 minix-sys ./usr/man/man3/trunc.3 minix-sys ./usr/man/man3/truncf.3 minix-sys @@ -3328,7 +3456,7 @@ ./usr/man/man3/ttyname_r.3 minix-sys ./usr/man/man3/ttyslot.3 minix-sys ./usr/man/man3/ttyunlock.3 minix-sys -./usr/man/man3/t_vparm.3 minix-sys +./usr/man/man3/t_vparm.3 minix-sys obsolete ./usr/man/man3/twalk.3 minix-sys ./usr/man/man3/tzalloc.3 minix-sys ./usr/man/man3/tzfree.3 minix-sys @@ -3688,7 +3816,6 @@ ./usr/pkg minix-sys ./usr/preserve minix-sys ./usr/run minix-sys -./usr/sbin minix-sys ./usr/sbin/acpi minix-sys ./usr/sbin/amddev minix-sys ./usr/sbin/atl2 minix-sys @@ -3717,7 +3844,9 @@ ./usr/sbin/lance minix-sys ./usr/sbin/log minix-sys ./usr/sbin/memory minix-sys +./usr/sbin minix-sys ./usr/sbin/mkproto minix-sys +./usr/sbin/mmc minix-sys ./usr/sbin/mtree minix-sys ./usr/sbin/orinoco minix-sys ./usr/sbin/pci minix-sys @@ -3759,6 +3888,7 @@ ./usr/share/doc/psd/19.curses/ex1.c minix-sys ./usr/share/doc/psd/19.curses/ex2.c minix-sys ./usr/share/doc/psd/19.curses/fns.doc minix-sys +./usr/share/doc/psd/19.curses inix-sys ./usr/share/doc/psd/19.curses/intro.0 minix-sys ./usr/share/doc/psd/19.curses/intro.1 minix-sys ./usr/share/doc/psd/19.curses/intro.2 minix-sys @@ -3770,7 +3900,6 @@ ./usr/share/doc/psd/19.curses/macros minix-sys ./usr/share/doc/psd/19.curses/Makefile minix-sys ./usr/share/doc/psd/19.curses/Master minix-sys -./usr/share/doc/psd/19.curses inix-sys ./usr/share/doc/psd/19.curses/twinkle1.c minix-sys ./usr/share/doc/psd/19.curses/twinkle2.c minix-sys ./usr/share/doc/psd/19.curses/win_st.c minix-sys @@ -3839,7 +3968,8 @@ ./usr/share/mk/pkgsrchooks.mk minix-sys obsolete ./usr/share/mk/sys.mk minix-sys ./usr/share/terminfo minix-sys -./usr/share/terminfo/terminfo.db minix-sys +./usr/share/terminfo/terminfo.cdb minix-sys +./usr/share/terminfo/terminfo.db minix-sys obsolete ./usr/share/terminfo/terminfo minix-sys ./usr/share/zoneinfo/Africa/Abidjan minix-sys ./usr/share/zoneinfo/Africa/Accra minix-sys @@ -4177,9 +4307,9 @@ ./usr/share/zoneinfo/Atlantic/Cape_Verde minix-sys ./usr/share/zoneinfo/Atlantic/Faeroe minix-sys ./usr/share/zoneinfo/Atlantic/Faroe minix-sys +./usr/share/zoneinfo/Atlantic inix-sys ./usr/share/zoneinfo/Atlantic/Jan_Mayen minix-sys ./usr/share/zoneinfo/Atlantic/Madeira minix-sys -./usr/share/zoneinfo/Atlantic inix-sys ./usr/share/zoneinfo/Atlantic/Reykjavik minix-sys ./usr/share/zoneinfo/Atlantic/South_Georgia minix-sys ./usr/share/zoneinfo/Atlantic/Stanley minix-sys @@ -4461,59 +4591,9 @@ ./usr/var minix-sys ./usr/var/run minix-sys ./var/db minix-sys -./var/db/obsolete minix-sys ./var/db/obsolete/minix minix-sys +./var/db/obsolete minix-sys +./var/log minix-sys ./var minix-sys ./var/run minix-sys -./boot/minix/.temp minix-sys -./boot/minix/.temp/kernel minix-sys -./boot/minix/.temp/mod01_ds minix-sys -./boot/minix/.temp/mod02_rs minix-sys -./boot/minix/.temp/mod03_pm minix-sys -./boot/minix/.temp/mod04_sched minix-sys -./boot/minix/.temp/mod05_vfs minix-sys -./boot/minix/.temp/mod06_memory minix-sys -./boot/minix/.temp/mod07_log minix-sys -./boot/minix/.temp/mod08_tty minix-sys -./boot/minix/.temp/mod09_mfs minix-sys -./boot/minix/.temp/mod10_vm minix-sys -./boot/minix/.temp/mod11_pfs minix-sys -./boot/minix/.temp/mod12_init minix-sys - -./multiboot minix-sys -./multiboot/kernel minix-sys -./multiboot/mod01_ds minix-sys -./multiboot/mod02_rs minix-sys -./multiboot/mod03_pm minix-sys -./multiboot/mod04_sched minix-sys -./multiboot/mod05_vfs minix-sys -./multiboot/mod06_memory minix-sys -./multiboot/mod07_log minix-sys -./multiboot/mod08_tty minix-sys -./multiboot/mod09_mfs minix-sys -./multiboot/mod10_vm minix-sys -./multiboot/mod11_pfs minix-sys -./multiboot/mod12_init minix-sys -./bin/tar minix-sys -./usr/bin/tar minix-sys -./usr/bin/cpio minix-sys -./usr/lib/librmt.a minix-sys -./usr/man/man3/rmtops.3 minix-sys - -./usr/bin/md2 minix-sys -./usr/bin/md4 minix-sys -./usr/bin/md5 minix-sys -./usr/bin/rmd160 minix-sys -./usr/bin/sha1 minix-sys -./usr/man/man1/md2.1 minix-sys -./usr/man/man1/md4.1 minix-sys -./usr/man/man1/md5.1 minix-sys -./usr/man/man1/rmd160.1 minix-sys -./usr/man/man1/sha1.1 minix-sys -./usr/sbin/mmc minix-sys -./usr/bin/cc minix-sys -./usr/bin/strip minix-sys -./usr/lib/crontab minix-sys -./var/log minix-sys ./var/tmp minix-sys -./dev/mouse minix-sys diff --git a/docs/UPDATING b/docs/UPDATING index 1c7cb620f..4b0d8a550 100644 --- a/docs/UPDATING +++ b/docs/UPDATING @@ -8,6 +8,14 @@ Then do a "make build". +20121205: + Following the terminfo update, some new tools are now used during + the build. Execute the following to install them: + # make -C usr.bin/nbperf all install + # make -C usr.bin/lorder all install + # make -C usr.bin/join all install + # make -C usr.bin/tic all install + 20121205: The tsort tool has been also upgraded and is now also used during the build: diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile index c28a8cc3a..aee5f0163 100644 --- a/lib/libcurses/Makefile +++ b/lib/libcurses/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.64 2010/02/03 15:34:40 roy Exp $ +# $NetBSD: Makefile,v 1.68 2012/04/21 14:39:35 roy Exp $ # @(#)Makefile 8.2 (Berkeley) 1/2/94 .include @@ -69,6 +69,7 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \ curses_clear.3 clrtobot.3 curses_clear.3 clrtoeol.3 \ curses_color.3 color_content.3 curses_attributes.3 color_set.3 \ curses_window.3 copywin.3 curses_tty.3 curs_set.3 \ + curses_input.3 define_key.3 \ curses_tty.3 delay_output.3 curses_tty.3 def_prog_mode.3 \ curses_tty.3 def_shell_mode.3 curses_delch.3 delch.3 \ curses_deleteln.3 deleteln.3 curses_screen.3 delscreen.3 \ @@ -80,7 +81,7 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \ curses_tty.3 flash.3 curses_tty.3 flushinp.3 \ curses_refresh.3 flushok.3 \ curses_termcap.3 fullname.3 curses_attributes.3 getattrs.3 \ - curses_background.3 getbkgd.3 curses_termcap.3 getcap.3 \ + curses_background.3 getbkgd.3 \ curses_input.3 getch.3 curses_cursor.3 getcury.3 \ curses_cursor.3 getcurx.3 curses_cursor.3 getbegy.3 \ curses_cursor.3 getbegx.3 curses_cursor.3 getmaxx.3 \ @@ -103,7 +104,7 @@ MLINKS+= curses_addch.3 addch.3 curses_addchstr.3 addchnstr.3 \ curses_touch.3 is_wintouched.3 curses_screen.3 isendwin.3 \ curses_keyname.3 keyname.3 \ curses_input.3 keypad.3 curses_tty.3 killchar.3 \ - curses_refresh.3 leaveok.3 curses_termcap.3 longname.3 \ + curses_refresh.3 leaveok.3 \ curses_tty.3 meta.3 curses_cursor.3 move.3 \ curses_addch.3 mvaddch.3 curses_addchstr.3 mvaddchnstr.3 \ curses_addchstr.3 mvaddchstr.3 curses_addstr.3 mvaddnstr.3 \ diff --git a/lib/libcurses/acs.c b/lib/libcurses/acs.c index 87e02db07..39815179d 100644 --- a/lib/libcurses/acs.c +++ b/lib/libcurses/acs.c @@ -1,4 +1,4 @@ -/* $NetBSD: acs.c,v 1.19 2010/02/25 10:56:24 drochner Exp $ */ +/* $NetBSD: acs.c,v 1.20 2012/04/21 12:27:27 roy Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: acs.c,v 1.19 2010/02/25 10:56:24 drochner Exp $"); +__RCSID("$NetBSD: acs.c,v 1.20 2012/04/21 12:27:27 roy Exp $"); #endif /* not lint */ #include "curses.h" @@ -49,7 +49,7 @@ cchar_t _wacs_char[ NUM_ACS ]; /* * __init_acs -- - * Fill in the ACS characters. The 'ac' termcap entry is a list of + * Fill in the ACS characters. The 'acs_chars' terminfo entry is a list of * character pairs - ACS definition then terminal representation. */ void @@ -138,7 +138,7 @@ _cursesi_reset_acs(SCREEN *screen) #ifdef HAVE_WCHAR /* * __init_wacs -- - * Fill in the ACS characters. The 'ac' termcap entry is a list of + * Fill in the ACS characters. The 'acs_chars' terminfo entry is a list of * character pairs - ACS definition then terminal representation. */ void diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c index 971772d22..d467f89c8 100644 --- a/lib/libcurses/addbytes.c +++ b/lib/libcurses/addbytes.c @@ -1,4 +1,4 @@ -/* $NetBSD: addbytes.c,v 1.38 2010/12/16 17:42:28 wiz Exp $ */ +/* $NetBSD: addbytes.c,v 1.39 2011/07/01 01:19:33 joerg Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: addbytes.c,v 1.38 2010/12/16 17:42:28 wiz Exp $"); +__RCSID("$NetBSD: addbytes.c,v 1.39 2011/07/01 01:19:33 joerg Exp $"); #endif #endif /* not lint */ diff --git a/lib/libcurses/addchnstr.c b/lib/libcurses/addchnstr.c index a293cbcfa..3c7e1a02f 100644 --- a/lib/libcurses/addchnstr.c +++ b/lib/libcurses/addchnstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: addchnstr.c,v 1.4 2008/04/28 20:23:01 martin Exp $ */ +/* $NetBSD: addchnstr.c,v 1.5 2012/09/28 06:00:39 blymn Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: addchnstr.c,v 1.4 2008/04/28 20:23:01 martin Exp $"); +__RCSID("$NetBSD: addchnstr.c,v 1.5 2012/09/28 06:00:39 blymn Exp $"); #endif /* not lint */ #include @@ -122,8 +122,11 @@ mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n) /* * waddchnstr -- * Add a string (at most n characters) to the given window - * starting at (_cury, _curx). If n is negative, add the - * entire string. + * starting at (_cury, _curx) until the end of line is reached or + * n characters have been added. If n is negative, add as much + * of the string that will fit on the current line. SUSv2 says + * that the addchnstr family does not wrap and strings are truncated + * to the RHS of the window. */ int waddchnstr(WINDOW *win, const chtype *chstr, int n) @@ -144,6 +147,10 @@ waddchnstr(WINDOW *win, const chtype *chstr, int n) else for (chp = chstr, len = 0; *chp++; ++len); + /* check if string is too long for current location */ + if (len > (win->maxx - win->curx)) + len = win->maxx - win->curx; + if ((ocp = malloc(len + 1)) == NULL) return ERR; chp = chstr; diff --git a/lib/libcurses/addnstr.c b/lib/libcurses/addnstr.c index 33c4c832d..b33229754 100644 --- a/lib/libcurses/addnstr.c +++ b/lib/libcurses/addnstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: addnstr.c,v 1.12 2007/05/28 15:01:54 blymn Exp $ */ +/* $NetBSD: addnstr.c,v 1.13 2012/09/28 06:07:05 blymn Exp $ */ /* * Copyright (c) 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)addnstr.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: addnstr.c,v 1.12 2007/05/28 15:01:54 blymn Exp $"); +__RCSID("$NetBSD: addnstr.c,v 1.13 2012/09/28 06:07:05 blymn Exp $"); #endif #endif /* not lint */ @@ -146,10 +146,17 @@ waddnstr(WINDOW *win, const char *s, int n) * BSD curses: if (n > 0) then "at most n", else "len = strlen(s)" * ncurses: if (n >= 0) then "at most n", else "len = strlen(s)" * XCURSES: if (n != -1) then "at most n", else "len = strlen(s)" + * + * Also SUSv2 says these functions do not wrap nor change the + * cursor position. */ if (n >= 0) for (p = s, len = 0; n-- && *p++; ++len); else len = strlen(s); - return (waddbytes(win, s, (int) len)); + + if (len > (win->maxx - win->curx)) + len = win->maxx - win->curx; + + return(waddbytes(win, s, (int) len)); } diff --git a/lib/libcurses/chgat.c b/lib/libcurses/chgat.c index 5a2c42baf..ce81033e2 100644 --- a/lib/libcurses/chgat.c +++ b/lib/libcurses/chgat.c @@ -1,4 +1,4 @@ -/* $NetBSD: chgat.c,v 1.4 2009/07/22 16:57:14 roy Exp $ */ +/* $NetBSD: chgat.c,v 1.5 2012/09/28 06:05:19 blymn Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: chgat.c,v 1.4 2009/07/22 16:57:14 roy Exp $"); +__RCSID("$NetBSD: chgat.c,v 1.5 2012/09/28 06:05:19 blymn Exp $"); #include "curses.h" #include "curses_private.h" @@ -71,6 +71,11 @@ mvwchgat(WINDOW *win , int y, int x, int count, attr_t attr, short color, if (count < 0 || count > win->maxx - x) count = win->maxx - x; +#ifdef DEBUG + __CTRACE(__CTRACE_ATTR, "mvwchgat: x: %d y: %d count: %d attr: 0x%x " + "color pair %d\n", x, y, count, (attr & ~__COLOR), + PAIR_NUMBER(color)); +#endif lp = win->alines[y]; lc = &lp->line[x]; diff --git a/lib/libcurses/clrtobot.c b/lib/libcurses/clrtobot.c index 4a2d659f4..3ffccc5ff 100644 --- a/lib/libcurses/clrtobot.c +++ b/lib/libcurses/clrtobot.c @@ -1,4 +1,4 @@ -/* $NetBSD: clrtobot.c,v 1.21 2009/07/22 16:57:14 roy Exp $ */ +/* $NetBSD: clrtobot.c,v 1.22 2012/02/19 19:38:13 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtobot.c,v 1.21 2009/07/22 16:57:14 roy Exp $"); +__RCSID("$NetBSD: clrtobot.c,v 1.22 2012/02/19 19:38:13 christos Exp $"); #endif #endif /* not lint */ @@ -77,8 +77,8 @@ wclrtobot(WINDOW *win) starty = win->cury; startx = win->curx; } - if (__using_color && win != curscr) - attr = win->battr & __COLOR; + if (win != curscr) + attr = win->battr & __ATTRIBUTES; else attr = 0; for (y = starty; y < win->maxy; y++) { @@ -89,12 +89,15 @@ wclrtobot(WINDOW *win) if (sp->ch != win->bch || sp->attr != attr) { #else if (sp->ch != (wchar_t)btowc((int) win->bch) || - (sp->attr & WA_ATTRIBUTES) != 0 || sp->nsp) { + (sp->attr & WA_ATTRIBUTES) != attr || sp->nsp) { #endif /* HAVE_WCHAR */ maxx = sp; if (minx == -1) minx = (int)(sp - win->alines[y]->line); - sp->attr = attr; + if (sp->attr & __ALTCHARSET) + sp->attr = attr | __ALTCHARSET; + else + sp->attr = attr; #ifdef HAVE_WCHAR sp->ch = ( wchar_t )btowc(( int ) win->bch); if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) diff --git a/lib/libcurses/clrtoeol.c b/lib/libcurses/clrtoeol.c index d7d2a57b9..7daccbfc1 100644 --- a/lib/libcurses/clrtoeol.c +++ b/lib/libcurses/clrtoeol.c @@ -1,4 +1,4 @@ -/* $NetBSD: clrtoeol.c,v 1.25 2009/07/22 16:57:14 roy Exp $ */ +/* $NetBSD: clrtoeol.c,v 1.26 2012/02/19 19:38:13 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtoeol.c,v 1.25 2009/07/22 16:57:14 roy Exp $"); +__RCSID("$NetBSD: clrtoeol.c,v 1.26 2012/02/19 19:38:13 christos Exp $"); #endif #endif /* not lint */ @@ -82,8 +82,8 @@ wclrtoeol(WINDOW *win) end = &win->alines[y]->line[win->maxx]; minx = -1; maxx = &win->alines[y]->line[x]; - if (__using_color && win != curscr) - attr = win->battr & __COLOR; + if (win != curscr) + attr = win->battr & __ATTRIBUTES; else attr = 0; for (sp = maxx; sp < end; sp++) @@ -97,7 +97,7 @@ wclrtoeol(WINDOW *win) maxx = sp; if (minx == -1) minx = (int) (sp - win->alines[y]->line); - sp->attr = attr; + sp->attr = attr | (sp->attr & __ALTCHARSET); #ifdef HAVE_WCHAR sp->ch = ( wchar_t )btowc(( int ) win->bch); if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) diff --git a/lib/libcurses/color.c b/lib/libcurses/color.c index 36bb6ae41..5f3976fdd 100644 --- a/lib/libcurses/color.c +++ b/lib/libcurses/color.c @@ -1,4 +1,4 @@ -/* $NetBSD: color.c,v 1.37 2011/01/06 11:29:40 blymn Exp $ */ +/* $NetBSD: color.c,v 1.38 2011/10/03 12:32:15 roy Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: color.c,v 1.37 2011/01/06 11:29:40 blymn Exp $"); +__RCSID("$NetBSD: color.c,v 1.38 2011/10/03 12:32:15 roy Exp $"); #endif /* not lint */ #include "curses.h" @@ -536,12 +536,12 @@ __set_color( /*ARGSUSED*/ WINDOW *win, attr_t attr) _cursesi_screen->colour_pairs[pair].back < 0) __unset_color(curscr); if (_cursesi_screen->colour_pairs[pair].fore >= 0) - tputs(vtparm(t_set_a_foreground(_cursesi_screen->term), - _cursesi_screen->colour_pairs[pair].fore), + tputs(tiparm(t_set_a_foreground(_cursesi_screen->term), + (int)_cursesi_screen->colour_pairs[pair].fore), 0, __cputchar); if (_cursesi_screen->colour_pairs[pair].back >= 0) - tputs(vtparm(t_set_a_background(_cursesi_screen->term), - _cursesi_screen->colour_pairs[pair].back), + tputs(tiparm(t_set_a_background(_cursesi_screen->term), + (int)_cursesi_screen->colour_pairs[pair].back), 0, __cputchar); break; case COLOR_HP: @@ -555,12 +555,12 @@ __set_color( /*ARGSUSED*/ WINDOW *win, attr_t attr) _cursesi_screen->colour_pairs[pair].back < 0) __unset_color(curscr); if (_cursesi_screen->colour_pairs[pair].fore >= 0) - tputs(vtparm(t_set_foreground(_cursesi_screen->term), - _cursesi_screen->colour_pairs[pair].fore), + tputs(tiparm(t_set_foreground(_cursesi_screen->term), + (int)_cursesi_screen->colour_pairs[pair].fore), 0, __cputchar); if (_cursesi_screen->colour_pairs[pair].back >= 0) - tputs(vtparm(t_set_background(_cursesi_screen->term), - _cursesi_screen->colour_pairs[pair].back), + tputs(tiparm(t_set_background(_cursesi_screen->term), + (int)_cursesi_screen->colour_pairs[pair].back), 0, __cputchar); break; } diff --git a/lib/libcurses/cr_put.c b/lib/libcurses/cr_put.c index 10de43832..3d7dc5e88 100644 --- a/lib/libcurses/cr_put.c +++ b/lib/libcurses/cr_put.c @@ -1,4 +1,4 @@ -/* $NetBSD: cr_put.c,v 1.30 2010/02/12 10:06:15 roy Exp $ */ +/* $NetBSD: cr_put.c,v 1.31 2011/10/03 12:32:15 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: cr_put.c,v 1.30 2010/02/12 10:06:15 roy Exp $"); +__RCSID("$NetBSD: cr_put.c,v 1.31 2011/10/03 12:32:15 roy Exp $"); #endif #endif /* not lint */ @@ -165,7 +165,7 @@ fgoto(in_refresh) destline = outline; if (cursor_address && - (cgp = t_vparm(NULL, cursor_address, destline, destcol))) + (cgp = tiparm(cursor_address, destline, destcol))) { /* * Need this condition due to inconsistent behavior diff --git a/lib/libcurses/curs_set.c b/lib/libcurses/curs_set.c index b59359f48..90688824b 100644 --- a/lib/libcurses/curs_set.c +++ b/lib/libcurses/curs_set.c @@ -1,4 +1,4 @@ -/* $NetBSD: curs_set.c,v 1.9 2010/02/03 15:34:40 roy Exp $ */ +/* $NetBSD: curs_set.c,v 1.10 2011/03/30 09:47:02 blymn Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: curs_set.c,v 1.9 2010/02/03 15:34:40 roy Exp $"); +__RCSID("$NetBSD: curs_set.c,v 1.10 2011/03/30 09:47:02 blymn Exp $"); #endif /* not lint */ #include "curses.h" @@ -59,6 +59,7 @@ curs_set(int visibility) #endif _cursesi_screen->old_mode = 0; tputs(cursor_invisible, 0, __cputchar); + fflush(_cursesi_screen->outfd); return old_one; } break; @@ -70,6 +71,7 @@ curs_set(int visibility) #endif _cursesi_screen->old_mode = 1; tputs(cursor_normal, 0, __cputchar); + fflush(_cursesi_screen->outfd); return old_one; } break; @@ -82,6 +84,7 @@ curs_set(int visibility) #endif _cursesi_screen->old_mode = 2; tputs(cursor_visible, 0, __cputchar); + fflush(_cursesi_screen->outfd); return old_one; } break; diff --git a/lib/libcurses/curses.3 b/lib/libcurses/curses.3 index eaad716a1..901552aad 100644 --- a/lib/libcurses/curses.3 +++ b/lib/libcurses/curses.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses.3,v 1.61 2010/12/09 13:26:27 njoly Exp $ +.\" $NetBSD: curses.3,v 1.63 2012/04/21 12:27:27 roy Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)curses.3 8.1 (Berkeley) 6/4/93 .\" -.Dd July 6, 2009 +.Dd April 5, 2012 .Dt CURSES 3 .Os .Sh NAME @@ -118,7 +118,6 @@ must be called before any of the other routines that deal with color are used. .It getbegx Ta Xr curses_cursor 3 .It getbegy Ta Xr curses_cursor 3 .It getbkgd Ta Xr curses_background 3 -.It getcap Ta Xr curses_termcap 3 .It getch Ta Xr curses_input 3 .It getcurx Ta Xr curses_cursor 3 .It getcury Ta Xr curses_cursor 3 @@ -158,7 +157,6 @@ must be called before any of the other routines that deal with color are used. .It keypad Ta Xr curses_input 3 .It killchar Ta Xr curses_tty 3 .It leaveok Ta Xr curses_tty 3 -.It longname Ta Xr curses_termcap 3 .It meta Ta Xr curses_tty 3 .It move Ta Xr curses_cursor 3 .It mvaddch Ta Xr curses_addch 3 @@ -321,7 +319,7 @@ The terminal type of the current terminal. .Xr ioctl 2 , .Xr getenv 3 , .Xr tty 4 , -.Xr termcap 5 +.Xr terminfo 5 .Rs .%T Screen Updating and Cursor Movement Optimization: A Library Package .%A Ken Arnold diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h index b7b607c0d..a3579377c 100644 --- a/lib/libcurses/curses.h +++ b/lib/libcurses/curses.h @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.101 2010/12/16 17:42:28 wiz Exp $ */ +/* $NetBSD: curses.h,v 1.104 2012/04/21 12:27:27 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -642,7 +642,6 @@ int flushok(WINDOW *, bool); char *fullname(const char *, char *); chtype getattrs(WINDOW *); chtype getbkgd(WINDOW *); -char *getcap(char *); int getcury(WINDOW *); int getcurx(WINDOW *); int getbegy(WINDOW *); @@ -672,7 +671,6 @@ int keypad(WINDOW *, bool); char *keyname(int); char killchar(void); int leaveok(WINDOW *, bool); -char *longname(void); int meta(WINDOW *, bool); int mvcur(int, int, int, int); int mvderwin(WINDOW *, int, int); @@ -735,10 +733,10 @@ int ungetch(int); int untouchwin(WINDOW *); int use_default_colors(void); int vline(chtype, int); -int vw_printw(WINDOW *, const char *, _BSD_VA_LIST_) __printflike(2, 0); -int vw_scanw(WINDOW *, const char *, _BSD_VA_LIST_) __scanflike(2, 0); -int vwprintw(WINDOW *, const char *, _BSD_VA_LIST_) __printflike(2, 0); -int vwscanw(WINDOW *, const char *, _BSD_VA_LIST_) __scanflike(2, 0); +int vw_printw(WINDOW *, const char *, __va_list) __printflike(2, 0); +int vw_scanw(WINDOW *, const char *, __va_list) __scanflike(2, 0); +int vwprintw(WINDOW *, const char *, __va_list) __printflike(2, 0); +int vwscanw(WINDOW *, const char *, __va_list) __scanflike(2, 0); int waddch(WINDOW *, chtype); int waddchnstr(WINDOW *, const chtype *, int); int waddchstr(WINDOW *, const chtype *); diff --git a/lib/libcurses/curses_chgat.3 b/lib/libcurses/curses_chgat.3 index 2143286e7..db726efc1 100644 --- a/lib/libcurses/curses_chgat.3 +++ b/lib/libcurses/curses_chgat.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_chgat.3,v 1.4 2009/07/12 23:14:06 wiz Exp $ +.\" $NetBSD: curses_chgat.3,v 1.5 2011/02/10 08:54:12 blymn Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -65,7 +65,7 @@ and the color pair to .Fa color . If .Fa n -is negative or larger than the reminder of the line, it gets truncated. +is negative or larger than the remainder of the line, it gets truncated. .Pp The .Fn wchgat diff --git a/lib/libcurses/curses_inch.3 b/lib/libcurses/curses_inch.3 index c6d16f3df..e66d558cb 100644 --- a/lib/libcurses/curses_inch.3 +++ b/lib/libcurses/curses_inch.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_inch.3,v 1.10 2004/04/21 06:24:32 jdc Exp $ +.\" $NetBSD: curses_inch.3,v 1.12 2011/08/07 11:37:06 wiz Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd April 18, 2004 +.Dd August 7, 2011 .Dt CURSES_INCH 3 .Os .Sh NAME @@ -219,6 +219,13 @@ and .Fn winstr is not recommended. .Sh RETURN VALUES +If the calls +.Fn innstr , +.Fn mvinnstr , +.Fn mvwinnstr , +and +.Fn winnstr +succeed then they will return the number of characters actually read. Functions returning pointers will return .Dv NULL if an error is detected. diff --git a/lib/libcurses/curses_input.3 b/lib/libcurses/curses_input.3 index 8eb76a1f3..d6ea58e79 100644 --- a/lib/libcurses/curses_input.3 +++ b/lib/libcurses/curses_input.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_input.3,v 1.21 2010/08/06 04:03:26 dholland Exp $ +.\" $NetBSD: curses_input.3,v 1.22 2012/04/21 12:27:28 roy Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd July 25, 2006 +.Dd April 5, 2012 .Dt CURSES_INPUT 3 .Os .Sh NAME @@ -161,7 +161,7 @@ be made by using the .Fn define_key function. Normally, these associations are made by the information in the -.Xr termcap 5 +.Xr terminfo 5 database but the .Fn define_key function gives the capability to remove or add more associations. @@ -177,7 +177,7 @@ It is valid to have multiple character sequences map to the same key symbol and there are no constraints on the length of the sequence allowed. The assembly of custom sequences follow the same rules for inter-character timing and so forth as the -.Xr termcap 5 +.Xr terminfo 5 derived ones. If .Fn define_key @@ -186,7 +186,7 @@ is passed a NULL in then all associations for the key symbol in .Fa key_symbol will be deleted, this includes any associations that were derived from -.Xr termcap 5 . +.Xr terminfo 5 . .Pp The .Fn mvgetch @@ -544,7 +544,7 @@ has been called on a window, then it may return one of the following values: .El .Pp Note that not all terminals are capable of generating all the keycodes -listed above nor are termcap entries normally configured with all the +listed above nor are terminfo entries normally configured with all the above capabilities defined. .Pp Other functions that return an int will return one of the following @@ -565,7 +565,7 @@ if an error is detected. .Xr curses_keyname 3 , .Xr curses_refresh 3 , .Xr curses_tty 3 , -.Xr termcap 5 +.Xr terminfo 5 .Sh STANDARDS The .Nx diff --git a/lib/libcurses/curses_print.3 b/lib/libcurses/curses_print.3 index cc5172d05..7047693e5 100644 --- a/lib/libcurses/curses_print.3 +++ b/lib/libcurses/curses_print.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_print.3,v 1.6 2003/04/16 13:35:01 wiz Exp $ +.\" $NetBSD: curses_print.3,v 1.7 2011/04/06 08:38:43 jruoho Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd August 12, 2002 +.Dd April 6, 2011 .Dt CURSES_PRINT 3 .Os .Sh NAME @@ -64,8 +64,9 @@ The .Fn printw function formats and prints its arguments on .Dv stdscr . -The behaviour is the same as that of -.Fn printf . +The behavior is deliberately similar to that of +.Xr printf 3 , +but, notably, the return value differs. .Pp The .Fn wprintw @@ -104,7 +105,7 @@ if an error is detected. The functions that return an int will return one of the following values: .Pp -.Bl -tag -width ERR -compact +.Bl -tag -width ERR -offset indent .It Er OK The function completed successfully. .It Er ERR diff --git a/lib/libcurses/curses_private.h b/lib/libcurses/curses_private.h index fcd19d46c..c47c020a4 100644 --- a/lib/libcurses/curses_private.h +++ b/lib/libcurses/curses_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: curses_private.h,v 1.46 2010/12/16 17:42:28 wiz Exp $ */ +/* $NetBSD: curses_private.h,v 1.47 2011/10/04 11:01:13 roy Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -239,7 +239,6 @@ struct __screen { unsigned int len; int meta_state; char padchar; - char ttytype[128]; int endwin; int notty; int half_delay; @@ -314,7 +313,6 @@ void __cursesi_putnsp(nschar_t *, const int, const int); void __cursesi_chtype_to_cchar(chtype, cchar_t *); #endif /* HAVE_WCHAR */ int __unget(wint_t); -char *__longname(char *, char *); /* Original BSD version */ int __mvcur(int, int, int, int, int); WINDOW *__newwin(SCREEN *, int, int, int, int, int); int __nodelay(void); diff --git a/lib/libcurses/curses_screen.3 b/lib/libcurses/curses_screen.3 index 50bb806b9..c8b91ebf3 100644 --- a/lib/libcurses/curses_screen.3 +++ b/lib/libcurses/curses_screen.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_screen.3,v 1.14 2007/10/25 20:42:07 jdc Exp $ +.\" $NetBSD: curses_screen.3,v 1.15 2012/04/21 12:27:28 roy Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd October 24, 2007 +.Dd April 5, 2012 .Dt CURSES_SCREEN 3 .Os .Sh NAME @@ -78,8 +78,8 @@ use by curses. The .Fa type argument points to a -.Xr termcap 5 -capability name, or it may be +.Xr terminfo 5 +entry, or it may be .Dv NULL in which case the TERM environment variable is used. The @@ -120,7 +120,7 @@ call which may be called prior to The size of the curses screen is determined by checking the .Xr tty 4 size and then the -.Xr termcap 5 +.Xr terminfo 5 entries for the terminal type. If the environment variables .Va LINES @@ -168,7 +168,7 @@ information related to the named terminal. The .Fa name argument must be a valid name or alias in the -.Xr termcap 5 +.Xr terminfo 5 database for this function to succeed. .Sh RETURN VALUES Functions returning pointers will return @@ -186,7 +186,7 @@ An error occurred in the function. .Sh SEE ALSO .Xr curses_window 3 , .Xr tty 4 , -.Xr termcap 5 , +.Xr terminfo 5 , .Xr signal 7 .Sh STANDARDS The diff --git a/lib/libcurses/curses_standout.3 b/lib/libcurses/curses_standout.3 index 269b9d409..d448c9cac 100644 --- a/lib/libcurses/curses_standout.3 +++ b/lib/libcurses/curses_standout.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_standout.3,v 1.4 2008/04/30 13:10:51 martin Exp $ +.\" $NetBSD: curses_standout.3,v 1.6 2012/05/02 04:23:09 agc Exp $ .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 13, 2002 +.Dd May 1, 2012 .Dt CURSES_STANDOUT 3 .Os .Sh NAME @@ -44,9 +44,13 @@ .Ft int .Fn standend void .Ft int -.Fn wstandout void +.Fo wstandout +.Fa "WINDOW *win" +.Fc .Ft int -.Fn wstandend void +.Fo wstandend +.Fa "WINDOW *win" +.Fc .Sh DESCRIPTION These functions manipulate the standout attribute on .Dv stdscr diff --git a/lib/libcurses/curses_termcap.3 b/lib/libcurses/curses_termcap.3 index a32f7e88a..19247b66d 100644 --- a/lib/libcurses/curses_termcap.3 +++ b/lib/libcurses/curses_termcap.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_termcap.3,v 1.4 2003/04/16 13:35:01 wiz Exp $ +.\" $NetBSD: curses_termcap.3,v 1.6 2012/04/21 12:27:28 roy Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,14 +30,12 @@ .\" SUCH DAMAGE. .\" .\" -.Dd August 12, 2002 +.Dd October 4, 2011 .Dt CURSES_TERMCAP 3 .Os .Sh NAME .Nm curses_termcap , -.Nm fullname , -.Nm getcap , -.Nm longname +.Nm fullname .Nd curses termcap querying routines .Sh LIBRARY .Lb libcurses @@ -45,10 +43,6 @@ .In curses.h .Ft char * .Fn fullname "char *termbuf" "char *name" -.Ft char * -.Fn getcap "char *name" -.Ft char * -.Fn longname "void" .Sh DESCRIPTION The .Fn fullname @@ -62,22 +56,6 @@ termcap entry name. It is assumed that the .Fa name variable has sufficient storage to hold the full name of the terminal. -.Pp -A termcap entry can be retrieved by calling the -.Fn getcap -function with the name of the capability in -.Fa name . -The matching capability string for the terminal is returned. -.Pp -The -.Fn longname -function returns a verbose description of the terminal which is taken -from the last name alias in the termcap description for the terminal. -This string will be at most 128 characters long and will only be -defined after a call to -.Fn initscr -or -.Fn newterm . .Sh RETURN VALUES Functions returning pointers will return .Dv NULL @@ -92,7 +70,7 @@ The function completed successfully. An error occurred in the function. .El .Sh SEE ALSO -.Xr termcap 5 +.Xr terminfo 5 .Sh STANDARDS The .Lb libcurses diff --git a/lib/libcurses/curses_window.3 b/lib/libcurses/curses_window.3 index cb1a30137..d2fe8b6d5 100644 --- a/lib/libcurses/curses_window.3 +++ b/lib/libcurses/curses_window.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_window.3,v 1.13 2009/05/18 09:30:31 wiz Exp $ +.\" $NetBSD: curses_window.3,v 1.15 2011/09/15 12:01:18 wiz Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd March 31, 2008 +.Dd September 15, 2011 .Dt CURSES_WINDOW 3 .Os .Sh NAME @@ -155,18 +155,28 @@ positions are the new origin of the window on the screen. If the new position would cause the any part of the window to lie outside the screen, it is an error and the window is not moved. .Pp -A subwindow can be moved relative to the parent window by calling the +A mapping of a region relative to the parent window may be created by +calling the .Fn mvderwin function, the .Fa y and .Fa x positions are relative to the origin of the parent window. +The screen offset of +.Fa win +is not updated, the characters beginning at +.Fa y , +.Fa x +for the area the size of +.Fa win +will be displayed at the screen offset of +.Fa win . If the given window in .Fa win is not a subwindow then an error will be returned. If the new position would cause the any part of the window to lie outside -the parent window, it is an error and the window is not moved. +the parent window, it is an error and the mapping is not updated. .Pp The .Fn newwin diff --git a/lib/libcurses/erase.c b/lib/libcurses/erase.c index 9b6983a86..85b0addf8 100644 --- a/lib/libcurses/erase.c +++ b/lib/libcurses/erase.c @@ -1,4 +1,4 @@ -/* $NetBSD: erase.c,v 1.24 2009/07/22 16:57:14 roy Exp $ */ +/* $NetBSD: erase.c,v 1.25 2011/07/10 12:11:49 blymn Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)erase.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: erase.c,v 1.24 2009/07/22 16:57:14 roy Exp $"); +__RCSID("$NetBSD: erase.c,v 1.25 2011/07/10 12:11:49 blymn Exp $"); #endif #endif /* not lint */ @@ -72,8 +72,8 @@ werase(WINDOW *win) #ifdef DEBUG __CTRACE(__CTRACE_ERASE, "werase: (%p)\n", win); #endif - if (__using_color && win != curscr) - attr = win->battr & __COLOR; + if (win != curscr) + attr = win->battr & __ATTRIBUTES; else attr = 0; for (y = 0; y < win->maxy; y++) { @@ -86,7 +86,10 @@ werase(WINDOW *win) if (sp->ch != ( wchar_t )btowc(( int ) win->bch ) || (sp->attr & WA_ATTRIBUTES) != 0 || sp->nsp) { #endif /* HAVE_WCHAR */ - sp->attr = attr; + if (sp->attr & __ALTCHARSET) + sp->attr = attr | __ALTCHARSET; + else + sp->attr = attr; #ifdef HAVE_WCHAR sp->ch = ( wchar_t )btowc(( int ) win->bch); if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) diff --git a/lib/libcurses/get_wch.c b/lib/libcurses/get_wch.c index 4430467d0..0e69334a4 100644 --- a/lib/libcurses/get_wch.c +++ b/lib/libcurses/get_wch.c @@ -1,4 +1,4 @@ -/* $NetBSD: get_wch.c,v 1.9 2010/12/16 17:42:28 wiz Exp $ */ +/* $NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation Inc. @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: get_wch.c,v 1.9 2010/12/16 17:42:28 wiz Exp $"); +__RCSID("$NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $"); #endif /* not lint */ #include @@ -67,7 +67,7 @@ void __init_get_wch(SCREEN *screen) { wstate = INKEY_NORM; - memset( &screen->cbuf, 0, MAX_CBUF_SIZE * sizeof( int )); + memset( &screen->cbuf, 0, sizeof(screen->cbuf)); screen->cbuf_head = screen->cbuf_tail = screen->cbuf_cur = 0; } #endif /* HAVE_WCHAR */ diff --git a/lib/libcurses/getch.c b/lib/libcurses/getch.c index 4c1163f89..025313908 100644 --- a/lib/libcurses/getch.c +++ b/lib/libcurses/getch.c @@ -1,4 +1,4 @@ -/* $NetBSD: getch.c,v 1.57 2010/12/07 22:02:52 joerg Exp $ */ +/* $NetBSD: getch.c,v 1.59 2012/04/21 12:27:28 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: getch.c,v 1.57 2010/12/07 22:02:52 joerg Exp $"); +__RCSID("$NetBSD: getch.c,v 1.59 2012/04/21 12:27:28 roy Exp $"); #endif #endif /* not lint */ @@ -365,14 +365,11 @@ delete_key_sequence(keymap_t *current, int key_type) _cursesi_free_keymap(key->value.next); } else if ((key->type == KEYMAP_LEAF) && (key->value.symbol == key_type)) { - /* - * delete the mapping by negating the current - * index - this "holds" the position in the - * allocation just in case we later re-add - * the key for that mapping. - */ - current->mapping[i] = - current->mapping[i]; - current->count--; +#ifdef DEBUG + __CTRACE(__CTRACE_INPUT, "delete_key_sequence: found keysym %d, deleting\n", + key_type); +#endif + key->enable = FALSE; } } } @@ -398,8 +395,8 @@ add_key_sequence(SCREEN *screen, char *sequence, int key_type) /* * OK - we really should never get a zero length string here, either - * the termcap entry is there and it has a value or we are not called - * at all. Unfortunately, if someone assigns a termcap string to the + * the terminfo entry is there and it has a value or we are not called + * at all. Unfortunately, if someone assigns a terminfo string to the * ^@ value we get passed a null string which messes up our length. * So, if we get a null string then just insert a leaf value in * the 0th char position of the root keymap. Note that we are @@ -474,7 +471,7 @@ __init_getch(SCREEN *screen) limit -= l; #ifdef DEBUG __CTRACE(__CTRACE_INIT, - "Processing termcap entry %d, sequence ", + "Processing terminfo entry %d, sequence ", tc[i].code); length = (int) strlen(entry); for (k = 0; k <= length -1; k++) @@ -783,9 +780,13 @@ define_key(char *sequence, int symbol) if (symbol <= 0) return ERR; - if (sequence == NULL) + if (sequence == NULL) { +#ifdef DEBUG + __CTRACE(__CTRACE_INPUT, "define_key: deleting keysym %d\n", + symbol); +#endif delete_key_sequence(_cursesi_screen->base_keymap, symbol); - else + } else add_key_sequence(_cursesi_screen, sequence, symbol); return OK; diff --git a/lib/libcurses/getstr.c b/lib/libcurses/getstr.c index 291238e20..e36f5ba3e 100644 --- a/lib/libcurses/getstr.c +++ b/lib/libcurses/getstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: getstr.c,v 1.20 2007/05/28 15:01:55 blymn Exp $ */ +/* $NetBSD: getstr.c,v 1.22 2012/01/27 15:37:09 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -35,10 +35,11 @@ #if 0 static char sccsid[] = "@(#)getstr.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: getstr.c,v 1.20 2007/05/28 15:01:55 blymn Exp $"); +__RCSID("$NetBSD: getstr.c,v 1.22 2012/01/27 15:37:09 christos Exp $"); #endif #endif /* not lint */ +#include #include "curses.h" #include "curses_private.h" @@ -161,12 +162,12 @@ int __wgetnstr(WINDOW *win, char *str, int n) { char *ostr, ec, kc; - int c, oldx, remain; + int c, xpos, oldx, remain; ostr = str; ec = erasechar(); kc = killchar(); - oldx = win->curx; + xpos = oldx = win->curx; _DIAGASSERT(n == -1 || n > 1); remain = n - 1; @@ -182,17 +183,23 @@ __wgetnstr(WINDOW *win, char *str, int n) *str = '\0'; if (str != ostr) { if ((char) c == ec) { - mvwaddch(win, win->cury, win->curx, - ' '); - wmove(win, win->cury, win->curx - 1); + mvwaddch(win, win->cury, xpos, ' '); + if (xpos > oldx) + mvwaddch(win, win->cury, + xpos - 1, ' '); + if (win->curx > xpos - 1) + wmove(win, win->cury, xpos - 1); + xpos--; } if (c == KEY_BACKSPACE || c == KEY_LEFT) { /* getch() displays the key sequence */ + mvwaddch(win, win->cury, win->curx, + ' '); mvwaddch(win, win->cury, win->curx - 1, ' '); - mvwaddch(win, win->cury, win->curx - 2, - ' '); - wmove(win, win->cury, win->curx - 1); + if (win->curx > xpos) + wmove(win, win->cury, xpos - 1); + xpos--; } str--; if (n != -1) { @@ -200,11 +207,12 @@ __wgetnstr(WINDOW *win, char *str, int n) remain++; } } else { /* str == ostr */ - if (c == KEY_BACKSPACE || c == KEY_LEFT) - /* getch() displays the other keys */ + /* getch() displays the other keys */ + if (win->curx > oldx) mvwaddch(win, win->cury, win->curx - 1, ' '); wmove(win, win->cury, oldx); + xpos = oldx; } } else if (c == kc) { *str = '\0'; @@ -229,16 +237,18 @@ __wgetnstr(WINDOW *win, char *str, int n) wmove(win, win->cury, oldx); } else if (c >= KEY_MIN && c <= KEY_MAX) { /* getch() displays these characters */ - mvwaddch(win, win->cury, win->curx - 1, ' '); - wmove(win, win->cury, win->curx - 1); + mvwaddch(win, win->cury, xpos, ' '); + wmove(win, win->cury, xpos); } else { if (remain) { + if (iscntrl((unsigned char)c)) + mvwaddch(win, win->cury, xpos, ' '); str++; + xpos++; remain--; - } else { - mvwaddch(win, win->cury, win->curx - 1, ' '); - wmove(win, win->cury, win->curx - 1); - } + } else + mvwaddch(win, win->cury, xpos, ' '); + wmove(win, win->cury, xpos); } } diff --git a/lib/libcurses/inchstr.c b/lib/libcurses/inchstr.c index 00318e509..c5893972d 100644 --- a/lib/libcurses/inchstr.c +++ b/lib/libcurses/inchstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: inchstr.c,v 1.3 2009/07/22 16:57:14 roy Exp $ */ +/* $NetBSD: inchstr.c,v 1.6 2012/04/21 11:33:16 blymn Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -23,21 +23,21 @@ * written permission. * * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC. BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC. BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #include #ifndef lint -__RCSID("$NetBSD: inchstr.c,v 1.3 2009/07/22 16:57:14 roy Exp $"); +__RCSID("$NetBSD: inchstr.c,v 1.6 2012/04/21 11:33:16 blymn Exp $"); #endif /* not lint */ #include "curses.h" @@ -144,7 +144,12 @@ winchnstr(WINDOW *win, chtype *chstr, int n) end = &win->alines[win->cury]->line[epos]; while (start <= end) { - *chstr = start->ch; + /* or in the attributes but strip out internal flags */ +#ifdef HAVE_WCHAR + *chstr = start->ch | (start->attr & ~__ACS_IS_WACS); +#else + *chstr = start->ch | start->attr; +#endif chstr++; start++; } diff --git a/lib/libcurses/instr.c b/lib/libcurses/instr.c index c470f5a42..d387e212d 100644 --- a/lib/libcurses/instr.c +++ b/lib/libcurses/instr.c @@ -1,4 +1,4 @@ -/* $NetBSD: instr.c,v 1.3 2009/07/22 16:57:15 roy Exp $ */ +/* $NetBSD: instr.c,v 1.4 2011/08/07 10:54:53 blymn Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: instr.c,v 1.3 2009/07/22 16:57:15 roy Exp $"); +__RCSID("$NetBSD: instr.c,v 1.4 2011/08/07 10:54:53 blymn Exp $"); #endif /* not lint */ #include "curses.h" @@ -137,11 +137,12 @@ int winnstr(WINDOW *win, char *str, int n) { __LDATA *end, *start; - int epos; + int epos, sn; if (str == NULL) return ERR; + sn = n; start = &win->alines[win->cury]->line[win->curx]; /* (n - 1) to leave room for the trailing NUL */ if (n < 0 || (n - 1) > win->maxx - win->curx - 1) { @@ -161,7 +162,7 @@ winnstr(WINDOW *win, char *str, int n) } *str = '\0'; - if (n < 0) + if (sn < 0) return OK; else return n; diff --git a/lib/libcurses/keymap.h b/lib/libcurses/keymap.h index 2940b49c4..9443d120e 100644 --- a/lib/libcurses/keymap.h +++ b/lib/libcurses/keymap.h @@ -1,4 +1,4 @@ -/* $NetBSD: keymap.h,v 1.3 2010/02/03 15:34:40 roy Exp $ */ +/* $NetBSD: keymap.h,v 1.4 2012/04/21 12:27:28 roy Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: keymap.h,v 1.3 2010/02/03 15:34:40 roy Exp $"); +__RCSID("$NetBSD: keymap.h,v 1.4 2012/04/21 12:27:28 roy Exp $"); #endif /* not lint */ /* keymap related stuff */ @@ -48,7 +48,7 @@ __RCSID("$NetBSD: keymap.h,v 1.3 2010/02/03 15:34:40 roy Exp $"); * because it is needed by both getch() and get_wch() * * Keyboard input handler. Do this by snarfing - * all the info we can out of the termcap entry for TERM and putting it + * all the info we can out of the terminfo entry for TERM and putting it * into a set of keymaps. A keymap is an array the size of all the possible * single characters we can get, the contents of the array is a structure * that contains the type of entry this character is (i.e. part/end of a @@ -107,7 +107,7 @@ struct keymap { #define INKEY_WCASSEMBLING 4 /* assembling a wide char sequence */ #endif /* HAVE_WCHAR */ -/* The termcap data we are interested in and the symbols they map to */ +/* The terminfo data we are interested in and the symbols they map to */ struct tcdata { int code; /* code of the terminfo entry */ wchar_t symbol; /* the symbol associated with it */ diff --git a/lib/libcurses/longname.c b/lib/libcurses/longname.c deleted file mode 100644 index 64adbd81f..000000000 --- a/lib/libcurses/longname.c +++ /dev/null @@ -1,88 +0,0 @@ -/* $NetBSD: longname.c,v 1.16 2004/01/20 08:29:29 wiz Exp $ */ - -/* - * Copyright (c) 1981, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#ifndef lint -#if 0 -static char sccsid[] = "@(#)longname.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: longname.c,v 1.16 2004/01/20 08:29:29 wiz Exp $"); -#endif -#endif /* not lint */ - -#include "curses.h" -#include "curses_private.h" - -/* - * __longname -- - * Fill in "def" with the long name of the terminal. - * This is the original BSD version of longname(), modified to return - * at most 128 characters. - */ -char * -__longname(char *bp, char *def) -{ - char *cp, *last_bp; - int i = 0; - - last_bp = NULL; - do { - while (*bp && *bp != ':' && *bp != '|') - bp++; - if (*bp == '|') { - last_bp = bp; - bp++; - } - } while (*bp && *bp != ':'); - - if (last_bp != NULL) - bp = last_bp; - - if (*bp == '|') { - for (cp = def, ++bp; *bp && *bp != ':' && *bp != '|' && - i < 127;) - *cp++ = *bp++; - i++; - *cp = '\0'; - } - return (def); -} - -/* - * longname -- - * Return pointer to the long name of the terminal. - * This is the SUS version of longname() - */ -char * -longname(void) -{ - return (_cursesi_screen->ttytype); -} diff --git a/lib/libcurses/meta.c b/lib/libcurses/meta.c index 917c549b6..36e10bb38 100644 --- a/lib/libcurses/meta.c +++ b/lib/libcurses/meta.c @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.7 2010/02/03 15:34:40 roy Exp $ */ +/* $NetBSD: meta.c,v 1.8 2011/08/07 10:52:18 blymn Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: meta.c,v 1.7 2010/02/03 15:34:40 roy Exp $"); +__RCSID("$NetBSD: meta.c,v 1.8 2011/08/07 10:52:18 blymn Exp $"); #endif /* not lint */ #include "curses.h" @@ -51,6 +51,7 @@ meta(/*ARGSUSED*/ WINDOW *win, bool bf) #endif tputs(meta_on, 0, __cputchar); _cursesi_screen->meta_state = TRUE; + fflush(_cursesi_screen->outfd); } } else { if (meta_off != NULL) { @@ -59,6 +60,7 @@ meta(/*ARGSUSED*/ WINDOW *win, bool bf) #endif tputs(meta_off, 0, __cputchar); _cursesi_screen->meta_state = FALSE; + fflush(_cursesi_screen->outfd); } } diff --git a/lib/libcurses/mvwin.c b/lib/libcurses/mvwin.c index ddc9ff089..f7c2eaddd 100644 --- a/lib/libcurses/mvwin.c +++ b/lib/libcurses/mvwin.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvwin.c,v 1.15 2003/08/07 16:44:22 agc Exp $ */ +/* $NetBSD: mvwin.c,v 1.17 2012/09/28 06:03:45 blymn Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)mvwin.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: mvwin.c,v 1.15 2003/08/07 16:44:22 agc Exp $"); +__RCSID("$NetBSD: mvwin.c,v 1.17 2012/09/28 06:03:45 blymn Exp $"); #endif #endif /* not lint */ @@ -43,14 +43,22 @@ __RCSID("$NetBSD: mvwin.c,v 1.15 2003/08/07 16:44:22 agc Exp $"); /* * mvderwin -- - * Move a derived window. + * Move a derived window. This does not change the physical screen + * coordinates of the subwin, rather maps the characters in the subwin + * sized part of the parent window starting at dy, dx into the subwin. * */ int mvderwin(WINDOW *win, int dy, int dx) { WINDOW *parent; - int x, y; + int x, y, i; + __LINE *lp, *olp; +#ifdef HAVE_WCHAR + __LDATA *cp; + int j; + nschar_t *np; +#endif /* HAVE_WCHAR */ if (win == NULL) return ERR; @@ -60,9 +68,47 @@ mvderwin(WINDOW *win, int dy, int dx) if (parent == NULL) return ERR; + if (((win->maxx + dx) > parent->maxx) || + ((win->maxy + dy) > parent->maxy)) + return ERR; + x = parent->begx + dx; y = parent->begy + dy; - return mvwin(win, y, x); + + win->ch_off = x; + /* Point the line pointers to line space */ + for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++) { + lp->flags = __ISDIRTY; + win->alines[i] = lp; + olp = parent->alines[i + dy]; +#ifdef DEBUG + lp->sentinel = SENTINEL_VALUE; +#endif + lp->line = &olp->line[win->ch_off]; + lp->firstchp = &olp->firstch; + lp->lastchp = &olp->lastch; +#ifndef HAVE_WCHAR + lp->hash = __hash((char *)(void *)lp->line, + (size_t) (win->maxx * __LDATASIZE)); +#else + for (cp = lp->line, j = 0; j < win->maxx; j++, cp++) { + lp->hash = __hash_more(&cp->ch, sizeof(wchar_t), + lp->hash); + lp->hash = __hash_more(&cp->attr, sizeof(wchar_t), + lp->hash); + if (cp->nsp) { + np = cp->nsp; + while (np) { + lp->hash = __hash_more(&np->ch, + sizeof(wchar_t), lp->hash); + np = np->next; + } + } + } +#endif /* HAVE_WCHAR */ + } + + return OK; } /* diff --git a/lib/libcurses/printw.c b/lib/libcurses/printw.c index 625a7a4f3..df5e8317f 100644 --- a/lib/libcurses/printw.c +++ b/lib/libcurses/printw.c @@ -1,4 +1,4 @@ -/* $NetBSD: printw.c,v 1.21 2009/07/07 10:16:52 joerg Exp $ */ +/* $NetBSD: printw.c,v 1.22 2011/07/17 20:54:34 joerg Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: printw.c,v 1.21 2009/07/07 10:16:52 joerg Exp $"); +__RCSID("$NetBSD: printw.c,v 1.22 2011/07/17 20:54:34 joerg Exp $"); #endif #endif /* not lint */ @@ -139,7 +139,7 @@ __winwrite(cookie, buf, n) * This routine actually executes the printf and adds it to the window. */ int -vw_printw(WINDOW *win, const char *fmt, _BSD_VA_LIST_ ap) +vw_printw(WINDOW *win, const char *fmt, va_list ap) { FILE *f; diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c index 5264bd3bd..fd7a9c42d 100644 --- a/lib/libcurses/refresh.c +++ b/lib/libcurses/refresh.c @@ -1,4 +1,4 @@ -/* $NetBSD: refresh.c,v 1.73 2010/02/08 20:45:22 roy Exp $ */ +/* $NetBSD: refresh.c,v 1.76 2012/04/21 11:33:16 blymn Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; #else -__RCSID("$NetBSD: refresh.c,v 1.73 2010/02/08 20:45:22 roy Exp $"); +__RCSID("$NetBSD: refresh.c,v 1.76 2012/04/21 11:33:16 blymn Exp $"); #endif #endif /* not lint */ @@ -174,7 +174,7 @@ _cursesi_wnoutrefresh(SCREEN *screen, WINDOW *win, int begy, int begx, orig, sub_win); #endif for (sy = 0; sy < sub_win->maxy; sy++) { - if (sub_win->alines[sy]->flags == __ISDIRTY) { + if (sub_win->alines[sy]->flags & __ISDIRTY) { orig->alines[sy + sub_win->begy - orig->begy]->flags |= __ISDIRTY; sub_win->alines[sy]->flags @@ -849,8 +849,19 @@ makech(int wy) #ifdef DEBUG __CTRACE(__CTRACE_REFRESH, "makech: have attr %08x, need attr %08x\n", - curscr->wattr & WA_ATTRIBUTES, - nsp->attr & WA_ATTRIBUTES); + curscr->wattr +#ifndef HAVE_WCHAR + & __ATTRIBUTES +#else + & WA_ATTRIBUTES +#endif + , nsp->attr +#ifndef HAVE_WCHAR + & __ATTRIBUTES +#else + & WA_ATTRIBUTES +#endif + ); #endif off = (~nsp->attr & curscr->wattr) @@ -1573,18 +1584,18 @@ scrolln(starts, startw, curs, bot, top) top > 3 || bot + 3 < __virtscr->maxy) && scroll_forward != NULL))) { - tputs(vtparm(change_scroll_region, top, bot), + tputs(tiparm(change_scroll_region, top, bot), 0, __cputchar); __mvcur(oy, ox, 0, 0, 1); tputs(cursor_home, 0, __cputchar); __mvcur(0, 0, bot, 0, 1); if (parm_index != NULL) - tputs(vtparm(parm_index, n), + tputs(tiparm(parm_index, n), 0, __cputchar); else for (i = 0; i < n; i++) tputs(scroll_forward, 0, __cputchar); - tputs(vtparm(change_scroll_region, + tputs(tiparm(change_scroll_region, 0, (int) __virtscr->maxy - 1), 0, __cputchar); __mvcur(bot, 0, 0, 0, 1); tputs(cursor_home, 0, __cputchar); @@ -1595,11 +1606,11 @@ scrolln(starts, startw, curs, bot, top) /* Scroll up the block. */ if (parm_index != NULL && top == 0) { __mvcur(oy, ox, bot, 0, 1); - tputs(vtparm(parm_index, n), 0, __cputchar); + tputs(tiparm(parm_index, n), 0, __cputchar); } else if (parm_delete_line != NULL) { __mvcur(oy, ox, top, 0, 1); - tputs(vtparm(parm_delete_line, n), + tputs(tiparm(parm_delete_line, n), 0, __cputchar); } else if (delete_line != NULL) { @@ -1619,7 +1630,7 @@ scrolln(starts, startw, curs, bot, top) /* Push down the bottom region. */ __mvcur(top, 0, bot - n + 1, 0, 1); if (parm_insert_line != NULL) - tputs(vtparm(parm_insert_line, n), 0, __cputchar); + tputs(tiparm(parm_insert_line, n), 0, __cputchar); else if (insert_line != NULL) for (i = 0; i < n; i++) @@ -1641,19 +1652,19 @@ scrolln(starts, startw, curs, bot, top) top > 3 || bot + 3 < __virtscr->maxy) && scroll_reverse != NULL))) { - tputs(vtparm(change_scroll_region, top, bot), + tputs(tiparm(change_scroll_region, top, bot), 0, __cputchar); __mvcur(oy, ox, 0, 0, 1); tputs(cursor_home, 0, __cputchar); __mvcur(0, 0, top, 0, 1); if (parm_rindex != NULL) - tputs(vtparm(parm_rindex, -n), + tputs(tiparm(parm_rindex, -n), 0, __cputchar); else for (i = n; i < 0; i++) tputs(scroll_reverse, 0, __cputchar); - tputs(vtparm(change_scroll_region, + tputs(tiparm(change_scroll_region, 0, (int) __virtscr->maxy - 1), 0, __cputchar); __mvcur(top, 0, 0, 0, 1); tputs(cursor_home, 0, __cputchar); @@ -1664,10 +1675,10 @@ scrolln(starts, startw, curs, bot, top) /* Preserve the bottom lines. */ __mvcur(oy, ox, bot + n + 1, 0, 1); if (parm_rindex != NULL && bot == __virtscr->maxy) - tputs(vtparm(parm_rindex, -n), 0, __cputchar); + tputs(tiparm(parm_rindex, -n), 0, __cputchar); else if (parm_delete_line != NULL) - tputs(vtparm(parm_delete_line, -n), + tputs(tiparm(parm_delete_line, -n), 0, __cputchar); else if (delete_line != NULL) @@ -1686,7 +1697,7 @@ scrolln(starts, startw, curs, bot, top) /* Scroll the block down. */ __mvcur(bot + n + 1, 0, top, 0, 1); if (parm_insert_line != NULL) - tputs(vtparm(parm_insert_line, -n), 0, __cputchar); + tputs(tiparm(parm_insert_line, -n), 0, __cputchar); else if (insert_line != NULL) for (i = n; i < 0; i++) diff --git a/lib/libcurses/scanw.c b/lib/libcurses/scanw.c index deeb47365..bbcf8f127 100644 --- a/lib/libcurses/scanw.c +++ b/lib/libcurses/scanw.c @@ -1,4 +1,4 @@ -/* $NetBSD: scanw.c,v 1.20 2009/07/07 10:16:52 joerg Exp $ */ +/* $NetBSD: scanw.c,v 1.21 2011/07/17 20:54:34 joerg Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)scanw.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: scanw.c,v 1.20 2009/07/07 10:16:52 joerg Exp $"); +__RCSID("$NetBSD: scanw.c,v 1.21 2011/07/17 20:54:34 joerg Exp $"); #endif #endif /* not lint */ @@ -113,7 +113,7 @@ mvwscanw(WINDOW * win, int y, int x, const char *fmt,...) * This routine actually executes the scanf from the window. */ int -vw_scanw(WINDOW *win, const char *fmt, _BSD_VA_LIST_ ap) +vw_scanw(WINDOW *win, const char *fmt, va_list ap) { char buf[1024]; diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c index 832fe6749..be900d8c4 100644 --- a/lib/libcurses/setterm.c +++ b/lib/libcurses/setterm.c @@ -1,4 +1,4 @@ -/* $NetBSD: setterm.c,v 1.47 2010/02/11 11:45:47 roy Exp $ */ +/* $NetBSD: setterm.c,v 1.49 2012/04/21 12:27:28 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94"; #else -__RCSID("$NetBSD: setterm.c,v 1.47 2010/02/11 11:45:47 roy Exp $"); +__RCSID("$NetBSD: setterm.c,v 1.49 2012/04/21 12:27:28 roy Exp $"); #endif #endif /* not lint */ @@ -82,7 +82,7 @@ _cursesi_setterm(char *type, SCREEN *screen) __CTRACE(__CTRACE_INIT, "setterm: tty = %s\n", type); #endif - /* Try TIOCGWINSZ, and, if it fails, the termcap entry. */ + /* Try TIOCGWINSZ, and, if it fails, the terminfo entry. */ if (ioctl(fileno(screen->outfd), TIOCGWINSZ, &win) != -1 && win.ws_row != 0 && win.ws_col != 0) { screen->LINES = win.ws_row; @@ -127,17 +127,6 @@ _cursesi_setterm(char *type, SCREEN *screen) screen->padchar = t_pad_char(screen->term) ? t_pad_char(screen->term)[0] : 0; - /* Get full name of terminal */ - if (unknown) { - strcpy(screen->ttytype, "dumb"); - return ERR; - } - if (screen->term->desc == NULL) - screen->ttytype[0] = '\0'; - else - strlcpy(screen->ttytype, screen->term->desc, - sizeof(screen->ttytype)); - /* If no scrolling commands, no quick change. */ screen->noqch = (t_change_scroll_region(screen->term) == NULL || diff --git a/lib/libcurses/shlib_version b/lib/libcurses/shlib_version index 97c9f92d6..f4709208e 100644 --- a/lib/libcurses/shlib_version +++ b/lib/libcurses/shlib_version @@ -1,2 +1,8 @@ +# $NetBSD: shlib_version,v 1.40 2009/01/11 03:07:47 christos Exp $ +# Remember to update distrib/sets/lists/base/shl.* when changing +# Remember to run `make fileio.h` when changing +# Remember to increment the major numbers of both libform and libmenu +# when the libcurses major number increments. +# major=0 minor=0 diff --git a/lib/libcurses/tstp.c b/lib/libcurses/tstp.c index 51d03225f..0f0106265 100644 --- a/lib/libcurses/tstp.c +++ b/lib/libcurses/tstp.c @@ -1,4 +1,4 @@ -/* $NetBSD: tstp.c,v 1.38 2010/02/03 15:34:40 roy Exp $ */ +/* $NetBSD: tstp.c,v 1.39 2011/08/29 11:07:38 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,14 +34,10 @@ #if 0 static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: tstp.c,v 1.38 2010/02/03 15:34:40 roy Exp $"); +__RCSID("$NetBSD: tstp.c,v 1.39 2011/08/29 11:07:38 christos Exp $"); #endif #endif /* not lint */ -#ifndef TCSASOFT -#define TCSASOFT 0 -#endif - #include #include @@ -59,6 +55,9 @@ static void (*otstpfn) __P((int)) = SIG_DFL; static struct sigaction owsa; +#ifndef TCSASOFT +#define TCSASOFT 0 +#endif /* * stop_signal_handler -- @@ -247,9 +246,8 @@ __stopwin(void) _cursesi_screen->endwin = 1; - return (tcsetattr(fileno(_cursesi_screen->infd), - __tcaction ? TCSASOFT | TCSADRAIN : TCSADRAIN, - &_cursesi_screen->orig_termios) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + &_cursesi_screen->orig_termios) ? ERR : OK; } @@ -303,9 +301,8 @@ __restartwin(void) &_cursesi_screen->orig_termios); /* Reset the terminal state to the mode just before we stopped. */ - (void) tcsetattr(fileno(_cursesi_screen->infd), - __tcaction ? TCSASOFT | TCSADRAIN : TCSADRAIN, - &_cursesi_screen->save_termios); + (void) tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + &_cursesi_screen->save_termios); /* Restore colours */ __restore_colors(); @@ -329,28 +326,27 @@ def_prog_mode(void) if (_cursesi_screen->endwin) return ERR; - return (tcgetattr(fileno(_cursesi_screen->infd), - &_cursesi_screen->save_termios) ? ERR : OK); + return tcgetattr(fileno(_cursesi_screen->infd), + &_cursesi_screen->save_termios) ? ERR : OK; } int reset_prog_mode(void) { - return tcsetattr(fileno(_cursesi_screen->infd), - __tcaction ? TCSASOFT | TCSADRAIN : TCSADRAIN, - &_cursesi_screen->save_termios) ? ERR : OK; + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + &_cursesi_screen->save_termios) ? ERR : OK; } int def_shell_mode(void) { - return (tcgetattr(fileno(_cursesi_screen->infd), - &_cursesi_screen->orig_termios) ? ERR : OK); + return tcgetattr(fileno(_cursesi_screen->infd), + &_cursesi_screen->orig_termios) ? ERR : OK; } int reset_shell_mode(void) { - return (__stopwin()); + return __stopwin(); } diff --git a/lib/libcurses/tty.c b/lib/libcurses/tty.c index 3f98b984f..20ca42184 100644 --- a/lib/libcurses/tty.c +++ b/lib/libcurses/tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.42 2010/02/03 15:34:40 roy Exp $ */ +/* $NetBSD: tty.c,v 1.43 2011/08/29 11:07:38 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95"; #else -__RCSID("$NetBSD: tty.c,v 1.42 2010/02/03 15:34:40 roy Exp $"); +__RCSID("$NetBSD: tty.c,v 1.43 2011/08/29 11:07:38 christos Exp $"); #endif #endif /* not lint */ @@ -56,13 +56,12 @@ __RCSID("$NetBSD: tty.c,v 1.42 2010/02/03 15:34:40 roy Exp $"); * those attributes at each change, or at least when stopped and restarted. * See also the comments in getterm(). */ -#ifdef TCSASOFT -int __tcaction = 1; /* Ignore hardware settings. */ -#else -#define TCSASOFT 0 -int __tcaction = 0; +#ifndef TCSASOFT +#define TCSASOFT 0 #endif +int __tcaction = TCSASOFT != 0; /* Ignore hardware settings */ + #ifndef OXTABS #ifdef XTABS /* SMI uses XTABS. */ #define OXTABS XTABS @@ -116,7 +115,7 @@ _cursesi_gettmode(SCREEN *screen) screen->notty = TRUE; __GT = 0; __NONL = 0; - return (OK); + return OK; } } @@ -144,6 +143,7 @@ _cursesi_gettmode(SCREEN *screen) screen->rawt.c_oflag &= ~OPOST; screen->rawt.c_lflag &= ~(ISIG | IEXTEN); +#if TCSASOFT == 0 /* * In general, curses should leave hardware-related settings alone. * This includes parity and word size. Older versions set the tty @@ -152,15 +152,14 @@ _cursesi_gettmode(SCREEN *screen) * parity and word size, the TCSASOFT bit has to be removed from the * calls that switch to/from "raw" mode. */ - if (!__tcaction) { - screen->rawt.c_iflag &= ~ISTRIP; - screen->rawt.c_cflag &= ~(CSIZE | PARENB); - screen->rawt.c_cflag |= CS8; - } + screen->rawt.c_iflag &= ~ISTRIP; + screen->rawt.c_cflag &= ~(CSIZE | PARENB); + screen->rawt.c_cflag |= CS8; +#endif screen->curt = &screen->baset; - return (tcsetattr(fileno(screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, screen->curt) ? ERR : OK); + return tcsetattr(fileno(screen->infd), TCSASOFT | TCSADRAIN, + screen->curt) ? ERR : OK; } /* @@ -181,9 +180,8 @@ raw(void) _cursesi_screen->curt = &_cursesi_screen->rawt; if (_cursesi_screen->notty == TRUE) return OK; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } /* @@ -204,9 +202,8 @@ noraw(void) if (_cursesi_screen->notty == TRUE) return OK; _cursesi_screen->curt = &_cursesi_screen->baset; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } /* @@ -228,9 +225,8 @@ cbreak(void) return OK; _cursesi_screen->curt = _cursesi_screen->useraw ? &_cursesi_screen->rawt : &_cursesi_screen->cbreakt; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } /* @@ -258,9 +254,8 @@ nocbreak(void) _cursesi_screen->half_delay = FALSE; _cursesi_screen->curt = _cursesi_screen->useraw ? &_cursesi_screen->rawt : &_cursesi_screen->baset; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } /* @@ -303,8 +298,8 @@ __delay(void) _cursesi_screen->baset.c_cc[VMIN] = 1; _cursesi_screen->baset.c_cc[VTIME] = 0; - if (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT : TCSANOW, _cursesi_screen->curt)) { + if (tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSANOW, + _cursesi_screen->curt)) { __restore_termios(); return ERR; } @@ -331,8 +326,8 @@ __nodelay(void) _cursesi_screen->baset.c_cc[VMIN] = 0; _cursesi_screen->baset.c_cc[VTIME] = 0; - if (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT : TCSANOW, _cursesi_screen->curt)) { + if (tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSANOW, + _cursesi_screen->curt)) { __restore_termios(); return ERR; } @@ -391,9 +386,8 @@ __timeout(int delay) _cursesi_screen->baset.c_cc[VMIN] = 0; _cursesi_screen->baset.c_cc[VTIME] = delay; - if (tcsetattr(fileno(_cursesi_screen->infd), - __tcaction ? TCSASOFT | TCSANOW : TCSANOW, - _cursesi_screen->curt)) { + if (tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSANOW, + _cursesi_screen->curt)) { __restore_termios(); return ERR; } @@ -420,9 +414,8 @@ __notimeout(void) _cursesi_screen->baset.c_cc[VMIN] = 1; _cursesi_screen->baset.c_cc[VTIME] = 0; - return (tcsetattr(fileno(_cursesi_screen->infd), - __tcaction ? TCSASOFT | TCSANOW : TCSANOW, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSANOW, + _cursesi_screen->curt) ? ERR : OK; } int @@ -436,7 +429,7 @@ echo(void) __restartwin(); __echoit = 1; - return (OK); + return OK; } int @@ -450,7 +443,7 @@ noecho(void) __restartwin(); __echoit = 0; - return (OK); + return OK; } int @@ -474,9 +467,8 @@ nl(void) _cursesi_screen->nl = 1; _cursesi_screen->pfast = _cursesi_screen->rawmode; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } int @@ -500,9 +492,8 @@ nonl(void) _cursesi_screen->nl = 0; __pfast = 1; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } #ifndef _CURSES_USE_MACROS @@ -539,9 +530,8 @@ intrflush(WINDOW *win, bool bf) /*ARGSUSED*/ } __pfast = 1; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - _cursesi_screen->curt) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + _cursesi_screen->curt) ? ERR : OK; } void @@ -588,14 +578,14 @@ endwin(void) bool isendwin(void) { - return (_cursesi_screen->endwin ? TRUE : FALSE); + return _cursesi_screen->endwin ? TRUE : FALSE; } int flushinp(void) { (void) fpurge(_cursesi_screen->infd); - return (OK); + return OK; } /* @@ -609,8 +599,8 @@ savetty(void) { if (_cursesi_screen->notty == TRUE) return OK; - return (tcgetattr(fileno(_cursesi_screen->infd), - &_cursesi_screen->savedtty) ? ERR : OK); + return tcgetattr(fileno(_cursesi_screen->infd), + &_cursesi_screen->savedtty) ? ERR : OK; } int @@ -618,9 +608,8 @@ resetty(void) { if (_cursesi_screen->notty == TRUE) return OK; - return (tcsetattr(fileno(_cursesi_screen->infd), __tcaction ? - TCSASOFT | TCSADRAIN : TCSADRAIN, - &_cursesi_screen->savedtty) ? ERR : OK); + return tcsetattr(fileno(_cursesi_screen->infd), TCSASOFT | TCSADRAIN, + &_cursesi_screen->savedtty) ? ERR : OK; } /* diff --git a/lib/libterminfo/Makefile b/lib/libterminfo/Makefile index cae747506..f1697f96c 100644 --- a/lib/libterminfo/Makefile +++ b/lib/libterminfo/Makefile @@ -1,14 +1,15 @@ -# $NetBSD: Makefile,v 1.12 2010/07/06 05:59:53 mrg Exp $ +# $NetBSD: Makefile,v 1.22 2012/03/21 05:37:44 matt Exp $ + +.include .if defined(__MINIX) -.include "minix-config.inc" +CPPFLAGS+= -D_NETBSD_SOURCE +MKLINKLIB= yes .endif USE_SHLIBDIR= yes -# LSC MINIX UNtil the library is fixed.. -NOGCCERROR=yes LIB= terminfo -WARNS= 4 +WARNS?= 5 CPPFLAGS+= -I${.CURDIR} @@ -17,15 +18,18 @@ SRCS+= compile.c hash.c INCS= term.h INCSDIR= /usr/include +COPTS.tparm.c = -Wno-format-nonliteral + MAN= terminfo.3 terminfo.5 MLINKS= terminfo.3 setupterm.3 \ terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \ + terminfo.3 termname.3 terminfo.3 longname.3 \ terminfo.3 tigetnum.3 terminfo.3 tigetflag.3 \ terminfo.3 tigetstr.3 terminfo.3 tparm.3 terminfo.3 tputs.3 \ terminfo.3 putp.3 \ terminfo.3 ti_setupterm.3 terminfo.3 ti_getflag.3 \ terminfo.3 ti_getnum.3 terminfo.3 ti_getstr.3 \ - terminfo.3 t_parm.3 terminfo.3 t_vparm.3 \ + terminfo.3 tiparm.3 terminfo.3 ti_tiparm.3 \ terminfo.3 ti_puts.3 terminfo.3 ti_putp.3 # Build in termcap emulation @@ -35,30 +39,19 @@ MAN+= termcap.3 MLINKS+= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \ termcap.3 tgetstr.3 termcap.3 tgoto.3 -# Generate our string and hash tables -hash: - @echo "Generating terminfo hash" - cd ${.CURDIR} && ${HOST_SH} ./genhash >hash.c - @echo "Generating termcap hash" - cd ${.CURDIR} && ${HOST_SH} ./genthash >termcap_hash.c +CPPFLAGS+= -I${.OBJDIR} + +.include # Generate our man pages -terminfo.5: terminfo.5.in term.h termcap_map.c +terminfo.5: genman terminfo.5.in term.h termcap_map.c @echo "Generating terminfo man pages" - cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@ + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET} CLEANFILES+= terminfo.5 -# Allow terminfo descriptions to be compiled into libterminfo -compiled_terms: - @echo "Generating compiled terminfo descriptions" - cd ${.CURDIR} && ${HOST_SH} ./genterms >compiled_terms.c - man: terminfo.5 -gen: hash compiled_terms man - -.include .include .if ${MKLINKLIB} != "no" diff --git a/lib/libterminfo/Makefile.hash b/lib/libterminfo/Makefile.hash new file mode 100644 index 000000000..c8887df4b --- /dev/null +++ b/lib/libterminfo/Makefile.hash @@ -0,0 +1,32 @@ +# $NetBSD: Makefile.hash,v 1.6 2012/08/20 15:44:02 joerg Exp $ + +SCRIPT_ENV= \ + TOOL_AWK=${TOOL_AWK:Q} \ + TOOL_NBPERF=${TOOL_NBPERF:Q} \ + TOOL_SED=${TOOL_SED:Q} \ + TOOL_SORT=${TOOL_SORT:Q} \ + TOOL_TIC=${TOOL_TIC:Q} \ + TERMINFO=${NETBSDSRCDIR}/share/terminfo/terminfo + +PARSEDIR:=${.PARSEDIR} +# Generate our string and hash tables +hash.c: genhash term.h + @echo "Generating terminfo hash" + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET} + +termcap_hash.c: genthash termcap_map.c + @echo "Generating termcap hash" + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET} + +# Allow terminfo descriptions to be compiled into libterminfo +compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo + @echo "Generating compiled terminfo descriptions" + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET} + +.if ${USETOOLS} == "yes" +compiled_terms.c: ${TOOL_TIC} +.endif + +DPSRCS+= hash.c termcap_hash.c compiled_terms.c + +CLEANFILES+= hash.c termcap_hash.c compiled_terms.c diff --git a/lib/libterminfo/compile.c b/lib/libterminfo/compile.c index e4a974232..32da55a8c 100644 --- a/lib/libterminfo/compile.c +++ b/lib/libterminfo/compile.c @@ -1,7 +1,7 @@ -/* $NetBSD: compile.c,v 1.4 2010/03/02 14:11:11 roy Exp $ */ +/* $NetBSD: compile.c,v 1.8 2012/06/03 23:19:10 joerg Exp $ */ /* - * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -32,7 +32,7 @@ #endif #include -__RCSID("$NetBSD: compile.c,v 1.4 2010/03/02 14:11:11 roy Exp $"); +__RCSID("$NetBSD: compile.c,v 1.8 2012/06/03 23:19:10 joerg Exp $"); #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H #include @@ -51,7 +51,7 @@ __RCSID("$NetBSD: compile.c,v 1.4 2010/03/02 14:11:11 roy Exp $"); #include #include -static void __attribute__((__format__(__printf__, 2, 3))) +static void __printflike(2, 3) dowarn(int flags, const char *fmt, ...) { va_list va; @@ -74,7 +74,7 @@ _ti_grow_tbuf(TBUF *tbuf, size_t len) l = tbuf->bufpos + len; if (l > tbuf->buflen) { - if (tbuf->bufpos == 0) + if (tbuf->buflen == 0) buf = malloc(l); else buf = realloc(tbuf->buf, l); @@ -239,12 +239,7 @@ _ti_flatten(uint8_t **buf, const TIC *tic) return -1; cap = *buf; - if (alen == 0 && dlen == 0 && tic->flags.bufpos == 0 && - tic->nums.bufpos == 0 && tic->strs.bufpos == 0 && - tic->extras.bufpos == 0) - *cap++ = 0; /* alias */ - else - *cap++ = 2; /* version */ + *cap++ = 1; le16enc(cap, len); cap += sizeof(uint16_t); memcpy(cap, tic->name, len); @@ -344,7 +339,7 @@ encode_string(const char *term, const char *cap, TBUF *tbuf, const char *str, if (ch == '?') ch = '\177'; else if ((ch &= 037) == 0) - ch = 128; + ch = (char)128; } *p++ = ch; last = ch; @@ -452,7 +447,8 @@ _ti_compile(char *cap, int flags) { char *token, *p, *e, *name, *desc, *alias; signed char flag; - long num; + long cnum; + short num; ssize_t ind; size_t len; TBUF buf; @@ -564,17 +560,18 @@ _ti_compile(char *cap, int flags) _ti_find_cap(&tic->nums, 'n', ind) != NULL) continue; - num = strtol(p, &e, 0); + cnum = strtol(p, &e, 0); if (*e != '\0') { dowarn(flags, "%s: %s: not a number", tic->name, token); continue; } - if (!VALID_NUMERIC(num)) { + if (!VALID_NUMERIC(cnum)) { dowarn(flags, "%s: %s: number out of range", tic->name, token); continue; } + num = (short)cnum; if (ind == -1) _ti_store_extra(tic, 1, token, 'n', -1, num, NULL, 0, flags); @@ -608,7 +605,7 @@ _ti_compile(char *cap, int flags) le16enc(tic->nums.buf + tic->nums.bufpos, ind); tic->nums.bufpos += sizeof(uint16_t); le16enc(tic->nums.buf + tic->nums.bufpos, - CANCELLED_NUMERIC); + (uint16_t)CANCELLED_NUMERIC); tic->nums.bufpos += sizeof(uint16_t); tic->nums.entries++; continue; @@ -657,6 +654,7 @@ _ti_freetic(TIC *tic) free(tic->name); free(tic->alias); free(tic->desc); + free(tic->extras.buf); free(tic->flags.buf); free(tic->nums.buf); free(tic->strs.buf); diff --git a/lib/libterminfo/compiled_terms.c b/lib/libterminfo/compiled_terms.c deleted file mode 100644 index 4ef9184e3..000000000 --- a/lib/libterminfo/compiled_terms.c +++ /dev/null @@ -1,595 +0,0 @@ -/* $NetBSD$ */ -/* * * MODIFIED FOR MINIX * * */ -/* DO NOT EDIT - * Regenerate by doing ``make compiled_terms'' - */ - -struct compiled_term { - const char *name; - const char *cap; - size_t caplen; -}; - -const struct compiled_term compiled_terms[] = { - { - "ansi", - "\002\005\000\141\156\163\151\000\000\000\000\000\016\000\004" - "\000\036\000\001\001\000\001\026\000\001\027\000\001\032\000" - "\006\000\016\000\010\000\025\000\003\000\021\000\100\000\004" - "\000\120\000\007\000\010\000\012\000\030\000\142\003\107\000" - "\200\001\013\000\033\133\045\151\045\144\073\045\144\122\000" - "\201\001\005\000\033\133\066\156\000\202\001\023\000\033\133" - "\077\045\133\073\060\061\062\063\064\065\066\067\070\071\135" - "\143\000\203\001\004\000\033\133\143\000\052\001\011\000\033" - "\133\063\071\073\064\071\155\000\132\001\012\000\033\133\064" - "\045\160\061\045\144\155\000\133\001\012\000\033\133\063\045" - "\160\061\045\144\155\000\110\000\005\000\033\133\070\155\000" - "\134\001\126\000\033\133\060\073\061\060\045\077\045\160\061" - "\045\164\073\067\045\073\045\077\045\160\062\045\164\073\064" - "\045\073\045\077\045\160\063\045\164\073\067\045\073\045\077" - "\045\160\064\045\164\073\065\045\073\045\077\045\160\066\045" - "\164\073\061\045\073\045\077\045\160\067\045\164\073\070\045" - "\073\045\077\045\160\071\045\164\073\061\061\045\073\155\000" - "\063\000\005\000\033\133\065\155\000\064\000\005\000\033\133" - "\061\155\000\105\000\005\000\033\133\067\155\000\135\000\006" - "\000\033\133\061\060\155\000\140\000\004\000\033\133\155\000" - "\143\000\004\000\033\133\155\000\125\000\010\000\033\133\060" - "\073\061\060\155\000\103\000\006\000\033\133\061\061\155\000" - "\112\000\005\000\033\133\067\155\000\116\000\005\000\033\133" - "\064\155\000\000\000\077\000\053\020\054\021\055\030\056\031" - "\060\333\140\004\141\261\146\370\147\361\150\260\152\331\153" - "\277\154\332\155\300\156\305\157\176\160\304\161\304\162\304" - "\163\137\164\303\165\264\166\301\167\302\170\263\171\363\172" - "\362\173\343\174\330\175\234\176\376\000\123\000\006\000\033" - "\133\061\060\155\000\061\000\006\000\033\133\061\061\155\000" - "\063\001\011\000\033\133\045\160\061\045\144\104\000\056\001" - "\011\000\033\133\045\160\061\045\144\102\000\065\001\011\000" - "\033\133\045\160\061\045\144\103\000\070\001\011\000\033\133" - "\045\160\061\045\144\101\000\054\001\011\000\033\133\045\160" - "\061\045\144\120\000\055\001\011\000\033\133\045\160\061\045" - "\144\115\000\122\000\011\000\033\133\045\160\061\045\144\130" - "\000\022\000\005\000\033\133\061\113\000\027\000\013\000\033" - "\133\045\151\045\160\061\045\144\107\000\166\001\004\000\033" - "\133\111\000\060\001\011\000\033\133\045\160\061\045\144\100" - "\000\062\001\011\000\033\133\045\160\061\045\144\114\000\061" - "\001\011\000\033\133\045\160\061\045\144\123\000\173\000\002" - "\000\010\000\175\000\004\000\033\133\132\000\326\000\004\000" - "\033\133\104\000\212\000\004\000\033\133\102\000\351\000\004" - "\000\033\133\103\000\015\001\004\000\033\133\101\000\324\000" - "\004\000\033\133\114\000\102\001\005\000\033\133\064\151\000" - "\103\001\005\000\033\133\065\151\000\047\001\005\000\015\033" - "\133\123\000\107\001\024\000\045\160\061\045\143\033\133\045" - "\160\062\045\173\061\175\045\055\045\144\142\000\067\001\011" - "\000\033\133\045\160\061\045\144\124\000\125\001\004\000\033" - "\050\102\000\126\001\004\000\033\051\102\000\127\001\004\000" - "\033\052\102\000\130\001\004\000\033\053\102\000\017\000\005" - "\000\033\133\062\147\000\117\001\013\000\033\133\045\151\045" - "\160\061\045\144\144\000\003\000\002\000\007\000\002\000\004" - "\000\033\133\132\000\021\000\007\000\033\133\110\033\133\112" - "\000\007\000\002\000\015\000\036\000\004\000\033\133\104\000" - "\033\000\004\000\033\133\102\000\041\000\004\000\033\133\103" - "\000\032\000\021\000\033\133\045\151\045\160\061\045\144\073" - "\045\160\062\045\144\110\000\043\000\004\000\033\133\101\000" - "\047\000\004\000\033\133\120\000\050\000\004\000\033\133\115" - "\000\024\000\004\000\033\133\112\000\023\000\004\000\033\133" - "\113\000\034\000\004\000\033\133\110\000\153\001\003\000\033" - "\110\000\166\000\004\000\033\133\114\000\122\001\002\000\012" - "\000\323\000\004\000\033\133\110\000\020\000\002\000\003\000" - "\101\130\000\146\001\003\000\142\163\000\146\001", - 942 - }, - { - "dumb", - "\002\005\000\144\165\155\142\000\000\000\000\000\005\000\001" - "\000\001\000\001\006\000\001\000\004\000\120\000\032\000\004" - "\000\003\000\002\000\007\000\007\000\002\000\015\000\033\000" - "\002\000\012\000\122\001\002\000\012\000\000\000", - 57 - }, - { - "minix", - "\002\006\000\155\151\156\151\170\000\000\000\000\000\010\000" - "\002\000\001\000\001\011\000\001\026\000\005\000\004\000\120" - "\000\007\000\010\000\012\000\031\000\016\000\010\000\021\000" - "\100\000\342\003\133\000\003\000\002\000\007\000\063\000\005" - "\000\033\133\065\155\000\064\000\005\000\033\133\061\155\000" - "\021\000\010\000\033\133\110\033\133\060\112\000\007\000\002" - "\000\015\000\063\001\011\000\033\133\045\160\061\045\144\104" - "\000\036\000\002\000\010\000\056\001\011\000\033\133\045\160" - "\061\045\144\102\000\033\000\004\000\033\133\102\000\065\001" - "\011\000\033\133\045\160\061\045\144\103\000\041\000\004\000" - "\033\133\103\000\032\000\021\000\033\133\045\151\045\160\061" - "\045\144\073\045\160\062\045\144\110\000\070\001\011\000\033" - "\133\045\160\061\045\144\101\000\043\000\004\000\033\133\101" - "\000\054\001\011\000\033\133\045\160\061\045\144\120\000\047" - "\000\004\000\033\133\120\000\055\001\011\000\033\133\045\160" - "\061\045\144\115\000\050\000\004\000\033\133\115\000\024\000" - "\005\000\033\133\060\112\000\023\000\004\000\033\133\113\000" - "\034\000\004\000\033\133\110\000\166\001\002\000\011\000\060" - "\001\011\000\033\133\045\160\061\045\144\100\000\165\000\004" - "\000\033\133\100\000\062\001\011\000\033\133\045\160\061\045" - "\144\114\000\166\000\004\000\033\133\114\000\122\001\002\000" - "\012\000\157\000\005\000\033\133\060\155\000\173\000\002\000" - "\010\000\326\000\004\000\033\133\104\000\212\000\004\000\033" - "\133\102\000\351\000\004\000\033\133\103\000\015\001\004\000" - "\033\133\101\000\210\000\002\000\177\000\214\000\004\000\033" - "\133\131\000\221\000\006\000\033\133\062\061\176\000\222\000" - "\006\000\033\133\061\061\176\000\223\000\006\000\033\133\061" - "\062\176\000\224\000\006\000\033\133\061\063\176\000\225\000" - "\006\000\033\133\061\064\176\000\226\000\006\000\033\133\061" - "\065\176\000\227\000\006\000\033\133\061\067\176\000\230\000" - "\006\000\033\133\061\070\176\000\231\000\006\000\033\133\061" - "\071\176\000\232\000\006\000\033\133\062\060\176\000\233\000" - "\006\000\033\133\062\061\176\000\234\000\010\000\033\133\061" - "\061\073\062\176\000\235\000\010\000\033\133\061\062\073\062" - "\176\000\236\000\010\000\033\133\061\063\073\062\176\000\237" - "\000\010\000\033\133\061\064\073\062\176\000\240\000\010\000" - "\033\133\061\065\073\062\176\000\241\000\010\000\033\133\061" - "\067\073\062\176\000\242\000\010\000\033\133\061\070\073\062" - "\176\000\243\000\010\000\033\133\061\071\073\062\176\000\244" - "\000\010\000\033\133\062\060\073\062\176\000\245\000\010\000" - "\033\133\062\061\073\062\176\000\246\000\010\000\033\133\061" - "\061\073\065\176\000\247\000\010\000\033\133\061\062\073\065" - "\176\000\250\000\010\000\033\133\061\063\073\065\176\000\251" - "\000\010\000\033\133\061\064\073\065\176\000\252\000\010\000" - "\033\133\061\065\073\065\176\000\253\000\010\000\033\133\061" - "\067\073\065\176\000\254\000\010\000\033\133\061\070\073\065" - "\176\000\255\000\010\000\033\133\061\071\073\065\176\000\256" - "\000\010\000\033\133\062\060\073\065\176\000\257\000\010\000" - "\033\133\062\061\073\065\176\000\260\000\010\000\033\133\061" - "\061\073\066\176\000\261\000\010\000\033\133\061\062\073\066" - "\176\000\262\000\010\000\033\133\061\063\073\066\176\000\263" - "\000\010\000\033\133\061\064\073\066\176\000\264\000\010\000" - "\033\133\061\065\073\066\176\000\265\000\010\000\033\133\061" - "\067\073\066\176\000\266\000\010\000\033\133\061\070\073\066" - "\176\000\267\000\010\000\033\133\061\071\073\066\176\000\270" - "\000\010\000\033\133\062\060\073\066\176\000\271\000\010\000" - "\033\133\062\061\073\066\176\000\323\000\004\000\033\133\110" - "\000\324\000\004\000\033\133\100\000\335\000\004\000\033\133" - "\125\000\340\000\004\000\033\133\126\000\047\001\003\000\015" - "\012\000\105\000\005\000\033\133\067\155\000\123\001\003\000" - "\033\115\000\140\000\005\000\033\133\060\155\000\143\000\005" - "\000\033\133\060\155\000\125\000\005\000\033\133\060\155\000" - "\112\000\005\000\033\133\067\155\000\116\000\005\000\033\133" - "\064\155\000\132\001\012\000\033\133\064\045\160\061\045\144" - "\155\000\133\001\012\000\033\133\063\045\160\061\045\144\155" - "\000\000\000\077\000\053\020\054\021\055\030\056\031\060\333" - "\140\004\141\261\146\370\147\361\150\260\152\331\153\277\154" - "\332\155\300\156\305\157\176\160\304\161\304\162\304\163\137" - "\164\303\165\264\166\301\167\302\170\263\171\363\172\362\173" - "\343\174\330\175\234\176\376\000\000\000", - 1045 - }, - { - "vt100", - "\002\006\000\166\164\061\060\060\000\000\000\000\000\021\000" - "\005\000\001\000\001\036\000\001\027\000\001\011\000\001\044" - "\000\001\022\000\004\000\004\000\120\000\007\000\010\000\012" - "\000\030\000\036\000\003\000\100\003\107\000\000\000\063\000" - "\140\140\141\141\146\146\147\147\152\152\153\153\154\154\155" - "\155\156\156\157\157\160\160\161\161\162\162\163\163\164\164" - "\165\165\166\166\167\167\170\170\171\171\172\172\173\173\174" - "\174\175\175\176\176\000\003\000\002\000\007\000\063\000\011" - "\000\033\133\065\155\044\074\062\076\000\064\000\011\000\033" - "\133\061\155\044\074\062\076\000\021\000\014\000\033\133\110" - "\033\133\112\044\074\065\060\076\000\007\000\002\000\015\000" - "\014\000\021\000\033\133\045\151\045\160\061\045\144\073\045" - "\160\062\045\144\162\000\063\001\011\000\033\133\045\160\061" - "\045\144\104\000\036\000\002\000\010\000\056\001\011\000\033" - "\133\045\160\061\045\144\102\000\033\000\002\000\012\000\065" - "\001\011\000\033\133\045\160\061\045\144\103\000\041\000\010" - "\000\033\133\103\044\074\062\076\000\032\000\025\000\033\133" - "\045\151\045\160\061\045\144\073\045\160\062\045\144\110\044" - "\074\065\076\000\070\001\011\000\033\133\045\160\061\045\144" - "\101\000\043\000\010\000\033\133\101\044\074\062\076\000\024" - "\000\011\000\033\133\112\044\074\065\060\076\000\023\000\010" - "\000\033\133\113\044\074\063\076\000\022\000\011\000\033\133" - "\061\113\044\074\063\076\000\057\000\007\000\033\050\102\033" - "\051\060\000\034\000\004\000\033\133\110\000\166\001\002\000" - "\011\000\153\001\003\000\033\110\000\122\001\002\000\012\000" - "\173\000\002\000\010\000\326\000\004\000\033\117\104\000\212" - "\000\004\000\033\117\102\000\351\000\004\000\033\117\103\000" - "\015\001\004\000\033\117\101\000\021\001\004\000\160\146\061" - "\000\022\001\004\000\160\146\062\000\023\001\004\000\160\146" - "\063\000\024\001\004\000\160\146\064\000\100\001\005\000\033" - "\133\060\151\000\102\001\005\000\033\133\064\151\000\103\001" - "\005\000\033\133\065\151\000\116\001\003\000\033\070\000\105" - "\000\011\000\033\133\067\155\044\074\062\076\000\123\001\007" - "\000\033\115\044\074\065\076\000\123\000\002\000\017\000\124" - "\000\006\000\033\133\077\067\154\000\016\001\010\000\033\133" - "\077\061\154\033\076\000\140\000\010\000\033\133\155\044\074" - "\062\076\000\143\000\010\000\033\133\155\044\074\062\076\000" - "\113\001\034\000\033\076\033\133\077\063\154\033\133\077\064" - "\154\033\133\077\065\154\033\133\077\067\150\033\133\077\070" - "\150\000\120\001\003\000\033\067\000\134\001\114\000\033\133" - "\060\045\077\045\160\061\045\160\066\045\174\045\164\073\061" - "\045\073\045\077\045\160\062\045\164\073\064\045\073\045\077" - "\045\160\061\045\160\063\045\174\045\164\073\067\045\073\045" - "\077\045\160\064\045\164\073\065\045\073\155\045\077\045\160" - "\071\045\164\016\045\145\017\045\073\044\074\062\076\000\125" - "\000\011\000\033\133\155\017\044\074\062\076\000\061\000\002" - "\000\016\000\062\000\006\000\033\133\077\067\150\000\017\001" - "\010\000\033\133\077\061\150\033\075\000\112\000\011\000\033" - "\133\067\155\044\074\062\076\000\116\000\011\000\033\133\064" - "\155\044\074\062\076\000\017\000\005\000\033\133\063\147\000" - "\221\000\004\000\033\117\171\000\233\000\004\000\033\117\170" - "\000\226\000\004\000\033\117\164\000\227\000\004\000\033\117" - "\165\000\230\000\004\000\033\117\166\000\231\000\004\000\033" - "\117\154\000\232\000\004\000\033\117\167\000\215\000\004\000" - "\033\117\115\000\222\000\004\000\033\117\120\000\223\000\004" - "\000\033\117\121\000\224\000\004\000\033\117\122\000\225\000" - "\004\000\033\117\123\000\170\000\004\000\033\117\161\000\171" - "\000\004\000\033\117\163\000\172\000\004\000\033\117\162\000" - "\176\000\004\000\033\117\160\000\177\000\004\000\033\117\156" - "\000\011\000\001\000\003\000\142\163\000\146\001", - 897 - }, - { - "vt220", - "\002\006\000\166\164\062\062\060\000\000\000\000\000\024\000" - "\006\000\001\000\001\036\000\001\026\000\001\027\000\001\011" - "\000\001\044\000\001\022\000\004\000\004\000\120\000\007\000" - "\010\000\012\000\030\000\036\000\003\000\367\003\132\000\000" - "\000\063\000\140\140\141\141\146\146\147\147\152\152\153\153" - "\154\154\155\155\156\156\157\157\160\160\161\161\162\162\163" - "\163\164\164\165\165\166\166\167\167\170\170\171\171\172\172" - "\173\173\174\174\175\175\176\176\000\003\000\002\000\007\000" - "\063\000\005\000\033\133\065\155\000\064\000\005\000\033\133" - "\061\155\000\021\000\007\000\033\133\110\033\133\112\000\007" - "\000\002\000\015\000\014\000\021\000\033\133\045\151\045\160" - "\061\045\144\073\045\160\062\045\144\162\000\063\001\011\000" - "\033\133\045\160\061\045\144\104\000\036\000\002\000\010\000" - "\056\001\011\000\033\133\045\160\061\045\144\102\000\033\000" - "\002\000\012\000\065\001\011\000\033\133\045\160\061\045\144" - "\103\000\041\000\004\000\033\133\103\000\032\000\021\000\033" - "\133\045\151\045\160\061\045\144\073\045\160\062\045\144\110" - "\000\070\001\011\000\033\133\045\160\061\045\144\101\000\043" - "\000\004\000\033\133\101\000\054\001\011\000\033\133\045\160" - "\061\045\144\120\000\047\000\004\000\033\133\120\000\055\001" - "\011\000\033\133\045\160\061\045\144\115\000\050\000\004\000" - "\033\133\115\000\122\000\011\000\033\133\045\160\061\045\144" - "\130\000\024\000\004\000\033\133\112\000\023\000\004\000\033" - "\133\113\000\022\000\005\000\033\133\061\113\000\057\000\004" - "\000\033\051\060\000\150\000\022\000\033\133\077\065\150\044" - "\074\062\060\060\057\076\033\133\077\065\154\000\034\000\004" - "\000\033\133\110\000\166\001\002\000\011\000\153\001\003\000" - "\033\110\000\060\001\011\000\033\133\045\160\061\045\144\100" - "\000\161\000\030\000\057\165\163\162\057\163\150\141\162\145" - "\057\164\141\142\163\145\164\057\166\164\061\060\060\000\062" - "\001\011\000\033\133\045\160\061\045\144\114\000\166\000\004" - "\000\033\133\114\000\122\001\003\000\033\104\000\157\000\026" - "\000\033\133\077\067\150\033\133\076\033\133\077\061\150\033" - "\040\106\033\133\077\064\154\000\173\000\002\000\010\000\326" - "\000\004\000\033\133\104\000\212\000\004\000\033\133\102\000" - "\351\000\004\000\033\133\103\000\015\001\004\000\033\133\101" - "\000\222\000\004\000\033\117\120\000\233\000\006\000\033\133" - "\062\061\176\000\234\000\006\000\033\133\062\063\176\000\235" - "\000\006\000\033\133\062\064\176\000\236\000\006\000\033\133" - "\062\065\176\000\237\000\006\000\033\133\062\066\176\000\242" - "\000\006\000\033\133\063\061\176\000\243\000\006\000\033\133" - "\063\062\176\000\244\000\006\000\033\133\063\063\176\000\223" - "\000\004\000\033\117\121\000\245\000\006\000\033\133\063\064" - "\176\000\224\000\004\000\033\117\122\000\225\000\004\000\033" - "\117\123\000\227\000\006\000\033\133\061\067\176\000\230\000" - "\006\000\033\133\061\070\176\000\231\000\006\000\033\133\061" - "\071\176\000\232\000\006\000\033\133\062\060\176\000\321\000" - "\005\000\033\133\061\176\000\322\000\006\000\033\133\062\070" - "\176\000\324\000\005\000\033\133\062\176\000\335\000\005\000" - "\033\133\066\176\000\340\000\005\000\033\133\065\176\000\343" - "\000\006\000\033\133\062\071\176\000\362\000\005\000\033\133" - "\064\176\000\021\001\004\000\160\146\061\000\022\001\004\000" - "\160\146\062\000\023\001\004\000\160\146\063\000\024\001\004" - "\000\160\146\064\000\100\001\004\000\033\133\151\000\102\001" - "\005\000\033\133\064\151\000\103\001\005\000\033\133\065\151" - "\000\047\001\003\000\033\105\000\116\001\003\000\033\070\000" - "\105\000\005\000\033\133\067\155\000\123\001\003\000\033\115" - "\000\123\000\010\000\033\050\102\044\074\064\076\000\124\000" - "\006\000\033\133\077\067\154\000\131\000\005\000\033\133\064" - "\154\000\140\000\006\000\033\133\062\067\155\000\143\000\006" - "\000\033\133\062\064\155\000\112\001\006\000\033\133\077\063" - "\154\000\120\001\003\000\033\067\000\134\001\113\000\033\133" - "\060\045\077\045\160\066\045\164\073\061\045\073\045\077\045" - "\160\062\045\164\073\064\045\073\045\077\045\160\064\045\164" - "\073\065\045\073\045\077\045\160\061\045\160\063\045\174\045" - "\164\073\067\045\073\155\045\077\045\160\071\045\164\033\050" - "\060\045\145\033\050\102\045\073\044\074\062\076\000\125\000" - "\007\000\033\133\155\033\050\102\000\061\000\010\000\033\050" - "\060\044\074\062\076\000\062\000\006\000\033\133\077\067\150" - "\000\073\000\005\000\033\133\064\150\000\112\000\005\000\033" - "\133\067\155\000\116\000\005\000\033\133\064\155\000\017\000" - "\005\000\033\133\063\147\000\011\000\001\000\003\000\142\163" - "\000\146\001", - 1083 - }, - { - "wsvt25", - "\002\007\000\167\163\166\164\062\065\000\000\000\000\000\027" - "\000\007\000\002\000\001\027\000\001\001\000\001\036\000\001" - "\026\000\001\011\000\001\044\000\001\036\000\007\000\016\000" - "\010\000\004\000\120\000\007\000\010\000\012\000\031\000\025" - "\000\002\000\021\000\100\000\036\000\003\000\064\004\140\000" - "\157\000\013\000\033\133\162\033\133\062\065\073\061\110\000" - "\214\000\005\000\033\133\070\176\000\222\000\006\000\033\133" - "\061\061\176\000\233\000\006\000\033\133\062\061\176\000\234" - "\000\006\000\033\133\062\063\176\000\235\000\006\000\033\133" - "\062\064\176\000\223\000\006\000\033\133\061\062\176\000\224" - "\000\006\000\033\133\061\063\176\000\225\000\006\000\033\133" - "\061\064\176\000\226\000\006\000\033\133\061\065\176\000\227" - "\000\006\000\033\133\061\067\176\000\230\000\006\000\033\133" - "\061\070\176\000\231\000\006\000\033\133\061\071\176\000\232" - "\000\006\000\033\133\062\060\176\000\323\000\005\000\033\133" - "\067\176\000\052\001\004\000\033\133\155\000\132\001\012\000" - "\033\133\064\045\160\061\045\144\155\000\133\001\012\000\033" - "\133\063\045\160\061\045\144\155\000\000\000\063\000\140\140" - "\141\141\146\146\147\147\152\152\153\153\154\154\155\155\156" - "\156\157\157\160\160\161\161\162\162\163\163\164\164\165\165" - "\166\166\167\167\170\170\171\171\172\172\173\173\174\174\175" - "\175\176\176\000\003\000\002\000\007\000\063\000\005\000\033" - "\133\065\155\000\064\000\005\000\033\133\061\155\000\021\000" - "\007\000\033\133\110\033\133\112\000\007\000\002\000\015\000" - "\014\000\021\000\033\133\045\151\045\160\061\045\144\073\045" - "\160\062\045\144\162\000\063\001\011\000\033\133\045\160\061" - "\045\144\104\000\036\000\002\000\010\000\056\001\011\000\033" - "\133\045\160\061\045\144\102\000\033\000\002\000\012\000\065" - "\001\011\000\033\133\045\160\061\045\144\103\000\041\000\004" - "\000\033\133\103\000\032\000\021\000\033\133\045\151\045\160" - "\061\045\144\073\045\160\062\045\144\110\000\070\001\011\000" - "\033\133\045\160\061\045\144\101\000\043\000\004\000\033\133" - "\101\000\054\001\011\000\033\133\045\160\061\045\144\120\000" - "\047\000\004\000\033\133\120\000\055\001\011\000\033\133\045" - "\160\061\045\144\115\000\050\000\004\000\033\133\115\000\122" - "\000\011\000\033\133\045\160\061\045\144\130\000\024\000\004" - "\000\033\133\112\000\023\000\004\000\033\133\113\000\022\000" - "\005\000\033\133\061\113\000\057\000\004\000\033\051\060\000" - "\150\000\022\000\033\133\077\065\150\044\074\062\060\060\057" - "\076\033\133\077\065\154\000\034\000\004\000\033\133\110\000" - "\166\001\002\000\011\000\153\001\003\000\033\110\000\060\001" - "\011\000\033\133\045\160\061\045\144\100\000\161\000\030\000" - "\057\165\163\162\057\163\150\141\162\145\057\164\141\142\163" - "\145\164\057\166\164\061\060\060\000\062\001\011\000\033\133" - "\045\160\061\045\144\114\000\166\000\004\000\033\133\114\000" - "\122\001\003\000\033\104\000\173\000\002\000\010\000\326\000" - "\004\000\033\133\104\000\212\000\004\000\033\133\102\000\351" - "\000\004\000\033\133\103\000\015\001\004\000\033\133\101\000" - "\236\000\006\000\033\133\062\065\176\000\237\000\006\000\033" - "\133\062\066\176\000\242\000\006\000\033\133\063\061\176\000" - "\243\000\006\000\033\133\063\062\176\000\244\000\006\000\033" - "\133\063\063\176\000\245\000\006\000\033\133\063\064\176\000" - "\321\000\005\000\033\133\061\176\000\322\000\006\000\033\133" - "\062\070\176\000\324\000\005\000\033\133\062\176\000\335\000" - "\005\000\033\133\066\176\000\340\000\005\000\033\133\065\176" - "\000\343\000\006\000\033\133\062\071\176\000\362\000\005\000" - "\033\133\064\176\000\021\001\004\000\160\146\061\000\022\001" - "\004\000\160\146\062\000\023\001\004\000\160\146\063\000\024" - "\001\004\000\160\146\064\000\100\001\004\000\033\133\151\000" - "\102\001\005\000\033\133\064\151\000\103\001\005\000\033\133" - "\065\151\000\047\001\003\000\033\105\000\116\001\003\000\033" - "\070\000\105\000\005\000\033\133\067\155\000\123\001\003\000" - "\033\115\000\123\000\010\000\033\050\102\044\074\064\076\000" - "\124\000\006\000\033\133\077\067\154\000\131\000\005\000\033" - "\133\064\154\000\140\000\006\000\033\133\062\067\155\000\143" - "\000\006\000\033\133\062\064\155\000\112\001\006\000\033\133" - "\077\063\154\000\120\001\003\000\033\067\000\134\001\113\000" - "\033\133\060\045\077\045\160\066\045\164\073\061\045\073\045" - "\077\045\160\062\045\164\073\064\045\073\045\077\045\160\064" - "\045\164\073\065\045\073\045\077\045\160\061\045\160\063\045" - "\174\045\164\073\067\045\073\155\045\077\045\160\071\045\164" - "\033\050\060\045\145\033\050\102\045\073\044\074\062\076\000" - "\125\000\007\000\033\133\155\033\050\102\000\061\000\010\000" - "\033\050\060\044\074\062\076\000\062\000\006\000\033\133\077" - "\067\150\000\073\000\005\000\033\133\064\150\000\112\000\005" - "\000\033\133\067\155\000\116\000\005\000\033\133\064\155\000" - "\017\000\005\000\033\133\063\147\000\011\000\001\000\003\000" - "\142\163\000\146\001", - 1160 - }, - { - "xterm", - "\002\006\000\170\164\145\162\155\000\000\000\000\000\032\000" - "\010\000\032\000\001\001\000\001\002\000\001\016\000\001\036" - "\000\001\026\000\001\027\000\001\011\000\001\026\000\005\000" - "\016\000\010\000\004\000\120\000\007\000\010\000\012\000\030" - "\000\021\000\100\000\004\010\247\000\061\001\011\000\033\133" - "\045\160\061\045\144\123\000\360\000\007\000\033\133\063\073" - "\062\176\000\363\000\007\000\033\133\061\073\062\106\000\371" - "\000\007\000\033\133\061\073\062\110\000\372\000\007\000\033" - "\133\062\073\062\176\000\376\000\007\000\033\133\066\073\062" - "\176\000\000\001\007\000\033\133\065\073\062\176\000\172\000" - "\004\000\033\117\105\000\175\000\004\000\033\133\132\000\326" - "\000\004\000\033\117\104\000\212\000\004\000\033\117\102\000" - "\351\000\004\000\033\117\103\000\015\001\004\000\033\117\101" - "\000\214\000\004\000\033\117\106\000\215\000\004\000\033\117" - "\115\000\323\000\004\000\033\117\110\000\324\000\005\000\033" - "\133\062\176\000\332\000\004\000\033\133\115\000\335\000\005" - "\000\033\133\066\176\000\340\000\005\000\033\133\065\176\000" - "\067\001\011\000\033\133\045\160\061\045\144\124\000\222\000" - "\004\000\033\117\120\000\233\000\006\000\033\133\062\061\176" - "\000\234\000\006\000\033\133\062\063\176\000\235\000\006\000" - "\033\133\062\064\176\000\236\000\007\000\033\133\061\073\062" - "\120\000\237\000\007\000\033\133\061\073\062\121\000\240\000" - "\007\000\033\133\061\073\062\122\000\241\000\007\000\033\133" - "\061\073\062\123\000\242\000\010\000\033\133\061\065\073\062" - "\176\000\243\000\010\000\033\133\061\067\073\062\176\000\244" - "\000\010\000\033\133\061\070\073\062\176\000\223\000\004\000" - "\033\117\121\000\245\000\010\000\033\133\061\071\073\062\176" - "\000\246\000\010\000\033\133\062\060\073\062\176\000\247\000" - "\010\000\033\133\062\061\073\062\176\000\250\000\010\000\033" - "\133\062\063\073\062\176\000\251\000\010\000\033\133\062\064" - "\073\062\176\000\252\000\007\000\033\133\061\073\065\120\000" - "\253\000\007\000\033\133\061\073\065\121\000\254\000\007\000" - "\033\133\061\073\065\122\000\255\000\007\000\033\133\061\073" - "\065\123\000\256\000\010\000\033\133\061\065\073\065\176\000" - "\224\000\004\000\033\117\122\000\257\000\010\000\033\133\061" - "\067\073\065\176\000\260\000\010\000\033\133\061\070\073\065" - "\176\000\261\000\010\000\033\133\061\071\073\065\176\000\262" - "\000\010\000\033\133\062\060\073\065\176\000\263\000\010\000" - "\033\133\062\061\073\065\176\000\264\000\010\000\033\133\062" - "\063\073\065\176\000\265\000\010\000\033\133\062\064\073\065" - "\176\000\266\000\007\000\033\133\061\073\066\120\000\267\000" - "\007\000\033\133\061\073\066\121\000\270\000\007\000\033\133" - "\061\073\066\122\000\225\000\004\000\033\117\123\000\271\000" - "\007\000\033\133\061\073\066\123\000\272\000\010\000\033\133" - "\061\065\073\066\176\000\273\000\010\000\033\133\061\067\073" - "\066\176\000\274\000\010\000\033\133\061\070\073\066\176\000" - "\275\000\010\000\033\133\061\071\073\066\176\000\276\000\010" - "\000\033\133\062\060\073\066\176\000\277\000\010\000\033\133" - "\062\061\073\066\176\000\300\000\010\000\033\133\062\063\073" - "\066\176\000\301\000\010\000\033\133\062\064\073\066\176\000" - "\302\000\007\000\033\133\061\073\063\120\000\226\000\006\000" - "\033\133\061\065\176\000\303\000\007\000\033\133\061\073\063" - "\121\000\304\000\007\000\033\133\061\073\063\122\000\305\000" - "\007\000\033\133\061\073\063\123\000\306\000\010\000\033\133" - "\061\065\073\063\176\000\307\000\010\000\033\133\061\067\073" - "\063\176\000\310\000\010\000\033\133\061\070\073\063\176\000" - "\311\000\010\000\033\133\061\071\073\063\176\000\312\000\010" - "\000\033\133\062\060\073\063\176\000\313\000\010\000\033\133" - "\062\061\073\063\176\000\314\000\010\000\033\133\062\063\073" - "\063\176\000\227\000\006\000\033\133\061\067\176\000\315\000" - "\010\000\033\133\062\064\073\063\176\000\316\000\007\000\033" - "\133\061\073\064\120\000\317\000\007\000\033\133\061\073\064" - "\121\000\320\000\007\000\033\133\061\073\064\122\000\230\000" - "\006\000\033\133\061\070\176\000\231\000\006\000\033\133\061" - "\071\176\000\232\000\006\000\033\133\062\060\176\000\373\000" - "\007\000\033\133\061\073\062\104\000\005\001\007\000\033\133" - "\061\073\062\103\000\366\000\007\000\033\133\061\073\062\102" - "\000\002\001\007\000\033\133\061\073\062\101\000\210\000\005" - "\000\033\133\063\176\000\000\000\065\000\140\140\141\141\146" - "\146\147\147\151\151\152\152\153\153\154\154\155\155\156\156" - "\157\157\160\160\161\161\162\162\163\163\164\164\165\165\166" - "\166\167\167\170\170\171\171\172\172\173\173\174\174\175\175" - "\176\176\000\003\000\002\000\007\000\063\000\005\000\033\133" - "\065\155\000\064\000\005\000\033\133\061\155\000\002\000\004" - "\000\033\133\132\000\035\000\007\000\033\133\077\062\065\154" - "\000\021\000\010\000\033\133\110\033\133\062\112\000\040\000" - "\015\000\033\133\077\061\062\154\033\133\077\062\065\150\000" - "\007\000\002\000\015\000\014\000\021\000\033\133\045\151\045" - "\160\061\045\144\073\045\160\062\045\144\162\000\063\001\011" - "\000\033\133\045\160\061\045\144\104\000\036\000\002\000\010" - "\000\056\001\011\000\033\133\045\160\061\045\144\102\000\033" - "\000\002\000\012\000\065\001\011\000\033\133\045\160\061\045" - "\144\103\000\041\000\004\000\033\133\103\000\032\000\021\000" - "\033\133\045\151\045\160\061\045\144\073\045\160\062\045\144" - "\110\000\070\001\011\000\033\133\045\160\061\045\144\101\000" - "\043\000\004\000\033\133\101\000\044\000\012\000\033\133\077" - "\061\062\073\062\065\150\000\054\001\011\000\033\133\045\160" - "\061\045\144\120\000\047\000\004\000\033\133\120\000\055\001" - "\011\000\033\133\045\160\061\045\144\115\000\050\000\004\000" - "\033\133\115\000\122\000\011\000\033\133\045\160\061\045\144" - "\130\000\024\000\004\000\033\133\112\000\023\000\004\000\033" - "\133\113\000\022\000\005\000\033\133\061\113\000\150\000\022" - "\000\033\133\077\065\150\044\074\061\060\060\057\076\033\133" - "\077\065\154\000\034\000\004\000\033\133\110\000\027\000\013" - "\000\033\133\045\151\045\160\061\045\144\107\000\166\001\002" - "\000\011\000\153\001\003\000\033\110\000\060\001\011\000\033" - "\133\045\160\061\045\144\100\000\062\001\011\000\033\133\045" - "\160\061\045\144\114\000\166\000\004\000\033\133\114\000\122" - "\001\002\000\012\000\110\000\005\000\033\133\070\155\000\157" - "\000\022\000\033\133\041\160\033\133\077\063\073\064\154\033" - "\133\064\154\033\076\000\173\000\002\000\010\000\100\001\004" - "\000\033\133\151\000\102\001\005\000\033\133\064\151\000\103" - "\001\005\000\033\133\065\151\000\052\001\011\000\033\133\063" - "\071\073\064\071\155\000\116\001\003\000\033\070\000\105\000" - "\005\000\033\133\067\155\000\123\001\003\000\033\115\000\123" - "\000\004\000\033\050\102\000\124\000\006\000\033\133\077\067" - "\154\000\126\000\011\000\033\133\077\061\060\064\071\154\000" - "\131\000\005\000\033\133\064\154\000\016\001\010\000\033\133" - "\077\061\154\033\076\000\036\001\011\000\033\133\077\061\060" - "\063\064\154\000\140\000\006\000\033\133\062\067\155\000\143" - "\000\006\000\033\133\062\064\155\000\112\001\003\000\033\143" - "\000\113\001\022\000\033\133\041\160\033\133\077\063\073\064" - "\154\033\133\064\154\033\076\000\120\001\003\000\033\067\000" - "\132\001\012\000\033\133\064\045\160\061\045\144\155\000\133" - "\001\012\000\033\133\063\045\160\061\045\144\155\000\135\001" - "\106\000\033\133\064\045\077\045\160\061\045\173\061\175\045" - "\075\045\164\064\045\145\045\160\061\045\173\063\175\045\075" - "\045\164\066\045\145\045\160\061\045\173\064\175\045\075\045" - "\164\061\045\145\045\160\061\045\173\066\175\045\075\045\164" - "\063\045\145\045\160\061\045\144\045\073\155\000\143\001\106" - "\000\033\133\063\045\077\045\160\061\045\173\061\175\045\075" - "\045\164\064\045\145\045\160\061\045\173\063\175\045\075\045" - "\164\066\045\145\045\160\061\045\173\064\175\045\075\045\164" - "\061\045\145\045\160\061\045\173\066\175\045\075\045\164\063" - "\045\145\045\160\061\045\144\045\073\155\000\134\001\122\000" - "\045\077\045\160\071\045\164\033\050\060\045\145\033\050\102" - "\045\073\033\133\060\045\077\045\160\066\045\164\073\061\045" - "\073\045\077\045\160\062\045\164\073\064\045\073\045\077\045" - "\160\061\045\160\063\045\174\045\164\073\067\045\073\045\077" - "\045\160\064\045\164\073\065\045\073\045\077\045\160\067\045" - "\164\073\070\045\073\155\000\125\000\007\000\033\050\102\033" - "\133\155\000\061\000\004\000\033\050\060\000\062\000\006\000" - "\033\133\077\067\150\000\065\000\011\000\033\133\077\061\060" - "\064\071\150\000\073\000\005\000\033\133\064\150\000\017\001" - "\010\000\033\133\077\061\150\033\075\000\037\001\011\000\033" - "\133\077\061\060\063\064\150\000\112\000\005\000\033\133\067" - "\155\000\116\000\005\000\033\133\064\155\000\017\000\005\000" - "\033\133\063\147\000\117\001\013\000\033\133\045\151\045\160" - "\061\045\144\144\000\202\001\010\000\033\133\077\061\073\062" - "\143\000\200\001\013\000\033\133\045\151\045\144\073\045\144" - "\122\000\201\001\005\000\033\133\066\156\000\203\001\004\000" - "\033\133\143\000\272\003\070\000\004\000\153\104\116\000\163" - "\007\000\033\133\061\073\062\102\000\005\000\153\104\116\063" - "\000\163\007\000\033\133\061\073\063\102\000\005\000\153\104" - "\116\064\000\163\007\000\033\133\061\073\064\102\000\005\000" - "\153\104\116\065\000\163\007\000\033\133\061\073\065\102\000" - "\005\000\153\104\116\066\000\163\007\000\033\133\061\073\066" - "\102\000\005\000\153\104\116\067\000\163\007\000\033\133\061" - "\073\067\102\000\006\000\153\114\106\124\063\000\163\007\000" - "\033\133\061\073\063\104\000\006\000\153\114\106\124\064\000" - "\163\007\000\033\133\061\073\064\104\000\006\000\153\114\106" - "\124\065\000\163\007\000\033\133\061\073\065\104\000\006\000" - "\153\114\106\124\066\000\163\007\000\033\133\061\073\066\104" - "\000\006\000\153\114\106\124\067\000\163\007\000\033\133\061" - "\073\067\104\000\006\000\153\122\111\124\063\000\163\007\000" - "\033\133\061\073\063\103\000\006\000\153\122\111\124\064\000" - "\163\007\000\033\133\061\073\064\103\000\006\000\153\122\111" - "\124\065\000\163\007\000\033\133\061\073\065\103\000\006\000" - "\153\122\111\124\066\000\163\007\000\033\133\061\073\066\103" - "\000\006\000\153\122\111\124\067\000\163\007\000\033\133\061" - "\073\067\103\000\004\000\153\125\120\000\163\007\000\033\133" - "\061\073\062\101\000\005\000\153\125\120\063\000\163\007\000" - "\033\133\061\073\063\101\000\005\000\153\125\120\064\000\163" - "\007\000\033\133\061\073\064\101\000\005\000\153\125\120\065" - "\000\163\007\000\033\133\061\073\065\101\000\005\000\153\125" - "\120\066\000\163\007\000\033\133\061\073\066\101\000\005\000" - "\153\125\120\067\000\163\007\000\033\133\061\073\067\101\000" - "\005\000\153\104\103\063\000\163\007\000\033\133\063\073\063" - "\176\000\005\000\153\104\103\064\000\163\007\000\033\133\063" - "\073\064\176\000\005\000\153\104\103\065\000\163\007\000\033" - "\133\063\073\065\176\000\005\000\153\104\103\066\000\163\007" - "\000\033\133\063\073\066\176\000\005\000\153\104\103\067\000" - "\163\007\000\033\133\063\073\067\176\000\006\000\153\105\116" - "\104\063\000\163\007\000\033\133\061\073\063\106\000\006\000" - "\153\105\116\104\064\000\163\007\000\033\133\061\073\064\106" - "\000\006\000\153\105\116\104\065\000\163\007\000\033\133\061" - "\073\065\106\000\006\000\153\105\116\104\066\000\163\007\000" - "\033\133\061\073\066\106\000\006\000\153\105\116\104\067\000" - "\163\007\000\033\133\061\073\067\106\000\006\000\153\110\117" - "\115\063\000\163\007\000\033\133\061\073\063\110\000\006\000" - "\153\110\117\115\064\000\163\007\000\033\133\061\073\064\110" - "\000\006\000\153\110\117\115\065\000\163\007\000\033\133\061" - "\073\065\110\000\006\000\153\110\117\115\066\000\163\007\000" - "\033\133\061\073\066\110\000\006\000\153\110\117\115\067\000" - "\163\007\000\033\133\061\073\067\110\000\005\000\153\111\103" - "\063\000\163\007\000\033\133\062\073\063\176\000\005\000\153" - "\111\103\064\000\163\007\000\033\133\062\073\064\176\000\005" - "\000\153\111\103\065\000\163\007\000\033\133\062\073\065\176" - "\000\005\000\153\111\103\066\000\163\007\000\033\133\062\073" - "\066\176\000\005\000\153\111\103\067\000\163\007\000\033\133" - "\062\073\067\176\000\006\000\153\116\130\124\063\000\163\007" - "\000\033\133\066\073\063\176\000\006\000\153\116\130\124\064" - "\000\163\007\000\033\133\066\073\064\176\000\006\000\153\116" - "\130\124\065\000\163\007\000\033\133\066\073\065\176\000\006" - "\000\153\116\130\124\066\000\163\007\000\033\133\066\073\066" - "\176\000\006\000\153\116\130\124\067\000\163\007\000\033\133" - "\066\073\067\176\000\006\000\153\120\122\126\063\000\163\007" - "\000\033\133\065\073\063\176\000\006\000\153\120\122\126\064" - "\000\163\007\000\033\133\065\073\064\176\000\006\000\153\120" - "\122\126\065\000\163\007\000\033\133\065\073\065\176\000\006" - "\000\153\120\122\126\066\000\163\007\000\033\133\065\073\066" - "\176\000\006\000\153\120\122\126\067\000\163\007\000\033\133" - "\065\073\067\176\000\003\000\142\163\000\146\001\003\000\101" - "\130\000\146\001\005\000\155\145\155\154\000\163\003\000\033" - "\154\000\005\000\155\145\155\165\000\163\003\000\033\155\000", - 3075 - } -}; diff --git a/lib/libterminfo/curterm.c b/lib/libterminfo/curterm.c index 53efb6c82..e047226a9 100644 --- a/lib/libterminfo/curterm.c +++ b/lib/libterminfo/curterm.c @@ -1,7 +1,7 @@ -/* $NetBSD: curterm.c,v 1.4 2010/02/22 23:05:39 roy Exp $ */ +/* $NetBSD: curterm.c,v 1.8 2011/10/05 10:46:08 roy Exp $ */ /* - * Copyright (c) 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -28,16 +28,29 @@ */ #include -__RCSID("$NetBSD: curterm.c,v 1.4 2010/02/22 23:05:39 roy Exp $"); +__RCSID("$NetBSD: curterm.c,v 1.8 2011/10/05 10:46:08 roy Exp $"); #include #include +#include #include #include #include #include + TERMINAL *cur_term; +/* + * There is no standard way of getting a list of aliases for the + * terminal. However, some applications such as telnet want to know this. + * ncurses dumps the terminfo header into an undefined variable ttytype + * and these applications then parse it to work out the aliases. + * We should do the same for now, until a standard mechanism for getting + * the information is available or the need for it goes away. + */ +#define NAMESIZE 256 +char ttytype[NAMESIZE]; + static const speed_t bauds[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 @@ -67,6 +80,8 @@ TERMINAL * set_curterm(TERMINAL *nterm) { TERMINAL *oterm; + size_t l, n; + char *p; oterm = cur_term; cur_term = nterm; @@ -81,6 +96,33 @@ set_curterm(TERMINAL *nterm) PC = *pad_char; _ti_setospeed(nterm); ospeed = nterm->_ospeed; + + p = ttytype; + l = sizeof(ttytype); + if ((n = strlcpy(p, nterm->name, l)) == strlen(p)) { + p += n; + l -= n; + *p++ = '|'; + l--; + if (nterm->_alias && + (n = strlcpy(p, nterm->_alias, l)) == strlen(p)) + { + p += n; + l -= n; + *p++ = '|'; + l--; + } + if (nterm->desc && + (n = strlcpy(p, nterm->desc, l)) == strlen(p)) + { + p += n; + l -= n; + *p++ = '|'; + l--; + } + p--; + } + *p = '\0'; } return oterm; @@ -90,6 +132,33 @@ int del_curterm(TERMINAL *oterm) { - _ti_freeterm(oterm); - return 0; + if (oterm == NULL) + return ERR; + free(oterm->_area); + free(oterm->strs); + free(oterm->nums); + free(oterm->flags); + free(oterm->_userdefs); + free(oterm); + return OK; +} + +char * +termname(void) +{ + + _DIAGASSERT(cur_term != NULL); + return __UNCONST(cur_term->name); +} + +static const char * nullname = '\0'; + +char * +longname(void) +{ + + _DIAGASSERT(cur_term != NULL); + if (cur_term->desc == NULL) + return __UNCONST(nullname); + return __UNCONST(cur_term->desc); } diff --git a/lib/libterminfo/genhash b/lib/libterminfo/genhash index 41fa05a8c..75730a978 100755 --- a/lib/libterminfo/genhash +++ b/lib/libterminfo/genhash @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $ +# $NetBSD: genhash,v 1.8 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -57,7 +57,7 @@ genent() echo $TOOL_SED -e "1,/enum TI${NAME}/d" -e '/};/,$d' \ -e 's/.*TICODE_\([^,]*\).*/\1/' $TERMH | \ - $TOOL_NBPERF -sn _ti_${name}hash; + $TOOL_NBPERF -p -s -n _ti_${name}hash; cat < -__RCSID("\$NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $"); - #include #include #include diff --git a/lib/libterminfo/genterms b/lib/libterminfo/genterms index 0404441d8..3d2afca82 100755 --- a/lib/libterminfo/genterms +++ b/lib/libterminfo/genterms @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genterms,v 1.3 2010/10/12 12:57:51 christos Exp $ +# $NetBSD: genterms,v 1.4 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2010 The NetBSD Foundation, Inc. +# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -34,10 +34,7 @@ set -e : ${NETBSDSRCDIR:=/usr/src} : ${TERMINFO:=${NETBSDSRCDIR}/share/terminfo/terminfo} -echo "/* \$NetBSD\$ */" -echo "/* * * MODIFIED FOR MINIX * * */" echo "/* DO NOT EDIT" -echo " * Regenerate by doing \`\`make compiled_terms''" -echo " */" +echo " * Automatically generated from terminfo */" echo ${TOOL_TIC} -Sx ${TERMINFO} ansi dumb minix vt100 vt220 wsvt25 xterm diff --git a/lib/libterminfo/genthash b/lib/libterminfo/genthash index 8238ca6cc..27d70e9a1 100755 --- a/lib/libterminfo/genthash +++ b/lib/libterminfo/genthash @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $ +# $NetBSD: genthash,v 1.5 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -36,13 +36,9 @@ set -e TERMCAPC=${1:-termcap_map.c} cat < -__RCSID("\$NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $"); - #include #include #include @@ -51,12 +47,12 @@ EOF $TOOL_SED -n -e "1,/_ti_cap_flagids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_flaghash + $TOOL_NBPERF -p -s -n _t_flaghash echo $TOOL_SED -n -e "1,/_ti_cap_numids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_numhash + $TOOL_NBPERF -p -s -n _t_numhash echo $TOOL_SED -n -e "1,/_ti_cap_strids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_strhash + $TOOL_NBPERF -p -s -n _t_strhash diff --git a/lib/libterminfo/hash.c b/lib/libterminfo/hash.c deleted file mode 100644 index 37efeee6c..000000000 --- a/lib/libterminfo/hash.c +++ /dev/null @@ -1,705 +0,0 @@ -/* $NetBSD: hash.c,v 1.4 2010/02/12 10:18:56 roy Exp $ */ -/* DO NOT EDIT - * Automatically generated from term.h */ - -#if HAVE_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#include -__RCSID("$NetBSD: hash.c,v 1.4 2010/02/12 10:18:56 roy Exp $"); - -#include -#include -#include -#include -#include - -static const char _ti_flagids[][6] = { - "bw", - "am", - "bce", - "ccc", - "xhp", - "xhpa", - "cpix", - "crxm", - "xt", - "xenl", - "eo", - "gn", - "hc", - "chts", - "km", - "daisy", - "hs", - "hls", - "in", - "lpix", - "da", - "db", - "mir", - "msgr", - "nxon", - "xsb", - "npc", - "ndscr", - "nrrmc", - "os", - "mc5i", - "xvpa", - "sam", - "eslok", - "hz", - "ul", - "xon", -}; - -#include - -static uint32_t -_ti_flaghash(const void * __restrict key, size_t keylen) -{ - static const uint8_t g[75] = { - 0x19, 0x08, 0x16, 0x00, 0x00, 0x1e, 0x07, 0x00, 0x1d, 0x00, - 0x17, 0x00, 0x0a, 0x17, 0x08, 0x09, 0x11, 0x00, 0x00, 0x0a, - 0x00, 0x13, 0x1a, 0x0f, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, - 0x12, 0x0a, 0x00, 0x11, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1b, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, - 0x00, 0x0d, 0x00, 0x00, 0x04, 0x16, 0x09, 0x00, 0x1a, 0x00, - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x1c, 0x05, 0x00, 0x00, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0xd36b2625U, h); - return (g[h[0] % 75] + g[h[1] % 75]) % 37; -} - -const char * -_ti_flagid(ssize_t idx) -{ - - if ((size_t)idx > __arraycount(_ti_flagids)) - return NULL; - return _ti_flagids[idx]; -} - -ssize_t -_ti_flagindex(const char *key) -{ - uint32_t idx; - - idx = _ti_flaghash((const unsigned char *)key, strlen(key)); - if (idx > __arraycount(_ti_flagids) || - strcmp(key, _ti_flagids[idx]) != 0) - return -1; - return idx; -} - -static const char _ti_numids[][7] = { - "bitwin", - "bitype", - "bufsz", - "btns", - "cols", - "spinh", - "spinv", - "it", - "lh", - "lw", - "lines", - "lm", - "ma", - "xmc", - "colors", - "maddr", - "mjump", - "pairs", - "wnum", - "mcs", - "mls", - "ncv", - "nlab", - "npins", - "orc", - "orl", - "orhi", - "orvi", - "pb", - "cps", - "vt", - "widcs", - "wsl", -}; - -#include - -static uint32_t -_ti_numhash(const void * __restrict key, size_t keylen) -{ - static const uint8_t g[67] = { - 0x04, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, - 0x19, 0x00, 0x0d, 0x00, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x0b, 0x15, 0x1d, 0x14, 0x00, 0x01, 0x13, 0x1b, 0x14, 0x00, - 0x19, 0x00, 0x00, 0x02, 0x14, 0x1a, 0x12, 0x00, 0x00, 0x00, - 0x16, 0x05, 0x00, 0x12, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x19, 0x00, 0x20, 0x00, 0x00, 0x10, 0x17, 0x00, 0x00, 0x0f, - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0x50a11f58U, h); - return (g[h[0] % 67] + g[h[1] % 67]) % 33; -} - -const char * -_ti_numid(ssize_t idx) -{ - - if ((size_t)idx > __arraycount(_ti_numids)) - return NULL; - return _ti_numids[idx]; -} - -ssize_t -_ti_numindex(const char *key) -{ - uint32_t idx; - - idx = _ti_numhash((const unsigned char *)key, strlen(key)); - if (idx > __arraycount(_ti_numids) || - strcmp(key, _ti_numids[idx]) != 0) - return -1; - return idx; -} - -static const char _ti_strids[][9] = { - "acsc", - "scesa", - "cbt", - "bel", - "bicr", - "binel", - "birep", - "cr", - "cpi", - "lpi", - "chr", - "cvr", - "csr", - "rmp", - "csnm", - "tbc", - "mgc", - "clear", - "el1", - "el", - "ed", - "csin", - "colornm", - "hpa", - "cmdch", - "cwin", - "cup", - "cud1", - "home", - "civis", - "cub1", - "mrcup", - "cnorm", - "cuf1", - "ll", - "cuu1", - "cvvis", - "defbi", - "defc", - "dch1", - "dl1", - "devt", - "dial", - "dsl", - "dclk", - "dispc", - "hd", - "enacs", - "endbi", - "smacs", - "smam", - "blink", - "bold", - "smcup", - "smdc", - "dim", - "swidm", - "sdrfq", - "ehhlm", - "smir", - "sitm", - "elhlm", - "slm", - "elohlm", - "smicm", - "snlq", - "snrmq", - "smpch", - "prot", - "rev", - "erhlm", - "smsc", - "invis", - "sshm", - "smso", - "ssubm", - "ssupm", - "ethlm", - "smul", - "sum", - "evhlm", - "smxon", - "ech", - "rmacs", - "rmam", - "sgr0", - "rmcup", - "rmdc", - "rwidm", - "rmir", - "ritm", - "rlm", - "rmicm", - "rmpch", - "rmsc", - "rshm", - "rmso", - "rsubm", - "rsupm", - "rmul", - "rum", - "rmxon", - "pause", - "hook", - "flash", - "ff", - "fsl", - "getm", - "wingo", - "hup", - "is1", - "is2", - "is3", - "if", - "iprog", - "initc", - "initp", - "ich1", - "il1", - "ip", - "ka1", - "ka3", - "kb2", - "kbs", - "kbeg", - "kcbt", - "kc1", - "kc3", - "kcan", - "ktbc", - "kclr", - "kclo", - "kcmd", - "kcpy", - "kcrt", - "kctab", - "kdch1", - "kdl1", - "kcud1", - "krmir", - "kend", - "kent", - "kel", - "ked", - "kext", - "kf0", - "kf1", - "kf2", - "kf3", - "kf4", - "kf5", - "kf6", - "kf7", - "kf8", - "kf9", - "kf10", - "kf11", - "kf12", - "kf13", - "kf14", - "kf15", - "kf16", - "kf17", - "kf18", - "kf19", - "kf20", - "kf21", - "kf22", - "kf23", - "kf24", - "kf25", - "kf26", - "kf27", - "kf28", - "kf29", - "kf30", - "kf31", - "kf32", - "kf33", - "kf34", - "kf35", - "kf36", - "kf37", - "kf38", - "kf39", - "kf40", - "kf41", - "kf42", - "kf43", - "kf44", - "kf45", - "kf46", - "kf47", - "kf48", - "kf49", - "kf50", - "kf51", - "kf52", - "kf53", - "kf54", - "kf55", - "kf56", - "kf57", - "kf58", - "kf59", - "kf60", - "kf61", - "kf62", - "kf63", - "kfnd", - "khlp", - "khome", - "kich1", - "kil1", - "kcub1", - "kll", - "kmrk", - "kmsg", - "kmous", - "kmov", - "knxt", - "knp", - "kopn", - "kopt", - "kpp", - "kprv", - "kprt", - "krdo", - "kref", - "krfr", - "krpl", - "krst", - "kres", - "kcuf1", - "ksav", - "kBEG", - "kCAN", - "kCMD", - "kCPY", - "kCRT", - "kDC", - "kDL", - "kslt", - "kEND", - "kEOL", - "kEXT", - "kind", - "kFND", - "kHLP", - "kHOM", - "kIC", - "kLFT", - "kMSG", - "kMOV", - "kNXT", - "kOPT", - "kPRV", - "kPRT", - "kri", - "kRDO", - "kRPL", - "kRIT", - "kRES", - "kSAV", - "kSPD", - "khts", - "kUND", - "kspd", - "kund", - "kcuu1", - "rmkx", - "smkx", - "lf0", - "lf1", - "lf2", - "lf3", - "lf4", - "lf5", - "lf6", - "lf7", - "lf8", - "lf9", - "lf10", - "fln", - "rmln", - "smln", - "rmm", - "smm", - "mhpa", - "mcud1", - "mcub1", - "mcuf1", - "mvpa", - "mcuu1", - "minfo", - "nel", - "porder", - "oc", - "op", - "pad", - "dch", - "dl", - "cud", - "mcud", - "ich", - "indn", - "il", - "cub", - "mcub", - "cuf", - "mcuf", - "rin", - "cuu", - "mcuu", - "pctrm", - "pfkey", - "pfloc", - "pfxl", - "pfx", - "pln", - "mc0", - "mc5p", - "mc4", - "mc5", - "pulse", - "qdial", - "rmclk", - "rep", - "rfi", - "reqmp", - "rs1", - "rs2", - "rs3", - "rf", - "rc", - "vpa", - "sc", - "scesc", - "ind", - "ri", - "scs", - "s0ds", - "s1ds", - "s2ds", - "s3ds", - "sgr1", - "setab", - "setaf", - "sgr", - "setb", - "smgb", - "smgbp", - "sclk", - "setcolor", - "scp", - "setf", - "smgl", - "smglp", - "smglr", - "slines", - "slength", - "smgr", - "smgrp", - "hts", - "smgtb", - "smgt", - "smgtp", - "wind", - "sbim", - "scsd", - "rbim", - "rcsd", - "subcs", - "supcs", - "ht", - "docr", - "tsl", - "tone", - "u0", - "u1", - "u2", - "u3", - "u4", - "u5", - "u6", - "u7", - "u8", - "u9", - "uc", - "hu", - "wait", - "xoffc", - "xonc", - "zerom", -}; - -#include - -static uint32_t -_ti_strhash(const void * __restrict key, size_t keylen) -{ - static const uint16_t g[789] = { - 0x0000, 0x00cd, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0094, - 0x0000, 0x011b, 0x00a0, 0x0094, 0x002f, 0x00aa, 0x0026, 0x004b, - 0x0000, 0x0163, 0x0171, 0x0000, 0x0000, 0x0064, 0x0019, 0x0000, - 0x009b, 0x0113, 0x00ed, 0x007e, 0x0000, 0x0000, 0x0000, 0x002d, - 0x0000, 0x00f4, 0x0000, 0x00cc, 0x00df, 0x0170, 0x0000, 0x0000, - 0x0179, 0x0018, 0x0000, 0x013b, 0x0000, 0x0028, 0x0000, 0x0000, - 0x00ef, 0x0000, 0x0137, 0x0061, 0x0000, 0x0000, 0x00ce, 0x00df, - 0x00f0, 0x001f, 0x0074, 0x0000, 0x0000, 0x008f, 0x0069, 0x0000, - 0x0134, 0x0000, 0x00ac, 0x0000, 0x0000, 0x0100, 0x0000, 0x0000, - 0x0012, 0x0027, 0x0000, 0x0110, 0x0000, 0x0000, 0x0000, 0x0061, - 0x00a7, 0x0000, 0x0061, 0x0000, 0x0000, 0x0096, 0x0000, 0x00e5, - 0x0000, 0x00d1, 0x0017, 0x0000, 0x0000, 0x00bc, 0x00d6, 0x0000, - 0x0182, 0x00d7, 0x012d, 0x0000, 0x00e2, 0x00b9, 0x0159, 0x0000, - 0x001c, 0x00cc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0031, 0x0106, 0x0087, 0x0157, 0x001d, 0x011a, 0x0119, - 0x0000, 0x0000, 0x0000, 0x012b, 0x0000, 0x011b, 0x0000, 0x0154, - 0x0000, 0x00ee, 0x00ad, 0x00f8, 0x0066, 0x0000, 0x0010, 0x0000, - 0x0064, 0x000e, 0x0052, 0x0000, 0x016a, 0x0000, 0x0148, 0x0000, - 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x016d, 0x000b, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0058, 0x0091, 0x0000, 0x0022, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0026, 0x011a, 0x00a4, 0x013a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0086, 0x0000, 0x00c0, 0x011f, - 0x0000, 0x0093, 0x0000, 0x0000, 0x0042, 0x0174, 0x0101, 0x0000, - 0x0065, 0x0086, 0x0000, 0x0000, 0x00e8, 0x0022, 0x000d, 0x0000, - 0x008e, 0x000d, 0x0000, 0x008b, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0022, 0x0000, 0x011d, 0x0000, 0x0000, 0x0000, 0x010e, 0x0000, - 0x0000, 0x0000, 0x0060, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0014, 0x00b3, 0x0000, 0x002e, 0x0051, 0x0000, 0x0102, 0x008e, - 0x012b, 0x0145, 0x004c, 0x0000, 0x001e, 0x00fa, 0x0000, 0x0000, - 0x0000, 0x0000, 0x00aa, 0x0000, 0x0000, 0x0000, 0x0103, 0x00a4, - 0x003e, 0x0000, 0x0114, 0x0028, 0x005e, 0x015d, 0x00e7, 0x0044, - 0x0000, 0x0000, 0x00c6, 0x008f, 0x0000, 0x00eb, 0x0000, 0x0000, - 0x0000, 0x0169, 0x0000, 0x0110, 0x0093, 0x0000, 0x012c, 0x0178, - 0x0000, 0x0000, 0x0024, 0x0000, 0x0000, 0x0000, 0x0000, 0x0158, - 0x004d, 0x009c, 0x0186, 0x009b, 0x0000, 0x0163, 0x007c, 0x0078, - 0x0000, 0x0000, 0x0172, 0x00d2, 0x0000, 0x0000, 0x00fc, 0x0000, - 0x0000, 0x0000, 0x0133, 0x0104, 0x017e, 0x0162, 0x0050, 0x0000, - 0x0023, 0x00c0, 0x0070, 0x0000, 0x0000, 0x0000, 0x0025, 0x0001, - 0x0184, 0x0053, 0x0133, 0x0000, 0x0000, 0x0000, 0x0048, 0x0075, - 0x0000, 0x00b2, 0x0056, 0x002c, 0x0000, 0x011c, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0166, 0x011b, 0x0000, 0x0039, 0x0020, - 0x0000, 0x0000, 0x0000, 0x00dc, 0x0048, 0x0000, 0x0076, 0x0169, - 0x00d7, 0x002a, 0x0032, 0x0013, 0x0153, 0x012f, 0x009c, 0x0041, - 0x002f, 0x0000, 0x0000, 0x012e, 0x0000, 0x0000, 0x00dd, 0x0000, - 0x0138, 0x000b, 0x0030, 0x008d, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0039, 0x017a, 0x00c5, 0x0100, 0x0000, 0x0000, 0x005c, 0x001f, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0110, 0x003e, 0x00a1, 0x0000, - 0x0081, 0x0000, 0x0000, 0x0000, 0x00dd, 0x0142, 0x00c1, 0x0000, - 0x0035, 0x0123, 0x0178, 0x00be, 0x015e, 0x0161, 0x0188, 0x0000, - 0x0000, 0x0149, 0x0123, 0x0000, 0x0000, 0x0185, 0x0000, 0x0000, - 0x0000, 0x004e, 0x0163, 0x0077, 0x00fa, 0x0000, 0x007b, 0x0006, - 0x0101, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0158, 0x00d6, - 0x00b0, 0x0180, 0x0003, 0x0000, 0x0000, 0x0000, 0x0136, 0x0045, - 0x017e, 0x0000, 0x0000, 0x0000, 0x0126, 0x0090, 0x011b, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x017b, 0x0000, 0x0053, 0x0000, - 0x005c, 0x0000, 0x0000, 0x0020, 0x0000, 0x0000, 0x007e, 0x014e, - 0x0035, 0x00ed, 0x0000, 0x00d1, 0x00d8, 0x0142, 0x0168, 0x000a, - 0x00d0, 0x0000, 0x0000, 0x0000, 0x00d9, 0x0000, 0x0000, 0x0087, - 0x0000, 0x008a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0112, 0x006c, - 0x011d, 0x0177, 0x0000, 0x0000, 0x0000, 0x0000, 0x0024, 0x001e, - 0x0177, 0x00c4, 0x0000, 0x0000, 0x0000, 0x0014, 0x00c7, 0x00ae, - 0x0042, 0x0180, 0x0075, 0x0000, 0x011c, 0x0064, 0x00a3, 0x00bc, - 0x0001, 0x0000, 0x0000, 0x0016, 0x00c3, 0x00e4, 0x0009, 0x0000, - 0x0000, 0x006b, 0x013c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x00fa, 0x0000, 0x0000, 0x0000, 0x0117, 0x0000, 0x007c, 0x0060, - 0x0149, 0x0059, 0x00d4, 0x014e, 0x000a, 0x014f, 0x0000, 0x0000, - 0x0000, 0x00b6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0121, - 0x0000, 0x0000, 0x0000, 0x007d, 0x0000, 0x0000, 0x001c, 0x0000, - 0x0000, 0x00f9, 0x0000, 0x003b, 0x00ea, 0x0000, 0x00ad, 0x0000, - 0x0000, 0x0000, 0x0155, 0x0000, 0x0141, 0x0000, 0x0000, 0x0000, - 0x0187, 0x004b, 0x009f, 0x0000, 0x0114, 0x0000, 0x00dd, 0x0000, - 0x0066, 0x0000, 0x0136, 0x0135, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x001e, 0x0000, 0x0062, 0x0146, 0x0033, 0x0071, 0x0000, - 0x0000, 0x010d, 0x004a, 0x0133, 0x0000, 0x0000, 0x0076, 0x0111, - 0x0000, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0038, 0x001d, 0x0158, - 0x0072, 0x00a3, 0x0000, 0x008c, 0x0008, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x00ea, 0x0000, 0x003f, - 0x0000, 0x0000, 0x0000, 0x004c, 0x0000, 0x00f9, 0x0000, 0x0000, - 0x0000, 0x0147, 0x0182, 0x008f, 0x0156, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0011, 0x0000, 0x0102, 0x0040, 0x0000, 0x0000, - 0x0130, 0x0000, 0x0000, 0x0000, 0x0126, 0x0026, 0x0145, 0x0000, - 0x0000, 0x00ab, 0x0000, 0x0175, 0x0113, 0x0117, 0x010f, 0x000f, - 0x0000, 0x00e3, 0x012e, 0x0000, 0x0000, 0x00f5, 0x0020, 0x0000, - 0x0000, 0x00a8, 0x0000, 0x0000, 0x012a, 0x009f, 0x0085, 0x0000, - 0x00b6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0108, - 0x00cb, 0x0000, 0x0000, 0x0000, 0x0053, 0x0000, 0x007f, 0x0000, - 0x008c, 0x0113, 0x0000, 0x0000, 0x0156, 0x0169, 0x0000, 0x0009, - 0x0000, 0x0073, 0x0000, 0x007e, 0x0000, 0x0000, 0x0000, 0x00eb, - 0x0000, 0x0153, 0x0084, 0x0000, 0x0000, 0x0148, 0x0000, 0x0000, - 0x011c, 0x0000, 0x00ec, 0x0000, 0x0000, 0x015a, 0x0000, 0x0000, - 0x0000, 0x0000, 0x012a, 0x0000, 0x0000, 0x015d, 0x0000, 0x00ae, - 0x0000, 0x0000, 0x00db, 0x0000, 0x0000, 0x0000, 0x0000, 0x0101, - 0x0067, 0x0000, 0x010c, 0x0000, 0x0032, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0167, 0x0000, 0x00e4, 0x0000, 0x00a2, 0x0000, - 0x0067, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0181, 0x0000, - 0x015b, 0x0046, 0x0000, 0x0000, 0x0000, 0x00fd, 0x0000, 0x0000, - 0x00a8, 0x0000, 0x0008, 0x00a6, 0x00b5, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x006b, 0x0000, 0x0000, 0x00b1, 0x00a2, - 0x0000, 0x0000, 0x0000, 0x0166, 0x0000, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0x8e1051e9U, h); - return (g[h[0] % 789] + g[h[1] % 789]) % 394; -} - -const char * -_ti_strid(ssize_t idx) -{ - - if ((size_t)idx > __arraycount(_ti_strids)) - return NULL; - return _ti_strids[idx]; -} - -ssize_t -_ti_strindex(const char *key) -{ - uint32_t idx; - - idx = _ti_strhash((const unsigned char *)key, strlen(key)); - if (idx > __arraycount(_ti_strids) || - strcmp(key, _ti_strids[idx]) != 0) - return -1; - return idx; -} diff --git a/lib/libterminfo/minix-config.inc b/lib/libterminfo/minix-config.inc deleted file mode 100644 index 1678da6f0..000000000 --- a/lib/libterminfo/minix-config.inc +++ /dev/null @@ -1,5 +0,0 @@ -NETBSDINCLUDES= /usr/include/ - -CPPFLAGS+= -D_NETBSD_SOURCE - -MKLINKLIB= yes diff --git a/lib/libterminfo/setupterm.c b/lib/libterminfo/setupterm.c index 304f5eddf..f0eddcb97 100644 --- a/lib/libterminfo/setupterm.c +++ b/lib/libterminfo/setupterm.c @@ -1,7 +1,7 @@ -/* $NetBSD: setupterm.c,v 1.2 2010/02/11 00:27:09 roy Exp $ */ +/* $NetBSD: setupterm.c,v 1.3 2011/10/03 19:18:55 roy Exp $ */ /* - * Copyright (c) 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: setupterm.c,v 1.2 2010/02/11 00:27:09 roy Exp $"); +__RCSID("$NetBSD: setupterm.c,v 1.3 2011/10/03 19:18:55 roy Exp $"); #include #include @@ -82,7 +82,7 @@ ti_setupterm(TERMINAL **nterm, const char *term, int fildes, int *errret) error = _ti_getterm(*nterm, term, 0); if (error != 1) { - free(*nterm); + del_curterm(*nterm); *nterm = NULL; switch (error) { case -1: diff --git a/lib/libterminfo/shlib_version b/lib/libterminfo/shlib_version index 97c9f92d6..16243a0b0 100644 --- a/lib/libterminfo/shlib_version +++ b/lib/libterminfo/shlib_version @@ -1,2 +1,5 @@ +# $NetBSD: shlib_version,v 1.1 2010/02/03 15:16:32 roy Exp $ +# Remember to update distrib/sets/lists/base/shl.* when changing +# major=0 minor=0 diff --git a/lib/libterminfo/term.c b/lib/libterminfo/term.c index a76a4cfd7..eff6619f9 100644 --- a/lib/libterminfo/term.c +++ b/lib/libterminfo/term.c @@ -1,7 +1,7 @@ -/* $NetBSD: term.c,v 1.11 2010/02/26 00:09:00 roy Exp $ */ +/* $NetBSD: term.c,v 1.16 2012/06/06 13:36:58 joerg Exp $ */ /* - * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -28,16 +28,16 @@ */ #include -__RCSID("$NetBSD: term.c,v 1.11 2010/02/26 00:09:00 roy Exp $"); +__RCSID("$NetBSD: term.c,v 1.16 2012/06/06 13:36:58 joerg Exp $"); #include #include +#include #include #include #include #include -#include #include #include #include @@ -66,26 +66,26 @@ _ti_readterm(TERMINAL *term, const char *cap, size_t caplen, int flags) TERMUSERDEF *ud; ver = *cap++; - /* Only read version 1 and 2 structures */ - if (ver != 1 && ver != 2) { + /* Only read version 1 structures */ + if (ver != 1) { errno = EINVAL; return -1; } term->flags = calloc(TIFLAGMAX + 1, sizeof(char)); if (term->flags == NULL) - goto err; + return -1; term->nums = malloc((TINUMMAX + 1) * sizeof(short)); if (term->nums == NULL) - goto err; + return -1; memset(term->nums, (short)-1, (TINUMMAX + 1) * sizeof(short)); term->strs = calloc(TISTRMAX + 1, sizeof(char *)); if (term->strs == NULL) - goto err; + return -1; term->_arealen = caplen; term->_area = malloc(term->_arealen); if (term->_area == NULL) - goto err; + return -1; memcpy(term->_area, cap, term->_arealen); cap = term->_area; @@ -93,17 +93,13 @@ _ti_readterm(TERMINAL *term, const char *cap, size_t caplen, int flags) cap += sizeof(uint16_t); term->name = cap; cap += len; - if (ver == 1) + len = le16dec(cap); + cap += sizeof(uint16_t); + if (len == 0) term->_alias = NULL; else { - len = le16dec(cap); - cap += sizeof(uint16_t); - if (len == 0) - term->_alias = NULL; - else { - term->_alias = cap; - cap += len; - } + term->_alias = cap; + cap += len; } len = le16dec(cap); cap += sizeof(uint16_t); @@ -209,55 +205,65 @@ _ti_readterm(TERMINAL *term, const char *cap, size_t caplen, int flags) break; default: errno = EINVAL; - goto err; + return -1; } } } return 1; - -err: - _ti_freeterm(term); - return -1; } static int _ti_dbgetterm(TERMINAL *term, const char *path, const char *name, int flags) { - DBM *db; - datum dt; - char *p; + struct cdbr *db; + const void *data; + char *db_name; + const uint8_t *data8; + size_t len, klen; int r; - db = dbm_open(path, O_RDONLY, 0644); + if (asprintf(&db_name, "%s.cdb", path) < 0) + return -1; + + db = cdbr_open(db_name, CDBR_DEFAULT); + free(db_name); if (db == NULL) return -1; + + klen = strlen(name) + 1; + if (cdbr_find(db, name, klen, &data, &len) == -1) + goto fail; + data8 = data; + if (len == 0) + goto fail; + /* Check for alias first, fall through to processing normal entries. */ + if (data8[0] == 2) { + if (klen + 7 > len || le16dec(data8 + 5) != klen) + goto fail; + if (memcmp(data8 + 7, name, klen)) + goto fail; + if (cdbr_get(db, le32dec(data8 + 1), &data, &len)) + goto fail; + data8 = data; + if (data8[0] != 1) + goto fail; + } else if (data8[0] != 1) + goto fail; + else if (klen + 3 >= len || le16dec(data8 + 1) != klen) + goto fail; + else if (memcmp(data8 + 3, name, klen)) + goto fail; + strlcpy(database, path, sizeof(database)); _ti_database = database; - dt.dptr = (void *)__UNCONST(name); - dt.dsize = strlen(name); - dt = dbm_fetch(db, dt); - if (dt.dptr == NULL) { - dbm_close(db); - return 0; - } - for (;;) { - p = (char *)dt.dptr; - if (*p++ != 0) /* not alias */ - break; - dt.dsize = le16dec(p) - 1; - p += sizeof(uint16_t); - dt.dptr = p; - dt = dbm_fetch(db, dt); - if (dt.dptr == NULL) { - dbm_close(db); - return 0; - } - } - - r = _ti_readterm(term, (char *)dt.dptr, dt.dsize, flags); - dbm_close(db); + r = _ti_readterm(term, data, len, flags); + cdbr_close(db); return r; + + fail: + cdbr_close(db); + return 0; } static int @@ -305,7 +311,7 @@ ticcmp(const TIC *tic, const char *name) l = strlen(alias); else l = s - alias; - if (len == l && strncmp(alias, name, l) == 0) + if (len == l && memcmp(alias, name, l) == 0) return 0; if (s == NULL) break; @@ -358,7 +364,8 @@ _ti_findterm(TERMINAL *term, const char *name, int flags) if (tic != NULL && ticcmp(tic, name) == 0) { len = _ti_flatten(&f, tic); if (len != -1) { - r = _ti_readterm(term, (char *)f, len, flags); + r = _ti_readterm(term, (char *)f, (size_t)len, + flags); free(f); } } @@ -407,16 +414,3 @@ _ti_getterm(TERMINAL *term, const char *name, int flags) return r; } - -void -_ti_freeterm(TERMINAL *term) -{ - - if (term != NULL) { - free(term->_area); - free(term->strs); - free(term->nums); - free(term->flags); - free(term->_userdefs); - } -} diff --git a/lib/libterminfo/term.h b/lib/libterminfo/term.h index 102e186b5..92af30faf 100644 --- a/lib/libterminfo/term.h +++ b/lib/libterminfo/term.h @@ -1,7 +1,7 @@ -/* $NetBSD: term.h,v 1.6 2010/09/22 06:10:51 roy Exp $ */ +/* $NetBSD: term.h,v 1.12 2012/05/29 00:27:59 dholland Exp $ */ /* - * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -1012,7 +1012,7 @@ enum TISTRS{ #define t_set_bottom_margin_parm(t) (t)->strs[TICODE_smgbp] #define t_set_clock(t) (t)->strs[TICODE_sclk] #define t_set_color_band(t) (t)->strs[TICODE_setcolor] -#define t_set_color_paid(t) (t)->strs[TICODE_scp] +#define t_set_color_pair(t) (t)->strs[TICODE_scp] #define t_set_foreground(t) (t)->strs[TICODE_setf] #define t_set_left_margin(t) (t)->strs[TICODE_smgl] #define t_set_left_margin_parm(t) (t)->strs[TICODE_smglp] @@ -1407,7 +1407,7 @@ enum TISTRS{ #define set_bottom_margin_parm t_set_bottom_margin_parm(cur_term) #define set_clock t_set_clock(cur_term) #define set_color_band t_set_color_band(cur_term) -#define set_color_paid t_set_color_paid(cur_term) +#define set_color_pair t_set_color_pair(cur_term) #define set_foreground t_set_foreground(cur_term) #define set_left_margin t_set_left_margin(cur_term) #define set_left_margin_parm t_set_left_margin_parm(cur_term) @@ -1460,18 +1460,18 @@ typedef struct { } TERMINAL; #endif +#include + __BEGIN_DECLS extern TERMINAL *cur_term; -#ifndef _TERMCAP_H -extern short ospeed; -extern char PC; -#endif /* setup functions */ int setupterm(const char *, int, int *); TERMINAL * set_curterm(TERMINAL *); int del_curterm(TERMINAL *); +char * termname(void); +char * longname(void); /* information functions */ int tigetflag(const char *); @@ -1482,18 +1482,12 @@ char * tigetstr(const char *); char * tparm(const char *, long, long, long, long, long, long, long, long, long); -#ifndef _TERMCAP_H -/* Output functions. */ -int putp(const char *); -int tputs(const char *, int, int (*)(int)); -#endif - /* Non standard functions, but provide a level of thread safety */ int ti_setupterm(TERMINAL **, const char *, int, int *); int ti_getflag(const TERMINAL *, const char *); int ti_getnum(const TERMINAL *, const char *); const char * ti_getstr(const TERMINAL *, const char *); -char * t_parm(TERMINAL *, const char *, +char * ti_parm(TERMINAL *, const char *, long, long, long, long, long, long, long, long, long); /* These functions do not use PC or speed, but the terminal */ @@ -1502,19 +1496,23 @@ int ti_puts(const TERMINAL *, const char *, int, int ti_putp(const TERMINAL *, const char *); /* Using tparm can be kunkly, so provide a variadic function */ -char * vtparm(const char *, ...); +/* This is not standard, but ncurses also provides this */ +char * tiparm(const char *, ...); /* And a thread safe version */ -char * t_vparm(TERMINAL *, const char *, ...); +char * ti_tiparm(TERMINAL *, const char *, ...); /* Default to X/Open tparm, but allow it to be variadic also */ #ifdef TPARM_VARARGS -# define tparm vtparm -# define t_parm t_vtparm +# define tparm tiparm +# define ti_parm ti_tiparm #endif /* Convert a termcap string into a terminfo string. * The passed string is destroyed and the return string needs to be freed. */ char * captoinfo(char *); +/* POSIX says that term.h should also pull in our termcap definitions. */ +#include + __END_DECLS #endif diff --git a/lib/libterminfo/term_private.h b/lib/libterminfo/term_private.h index 63c069dd4..4314c1115 100644 --- a/lib/libterminfo/term_private.h +++ b/lib/libterminfo/term_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: term_private.h,v 1.8 2010/09/22 06:10:51 roy Exp $ */ +/* $NetBSD: term_private.h,v 1.10 2012/06/03 23:19:10 joerg Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -42,15 +42,22 @@ * including the null terminator. * The largest capability block we can handle is 65535 bytes. * This means that we exceed the current terminfo defined limits. - * The header is version (char), name. - * version 0 is an alias, and the name refers to the real terminfo. - * version 1 capabilities are defined as so: + * + * Version 1 capabilities are defined as: + * header byte (always 1) + * name * description, * cap length, num flags, index, char, * cap length, num numbers, index, number, * cap length, num strings, index, string, - * cap lelngth, num undefined caps, name, type (char), flag, number, string - * The database itself is created using ndbm(3) and the numbers are + * cap length, num undefined caps, name, type (char), flag, number, string + * + * Version 2 entries are aliases and defined as: + * header byte (always 2) + * 32bit id of the corresponding terminal in the file + * name + * + * The database itself is created using cdbw(3) and the numbers are * always stored as little endian. */ @@ -114,7 +121,6 @@ const char * _ti_numid(ssize_t); const char * _ti_strid(ssize_t); int _ti_getterm(TERMINAL *, const char *, int); void _ti_setospeed(TERMINAL *); -void _ti_freeterm(TERMINAL *); /* libterminfo can compile terminfo strings too */ #define TIC_WARNING (1 << 0) diff --git a/lib/libterminfo/termcap.3 b/lib/libterminfo/termcap.3 index da08d246c..956417b25 100644 --- a/lib/libterminfo/termcap.3 +++ b/lib/libterminfo/termcap.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: termcap.3,v 1.4 2010/02/04 09:12:55 wiz Exp $ +.\" $NetBSD: termcap.3,v 1.6 2011/03/14 11:44:20 christos Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 7, 2009 +.Dd March 14, 2011 .Dt TERMCAP 3 .Os .Sh NAME @@ -124,7 +124,19 @@ function returns a cursor addressing string decoded from to go to column .Fa destcol in line -.Fa destline . +.Fa destline , +or +.Dv NULL +on error conditions such as out of memory. +Please note that +.Fn tgoto +can return an incomplete value on a malformed input sequence. +Historically +.Fn tgoto +used to return +.Dq OOPS +on those conditions, so newer programs should now be checking the return +value. .Sh SEE ALSO .Xr terminfo 3 , .Xr terminfo 5 diff --git a/lib/libterminfo/termcap.c b/lib/libterminfo/termcap.c index e9d422532..aed608017 100644 --- a/lib/libterminfo/termcap.c +++ b/lib/libterminfo/termcap.c @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.c,v 1.10 2010/10/12 12:49:27 christos Exp $ */ +/* $NetBSD: termcap.c,v 1.17 2011/11/13 15:24:04 christos Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: termcap.c,v 1.10 2010/10/12 12:49:27 christos Exp $"); +__RCSID("$NetBSD: termcap.c,v 1.17 2011/11/13 15:24:04 christos Exp $"); #include #include @@ -74,13 +74,12 @@ tgetent(__unused char *bp, const char *name) } int -tgetflag(const char *id) +tgetflag(const char *id2) { uint32_t ind; size_t i; TERMUSERDEF *ud; - - _DIAGASSERT(id != NULL); + const char id[] = { id2[0], id2[0] ? id2[1] : '\0', '\0' }; if (cur_term == NULL) return 0; @@ -99,14 +98,13 @@ tgetflag(const char *id) } int -tgetnum(const char *id) +tgetnum(const char *id2) { uint32_t ind; size_t i; TERMUSERDEF *ud; const TENTRY *te; - - _DIAGASSERT(id != NULL); + const char id[] = { id2[0], id2[0] ? id2[1] : '\0', '\0' }; if (cur_term == NULL) return -1; @@ -132,14 +130,13 @@ tgetnum(const char *id) } char * -tgetstr(const char *id, char **area) +tgetstr(const char *id2, char **area) { uint32_t ind; size_t i; TERMUSERDEF *ud; const char *str; - - _DIAGASSERT(id != NULL); + const char id[] = { id2[0], id2[0] ? id2[1] : '\0', '\0' }; if (cur_term == NULL) return NULL; @@ -178,9 +175,8 @@ tgetstr(const char *id, char **area) char * tgoto(const char *cm, int destcol, int destline) { - _DIAGASSERT(cm != NULL); - return vtparm(cm, destline, destcol); + return tiparm(cm, destline, destcol); } static const char * @@ -223,14 +219,82 @@ strname(const char *key) return key; } -/* We don't currently map %> %B %D - * That means no conversion for regent100, hz1500, act4, act5, mime terms. */ +/* Print a parameter if needed */ +static int +printparam(char **dst, char p, int *nop) +{ + if (*nop != 0) { + *nop = 0; + return 0; + } + + *(*dst)++ = '%'; + *(*dst)++ = 'p'; + *(*dst)++ = '0' + p; + return 3; +} + +/* Convert a termcap character into terminfo equivalents */ +static int +printchar(char **dst, const char **src) +{ + unsigned char v; + int l; + + l = 4; + v = (unsigned char) *++(*src); + if (v == '\\') { + v = (unsigned char) *++(*src); + switch (v) { + case '0': + case '1': + case '2': + case '3': + v = 0; + while (isdigit((unsigned char) **src)) + v = 8 * v + ((unsigned char) *(*src)++ - '0'); + (*src)--; + break; + case '\0': + v = '\\'; + break; + } + } else if (v == '^') + v = (unsigned char) (*++(*src) & 0x1f); + *(*dst)++ = '%'; + if (isgraph(v) && v != ',' && v != '\'' && v != '\\' && v != ':') { + *(*dst)++ = '\''; + *(*dst)++ = v; + *(*dst)++ = '\''; + } else { + *(*dst)++ = '{'; + if (v > 99) { + *(*dst)++ = '0'+ v / 100; + l++; + } + if (v > 9) { + *(*dst)++ = '0' + ((int) (v / 10)) % 10; + l++; + } + *(*dst)++ = '0' + v % 10; + *(*dst)++ = '}'; + } + return l; +} + +/* Convert termcap commands into terminfo commands */ +static const char fmtB[] = "%p0%{10}%/%{16}%*%p0%{10}%m%+"; +static const char fmtD[] = "%p0%p0%{2}%*%-"; +static const char fmtIf[] = "%p0%p0%?"; +static const char fmtThen[] = "%>%t"; +static const char fmtElse[] = "%+%;"; + static char * strval(const char *val) { char *info, *ip, c; const char *ps, *pe; - int p; + int p, nop; size_t len, l; len = 1024; /* no single string should be bigger */ @@ -254,7 +318,7 @@ strval(const char *val) } else ps = pe = NULL; - l = 0; + l = nop = 0; p = 1; for (; *val != '\0'; val++) { if (l + 2 > len) @@ -270,27 +334,98 @@ strval(const char *val) l++; continue; } - switch (c = *(++val)) { + switch (c = *++(val)) { + case 'B': + if (l + sizeof(fmtB) > len) + goto elen; + memcpy(ip, fmtB, sizeof(fmtB) - 1); + /* Replace the embedded parameters with real ones */ + ip[2] += p; + ip[19] += p; + ip += sizeof(fmtB) - 1; + l += sizeof(fmtB) - 1; + nop = 1; + continue; + case 'D': + if (l + sizeof(fmtD) > len) + goto elen; + memcpy(ip, fmtD, sizeof(fmtD) - 1); + /* Replace the embedded parameters with real ones */ + ip[2] += p; + ip[5] += p; + ip += sizeof(fmtD) - 1; + l += sizeof(fmtD) - 1; + nop = 1; + continue; + case 'r': + /* non op as switched below */ + break; + case '2': /* FALLTHROUGH */ + case '3': /* FALLTHROUGH */ case 'd': + if (l + 7 > len) + goto elen; + l += printparam(&ip, p, &nop); + *ip++ = '%'; + if (c != 'd') { + *ip++ = c; + l++; + } + *ip++ = 'd'; + l += 2; + break; + case '+': + if (l + 13 > len) + goto elen; + l += printparam(&ip, p, &nop); + l += printchar(&ip, &val); + *ip++ = '%'; + *ip++ = c; + *ip++ = '%'; + *ip++ = 'c'; + l += 7; + break; + case '>': + if (l + sizeof(fmtIf) + sizeof(fmtThen) + + sizeof(fmtElse) + (6 * 2) > len) + goto elen; + + memcpy(ip, fmtIf, sizeof(fmtIf) - 1); + /* Replace the embedded parameters with real ones */ + ip[2] += p; + ip[5] += p; + ip += sizeof(fmtIf) - 1; + l += sizeof(fmtIf) - 1; + l += printchar(&ip, &val); + memcpy(ip, fmtThen, sizeof(fmtThen) - 1); + ip += sizeof(fmtThen) - 1; + l += sizeof(fmtThen) - 1; + l += printchar(&ip, &val); + memcpy(ip, fmtElse, sizeof(fmtElse) - 1); + ip += sizeof(fmtElse) - 1; + l += sizeof(fmtElse) - 1; + l += 16; + nop = 1; + continue; + case '.': if (l + 6 > len) goto elen; + l += printparam(&ip, p, &nop); *ip++ = '%'; - *ip++ = 'p'; - *ip++ = '0' + p; - *ip++ = '%'; - *ip++ = 'd'; - l += 5; - /* FALLTHROUGH */ - case 'r': - p = 3 - p; + *ip++ = 'c'; + l += 2; break; default: /* Hope it matches a terminfo command. */ *ip++ = '%'; *ip++ = c; l += 2; + if (c == 'i') + continue; break; } + /* Swap p1 and p2 */ + p = 3 - p; } /* \E\ is valid termcap. diff --git a/lib/libterminfo/termcap.h b/lib/libterminfo/termcap.h index 3c5e1da6d..d64c8741a 100644 --- a/lib/libterminfo/termcap.h +++ b/lib/libterminfo/termcap.h @@ -1,7 +1,7 @@ -/* $NetBSD: termcap.h,v 1.1 2010/02/03 15:16:32 roy Exp $ */ +/* $NetBSD: termcap.h,v 1.2 2011/04/11 21:13:09 roy Exp $ */ /* - * Copyright (c) 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -34,7 +34,6 @@ __BEGIN_DECLS -#ifndef _TERM_H /* Output functions. * These are still valid for terminfo. */ int putp(const char *); @@ -42,8 +41,6 @@ int tputs(const char *, int, int (*)(int)); extern short ospeed; extern char PC; -#endif - extern char *BC; extern char *UP; diff --git a/lib/libterminfo/termcap_hash.c b/lib/libterminfo/termcap_hash.c deleted file mode 100644 index 92b209079..000000000 --- a/lib/libterminfo/termcap_hash.c +++ /dev/null @@ -1,163 +0,0 @@ -/* $NetBSD: termcap_hash.c,v 1.3 2010/02/12 10:18:56 roy Exp $ */ -/* DO NOT EDIT - * Automatically generated from termcap.c */ - -#include -__RCSID("$NetBSD: termcap_hash.c,v 1.3 2010/02/12 10:18:56 roy Exp $"); - -#include -#include -#include - -#include - -static uint32_t -_t_flaghash(const void * __restrict key, size_t keylen) -{ - static const uint8_t g[75] = { - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x08, 0x00, 0x00, 0x19, - 0x24, 0x0a, 0x00, 0x14, 0x20, 0x1d, 0x0e, 0x0d, 0x00, 0x0d, - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x1a, 0x00, - 0x12, 0x00, 0x16, 0x00, 0x1d, 0x00, 0x00, 0x11, 0x00, 0x00, - 0x00, 0x17, 0x0e, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x1f, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x23, - 0x00, 0x1f, 0x00, 0x00, 0x05, 0x00, 0x00, 0x15, 0x1d, 0x00, - 0x09, 0x00, 0x0f, 0x1b, 0x01, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0x5a53bb7cU, h); - return (g[h[0] % 75] + g[h[1] % 75]) % 37; -} - -#include - -static uint32_t -_t_numhash(const void * __restrict key, size_t keylen) -{ - static const uint8_t g[67] = { - 0x03, 0x0e, 0x17, 0x01, 0x10, 0x00, 0x00, 0x00, 0x1e, 0x00, - 0x10, 0x00, 0x05, 0x13, 0x00, 0x00, 0x17, 0x00, 0x06, 0x18, - 0x03, 0x00, 0x00, 0x09, 0x18, 0x00, 0x07, 0x00, 0x00, 0x0c, - 0x14, 0x03, 0x01, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x1e, 0x00, 0x1d, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x17, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x15, 0x0e, 0x0e, - 0x00, 0x0e, 0x00, 0x00, 0x00, 0x12, 0x00, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0x6452f8e6U, h); - return (g[h[0] % 67] + g[h[1] % 67]) % 33; -} - -#include - -static uint32_t -_t_strhash(const void * __restrict key, size_t keylen) -{ - static const uint16_t g[789] = { - 0x0047, 0x015c, 0x002c, 0x00b5, 0x0000, 0x0000, 0x00ea, 0x0000, - 0x0000, 0x0127, 0x0000, 0x00a7, 0x00c0, 0x00ee, 0x0000, 0x0049, - 0x0000, 0x0000, 0x0000, 0x004a, 0x0136, 0x0000, 0x0140, 0x0000, - 0x0016, 0x0123, 0x002f, 0x00e7, 0x0000, 0x0000, 0x0000, 0x0042, - 0x0000, 0x00ee, 0x0000, 0x0000, 0x001c, 0x0009, 0x008b, 0x0000, - 0x0002, 0x012d, 0x0000, 0x0000, 0x001f, 0x0000, 0x0000, 0x0000, - 0x00c0, 0x0000, 0x0000, 0x0034, 0x004d, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x00de, 0x0152, 0x0000, 0x00d9, 0x00dc, - 0x00c5, 0x0096, 0x0001, 0x0058, 0x010e, 0x00ba, 0x0000, 0x0000, - 0x0021, 0x0000, 0x0000, 0x00f0, 0x0000, 0x0000, 0x00c6, 0x0000, - 0x0094, 0x008d, 0x0021, 0x0000, 0x0000, 0x00b8, 0x0060, 0x0000, - 0x000e, 0x0000, 0x0000, 0x003a, 0x0026, 0x0089, 0x003f, 0x0145, - 0x0050, 0x0000, 0x0000, 0x0170, 0x00f0, 0x0000, 0x0000, 0x0000, - 0x00b1, 0x007d, 0x0045, 0x00de, 0x006d, 0x0092, 0x0000, 0x0177, - 0x0049, 0x0000, 0x0000, 0x017a, 0x0000, 0x00e1, 0x0023, 0x0000, - 0x0000, 0x0000, 0x0096, 0x0098, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0176, 0x0089, 0x00fd, 0x0000, 0x0000, 0x00e5, 0x0000, 0x0000, - 0x0170, 0x0000, 0x014b, 0x0022, 0x0075, 0x0000, 0x0000, 0x0000, - 0x0170, 0x0015, 0x014f, 0x012e, 0x0041, 0x010c, 0x0159, 0x00c1, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0147, 0x0011, 0x0045, 0x0150, - 0x0000, 0x0000, 0x0000, 0x0000, 0x003e, 0x0000, 0x0000, 0x0168, - 0x00fe, 0x0000, 0x0000, 0x00b2, 0x0000, 0x007a, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0079, 0x0000, 0x0031, 0x015e, 0x0024, - 0x0090, 0x0000, 0x0000, 0x0000, 0x005b, 0x0000, 0x00eb, 0x0000, - 0x0142, 0x0091, 0x016f, 0x0180, 0x00a8, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x00e2, 0x0075, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0050, 0x016d, 0x00f5, 0x0018, 0x006d, 0x0059, - 0x00bb, 0x0048, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ec, 0x0130, - 0x0054, 0x0067, 0x0000, 0x0000, 0x0000, 0x016e, 0x0072, 0x0154, - 0x0000, 0x0000, 0x0000, 0x012d, 0x00a5, 0x007c, 0x0000, 0x0036, - 0x0071, 0x0000, 0x0080, 0x0000, 0x00ba, 0x0000, 0x00e5, 0x0064, - 0x0173, 0x006c, 0x0043, 0x00ab, 0x0152, 0x0082, 0x0000, 0x0172, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0172, 0x010a, 0x0000, 0x003e, - 0x015b, 0x0000, 0x00dd, 0x0088, 0x0000, 0x003e, 0x0152, 0x006a, - 0x0000, 0x0000, 0x0000, 0x0169, 0x0076, 0x008e, 0x000a, 0x009b, - 0x0000, 0x0000, 0x0033, 0x014e, 0x0000, 0x0000, 0x0145, 0x0041, - 0x00bd, 0x012f, 0x0177, 0x0053, 0x0031, 0x0054, 0x0000, 0x0000, - 0x0000, 0x0105, 0x0000, 0x0000, 0x0000, 0x0000, 0x011b, 0x00b6, - 0x00c7, 0x00b4, 0x0000, 0x0000, 0x0112, 0x009b, 0x0000, 0x0000, - 0x00cd, 0x0000, 0x0052, 0x0094, 0x005d, 0x00f7, 0x00f5, 0x011a, - 0x0000, 0x0000, 0x00ed, 0x0000, 0x00c2, 0x0000, 0x0000, 0x0000, - 0x011b, 0x0000, 0x0000, 0x0000, 0x0124, 0x0064, 0x0000, 0x0000, - 0x0045, 0x0063, 0x0131, 0x0170, 0x0000, 0x0090, 0x0000, 0x0000, - 0x0000, 0x015d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0023, 0x0146, 0x00ec, 0x0017, 0x0000, 0x0000, 0x0029, 0x0000, - 0x0181, 0x0000, 0x0000, 0x00a0, 0x0000, 0x015e, 0x0043, 0x0000, - 0x00f8, 0x0037, 0x0000, 0x0110, 0x0000, 0x0147, 0x0000, 0x009f, - 0x006f, 0x0000, 0x0140, 0x008c, 0x0000, 0x0169, 0x0000, 0x0061, - 0x005c, 0x0000, 0x0185, 0x0000, 0x0000, 0x0000, 0x001e, 0x0000, - 0x0000, 0x0042, 0x0111, 0x0181, 0x0000, 0x006e, 0x0000, 0x0000, - 0x0058, 0x0041, 0x0000, 0x0000, 0x0000, 0x0035, 0x0048, 0x00d9, - 0x0000, 0x0000, 0x0000, 0x0166, 0x0033, 0x0000, 0x00f1, 0x0022, - 0x00eb, 0x0110, 0x0000, 0x0000, 0x00ad, 0x0113, 0x015d, 0x0000, - 0x012e, 0x0000, 0x0000, 0x0000, 0x0136, 0x0000, 0x0189, 0x0000, - 0x0000, 0x00ce, 0x015a, 0x000b, 0x006f, 0x0000, 0x00a0, 0x0000, - 0x0000, 0x0112, 0x017a, 0x0000, 0x0000, 0x0040, 0x0138, 0x008b, - 0x007e, 0x0187, 0x0140, 0x00c2, 0x0000, 0x0061, 0x0000, 0x0155, - 0x0000, 0x0000, 0x0117, 0x0000, 0x00c5, 0x0000, 0x0000, 0x00a0, - 0x0000, 0x00e1, 0x0000, 0x0000, 0x0128, 0x0000, 0x0000, 0x0000, - 0x0188, 0x0000, 0x005f, 0x0000, 0x0133, 0x0044, 0x0000, 0x0000, - 0x0000, 0x0077, 0x0123, 0x0000, 0x010a, 0x005e, 0x0011, 0x00e2, - 0x0000, 0x004c, 0x0000, 0x004d, 0x0000, 0x0000, 0x0000, 0x0088, - 0x007a, 0x00fa, 0x0000, 0x004e, 0x0146, 0x0000, 0x006e, 0x0000, - 0x0000, 0x0000, 0x009a, 0x0000, 0x007b, 0x0000, 0x00ee, 0x0086, - 0x0000, 0x0000, 0x00ee, 0x0037, 0x0169, 0x0000, 0x0000, 0x00b5, - 0x0000, 0x0164, 0x0000, 0x00d0, 0x005d, 0x0000, 0x0139, 0x0078, - 0x00c4, 0x0000, 0x0127, 0x0062, 0x0124, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x009e, 0x00cc, 0x0000, 0x00f4, 0x0007, - 0x0158, 0x0051, 0x0000, 0x0000, 0x0168, 0x0000, 0x00fe, 0x0009, - 0x0141, 0x0000, 0x0154, 0x00ba, 0x0000, 0x00af, 0x016e, 0x0000, - 0x00b0, 0x00ed, 0x0000, 0x0000, 0x0000, 0x012a, 0x0000, 0x0000, - 0x0077, 0x0169, 0x0028, 0x0000, 0x0000, 0x0180, 0x0000, 0x013f, - 0x0000, 0x017e, 0x0000, 0x0000, 0x0000, 0x0024, 0x0000, 0x0000, - 0x0118, 0x0000, 0x0000, 0x0098, 0x0000, 0x016b, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0122, 0x0000, 0x0000, 0x0000, 0x0014, 0x0000, - 0x0000, 0x0000, 0x0000, 0x002f, 0x016d, 0x00d3, 0x017e, 0x0000, - 0x0000, 0x0052, 0x0172, 0x014b, 0x0141, 0x0000, 0x0000, 0x00c8, - 0x0000, 0x0000, 0x0128, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x00b0, 0x0057, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0033, 0x0000, 0x0000, 0x0000, 0x00af, 0x00d4, 0x0000, - 0x0000, 0x0000, 0x014a, 0x0038, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0137, 0x0000, 0x0000, 0x0018, 0x0000, 0x0004, 0x014d, - 0x0020, 0x001c, 0x0000, 0x0000, 0x0000, 0x0160, 0x00f0, 0x013e, - 0x0000, 0x0000, 0x0000, 0x00ca, 0x002a, 0x0000, 0x0000, 0x014b, - 0x0047, 0x0000, 0x0000, 0x0122, 0x00bc, 0x002a, 0x0000, 0x006b, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0099, 0x00f0, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0027, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0070, 0x0000, 0x0000, 0x0000, 0x000f, 0x0000, - 0x0009, 0x0061, 0x003f, 0x0135, 0x0000, 0x0123, 0x0181, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0115, 0x0059, 0x00a4, 0x0010, - 0x0000, 0x0000, 0x0000, 0x0156, 0x0014, 0x0000, 0x0000, 0x0000, - 0x0040, 0x00e5, 0x0000, 0x0002, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0003, 0x010b, 0x0046, 0x012f, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004b, 0x0000, 0x002b, 0x0000, 0x0000, 0x0139, 0x00e8, 0x0000, - 0x0154, 0x0000, 0x0000, 0x0000, 0x0000, 0x005a, 0x0000, 0x00e2, - 0x0022, 0x00bd, 0x00a3, 0x00cb, 0x0144, 0x0143, 0x00f6, 0x0000, - 0x0026, 0x012b, 0x0000, 0x0053, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0012, 0x0172, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x00b4, 0x0136, - }; - uint32_t h[3]; - - mi_vector_hash(key, keylen, 0x9090e0f1U, h); - return (g[h[0] % 789] + g[h[1] % 789]) % 394; -} diff --git a/lib/libterminfo/terminfo.3 b/lib/libterminfo/terminfo.3 index eab4f49cd..eea345f68 100644 --- a/lib/libterminfo/terminfo.3 +++ b/lib/libterminfo/terminfo.3 @@ -1,6 +1,6 @@ -.\" $NetBSD: terminfo.3,v 1.4 2010/02/04 09:12:56 wiz Exp $ +.\" $NetBSD: terminfo.3,v 1.8 2011/10/04 11:01:14 roy Exp $ .\" -.\" Copyright (c) 2009 The NetBSD Foundation, Inc. +.\" Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,13 +27,15 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 7, 2009 +.Dd October 4, 2011 .Dt TERMINFO 3 .Os .Sh NAME .Nm setupterm , .Nm set_curterm , .Nm del_curterm , +.Nm termname , +.Nm longname , .Nm tigetflag , .Nm tigetnum , .Nm tigetstr , @@ -51,9 +53,13 @@ .Ft int .Fn setupterm "const char *name" "int fildes" "int *errret" .Ft TERMINAL * -.Fn set_curterm "TERMINAL *term" +.Fn set_curterm "TERMINAL *nterm" .Ft int -.Fn del_curterm "TERMINAL *term" +.Fn del_curterm "TERMINAL *oterm" +.Ft char * +.Fn termname "void" +.Ft char * +.Fn longname "void" .Ft int .Fn tigetnum "const char *id" .Ft int @@ -75,11 +81,9 @@ .Ft const char * .Fn ti_getstr "const TERMINAL *" "const char *id" .Ft char * -.Fn t_parm "const TERMINAL *" "const char *cm" "long p1" "long p2" "long p3" "long p4" "long p5" "long p6" "long p7" "long p8" "long p9" +.Fn tiparm "const char *cm" "..." .Ft char * -.Fn t_parm "const char *cm" "..." -.Ft char * -.Fn t_vparm "TERMINAL *" "const char *cm" "..." +.Fn ti_tiparm "TERMINAL *" "const char *cm" "..." .Ft int .Fn ti_puts "const TERMINAL *term" "const char *str" "int affcnt" "int (*outc)(int, void *)" .Ft int @@ -144,6 +148,15 @@ function frees space pointed to by .Va oterm . .Pp The +.Fn termname +function returns the name of +.Va cur_term . +The +.Fn longname +function returns the description of +.Va cur_term . +.Pp +The .Fn tigetflag function gets the boolean value of capability .Va id , @@ -198,9 +211,9 @@ The output from always goes to stdout. .Ss NetBSD Extensions To Terminfo The -.Fn vtparm +.Fn tiparm function allows variadic parameters instead of 9 fixed longs. -Numeric parameters must be longs. +Numeric parameters must be integers (int) instead of longs. String parameters can be used even if the platform cannot fit a .Vt char * into a diff --git a/lib/libterminfo/terminfo.5.in b/lib/libterminfo/terminfo.5.in index 8a9bbc4d3..6ae22f2d7 100644 --- a/lib/libterminfo/terminfo.5.in +++ b/lib/libterminfo/terminfo.5.in @@ -1,6 +1,6 @@ -.\" $NetBSD: terminfo.5.in,v 1.14 2010/02/26 07:03:49 wiz Exp $ +.\" $NetBSD: terminfo.5.in,v 1.17 2012/06/05 17:22:01 wiz Exp $ .\" -.\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. +.\" Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 26, 2010 +.Dd June 6, 2012 .Dt TERMINFO 5 .Os .Sh NAME @@ -195,10 +195,10 @@ hts=\eEH, ht=^I, .Ed .Ss Fetching Compiled Descriptions This implementation uses hashed databases managed by -.Xr ndbm 3 +.Xr cdb 5 instead of directories. To maintain compatability with other implementations, -.Pa .db +.Pa .cdb is appended to each file checked. .Pp If the environment variable @@ -237,12 +237,12 @@ If a matching description is not found then a small embedded database is searched, which currently holds descriptions for ansi, dumb, vt100, vt220, wsvt25, and xterm. .Sh FILES -.Bl -tag -width /usr/share/misc/terminfo.db -compact -.It Pa $HOME/.terminfo.db +.Bl -tag -width /usr/share/misc/terminfo.cdb -compact +.It Pa $HOME/.terminfo.cdb Database of terminal descriptions for personal use. .It Pa /usr/share/misc/terminfo File containing terminal descriptions. -.It Pa /usr/share/misc/terminfo.db +.It Pa /usr/share/misc/terminfo.cdb Database of terminal descriptions. .El .Sh SEE ALSO @@ -250,7 +250,7 @@ Database of terminal descriptions. .Xr tic 1 , .Xr tput 1 , .Xr curses 3 , -.Xr ndbm 3 +.Xr cdb 5 .Sh STANDARDS .Nm complies with the @@ -261,7 +261,3 @@ Extensions to the standard are noted in .Xr tic 1 . .Sh AUTHORS .An Roy Marples Aq roy@NetBSD.org -.Sh BUGS -The -.Ev TERMCAP -capabilities %\*[Gt], %B and %D are not converted into terminfo capabilities. diff --git a/lib/libterminfo/tparm.c b/lib/libterminfo/tparm.c index 92a2d698d..8e48cafc9 100644 --- a/lib/libterminfo/tparm.c +++ b/lib/libterminfo/tparm.c @@ -1,7 +1,7 @@ -/* $NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.8 2012/06/02 19:10:33 roy Exp $ */ /* - * Copyright (c) 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -28,7 +28,8 @@ */ #include -__RCSID("$NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $"); +__RCSID("$NetBSD: tparm.c,v 1.8 2012/06/02 19:10:33 roy Exp $"); +#include #include #include @@ -43,18 +44,18 @@ __RCSID("$NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $"); static TERMINAL *dumbterm; /* For non thread safe functions */ typedef struct { - long nums[20]; + int nums[20]; char *strings[20]; size_t offset; } TPSTACK; typedef struct { - long num; + int num; char *string; } TPVAR; static int -push(long num, char *string, TPSTACK *stack) +push(int num, char *string, TPSTACK *stack) { if (stack->offset > sizeof(stack->nums)) { errno = E2BIG; @@ -67,9 +68,13 @@ push(long num, char *string, TPSTACK *stack) } static int -pop(long *num, char **string, TPSTACK *stack) +pop(int *num, char **string, TPSTACK *stack) { if (stack->offset == 0) { + if (num) + *num = 0; + if (string) + *string = NULL; errno = E2BIG; return -1; } @@ -87,10 +92,10 @@ checkbuf(TERMINAL *term, size_t len) char *buf; if (term->_bufpos + len >= term->_buflen) { - len = term->_buflen + BUFSIZ; + len = term->_buflen + MAX(len, BUFSIZ); buf = realloc(term->_buf, len); if (buf == NULL) - return 0; + return NULL; term->_buf = buf; term->_buflen = len; } @@ -110,7 +115,7 @@ ochar(TERMINAL *term, int c) } static size_t -onum(TERMINAL *term, const char *fmt, long num, int len) +onum(TERMINAL *term, const char *fmt, int num, int len) { size_t l; @@ -125,12 +130,12 @@ onum(TERMINAL *term, const char *fmt, long num, int len) } static char * -_ti_vtparm(TERMINAL *term, const char *str, va_list parms) +_ti_tiparm(TERMINAL *term, const char *str, va_list parms) { const char *sp; char c, fmt[64], *fp, *ostr; - long val, val2; - long dnums[26]; /* dynamic variables a-z, not preserved */ + int val, val2; + int dnums[26]; /* dynamic variables a-z, not preserved */ size_t l, max; TPSTACK stack; TPVAR params[9]; @@ -146,6 +151,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) still work with non thread safe functions (which sadly are still the norm and standard). */ + if (term == NULL) { if (dumbterm == NULL) { dumbterm = malloc(sizeof(*dumbterm)); @@ -167,7 +173,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) /* Make a first pass through the string so we can work out - which parameters are longs and which are char *. + which parameters are ints and which are char *. Basically we only use char * if %p[1-9] is followed by %l or %s. */ memset(&piss, 0, sizeof(piss)); @@ -184,7 +190,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) c = *sp++; if (c < '1' || c > '9') { errno = EINVAL; - return NULL; + continue; } l = c - '0'; if (l > max) @@ -204,7 +210,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) memset(¶ms, 0, sizeof(params)); for (l = 0; l < max; l++) { if (piss[l] == 0) - params[l].num = va_arg(parms, long); + params[l].num = va_arg(parms, int); else params[l].string = va_arg(parms, char *); } @@ -288,14 +294,12 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) /* Handle commands */ switch (c) { case 'c': - if (pop(&val, NULL, &stack)) - return NULL; + pop(&val, NULL, &stack); if (ochar(term, (unsigned char)val) == 0) return NULL; break; case 's': - if (pop(NULL, &ostr, &stack)) - return NULL; + pop(NULL, &ostr, &stack); if (ostr != NULL) { l = strlen(ostr); if (l < (size_t)olen) @@ -308,44 +312,37 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) } break; case 'l': - if (pop(NULL, &ostr, &stack)) - return NULL; + pop(NULL, &ostr, &stack); if (ostr == NULL) l = 0; else l = strlen(ostr); - if (onum(term, "%d", (long)l, 0) == 0) + if (onum(term, "%d", (int)l, 0) == 0) return NULL; break; case 'd': /* FALLTHROUGH */ case 'o': /* FALLTHROUGH */ case 'x': /* FALLTHROUGH */ case 'X': - if (pop(&val, NULL, &stack)) - return NULL; + pop(&val, NULL, &stack); if (onum(term, fmt, val, olen) == 0) return NULL; break; case 'p': - if (*str < '1' || *str > '9') { - errno = EINVAL; - return NULL; - } + if (*str < '1' || *str > '9') + break; l = *str++ - '1'; if (push(params[l].num, params[l].string, &stack)) return NULL; break; case 'P': - if (pop(&val, NULL, &stack)) - return NULL; - str++; + pop(&val, NULL, &stack); if (*str >= 'a' && *str <= 'z') dnums[*str - 'a'] = val; else if (*str >= 'A' && *str <= 'Z') term->_snums[*str - 'A'] = val; break; case 'g': - str++; if (*str >= 'a' && *str <= 'z') { if (push(dnums[*str - 'a'], NULL, &stack)) return NULL; @@ -362,7 +359,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) params[1].num++; break; case '\'': - if (push((long)(unsigned char)*str++, NULL, &stack)) + if (push((int)(unsigned char)*str++, NULL, &stack)) return NULL; while (*str != '\0' && *str != '\'') str++; @@ -371,7 +368,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) break; case '{': val = 0; - for (str++; isdigit((unsigned char)*str); str++) + for (; isdigit((unsigned char)*str); str++) val = (val * 10) + (*str - '0'); if (push(val, NULL, &stack)) return NULL; @@ -393,9 +390,8 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) case '=': /* FALLTHROUGH */ case '<': /* FALLTHROUGH */ case '>': - if (pop(&val, NULL, &stack) || - pop(&val2, NULL, &stack)) - return NULL; + pop(&val, NULL, &stack); + pop(&val2, NULL, &stack); switch (c) { case '+': val = val + val2; @@ -442,8 +438,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) break; case '!': case '~': - if (pop(&val, NULL, &stack)) - return NULL; + pop(&val, NULL, &stack); switch (*str) { case '!': val = !val; @@ -458,8 +453,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) case '?': /* if */ break; case 't': /* then */ - if (pop(&val, NULL, &stack)) - return NULL; + pop(&val, NULL, &stack); if (val != 0) { l = 0; for (; *str != '\0'; str++) { @@ -503,7 +497,7 @@ _ti_vtparm(TERMINAL *term, const char *str, va_list parms) } char * -t_vparm(TERMINAL *term, const char *str, ...) +ti_tiparm(TERMINAL *term, const char *str, ...) { va_list va; char *ret; @@ -512,13 +506,13 @@ t_vparm(TERMINAL *term, const char *str, ...) _DIAGASSERT(str != NULL); va_start(va, str); - ret = _ti_vtparm(term, str, va); + ret = _ti_tiparm(term, str, va); va_end(va); return ret; } char * -vtparm(const char *str, ...) +tiparm(const char *str, ...) { va_list va; char *ret; @@ -526,28 +520,18 @@ vtparm(const char *str, ...) _DIAGASSERT(str != NULL); va_start(va, str); - ret = _ti_vtparm(NULL, str, va); + ret = _ti_tiparm(NULL, str, va); va_end(va); return ret; } -char * -t_parm(TERMINAL *term, const char *str, - long p1, long p2, long p3, long p4, long p5, - long p6, long p7, long p8, long p9) -{ - - _DIAGASSERT(term != NULL); - _DIAGASSERT(str != NULL); - return t_vparm(term, str, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - char * tparm(const char *str, - long p1, long p2, long p3, long p4, long p5, - long p6, long p7, long p8, long p9) + long lp1, long lp2, long lp3, long lp4, long lp5, + long lp6, long lp7, long lp8, long lp9) { - - _DIAGASSERT(str != NULL); - return t_vparm(NULL, str, p1, p2, p3, p4, p5, p6, p7, p8, p9); + int p1 = lp1, p2 = lp2, p3 = lp3, p4 = lp4, p5 = lp5; + int p6 = lp6, p7 = lp7, p8 = lp8, p9 = lp9; + + return tiparm(str, p1, p2, p3, p4, p5, p6, p7, p8, p9); } diff --git a/releasetools/nbsd_ports b/releasetools/nbsd_ports index a87a49f51..f9458d289 100644 --- a/releasetools/nbsd_ports +++ b/releasetools/nbsd_ports @@ -97,6 +97,7 @@ 2012/10/17 12:00:00,usr.bin/genassym 2012/02/10 16:16:12,usr.bin/su 2011/12/25 06:09:09,sys/arch/i386/stand +2012/10/17 12:00:00,share/terminfo 2012/02/10 16:16:12,share/zoneinfo 2012/02/10 16:16:12,share/misc 2011/05/26 00:00:00,external/public-domain/xz @@ -112,11 +113,10 @@ 2011/01/21 23:36:49,lib/libc 2011/01/12 23:03:56,lib/libm 2009/05/01 00:28:17,lib/libcrypt -2010/10/12 12:57:51,lib/libterminfo -2011/01/06 11:29:40,lib/libcurses +2012/10/17 12:00:00,lib/libterminfo +2012/10/17 12:00:00,lib/libcurses 2010/12/22 09:12:28,lib/libutil 2009/05/13 02:50:31,common/lib/libutil -2011/01/21 23:36:49,include 2008/07/20 00:52:40,bin/mkdir 2011/08/29 14:48:46,bin/rm 2011/08/29 14:49:38,bin/rmdir diff --git a/share/terminfo/Makefile b/share/terminfo/Makefile index 59e5773b7..83edbc8fb 100644 --- a/share/terminfo/Makefile +++ b/share/terminfo/Makefile @@ -1,18 +1,20 @@ -# $NetBSD: Makefile,v 1.2 2010/02/05 16:34:04 roy Exp $ +# $NetBSD: Makefile,v 1.3 2012/06/03 23:19:11 joerg Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/8/93 - -CLEANFILES= terminfo.db -realall: terminfo.db -FILES=terminfo.db terminfo +CLEANFILES= terminfo.cdb +realall: terminfo.cdb +FILES=terminfo.cdb terminfo .if defined(__MINIX) FILESDIR=/usr/share/terminfo .else FILESDIR=${BINDIR}/misc .endif -terminfo.db: terminfo +terminfo.cdb: terminfo ${TOOL_TIC} ${_MKTARGET_CREATE} - ${TOOL_TIC} -ax -o "${.OBJDIR}/terminfo" "${.CURDIR}/terminfo" + ${TOOL_TIC} -ax -o ${.TARGET} "${.CURDIR}/terminfo" +#LSC FIXME: Hack, on some platform TOOL_TIC automatically add +# .db to the filename... + test -e ${.TARGET}.db && mv ${.TARGET}.db ${.TARGET} .include diff --git a/share/terminfo/terminfo b/share/terminfo/terminfo index 980e00d33..264c9b9d0 100644 --- a/share/terminfo/terminfo +++ b/share/terminfo/terminfo @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.1 $ -# $Date: 2010/02/03 15:16:32 $ +# $Revision: 1.5 $ +# $Date: 2012/06/01 14:47:06 $ # # The original header is preserved below for reference. It is noted that there # is a "newer" version which differs in some cosmetic details (but actually @@ -340,7 +340,7 @@ ansi+local, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, cuu=\E[%p1%dA, use=ansi+local1, ansi+tabs, - cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[2g, + cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[3g, ansi+inittabs, it#8, use=ansi+tabs, ansi+erase, @@ -452,8 +452,9 @@ ecma+sgr|attribute capabilities for true ECMA-48 terminals, # For more detail on this rather pathetic standard, see the comments # near the end of this file. ibcs2|Intel Binary Compatibility Standard prescriptions, - cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cud=\E[%p1%dB, - cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, + cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cub1=\E[1D, + cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, dch=\E[%p1%dP, dispc=\E=%p1%dg, ech=\E[%p1%dX, hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, indn=\E[%p1%dS, rc=\E7, rin=\E[%p1%dT, rmam=\E[?7l, sc=\E7, @@ -545,7 +546,7 @@ pcansi-m|pcansi-mono|ibm-pc terminal programs claiming to be ansi (mono mode), cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, hts=\EH, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B, - kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[2g, + kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[3g, use=klone+sgr-dumb, pcansi-25-m|pcansi25m|ibm-pc terminal programs with 25 lines (mono mode), lines#25, use=pcansi-m, @@ -576,7 +577,7 @@ ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S, rep=%p1%c\E[%p2%{1}%-%db, rin=\E[%p1%dT, s0ds=\E(B, - s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[2g, + s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[3g, vpa=\E[%i%p1%dd, use=pcansi-m, ansi+enq|ncurses extension for ANSI ENQ, @@ -617,11 +618,45 @@ ansi.sys-old|ANSI.SYS under PC-DOS 2.1, clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H, is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, - khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u, + khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u, rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR, u7=\E[6n, use=klone+color, use=klone+sgr8, + +# Keypad: Home=\0G Up=\0H PrPag=\0I +# ka1,kh kcuu1 kpp,ka3 +# +# Left=\0K 5=\0L Right=\0M +# kcub1 kb2 kcuf1 +# +# End=\0O Down=\0P NxPag=\0Q +# kc1,kend kcud1 kc3,knp +# +# Ins=\0R Del=\0S +# kich1 kdch1 +# +# On keyboard with 12 function keys, +# shifted f-keys: F13-F24 +# control f-keys: F25-F36 +# alt f-keys: F37-F48 +# The shift/control/alt keys do not modify each other, but alt overrides both, +# and control overrides shift. +# +# capability for F1-F48 -TD ansi.sys|ANSI.SYS 3.1 and later versions, - el=\E[K, use=ansi.sys-old, + el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q, + kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, + kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205, + kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W, + kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\, + kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_, + kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d, + kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212, + kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l, + kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q, + kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, + kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I, + pfkey=\E[0;%?%p1%{11}%<%t%'\:'%e%?%p1%{13}%<%t%'z'%e%?%p1%{23}%<%t%'G'%e%?%p1%{25}%<%t%'p'%e%?%p1%'#'%<%t%'E'%e%?%p1%'%'%<%t%'f'%e%?%p1%'/'%<%t%'C'%e%{92}%;%;%;%;%;%;%;%p1%+%d;%p2"%s"p, + use=ansi.sys-old, # # Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS. @@ -657,6 +692,149 @@ nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi #### ANSI console types # +############################################################################# +# +# Atari ST terminals. +# From Guido Flohr . +# +tw52|tw52-color|Toswin window manager with color, + bce, + colors#16, pairs#256, + oc=\Eb?\Ec0, op=\Eb?\Ec0, + setab=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c, + setaf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c, + setb=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c, + setf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c, + use=tw52-m, +tw52-m|Toswin window manager monochrome, + ul, + ma#999, + bold=\Eya, dch1=\Ea, dim=\EyB, + is2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, rev=\EyP, rmso=\EzQ, + rmul=\EzH, rs2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, sgr0=\Ez_, + smso=\EyQ, smul=\EyH, use=at-m, +tt52|Atari TT medium and high resolution, + lines#30, use=at-color, +st52-color|at-color|atari-color|atari_st-color|Atari ST with color, + bce, + colors#16, pairs#256, + is2=\Ev\Eq\Ee\Eb1\Ec0, rs2=\Ev\Eq\Ee\Eb1\Ec0, + setab=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?, + setaf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?, + setb=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?, + setf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?, + use=st52, +st52|st52-m|at|at-m|atari|atari-m|atari_st|atarist-m|Atari ST, + am, eo, mir, npc, + cols#80, it#8, lines#24, + bel=^G, civis=\Ef, clear=\EE, cnorm=\Ee, cr=^M, cub1=\ED, + cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, + cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, el1=\Eo, home=\EH, ht=^I, + il1=\EL, ind=^J, is2=\Ev\Eq\Ee, kLFT=\Ed, kRIT=\Ec, kbs=^H, + kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\177, + kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es, + kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EQ, + kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, kf8=\EW, + kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, kpp=\Ea, + kund=\EK, nel=^M^J, rc=\Ek, rev=\Ep, ri=\EI, rmso=\Eq, + rs2=\Ev\Eq\Ee, sc=\Ej, sgr0=\Eq, smso=\Ep, +tw100|toswin vt100 window mgr, + eo, mir, msgr, xon, + colors#8, cols#80, it#8, lines#24, pairs#64, vt#3, + acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\Ef, + clear=\E[2J\E[H, cnorm=\Ee, cr=^M, csr=\E[%i%p1%d;%p2%dr, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB, + cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\EA, dch1=\Ea, dim=\E[2m, dl=\E[%p1%dM, + dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, + hts=\EH, ich=\E[%p1%d@, il1=\EL, ind=^J, is2=\E<\E)0, kbs=^H, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\177, + kf1=\EOP, kf10=\EOY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es, + kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EOQ, + kf20=\Ey, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, + kf8=\EOW, kf9=\EOX, khlp=\EH, khome=\E\EE, kich1=\EI, + knp=\Eb, kpp=\E\Ea, kund=\EK, ll=\E[24H, nel=\EE, + oc=\E[30;47m, op=\E[30;47m, rc=\E8, rev=\E[7m, ri=\EM, + rmacs=^O, rmcup=\E[?7h, rmir=\Ei, rmkx=\E[?1l\E>, + rmso=\E[m, rmul=\E[m, + rs1=\E<\E[20l\E[?3;6;9l\E[r\Eq\E(B\017\E)0\E>, + sc=\E7, + setb=\E[4%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m, + setf=\E[3%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m, + sgr0=\E[m, smacs=^N, smcup=\E[?7l, smir=\Eh, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, +# The entries for stv52 and stv52pc probably need a revision. +stv52|MiNT virtual console, + am, msgr, + cols#80, it#8, lines#30, + bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, + cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, + cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.", + dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, + ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, + kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, + kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, + kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, + kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, + kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, + op=\Eb@\EcO, rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, + rmso=\Eq, rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, + smcup=\Ev\Ee\Ez_, smso=\Ep, smul=\EyH, +stv52pc|MiNT virtual console with PC charset, + am, msgr, + cols#80, it#8, lines#30, + acsc=+\257\,\256-\^.v0\333I\374`\177a\260f\370g\361h\261j\331k\277l\332m\300n\305o\377p-q\304r-s_t+u+v+w+x\263y\363z\362{\343|\366}\234~\371, + bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE, + cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, + cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.", + dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, + ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, + kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, + kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, + kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, + kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE, + kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>, + rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq, + rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_, + smso=\Ep, smul=\EyH, + +#### Atari ST +# + +# From: Simson L. Garfinkel +atari-old|atari st, + OTbs, am, + cols#80, it#8, lines#25, + clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, + ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB, + kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep, +# UniTerm terminal program for the Atari ST: 49-line VT220 emulation mode +# From: Paul M. Aoki +uniterm|uniterm49|UniTerm VT220 emulator with 49 lines, + lines#49, + is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H, + use=vt220, +# MiNT VT52 emulation. 80 columns, 25 rows. +# MiNT is Now TOS, the operating system which comes with all Ataris now +# (mainly Atari Falcon). This termcap is for the VT52 emulation you get +# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode +# From: Per Persson , 27 Feb 1996 +st52-old|Atari ST with VT52 emulation, + am, km, + cols#80, lines#25, + bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED, + cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, + cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, + ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1, + kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M, + kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>, + kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G, + kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek, + ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq, + smcup=\Ee, smso=\Ep, + #### BeOS # # BeOS entry for Terminal program Seems to be almost ANSI @@ -712,13 +890,14 @@ beterm|BeOS Terminal, # linux-basic|linux console, am, bce, eo, mir, msgr, xenl, xon, - it#8, ncv#18, + it#8, ncv#18, U8#1, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, - dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, - el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, + el=\E[K, el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, @@ -746,12 +925,12 @@ linux-m|Linux console no color, # 1.9.9. linux-c-nc|linux console with color-change, ccc, - initc=\E]P%p1%x%p2%{256}%*%{1000}%/%02x%p3%{256}%*%{1000}%/%02x%p4%{256}%*%{1000}%/%02x, + initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, oc=\E]R, use=linux-basic, # From: Dennis Henriksen , 9 July 1996 linux-c|linux console 1.3.6+ for older ncurses, ccc, - initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;, + initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;, oc=\E]R, use=linux-basic, # The 2.2.x kernels add a private mode that sets the cursor type; use that to @@ -761,6 +940,15 @@ linux|linux console, civis=\E[?25l\E[?1c, cnorm=\E[?25h\E[?0c, cvvis=\E[?25h\E[?8c, use=linux-c-nc, +# Subject: linux 2.6.26 vt back_color_erase +# Changes to the Linux console driver broke bce model as reported in +# https://bugzilla.novell.com/show_bug.cgi?id=418613 +# apparently from +# http://lkml.org/lkml/2008/4/26/305 +# http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/87f98338f0d636bb/aa96e8b86cee0d1e?lnk=st&q=#aa96e8b86cee0d1e +linux2.6.26|linux console w/o bce, + bce@, use=linux, + # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file linux-nic|linux with ich/ich1 suppressed for non-curses programs, ich@, ich1@, use=linux, @@ -805,6 +993,41 @@ kon|kon2|jfbterm|Kanji ON Linux console, initp@, kcbt@, oc@, op=\E[37;40m, rs1=\Ec, tsl=\E[?T, use=linux, +# 16-color linux console entry; this works with a 256-character +# console font but bright background colors turn into dim ones when +# you use a 512-character console font. This uses bold for bright +# foreground colors and blink for bright background colors. +linux-16color|linux console with 16 colors, + colors#16, ncv#54, pairs#256, + setab=\E[4%p1%{8}%m%d%?%p1%{8}%>%t;5%e%p1%{8}%=%t;2%e;25%;m, + setaf=\E[3%p1%{8}%m%d%?%p1%{8}%>%t;1%e%p1%{8}%=%t;2%e;21%;m, + use=linux, + +# bterm (bogl 0.1.18) +# Implementation is in bogl-term.c +# Key capabilities from linux terminfo entry +# +# Notes: +# bterm only supports acs using wide-characters, has case for these: qjxamlkut +# bterm does not support sgr, since it only processes one parameter -TD +bterm|bogl virtual terminal, + am, bce, + colors#8, cols#80, lines#24, pairs#64, + acsc=aajjkkllmmqqttuuxx, bold=\E[1m, civis=\E[?25l, + clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J, + cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ind=^J, + kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, + kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, + kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, + op=\E49;39m, rev=\E[7m, ri=\EM, rmacs=^O, rmso=\E[27m, + rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr0=\E[0m, smacs=^N, smso=\E[7m, smul=\E[4m, + #### Mach # @@ -860,7 +1083,7 @@ mach-color|Mach Console with ANSI color, hurd|The GNU Hurd console server, am, bce, bw, eo, km, mir, msgr, xon, colors#8, it#8, ncv#18, pairs#64, - acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\Ec, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, @@ -929,7 +1152,7 @@ pmcons|pmconsole|PMAX console, scoansi-old|SCO Extended ANSI standard crt (5.0.5), OTbs, am, bce, eo, xon, colors#8, cols#80, it#8, lines#25, pairs#64, - acsc=-\230.\231\,.+/0[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207, + acsc=+/\,.-\230.\2310[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[=14;12C, clear=\E[H\E[2J, cnorm=\E[=10;12C, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, @@ -996,7 +1219,7 @@ att6386|at386|386at|AT&T WGS 6386 console, sc=\E7, sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m, sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m, - tbc=\E[2g, vpa=\E[%i%p1%dd, use=klone+color, + tbc=\E[3g, vpa=\E[%i%p1%dd, use=klone+color, # (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr) pc6300plus|AT&T 6300 plus, OTbs, am, xon, @@ -1364,7 +1587,7 @@ qnxt2|qnx 2.15 serial terminal, qansi-g|QNX ANSI, am, eslok, hs, xon, colors#8, cols#80, it#8, lines#25, ncv#19, pairs#64, wsl#80, - acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~Oa, + acsc=Oa``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[2J\E[H, cnorm=\E[?25h\E[?12l, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, @@ -1407,7 +1630,7 @@ qansi-g|QNX ANSI, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m, - smul=\E[4m, tbc=\E[2g, + smul=\E[4m, tbc=\E[3g, tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH, # qansi|QNX ansi with console writes, @@ -1593,11 +1816,12 @@ ofcons|DNARD OpenFirmware console, wsvt25|NetBSD wscons in 25 line DEC VT220 mode, bce, msgr, colors#8, cols#80, it#8, lines#25, ncv#2, pairs#64, - is2=\E[r\E[25;1H, kend=\E[8~, kf1=\E[11~, kf10=\E[21~, + civis=\E[?25l, cnorm=\E[?25h, + is2=\E[r\E[25;1H, kdch1=\E[3~, kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, - kf9=\E[20~, khome=\E[7~, op=\E[m, setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, use=vt220, + kf9=\E[20~, khome=\E[7~, op=\E[m, rs1=\Ec, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=vt220, wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta, km, use=wsvt25, @@ -1696,6 +1920,8 @@ cons25w|ansiw|ansi80x25-raw|freebsd console (25-line raw mode), cons25|ansis|ansi80x25|freebsd console (25-line ansi mode), acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~\371, use=cons25w, +cons25-debian|freebsd console with debian backspace (25-line ansi mode), + kbs=\177, kdch1=\E[3~, use=cons25, cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode), colors@, pairs@, bold@, dim@, op@, rmul=\E[m, setab@, setaf@, @@ -1840,7 +2066,7 @@ bsdos-ppc|PowerPC BSD/OS Console, vt52|dec vt52, OTbs, cols#80, it#8, lines#24, - acsc=ffgghhompoqqss.k, bel=^G, clear=\EH\EJ, cr=^M, + acsc=+h.k0affggolpnqprrss, bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, @@ -2274,9 +2500,9 @@ vt200-js|vt220-js|dec vt200 series with jump scroll, am, cols#80, bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr, - cub1=^H, cud1=^J, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, - il1=\E[L, ind=\ED, + cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, + ht=^I, il1=\E[L, ind=\ED, is2=\E[61"p\E[H\E[?3l\E[?4l\E[?1l\E[?5l\E[?6l\E[?7h\E[?8h\E[?25h\E>\E[m, kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M\ED, rc=\E8, @@ -2662,8 +2888,8 @@ crt|crt-vt220|CRT 2.3 emulating VT220, # the default behavior -TD putty|PuTTY terminal emulator, - am, bce, bw, ccc, hs, mir, msgr, xenl, xon, - colors#8, it#8, ncv#22, pairs#64, + am, bce, bw, ccc, hs, mir, msgr, xenl, xon, XT, + colors#8, it#8, ncv#22, pairs#64, U8#1, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, @@ -2679,13 +2905,13 @@ putty|PuTTY terminal emulator, indn=\E[%p1%dS, initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R, - kb2=\E[G, kbs=\177, kcan=^C, kcbt=\E[Z, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, - kend=\E[4~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, - kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, - kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, - kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, + kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, + kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, + kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, + kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, @@ -2751,7 +2977,7 @@ putty-vt100|VT100+ keyboard layout, # retrieving the window title, and for setting the window size (i.e., using # "resize -s"), though it does not pass SIGWINCH to the application if the # user resizes the window with the mouse. -teraterm|Tera Term Pro, +teraterm2.3|Tera Term Pro, km, xon@, ncv#43, vt@, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, @@ -2771,6 +2997,28 @@ teraterm|Tera Term Pro, smul=\E[4m, vpa=\E[%i%p1%dd, use=vt100+enq, use=klone+color, use=vt100, +# Version 4.59 has regular vt100 line-drawing (so it is no longer necessary +# to choose a Windows OEM font). +# +# Testing with tack: +# - it does not have xenl (suppress that) +# - underline seems to work with color (modify ncv). +# Testing with vttest: +# - wrapping differs from vt100 (menu 1). +# - it recognizes xterm's X10 and normal mouse tracking, but none of the +# other flavors. +# - it recognizes the dtterm window controls for reporting size in +# characters and pixels. +# - it passes SIGWINCH. +teraterm4.59|Tera Term Pro, + bce, xenl@, + ncv#41, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + kmous=\E[M, use=teraterm2.3, + +teraterm|Tera Term, + use=teraterm4.59, + # Tested with WinNT 4.0, the telnet application assumes the screensize is # 25x80. This entry uses the 'Terminal' font, to get line-drawing characters. # @@ -2833,11 +3081,15 @@ ms-vt100+|vt100+|windows XP vt100+ (sic), ms-vt-utf8|vt-utf8|UTF-8 flavor of vt100+, use=ms-vt100+, +# expect-5.44.1.15/example/tkterm # a minimal subset of a vt100 (compare with "news-unk). +# +# The missing "=" in smkx is not a typo (here), but an error in tkterm. tt|tkterm|Don Libes' tk text widget terminal emulator, - clear=\E[H\E[J, cr=^M, cuf1=\E[C, cup=\E[%p1%d;%p2%dH, - cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, - kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rmso=\E[m, + clear=\E[H\E[J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C, + cup=\E[%p1%d;%p2%dH, cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, + kf9=\EOX, rmkx=\E[?1l\E>, rmso=\E[m, smkx=\E[?1h\E, smso=\E[7m, #### X terminal emulators @@ -3225,11 +3477,15 @@ xterm-basic|modern xterm terminal emulator - common, xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1, rmso=\E[m, rmul=\E[m, use=xterm-xf86-v33, -# This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey) +# 16-colors is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey) +# If configured to support 88- or 256-colors (which is fairly common in 2009), +# xterm also recognizes the control sequences for initc -TD xterm-16color|xterm with 16 colors like aixterm, + ccc, + initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, use=ibm+16color, use=xterm-new, -# This is a compile-time feature of XFree86 xterm beginning with +# 256-colors is a compile-time feature of XFree86 xterm beginning with # patch #111 (1999/7/10) -TD xterm+256color|xterm 256-color feature, ccc, @@ -3239,7 +3495,7 @@ xterm+256color|xterm 256-color feature, setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, setb@, setf@, -# This is a compile-time feature of XFree86 xterm beginning with +# 88-colors is a compile-time feature of XFree86 xterm beginning with # patch #115 (1999/9/18) -TD # # Note that the escape sequences used are the same as for 256-colors - xterm @@ -3380,6 +3636,11 @@ xterm-24|vs100|xterms|xterm terminal emulator (X Window System), xterm|xterm terminal emulator (X Window System), use=xterm-new, +# This entry assumes that xterm's handling of VT100 SI/SO is disabled by +# setting the vt100Graphics resource to false. +xterm-utf8|xterm with no VT100 line-drawing in UTF-8 mode, + U8#1, use=xterm, + # These entries allow access to the X titlebar and icon name as a status line. # Note that twm (and possibly window managers descended from it such as tvtwm, # ctwm, and vtwm) track windows by icon-name; thus, you don't want to mess @@ -3406,7 +3667,7 @@ xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold, # -- MATSUMOTO Shoji) # kterm implements acsc via built-in table of X Drawable's kterm|kterm kanji terminal emulator (X window system), - eslok, hs, + eslok, hs, XT, ncv@, acsc=``aajjkkllmmnnooppqqrrssttuuvvwwxx~~, csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs=, fsl=\E[?F, @@ -3430,7 +3691,7 @@ xterm1|xterm terminal emulator ignoring the alternate screen buffer, # The README's with the distribution also say that it supports SGR 21, 24, 25 # and 27, but they are not present in the terminfo or termcap. color_xterm|cx|cx100|color_xterm color terminal emulator for X, - OTbs, am, km, mir, msgr, xenl, + OTbs, am, km, mir, msgr, xenl, XT, cols#80, it#8, lines#65, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, @@ -3543,15 +3804,60 @@ gnome-fc5|GNOME Terminal, # of the keys (which more/less correspond to the termcap values), and will # interpret those according to the $TERM value, but others not in the # terminfo according to some constantly changing set of hacker guidelines -TD -gnome-2007|GNOME Terminal snapshot 2.18.1, +vte-2007|VTE in GNOME Terminal snapshot 2.18.1, use=xterm+pcc2, use=gnome-fc5, +gnome-2007|GNOME Terminal snapshot 2.18.1, + use=vte-2007, +# GNOME Terminal 2.22.3 (2008 snapshot) +# +# In vttest, it claims to be a vt220 with national replacement character-sets, +# but aside from the identifier string, implements only a small fraction of +# vt220's behavior, which will make it less usable on a VMS system (unclear +# what the intent of the developer is, since the NRC feature exposed in vttest +# by this change does not work). +vte-2008|VTE in GNOME Terminal snapshot 2.22.3, + use=vte+pcfkeys, use=vte-2007, +gnome-2008|GNOME Terminal snapshot 2.22.3, + use=vte-2008, + +# GNOME terminal may automatically use the contents of the "xterm" terminfo to +# supply key information which is not built into the program. With 2.22.3, +# this list is built into the program (which addresses the inadvertant use of +# random terminfo data, though using a set of values which does not correspond +# to any that xterm produces - still not solving the problem that GNOME +# terminal hardcodes the $TERM variable as "xterm"). +# +# terminfo modifier code keys +# kf13-kf24 shift 2 F1 to F12 +# kf25-kf36 control 5 F1 to F12 +# kf37-kf48 shift/control 6 F1 to F12 +# kf49-kf60 alt 3 F1 to F12 +# kf61-kf63 shift-alt 4 F1 to F3 +# +# The parameters with \EO (SS3) are technically an error, since SS3 should have +# no parameters. This appears to be rote copying based on xterm+pcc0. +vte+pcfkeys|VTE's variation on xterm+pcfkeys, + kf1=\EOP, kf13=\EO1;2P, kf14=\EO1;2Q, kf15=\EO1;2R, + kf16=\EO1;2S, kf2=\EOQ, kf25=\EO1;5P, kf26=\EO1;5Q, + kf27=\EO1;5R, kf28=\EO1;5S, kf3=\EOR, kf37=\EO1;6P, + kf38=\EO1;6Q, kf39=\EO1;6R, kf4=\EOS, kf40=\EO1;6S, + kf49=\EO1;3P, kf50=\EO1;3Q, kf51=\EO1;3R, kf52=\EO1;3S, + kf61=\EO1;4P, kf62=\EO1;4Q, kf63=\EO1;4R, + use=xterm+pcfkeys, +gnome+pcfkeys|VTE's variation on xterm+pcfkeys, + use=vte+pcfkeys, + +vte|VTE aka GNOME Terminal, + use=vte-2008, gnome|GNOME Terminal, - use=gnome-2007, + use=vte, # palette is hardcoded... +vte-256color|VTE with xterm 256-colors, + initc@, use=xterm+256color, use=vte, gnome-256color|GNOME Terminal with xterm 256-colors, - initc@, use=xterm+256color, use=gnome, + use=vte-256color, # XFCE Terminal 0.2.5.4beta2 # @@ -3560,7 +3866,7 @@ gnome-256color|GNOME Terminal with xterm 256-colors, # Since most of the terminfo-related behavior is due to the VTE library, # the terminfo is the same as gnome-terminal. xfce|Xfce Terminal, - use=gnome, + use=vte, # Multi-Gnome-Terminal 1.6.2 # @@ -3605,8 +3911,16 @@ kvt|KDE terminal, # # Updated for konsole 1.6.4: # add konsole-solaris +# +# Updated for konsole 1.6.6: +# add control-key modifiers for function-keys, etc. +# +# vttest menu 1 shows that both konsole and gnome terminal do wrapping +# different from xterm (and vt100's). They have the same behavior in this +# detail, but it is unclear which copies the other. konsole-base|KDE console window, - bce, km@, npc, + bce, km@, npc, XT, + ncv@, bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h, ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1@, @@ -3633,11 +3947,12 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm, # The value for kbs reflects local customization rather than the settings used # for XFree86 xterm. konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm, - kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, - kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, - kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, - kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS, - khome=\EOH, use=konsole-vt100, + kend=\EOF, khome=\EOH, use=konsole+pcfkeys, + use=konsole-vt100, +# Konsole does not implement shifted cursor-keys. +konsole+pcfkeys|konsole subset of xterm+pcfkeys, + kLFT@, kRIT@, kcbt=\E[Z, kind@, kri@, kDN@, kUP@, use=xterm+pcc2, + use=xterm+pcf0, # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but # it is still useful for deriving the other entries. konsole-vt100|KDE console window with vt100 (sic) keyboard, @@ -3678,7 +3993,7 @@ konsole-256color|KDE console window with xterm 256-colors, # control/shift/alt kf1 to kf12 \E[11;8~ to \E[24;8~ # mlterm|multi lingual terminal emulator, - am, eslok, km, mc5i, mir, msgr, npc, xenl, + am, eslok, km, mc5i, mir, msgr, npc, xenl, XT, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, @@ -3720,6 +4035,9 @@ mlterm+pcfkeys|fragment for PC-style fkeys, kRIT6=\EO1;6C, kRIT7=\EO1;7C, kUP=\EO1;2A, kUP3=\EO1;3A, kUP4=\EO1;4A, kUP5=\EO1;5A, kUP6=\EO1;6A, kUP7=\EO1;7A, +mlterm-256color|mlterm 3.0 with xterm 256-colors, + use=xterm+256color, use=rxvt, + # From: Thomas Dickey 04 Oct 1997 # Updated: Oezguer Kesim 02 Nov 1997 # Notes: @@ -3742,7 +4060,7 @@ mlterm+pcfkeys|fragment for PC-style fkeys, # removed dch/dch1 because they are inconsistent with bce/ech -TD # remove km as per tack test -TD rxvt-basic|rxvt terminal base (X Window System), - OTbs, am, bce, eo, mir, msgr, xenl, xon, + OTbs, am, bce, eo, mir, msgr, xenl, xon, XT, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, @@ -3860,12 +4178,12 @@ rxvt+pcfkeys|fragment for PC-style fkeys, kf38=\E[29\^, kf39=\E[31\^, kf4=\E[14~, kf40=\E[32\^, kf41=\E[33\^, kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, - kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@, kDN=\E[b, kDN5=\EOb, - kEND5=\E[8\^, kEND6=\E[8@, kHOM5=\E[7\^, kHOM6=\E[7@, - kIC5=\E[2\^, kIC6=\E[2@, kLFT5=\EOd, kNXT5=\E[6\^, - kNXT6=\E[6@, kPRV5=\E[5\^, kPRV6=\E[5@, kRIT5=\EOc, - kUP=\E[a, kUP5=\EOa, + kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, kind=\E[a, knp=\E[6~, + kpp=\E[5~, kri=\E[b, kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@, + kDN=\E[b, kDN5=\EOb, kEND5=\E[8\^, kEND6=\E[8@, + kHOM5=\E[7\^, kHOM6=\E[7@, kIC5=\E[2\^, kIC6=\E[2@, + kLFT5=\EOd, kNXT5=\E[6\^, kNXT6=\E[6@, kPRV5=\E[5\^, + kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa, rxvt|rxvt terminal emulator (X Window System), ncv@, @@ -3880,10 +4198,10 @@ rxvt-88color|rxvt 2.7.9 with xterm 88-colors, rxvt-xpm|rxvt terminal emulator (X Window System), use=rxvt, rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin, - acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, use=rxvt, rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygwin, - acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376, + acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376, use=rxvt-cygwin, # This variant is supposed to work with rxvt 2.7.7 when compiled with @@ -3891,12 +4209,22 @@ rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygw rxvt-16color|xterm with 16 colors like aixterm, ncv#32, use=ibm+16color, use=rxvt, -# mrxvt 0.5.3 +# mrxvt 0.5.4 # # mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which # makes its function-keys different from other flavors of rxvt -TD mrxvt|multitabbed rxvt, - use=xterm+pcc2, use=xterm+r6f2, use=rxvt, + XT, + kEND=\E[8;2~, kHOM=\E[7;2~, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kend=\E[8~, khome=\E[7~, + kEND3=\E[8;3~, kEND4=\E[8;4~, kEND5=\E[8;5~, + kEND6=\E[8;6~, kEND7=\E[8;7~, kHOM3=\E[7;3~, + kHOM4=\E[7;4~, kHOM5=\E[7;5~, kHOM6=\E[7;6~, + kHOM7=\E[7;7~, use=xterm+r6f2, use=xterm+pcfkeys, + use=rxvt, + +mrxvt-256color|multitabbed rxvt with 256 colors, + use=xterm+256color, use=mrxvt, # From: Michael Jennings # @@ -3909,7 +4237,7 @@ mrxvt|multitabbed rxvt, # remove nonworking flash -TD # remove km as per tack test -TD Eterm|Eterm-color|Eterm with xterm-style color support (X Window System), - am, bce, bw, eo, mc5i, mir, msgr, xenl, xon, + am, bce, bw, eo, mc5i, mir, msgr, xenl, xon, XT, btns#5, cols#80, it#8, lines#24, lm#0, ncv@, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, @@ -3943,6 +4271,11 @@ Eterm-256color|Eterm with xterm 256-colors, Eterm-88color|Eterm with 88 colors, use=xterm+88color, use=Eterm, +# Based on rxvt 2.4.8, it has a few differences in key bindings +aterm|AfterStep terminal, + XT, + kbs=\177, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, use=rxvt, + # xiterm 0.5-5.2 # This is not based on xterm's source... # vttest shows several problems with keyboard, cursor-movements. @@ -3959,7 +4292,7 @@ xtermm|xterm terminal emulator (monocrome), btns#3, cols#80, it#8, lines#24, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[1D, + csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, @@ -4062,7 +4395,7 @@ emu|emu native mode, acsc=61a\202f\260g2j\213k\214l\215m\216n\217o\220q\222s\224t\225u\226v\227w\230x\231~\244, bel=^G, blink=\EW, bold=\EU, civis=\EZ, clear=\EP\EE0;0;, cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, cub=\Eq-%p1%d;, - cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\ED, + cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\EC, cup=\EE%p1%d;%p2%d;, cuu=\Ep-%p1%d;, cuu1=\EA, dch=\EI%p1%d;, dch1=\EI1;, dl=\ER%p1%d;, dl1=\ER1;, ech=\Ej%p1%d;, ed=\EN, el=\EK, el1=\EL, home=\EE0;0;, ht=^I, @@ -4207,6 +4540,31 @@ decansi|ANSI emulation with DEC compatibility hacks, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR, u7=\E[6n, vpa=\E[%i%p1%dd, +#### VWM +# +# vwmterm is a terminal emulator written for the VWM console window manager +# +vwmterm|(vwm term), + am, bce, ccc, mir, msgr, npc, xenl, xon, + colors#8, pairs#64, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l, + clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub=\E[%p1%dD, + cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, + cuu1=\E[A, cvvis=\E[?25h, dim=\E[2m, ed=\E[J, el=\E[K, + home=\E[H, il1=\E[L, ind=^J, invis=\E[8m, kcub1=\E[D, + kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, + kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[22~, + kf12=\E[23~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + khome=\E[1~, knp=\E[6~, kpp=\E[5~, rev=\E[7m, rmacs=\E[10m, + rmam=\E[?7l, rmcup=\E[?1049l, rs1=\E[H\E[J\E[m\Ec, + setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, + sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h, + smcup=\E[?1049h, smso=\E[3m, smul=\E[4m, + #### MGR # # MGR is a Bell Labs window system lighter-weight than X. @@ -4279,6 +4637,26 @@ eterm|gnu emacs term.el terminal emulation, sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m, smul=\E[4m, +# The codes supported by the term.el terminal emulation in GNU Emacs 22.2 +eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96, + am, mir, msgr, xenl, + colors#8, cols#80, lines#24, pairs#64, + bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M, + csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, + cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, + dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, + el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@, + il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=\177, + kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, + kdch1=\E[3~, kend=\E[4~, khome=\E[1~, kich1=\E[2~, + knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, rev=\E[7m, + ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, + sc=\E7, setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm, + sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m, + sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m, + u6=\E[%i%d;%dR, u7=\E[6n, + # Entries for use by the `screen' program by Juergen Weigert, # Michael Schroeder, Oliver Laumann. The screen and # screen-w entries came with version 3.7.1. The screen2 and screen3 entries @@ -4296,7 +4674,7 @@ eterm|gnu emacs term.el terminal emulation, # tested with screen 3.09.08 screen|VT 100/ANSI X3.64 virtual terminal, OTbs, OTpt, am, km, mir, msgr, xenl, G0, - colors#8, cols#80, it#8, lines#24, pairs#64, + colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M, @@ -4322,7 +4700,8 @@ screen|VT 100/ANSI X3.64 virtual terminal, # The bce and status-line entries are from screen 3.9.13 (and require some # changes to .screenrc). screen-bce|VT 100/ANSI X3.64 virtual terminal with bce, - bce, use=screen, + bce, + ech@, use=screen, screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen, @@ -4415,10 +4794,20 @@ screen.teraterm|disable ncv in teraterm, use=screen+fkeys, use=screen, # Other terminals screen.rxvt|screen in rxvt, - bw, + bw, XT, cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, use=screen+fkeys, use=vt100+enq, use=rxvt+pcfkeys, use=vt220+keypad, use=screen, +screen.Eterm|screen in Eterm, + use=screen+fkeys, use=Eterm, +screen.mrxvt|screen in mrxvt, + use=screen+fkeys, use=mrxvt, +screen.vte|screen in any VTE-based terminal, + use=screen+fkeys, use=vte, +screen.gnome|screen in GNOME Terminal, + use=screen+fkeys, use=gnome, +screen.konsole|screen in KDE console window, + use=screen+fkeys, use=konsole, # fix the backspace key screen.linux|screen in linux console, bw, @@ -4426,6 +4815,44 @@ screen.linux|screen in linux console, screen.mlterm|screen in mlterm, use=screen+fkeys, use=mlterm, +# The default "screen" entry is reasonably portable, but not optimal for the +# most widely-used terminal emulators. The "bce" capability is supported in +# screen since 3.9.13, and when used, will require fewer characters to be sent +# to the terminal for updates. +# +# If you are using only terminals which support bce, then you can use this +# feature in your screen configuration. +# +# Adding these lines to your ".screenrc" file will allow using these customized +# entries: +# term screen-bce +# bce on +# defbce on +screen-bce.xterm-new|screen optimized for modern xterm, + bce, + ech@, use=screen.xterm-new, +screen-bce.rxvt|screen optimized for rxvt, + bce, + ech@, use=screen.rxvt, +screen-bce.Eterm|screen optimized for Eterm, + bce, + ech@, use=screen.Eterm, +screen-bce.mrxvt|screen optimized for mrxvt, + bce, + ech@, use=screen.mrxvt, +screen-bce.gnome|screen optimized for GNOME-Terminal, + bce, + ech@, use=screen.gnome, +screen-bce.konsole|screen optimized for KDE console window, + bce, + ech@, use=screen.konsole, +screen-bce.linux|screen optimized for linux console, + bce, + ech@, use=screen.linux, +screen-bce.mlterm|screen optimized for mlterm, + bce, + ech@, use=screen.mlterm, + screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, cols#132, use=screen, @@ -4684,11 +5111,28 @@ sun-type4|Sun Workstation console with type 4 keyboard, # Most of the current references to sun-color are from users wondering why this # is the default on install. Details from reading the wscons manpage, adding # cub, etc., here (rather than in the base sun-il entry) since it is not clear -# when those were added -TD +# when those were added -TD (2005-05-28) +# +# According to wscons manpage, color is supported only on IA systems. +# Sun's terminfo entry documents bold and smul/rmul capabilities, but wscons +# does not list these. It also sets ncv#3, however that corresponds to +# underline and standout. +# +# Since the documentation and terminfo do not agree, see also current code at +# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/tem_safe.c +# +# That (actually a different driver which "supports" sun-color) also supports +# these features: +# vpa=\E[%i%p1%dd +# hpa=\E[%i%p1%d` +# cbt=\E[Z +# dim=\E[2m +# blink=\E[5m +# It supports bold, but not underline -TD (2009-09-19) sun-color|Sun Microsystems Workstation console with color support (IA systems), - colors#8, pairs#64, + colors#8, ncv#3, pairs#64, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC, - cuu=\E[%p1%dA, home=\E[H, op=\E[m\E[p, setab=\E[4%p1%dm, + cuu=\E[%p1%dA, home=\E[H, op=\E[0m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, @@ -4900,7 +5344,7 @@ news29|news28-a|sony vt100 emulator 29 lines, nwp511|nwp-511|nwp-511 vt100, OTbs, OTpt, am, xenl, cols#80, lines#24, - clear=\E[;H\E[2J$<20/>, cuf1=\E[C, + clear=\E[;H\E[2J$<20/>, cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A$<2/>, dl1=\E[M, ed=\E[J$<30/>, el=\E[K$<3/>, flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l, @@ -4964,44 +5408,13 @@ dtterm|CDE desktop terminal, ### EMX termcap.dat compatibility modes # -# Keypad: Home=\0G Up=\0H PrPag=\0I -# ka1,kh kcuu1 kpp,ka3 -# -# Left=\0K 5=\0L Right=\0M -# kcub1 kb2 kcuf1 -# -# End=\0O Down=\0P NxPag=\0Q -# kc1,kend kcud1 kc3,knp -# -# Ins=\0R Del=\0S -# kich1 kdch1 -# -# On keyboard with 12 function keys, -# shifted f-keys: F13-F24 -# control f-keys: F25-F36 -# alt f-keys: F37-F48 -# The shift/control/alt keys do not modify each other, but alt overrides both, -# and control overrides shift. -# # Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the # no_color_video to inform the application that standout(1), underline(2) # reverse(4) and invisible(64) don't work with color. emx-base|DOS special keys, bce, bw, it#8, ncv#71, - bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q, - kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H, - kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205, - kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W, - kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\, - kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_, - kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d, - kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212, - kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l, - kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q, - kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B, - kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I, - use=ansi.sys, + bel=^G, use=ansi.sys, # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b, # a Unix-style environment used on OS/2. (Note that the suffix makes some @@ -5169,7 +5582,7 @@ cygwinDBG|Debug Version for Cygwin, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m, sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m, - smul=\E[4m, tbc=\E[2g, vpa=\E[%i%p1%dd, use=vt102+enq, + smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt102+enq, # Key definitions: # The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc. match the @@ -5432,7 +5845,7 @@ pcmw|PC running Microsoft Works, interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color, am, bw, msgr, colors#8, cols#80, lines#25, ncv#3, pairs#64, - acsc=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\,\021+^P0\333p\304r\304y\363z\362{\343|\330}\234, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, @@ -5458,7 +5871,7 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec, sc=\E[s, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm, - sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m, + sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m, opennt-35|ntconsole-35|OpenNT-term35 compatible with color, lines#35, use=opennt, @@ -6130,10 +6543,10 @@ hp9837|hp98720|hp98721|HP 9000/300 workstations, hp9845|HP 9845, OTbs, am, da, db, eo, mir, xhp, cols#80, lines#21, - OTbc=\ED, clear=\EH\EJ, cuf1=\EC, cup=\E&a%p2%2dc%p1%2dY, - cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK, - if=/usr/share/tabset/std, il1=\EL, rmir=\ER, rmso=\E&d@, - smir=\EQ, smso=\E&dB, + OTbc=\ED, clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\E&a%p2%2dc%p1%2dY, cuu1=\EA, dch1=\EP, dl1=\EM, + ed=\EJ, el=\EK, if=/usr/share/tabset/std, il1=\EL, + rmir=\ER, rmso=\E&d@, smir=\EQ, smso=\E&dB, # From: Charles A. Finnell of MITRE , developed 07SEP90 # (hp98550: replaced /usr/share/tabset/9837 with std because ,; # added empty to avoid warnings re / --esr) @@ -8174,7 +8587,7 @@ wy100|wyse 100, wy120|wyse120|wy150|wyse150|Wyse 120/150, am, bw, hs, km, mc5i, mir, msgr, xon, cols#80, it#8, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45, - acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, + acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, @@ -8253,7 +8666,7 @@ wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column wy60|wyse60|Wyse 60, am, bw, hs, km, mc5i, mir, msgr, cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#45, - acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, + acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<100>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, @@ -8422,7 +8835,7 @@ wy99a-ansi|Wyse WY-99GT in ansi mode (US PC keyboard), wy99f|wy99fgt|wy-99fgt|Wyse WY-99GT (int'l PC keyboard), am, bw, hs, km, mc5i, mir, msgr, xon, cols#80, it#8, lines#25, wsl#46, - acsc='x+y.wi~_vj(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G, + acsc='x+y.w_vi~j(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E'\E(\032, cnorm=\E`4\E`1, cr=^M, cub1=^H, cud1=\Ej, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, @@ -8474,7 +8887,7 @@ wy99fa|wy99fgta|wy-99fgta|Wyse WY-99GT (US PC keyboard), wy160|wyse160|Wyse 160, am, bw, hs, km, mc5i, mir, msgr, cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#38, - acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, + acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<30>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<5>, @@ -8668,7 +9081,7 @@ wy85-wvb|wyse85-wvb|wyse 85 with visible bell 132-columns, # terminfo. At one point, I found some reference indicating that this # terminal bug (not sending \E[) was acknowledged by Wyse (so it's not just # me), but I can't find that and the server under my bookmark to "Wyse -# Technical" isn't responding. So there's the question of wether the wy85 +# Technical" isn't responding. So there's the question of whether the wy85 # terminfo should reflect the manufactuer's intended behaviour of the terminal # or the actual." wy85-8bit|wyse85-8bit|wyse 85 in 8-bit mode, @@ -8782,7 +9195,7 @@ wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols, wy325|wyse325|Wyse epc, am, bw, hs, mc5i, mir, cols#80, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45, - acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~, + acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~, bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>, cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>, @@ -9229,7 +9642,7 @@ wy100q|Wyse 100 for Quotron, kermit|standard kermit, OTbs, cols#80, lines#24, - clear=\EE, cub1=^H, cuf1=\EC, + clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EK, home=\EH, is2=K0 Standard Kermit 9-25-84\n, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^, @@ -9714,14 +10127,14 @@ att5420_2|AT&T 5420 model 2 80 cols, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, blink=\E[5m, cbt=\E[1Z, clear=\EH\EJ, cnorm=\E[11;0j, cr=\EG, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, - cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, - cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cvvis=\E[11;1j, - dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, - dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, el=\E[0K, - el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H, - hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, - ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dE, - invis=\E[8m, + cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C, + cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A, + cvvis=\E[11;1j, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, + dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, + el=\E[0K, el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8, + home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, + ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, + indn=\E[%p1%dE, invis=\E[8m, is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;0j\E[6;0j\E[7;0j\E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j\E[29;0j\E[1;24r, kbeg=\Et, kbs=^H, kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, @@ -9894,7 +10307,7 @@ att4426|tty4426|teletype 4426S, bel=^G, bold=\E[5m, clear=\E[H\E[2J\E[1U\E[H\E[2J\E[1V, cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\EA, dch=\E[%p1%dP, dch1=\EP, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EP, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[0K, home=\E[H, hpa=\E[%p1%dG, ht=^I, hts=\E1, ich=\E[%p1%d@, ich1=\E\^, il=\E[%p1%dL, il1=\EL, ind=^J, indn=\E[%p1%dS, @@ -9922,7 +10335,7 @@ att510a|bct510a|AT&T 510A Personal Terminal, acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~, bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, civis=\E[11;0|, clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[1B, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, @@ -9955,7 +10368,7 @@ att510d|bct510d|AT&T 510D Personal Terminal, acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~, bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z, clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M, cub=\E[%p1%dD, - cub1=^H, cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, + cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K, @@ -10982,7 +11395,7 @@ aaa+unk|aaa-unk|ann arbor ambassador (internal - don't use this directly), sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, sgr0=\E[m, smkx=\EP`>z~[[J`8xz~[[A`4xz~[[D`6xz~[[C`2xz~[[B\E\\, - smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[2g, + smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, aaa+rv|ann arbor ambassador in reverse video, @@ -11352,7 +11765,7 @@ adds980|a980|adds consul 980, cit80|cit-80|citoh 80, OTbs, am, cols#80, lines#24, - clear=\E[H\EJ, cr=^M, cub1=^H, cuf1=\E[C, + clear=\E[H\EJ, cr=^M, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\EJ, el=\EK, ff=^L, ind=^J, is2=\E>, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, @@ -11361,9 +11774,9 @@ cit80|cit-80|citoh 80, cit101|citc|C.itoh fast vt100, OTbs, am, xenl, cols#80, lines#24, - bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U, - dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, + bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cud1=\E[B, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, + cvvis=\E7\E[U, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5h$<200/>\E[?5l, ich1=\E[@, il1=\E[L, is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, @@ -11381,9 +11794,9 @@ cit101e|C. Itoh CIT-101e, OTbs, OTpt, am, mir, msgr, cols#80, it#8, lines#24, acsc=, clear=\E[H\E[J, cnorm=, csr=\E[%i%p1%2d;%p2%2dr, - cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, - cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M, ed=\E[J, - el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L, + cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, + cuu1=\E[A, cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M, + ed=\E[J, el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOT, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOm, kf6=\EOl, kf7=\EOM, kf8=\EOn, rc=\E8, ri=\EM, rmacs=^O, rmir=\E[4l, @@ -12069,7 +12482,7 @@ avt-ns|concept avt no status line, sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r, smir=\E[4h, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m, - tbc=\E[2g, vpa=\E[%p1%{1}%+%dd, + tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, avt-rv-ns|concept avt in reverse video mode/no status line, flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h, use=avt-ns, @@ -12279,7 +12692,7 @@ dgmode+color|Color info for Data General D470C terminals in DG mode, dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode, bce, ccc, colors#52, ncv#53, pairs#26, - initp=\036RG0%p1%02X%p2%{256}%*%{1001}%/%02X%p3%{256}%*%{1001}%/%02X%p4%{256}%*%{1001}%/%02X%p5%{256}%*%{1001}%/%02X%p6%{256}%*%{1001}%/%02X%p7%{256}%*%{1001}%/%02X, + initp=\036RG0%p1%02X%p2%{255}%*%{1000}%/%02X%p3%{255}%*%{1000}%/%02X%p4%{255}%*%{1000}%/%02X%p5%{255}%*%{1000}%/%02X%p6%{255}%*%{1000}%/%02X%p7%{255}%*%{1000}%/%02X, oc=\036RG01A00FF00000000\036RG01B00000000FF00\036RG01C007F00000000\036RG01D000000007F00, op=\036RF4831A\036RF2E31B\036RF1D31C\036RF3F31D, scp=\036RG2%p1%02X, @@ -12288,7 +12701,7 @@ dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode, dg+ccc|Configurable color info for DG D430C terminals in DG mode, bce, ccc, colors#52, ncv#53, pairs#26, - initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c, + initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c, oc=\036RG01\:00??00000000\036RG01;00000000??00\036RG01<007?00000000\036RG01=000000007?00, op=\036RF4831\:\036RF2>31;\036RF1=31<\036RF3?31=, scp=\036RG2%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c, @@ -12324,11 +12737,11 @@ dg200|data general dasher 200, dg210|dg-ansi|Data General 210/211, am, cols#80, lines#24, - OTnl=\E[B, clear=\E[2J, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH, - cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, kcub1=\E[D, - kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, - nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, smso=\E[7;m, - smul=\E[4;m, + OTnl=\E[B, clear=\E[2J, cub1=\E[D, cud1=\E[B, cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K, + home=\E[H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + khome=\E[H, nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, + smso=\E[7;m, smul=\E[4;m, # From: Peter N. Wan # courtesy of Carlos Rucalde of Vantage Software, Inc. # (dg211: this had ., which was an ancient termcap hangover. @@ -13200,7 +13613,7 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi, go140|graphon go-140, OTbs, cols#80, it#8, lines#24, - clear=\E[H\E[2J$<10/>, cub1=^H, cuf1=\E[C, + clear=\E[H\E[2J$<10/>, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J$<10/>, el=\E[K, ht=^I, if=/usr/share/tabset/vt100, il1=\E[L, @@ -14196,9 +14609,9 @@ intext|Interactive Systems Corporation modified owl 1200, intext2|intextii|INTERACTIVE modified owl 1251, am, bw, ul, cols#80, lines#24, xmc#0, - bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cud1=\E[B, - cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, - dl1=\E[M, ed=\E[J, el=\E[K, + bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cub1=\E[D, + cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, + dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[;;;;;;;;;2;;u$<200/>\E[;;;;;;;;;1;;u, hpa=\E[%p1%{1}%+%dG, ht=^I, ich1=\E[@, il1=\E[L, ind=\E[S, kbs=^H, kcub1=\ED\r, kcud1=\EB\r, kcuf1=\EC\r, kcuu1=\EA\r, @@ -14506,7 +14919,7 @@ prism9|p9|P9|MDC Prism-9 in ANSII mode, sc=\E[%y, sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;, sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m, - tbc=\E[2g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, + tbc=\E[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd, # p9-w: Prism-9 in 132 column mode # -------------------------------- @@ -15380,7 +15793,7 @@ ncr7901|ncr 7901 model, ndr9500|nd9500|Newbury Data 9500, am, bw, hs, mc5i, mir, msgr, ul, xon, cols#80, lines#24, wsl#79, - acsc=qKnImAjDwNuLtMvOlBkCxJ, bel=^G, cbt=\EI, civis=\E.0, + acsc=jDkClBmAnIqKtMuLvOwNxJ, bel=^G, cbt=\EI, civis=\E.0, clear=\E;, cnorm=\E.1, cr=^M, cub1=^H, cud1=^V, cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW, dim=\E), dl1=\ER, dsl=\Eh, ed=\EY, el=\ET, @@ -15500,8 +15913,8 @@ uts30|sperry uts30 with cp/m@1R1, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, civis=\ER, clear=^L, cnorm=\ES, cr=^M, csr=\EU%p1%{32}%+%c%p2%{32}%+%c, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB, - cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH, + cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EM, dl=\E[%p1%dM, dl1=\EL, ed=\E[J, el=\E[K, fsl=^M, home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\EO, il=\E[%p1%dL, il1=\EN, @@ -15576,8 +15989,8 @@ dt110|Tandy DT-110 emulating ansi, cols#80, lines#24, acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, - csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[0B, cuf1=\E[C, - cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[0A, dch1=\E[0P, + csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C, + cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[0P, dl1=\E[0M, ed=\E[0J, el=\E[0K, enacs=\E(B\E)0, home=\E[H, ht=^I, ich1=\E[0@, il1=\E[0L, ind=^J, is2=\E[?3l\E)0\E(B, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[K, @@ -15728,7 +16141,7 @@ tek4105|tektronix 4105, OTbs, am, mir, msgr, ul, xenl, xt, cols#79, it#8, lines#29, acsc=, bel=^G, blink=\E[=3;<7m, bold=\E[=7;<4m, cbt=\E[Z, - clear=\E[2J\E[H, cr=^M, cud1=\E[1B, cuf1=\E[1C, + clear=\E[2J\E[H, cr=^M, cub1=\E[1D, cud1=\E[1B, cuf1=\E[1C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[1A, dch1=\E[1P, dim=\E[=1;<6m, dl1=\E[1M, ed=\E[J, el=\E[K, home=\E[H, ht=^I, il1=\E[1L, ind=\E[S, invis=\E[=6;<5, is1=\E%!1\E[m, @@ -15847,6 +16260,15 @@ tek4106brl|tek4107brl|tek4109brl|Tektronix 4106 4107 or 4109, sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, tbc=\E[3g, +# Tektronix 4107/4109 interpret 4 modes using "\E%!" followed by a code: +# 0 selects Tek mode, i.e., \E%!0 +# 1 selects ANSI mode +# 2 selects ANSI edit-mode +# 3 selects VT52 mode +# +# One odd thing about the description (which has been unchanged since the 90s) +# is that the cursor addressing is using VT52 mode, and a few others use the +# VT52's non-CSI versions of ANSI, e.g., \EJ. tek4107|tek4109|tektronix terminals 4107 4109, OTbs, am, mir, msgr, ul, xenl, xt, cols#79, it#8, lines#29, @@ -15856,7 +16278,7 @@ tek4107|tek4109|tektronix terminals 4107 4109, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E%!3, dim=\E%!1\E[<0m$<2>\E%!0, ed=\EJ, el=\EK, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, - rev=\E%!1\E[7m$<2>\E%0, ri=\EI, + rev=\E%!1\E[7m$<2>\E%!0, ri=\EI, rmso=\E%!1\E[m$<2>\E%!0, rmul=\E%!1\E[m$<2>\E%!0, sgr=\E%%!1\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m$<2>\E%%!0, sgr0=\E%!1\E[m$<2>\E%!0, smso=\E%!1\E[7;5m$<2>\E%!0, @@ -15893,9 +16315,9 @@ otek4112|o4112-nd|otek4113|otek4114|old tektronix 4110 series, tek4112|tek4114|tektronix 4110 series, OTbs, am, db, cols#80, lines#34, - cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cuf1=\E[C, - cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P, dl1=\E[M, - ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L, + cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cud1=\E[B, + cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P, + dl1=\E[M, ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L, ind=\E7\E[0;0H\E[M\E8, is2=\E3!1, ri=\E7\E[0;0H\E[L\E8, rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m, tek4112-nd|4112 not in dialog area, @@ -15958,8 +16380,8 @@ tek4115|newer tektronix 4115 entry with more ANSI capabilities, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l, rmso=\E[m, rmul=\E[m, - sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m, - sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[2g, + sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m, + sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%p1%{1}%+%dd, # The tek4125 emulates a vt100 incorrectly - the scrolling region # command is ignored. The following entry replaces with the needed @@ -16330,7 +16752,7 @@ apple-uterm|Ultraterm for Apple micros, # This entry assumes that you are using an apple with the UCSD Pascal # language card. SYSTEM.MISCINFO is assumed to be the same as that # supplied with the standard apple except that screenwidth should be set -# using SETUP to 80 columns. Note that the right arrow in not mapped in +# using SETUP to 80 columns. Note that the right arrow is not mapped in # this termcap entry. This is because that key, on the Apple, transmits # a ^U and would thus preempt the more useful "up" function of vi. # @@ -16366,15 +16788,16 @@ apple-videx2|Apple II+ w/ Videx card (similar to Datamedia h1520), apple-videx3|vapple|Apple II with 80 col card, OTbs, am, cols#80, lines#24, - clear=\Ev, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, el=\Ex, home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, - kcuu1=\EA, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, - kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH, + clear=\Ev, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, el=\Ex, + home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, + kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, kf5=\E", kf6=\E#, + kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH, #From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL aepro|Apple II+ running ASCII Express Pro--vt52, OTbs, cols#80, lines#24, - clear=\014$<300/>, cuf1=\EC, + clear=\014$<300/>, cub1=\ED, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ, el=\EK, home=\EH, # UCSD addition: Yet another termcap from Brian Kantor's Micro Munger Factory @@ -16446,17 +16869,102 @@ mac|macintosh|Macintosh with MacTerminal, mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, cols#132, use=mac, +# nsterm*|Apple_Terminal - AppKit Terminal.app +# +# Terminal.app is a Terminal emulator bundled with NeXT's NeXTStep and +# OPENSTEP/Mach operating systems, and with Apple's Rhapsody, Mac OS X +# Server and Mac OS X operating systems. There is also a +# "terminal.app" in GNUStep, but I believe it to be an unrelated +# codebase and I have not attempted to describe it here. +# +# For NeXTStep, OPENSTEP/Mach, Rhapsody and Mac OS X Server 1.0, you +# are pretty much on your own. Use "nsterm-7-m" and hope for the best. +# You might also try "nsterm-7" and "nsterm-old" if you suspect your +# version supports color. +# +# To determine the version of Terminal.app you're using by running: +# +# echo "$TERM_PROGRAM" "$TERM_PROGRAM_VERSION" +# +# For Apple_Terminal v200+, use "nsterm-16color" (a.k.a. "nsterm") +# +# For Apple_Terminal v71+/v100+, use "nsterm-bce". +# +# For Apple_Terminal v51+, use "nsterm-7-c" or "nsterm-7-c-s". +# +# For Apple_Terminal v41+, use "nsterm-old", or "nsterm-s". +# +# For all earlier versions (Apple_Terminal), try "nsterm-7-m" +# (monochrome) or "nsterm-7" (color); "nsterm-7-m-s" and "nsterm-7-s" +# might work too, but really you're on your own here since these +# systems are very obsolete and I can't test them. I do welcome +# patches, though :). + +# Other Terminals: +# +# For GNUstep_Terminal, you're probably best off using "linux" or +# writing your own terminfo. + +# For MacTelnet, you're on your own. It's a different codebase, and +# seems to be somewhere between "vt102", "ncsa" and "xterm-color". + +# For iTerm.app, see "iterm". + +# # The AppKit Terminal.app descriptions all have names beginning with # "nsterm". Note that the statusline (-s) versions use the window # titlebar as a phony status line, and may produce warnings during -# compilation as a result ("tsl uses 0 parameters, expected 1".) Ignore -# these warnings, or even ignore these entries entirely. Apps which -# need to position the cursor or do other fancy stuff inside the status -# line won't work with these entries. They're primarily useful for -# programs like Pine which provide simple notifications in the status -# line. Please note that non-ASCII characters don't work right in the -# status line, since Terminal.app incorrectly interprets their Unicode -# codepoints as MacRoman codepoints. +# compilation as a result ("tsl uses 0 parameters, expected 1".) +# Ignore these warnings, or even ignore these entries entirely. Apps +# which need to position the cursor or do other fancy stuff inside the +# status line won't work with these entries. They're primarily useful +# for programs like Pine which provide simple notifications in the +# status line. Please note that non-ASCII characters don't work right +# in the status line, since Terminal.app incorrectly interprets their +# Unicode codepoints as MacRoman codepoints (in earlier Mac OS X +# versions) or only accepts status lines consisting entirely of +# characters from the first 256 Unicode positions (including C1 but +# not C0 or DEL.) +# +# The Mythology* of AppKit Terminal.app: +# +# In the days of NeXTSTep 0.x and 1.x there were two incompatible +# bundled terminal emulators, Shell and Terminal. Scott Hess wrote a +# shareware replacement for Terminal called "Stuart" which NeXT bought +# and used as the basis for the Terminal.app in NeXTstep 2+, +# OPENSTEP/Mach, Apple Rhapsody, Mac OS X Server 1.0, and Mac OS X. I +# don't know the TERM_PROGRAM and TERM_PROGRAM_VERSION settings or +# capabilities for the early versions, but I believe that the +# TERM_PROGRAM_VERSION may have been reset at some point. +# +# The early versions were tailored to the NeXT character set. Sometime +# after the Apple aquisition the encoding was swiched to MacRoman +# (initally with serious altcharset bugs due to incomplete conversion +# of the old NeXT code,) and then later to UTF-8. Alos sometime during +# or just prior to the early days of Mac OS X, the Terminal grew ANSI +# 8-color support (initially buggy when combined with attributes, but +# that was later fixed.) More recently, around Mac OS X version 10.3 +# or so (Terminal.app v100+) xterm-like 16-color support was added. In +# some versions (for instance 133-1 which shipped with Mac OS X +# version 10.4) this suffered from the bug, but that seems to +# have been fixed in Mac OS X version 10.5 (Terminal.app v240.2+). +# +# In the early days of Mac OS X the terminal was fairly buggy and +# would routinely crash under load. Many of these bugs seem to have +# been fixed around Mac OS X version 10.3 (Terminal.app v100+) but +# some may still remain. This change seems to correspond to +# Terminal.app reporting "xterm-color" as $TERM rather than "vt100" as +# it did previously. +# +# * This may correspond with what actually happened, but I don't +# know. It is based on guesswork, hearsay, private correspondence, +# my faulty memory, and the following online sources and references: +# +# [1] "Three Scotts and a Duane" by Simson L. Garfinkel +# http://www.nextcomputers.org/NeXTfiles/Articles/NeXTWORLD/93.8/93.8.Dec.Community1.html +# +# [2] NeXTSTEP entry from Wikipedia, the free encyclopedia +# https://secure.wikimedia.org/wikipedia/en/wiki/Nextstep # # * Renamed the AppKit Terminal.app entry from "Apple_Terminal" to # "nsterm" to comply with the name length and case conventions and @@ -16546,7 +17054,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, # export TERM # if [ :"$TERM_PROGRAM_VERSION" = :41 ] # then -# TERM="nsterm" +# TERM="nsterm-old" # else # TERM="nsterm-c-7" # fi @@ -16557,7 +17065,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode, # if ( $?TERM && $?TERM_PROGRAM && $?TERM_PROGRAM_VERSION) then # if ( :"$TERM" == :"vt100" && :"$TERM_PROGRAM" == :"Apple_Terminal" ) then # if ( :"$TERM_PROGRAM_VERSION" == :41 ) then -# setenv TERM "nsterm" +# setenv TERM "nsterm-old" # else # setenv TERM "nsterm-c-7" # endif @@ -16574,25 +17082,25 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J, - kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l, - rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, + kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, + rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, - sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m, - sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, + sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys, nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, enacs=\E(B\E)0, rmacs=^O, - sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - smacs=^N, use=nsterm+7, + sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, + sgr0=\E[m\017, smacs=^N, use=nsterm+7, nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset, - acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377, + acsc=+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245, enacs=\E(B\E)0, rmacs=^O, - sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;, - smacs=^N, use=nsterm+7, + sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, + sgr0=\E[m\017, smacs=^N, use=nsterm+7, nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support, hs, @@ -16653,7 +17161,7 @@ nsterm-m|AppKit Terminal.app v41+ w/MacRoman charset (monochrome), nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline), use=nsterm+s, use=nsterm+mac, -nsterm|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color), +nsterm-old|AppKit Terminal.app v41+ w/MacRoman charset (color), use=nsterm+c41, use=nsterm+mac, nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color), @@ -16665,17 +17173,66 @@ nsterm-s|AppKit Terminal.app v41+ w/MacRoman charset (color w/statusline), nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline), use=nsterm+s, use=nsterm+c, use=nsterm+mac, +# In Mac OS X version 10.5 the format of the preferences has changed +# and a new, more complex technique is needed, e.g., +# +# python -c 'import sys,objc;NSUserDefaults=objc.lookUpClass( +# "NSUserDefaults");ud=NSUserDefaults.alloc(); +# ud.init();prefs=ud.persistentDomainForName_( +# "com.apple.Terminal");prefs["Window Settings"][ +# prefs["Default Window Settings"]]["TerminalType" +# ]=sys.argv[1];ud.setPersistentDomain_forName_(prefs, +# "com.apple.Terminal")' nsterm-16color +# +# and it is still not settable from the preferences dialog. This is +# tracked under rdar://problem/7365108 and rdar://problem/7365134 +# in Apple's bug reporter. +nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5, + bw@, mir, npc, + civis=\E[?25l, cnorm=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, + flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG, + ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, kend=\E[F, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, + kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, + kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~, + kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H, + knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, + smcup=\E7\E[?47h, smir=\E[4h, vpa=\E[%i%p1%dd, + use=nsterm-c-s-acs, +# The versions of Terminal.app in Mac OS X version 10.3.x seem to have +# the background color erase bug. The newer version 240.2 in Mac OS X +# version 10.5 does not. +# # This entry is based on newsgroup comments by Alain Bench, Christian Ebert, # and D P Schreber comparing to nsterm-c-s-acs. # -# D P Schreber notes that $TERM can be set in Terminal.app, e.g., -# defaults write com.apple.Terminal TermCapString nsterm-c-s-acs +# In Mac OS X version 10.4 and earlier, D P Schreber notes that $TERM +# can be set in Terminal.app, e.g., +# +# defaults write com.apple.Terminal TermCapString nsterm-bce +# # and that it is not set in Terminal's preferences dialog. -nsterm-16color|AppKit Terminal.app v100.1.8 with MacOS X 10.3.9, - kdch1=\E[3~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, - kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, - knp=\E[6~, kpp=\E[5~, use=nsterm-c-s-acs, +nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce), + bce, bw, use=nsterm-16color, + +# This is an alias which should always point to the "current" version +nsterm|Apple_Terminal|AppKit Terminal.app, + use=nsterm-16color, + +# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and +# more featureful) terminal emulator for Mac OS X. It is similar +# enough in capabilities to nsterm-16color that I have derived this +# description from that one, but as far as I know they share no code. +# Many of the features are user-configurable, but I attempt only to +# describe the default configuration. +# +# NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is +# disabled. +iTerm.app|iTerm.app terminal emulator for Mac OS X, + bce, bw@, ccc@, + csr@, initc@, kend=\EOF, khome=\EOH, use=xterm+256color, + use=nsterm-16color, # xnuppc - Darwin PowerPC Console (a.k.a. "darwin") # @@ -16785,7 +17342,7 @@ xnuppc+basic|Darwin PowerPC Console basic capabilities, rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m, - sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, + sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt100+keypad, xnuppc+c|Darwin PowerPC Console ANSI color support, @@ -16986,42 +17543,6 @@ trs16|trs-80 model 16 console, lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, rmso=\ER@, sgr0=\ER@, smacs=\ERG, smso=\ERD, -#### Atari ST -# - -# From: Simson L. Garfinkel -atari|atari st, - OTbs, am, - cols#80, it#8, lines#25, - clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM, - ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB, - kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep, -# UniTerm terminal program for the Atari ST: 49-line VT220 emulation mode -# From: Paul M. Aoki -uniterm|uniterm49|UniTerm VT220 emulator with 49 lines, - lines#49, - is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H, - use=vt220, -# MiNT VT52 emulation. 80 columns, 25 rows. -# MiNT is Now TOS, the operating system which comes with all Ataris now -# (mainly Atari Falcon). This termcap is for the VT52 emulation you get -# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode -# From: Per Persson , 27 Feb 1996 -st52|Atari ST with VT52 emulation, - am, km, - cols#80, lines#25, - bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED, - cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, - cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL, - ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1, - kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M, - kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>, - kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G, - kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek, - ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq, - smcup=\Ee, smso=\Ep, - #### Commodore Business Machines # # Formerly located in West Chester, PA; went spectacularly bust in 1994 @@ -17229,50 +17750,31 @@ osexec|Osborne executive, # even as single processes under SunOS and the Macintosh OS. # -# This is the entry matching the distributed ncurses patch; -# F11, F12, <5>, Numeric Plus and Minus are not available +# See +# http://www.minix3.org/manpages/man4/console.4.html minix|minix console (v3), - am, xenl, - cols#80, it#8, lines#25, - bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, - cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, - cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, - cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, - is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kdch1=\177, kend=\E[Y, kf0=\E[21~, kf1=\E[11~, - kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, - kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kf10=\E[21~, - kf11=\E[11;2~, kf12=\E[12;2~, kf13=\E[13;2~, kf14=\E[14;2~, - kf15=\E[15;2~, kf16=\E[17;2~, kf17=\E[18;2~, kf18=\E[19;2~, - kf19=\E[20;2~, kf20=\E[21;2~, kf21=\E[11;5~, kf22=\E[12;5~, - kf23=\E[13;5~, kf24=\E[14;5~, kf25=\E[15;5~, kf26=\E[17;5~, - kf27=\E[18;5~, kf28=\E[19;5~, kf29=\E[20;5~, kf30=\E[21;5~, - kf31=\E[11;6~, kf32=\E[12;6~, kf33=\E[13;6~, kf34=\E[14;6~, - kf35=\E[15;6~, kf36=\E[17;6~, kf37=\E[18;6~, kf38=\E[19;6~, - kf39=\E[20;6~, kf40=\E[21;6~, khome=\E[H, kich1=\E[@, - knp=\E[U, kpp=\E[V, nel=^M^J, rev=\E[7m, ri=\EM, - rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m, - colors#8, pairs#64, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, - acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, + use=ecma+color, use=minix-1.7, + +# See +# http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html # This is the entry provided with minix 1.7.4, with bogus :ri: removed. -minix-old2|minix console (v1.7), +minix-1.7|minix console (v1.7), am, xenl, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, - dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I, - ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, - is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, - kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, kf4=\E[S, - kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, lf2=PgDn, lf3=Num +, - lf4=Num -, lf5=Num 5, nel=^M^J, rev=\E[7m, ri=\EM, - rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m, + dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, el1=\E[2K, + home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, + il1=\E[L, ind=^J, is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, + kcuf1=\E[C, kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, + kf3=\E[T, kf4=\E[S, kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, + lf2=PgDn, lf3=Num +, lf4=Num -, lf5=Num 5, nel=^M^J, + rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, + smso=\E[7m, smul=\E[4m, # Corrected Jan 14, 1997 by Vincent Broman -minix-old|minix-old15|minix console (v1.5), +minix-old|minix-1.5|minix console (v1.5), xon, cols#80, it#8, lines#25, bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M, @@ -17678,7 +18180,7 @@ tws-generic|dku7102|Bull Questar tws terminals, rmul=\E[m, rs2=\E[?=h\Ec, s0ds=^O, s1ds=^N, sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, sgr0=\E[m\017, smacs=^N, smcup=\E[?>h\EPY99\:98\E\\, - smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[2g, + smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g, tsl=\EPY99\:98\E\\\E[0;98v\E[2;7m, tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA, dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v, @@ -17879,8 +18381,9 @@ bq300-8|Bull vt320 full 8 bits 80 columns, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\2335m, bold=\2331m, civis=\233?25l, clear=\233H\233J, cnorm=\233?25h, cr=^M, - csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cud=\233%p1%dB, - cuf=\233%p1%dC, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, + csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=\2331D, + cud=\233%p1%dB, cud1=\2331B, cuf=\233%p1%dC, cuf1=\2331C, + cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\2331A, dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J, el=\233K, el1=\2331K, enacs=\E(B\E)0, @@ -18421,7 +18924,7 @@ h19-us|h19us|h19-smul|heathkit w/keypad shifted/underscore cursor, h19|heath|h19-b|heathkit|heath-19|z19|zenith|heathkit h19, OTbs, am, eslok, hs, mir, msgr, cols#80, it#8, lines#24, - acsc=~\^x`qanbkcjdmelfgg+hai.kwsutvutvozs{, bel=^G, + acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^, bel=^G, clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ex4, dch1=\EN, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH, ht=^I, ind=^J, @@ -18559,7 +19062,7 @@ z100|h100|z110|z-100|h-100|heath/zenith z-100 pc with color monitor, z100bw|h100bw|z110bw|z-100bw|h-100bw|heath/zenith z-100 pc, OTbs, OTpt, mir, msgr, OTkn#10, cols#80, it#8, lines#24, - acsc=~\^x`qanbkcjdmelfgg+hai.kwsutvutvozs{, + acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^, clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>, cuu1=\EA, cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>, ed=\EJ, el=\EK, @@ -18607,7 +19110,7 @@ ims950-rv|ims tvi950 rev video, ims-ansi|ultima2|ultimaII|IMS Ultima II, OTbs, am, cols#80, it#8, lines#24, - clear=\E[H\E[2J, cub1=^H, cud1=\ED, + clear=\E[H\E[2J, cub1=^H, cud1=\ED, cuf1=\EC, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\EM, ed=\E[0J, el=\E[0K, ht=^I, if=/usr/share/tabset/vt100, is2=\E[m\E[>14l\E[?1;?5;20l\E>\E[1m\r, kcub1=\E[D, @@ -18718,9 +19221,9 @@ modgraph|mod24|modgraph terminal emulating vt100, modgraph2|modgraph gx-1000 80x24 with keypad not enabled, am, da, db, cols#80, it#8, lines#24, - clear=\EH\EJ$<50/>, cub1=^H, cuf1=\EC$<2/>, - cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>, cuu1=\EA$<2/>, - ed=\EJ$<50/>, el=\EK$<3/>, ht=^I, + clear=\EH\EJ$<50/>, cub1=^H, cud1=\EB$<2/>, + cuf1=\EC$<2/>, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>, + cuu1=\EA$<2/>, ed=\EJ$<50/>, el=\EK$<3/>, ht=^I, is2=\E<\E\^5;2s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s\E\^11;81s\E\^11;89s\E\^12;0s\E\^14;2s\E\^15;9s\E\^25;1s\E\^9;1s\E\^27;1, ri=\EI$<5/>, # @@ -18791,9 +19294,9 @@ mt70|mt-70|Morrow MD-70; native Morrow mode, ex155|Motorola Exorterm 155, OTbs, am, bw, OTkn#5, OTug#1, cols#80, lines#24, - cbt=\E[, clear=\EX, cud1=\EB, cuf1=\ED, - cup=\EE%p1%{32}%+%c%p2%{32}%+%c, ed=\ET, el=\EU, - home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H, + cbt=\E[, clear=\EX, cub1=\ED, cud1=\EB, cuf1=\EC, + cup=\EE%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\ET, + el=\EU, home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, ked=\ET, kel=\EU, khome=\E@, rmso=\Ec\ED, rmul=\Eg\ED, smso=\Eb\ED, smul=\Ef\ED, @@ -19089,7 +19592,7 @@ t1061f|teleray 1061 with fast PROMs, t10|teleray 10 special, OTbs, km, xhp, xt, cols#80, it#8, lines#24, xmc#2, - clear=\Ej$<30/>, cub1=^H, cuf1=\EC, + clear=\Ej$<30/>, cub1=^H, cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, ich1=\EP, il1=\EL, ind=\Eq, pad=\0, ri=\Ep, rmso=\ER@, rmul=\ER@, smso=\ERD, @@ -19811,7 +20314,7 @@ teletec|Teletec Datascreen, v3220|LANPAR Vision II model 3220/3221/3222, OTbs, am, mir, xenl, cols#80, it#8, lines#24, - clear=\E[H\E[J, cub1=^H, cuf1=\E[C, + clear=\E[H\E[J, cub1=^H, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, ht=^I, il1=\E[L, is2=\E>\E[?3l\E[?7h\E[?8h\E[p, kcub1=\E[D, kcud1=\E[B, @@ -21732,13 +22235,126 @@ v3220|LANPAR Vision II model 3220/3221/3222, # * add Eterm-256color, Eterm-88color -TD # * add rxvt-88color -TD # -# The following sets edit modes for GNU EMACS. -# Local Variables: -# fill-prefix:"\t" -# fill-column:75 -# comment-column:0 -# comment-start-skip:"^#+" -# comment-start:"# " -# compile-command:"tic -c terminfo.master" -# End: +# 2008-10-12 +# * add teraterm4.59 entry, use that as primary teraterm entry, rename +# original to teraterm2.3 -TD +# * update "gnome" to 2.22.3 -TD +# * update "konsole" to 1.6.6 -TD +# * add "aterm" -TD +# * add "linux2.6.26" -TD +# +# 2008-11-15 +# * change several \E[2g (clear tab at current column) to \E[3g +# (clear all tabs) to match definition for tbc capability -TD +# +# 2008-11-29 +# * add eterm-color -TD +# +# 2009-01-10 +# * add screen.Eterm -TD +# +# 2009-03-28 +# * correct typo in pfkey of ansi.sys-old +# (report by Kalle Olavi Niemitalo) +# * move function- and cursor-keys from emx-base to ansi.sys, and create +# a pfkey capability which handles F1-F48 -TD +# +# 2009-05-02 +# * add vwmterm entry (Bryan Christ) +# +# 2009-09-19 +# * change ncv and op capabilities in sun-color to match Sun's entry for +# this (report by Laszlo Peter) +# * improve interix smso by using reverse rather than bold (report by +# Kristof Zelechovski). +# +# 2009-10-03 +# * remove unnecessary kcan assignment to ^C from putty (Sven Joachim) +# * add linux-16color (Benjamin Sittler) +# * correct initc capability of linux-c-nc end-of-range (Benjamin Sittler) +# * similar change for dg+ccc and dgunix+ccc (Benjamin Sittler) +# * add ccc and initc capabilities to xterm-16color -TD +# +# 2009-10-31 +# * updated nsterm* entries (Benjamin Sittler, prompted by GenToo #206201) +# +# 2009-12-12 +# * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta) +# +# 2009-12-12 +# * add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler) +# * rename minix to minix-1.7, add minix entry for Minux3 -TD +# +# 2009-12-26 +# * add bterm (bogl 0.1.18) -TD +# * minor fix to rxvt+pcfkeys -TD +# +# 2010-02-06 +# * update mrxvt to 0.5.4, add mrxvt-256color -TD +# +# 2010-02-13 +# * add several screen-bce.XXX entries -TD +# +# 2010-02-23 +# * modify screen-bce.XXX entries to exclude ech, since screen's color +# model does not clear with color for that feature -TD +# +# 2010-03-20 +# * rename atari and st52 to atari-old, st52-old, use newer entries from +# FreeMiNT by Guido Flohr (from patch/report by Alan Hourihane). +# +# 2010-06-12 +# * add mlterm+256color entry -TD +# +# 2010-07-17 +# * add hard-reset for rs2 to wsvt25 to help ensure that reset ends +# the alternate character set (patch by Nicholas Marriott) +# +# 2010-08-28 +# * improve acsc for vt52 (Benjamin Sittler) +# * modify nsterm entries for consistent sgr/sgr0 -TD +# * modify xnuppc entries for consistent sgr/sgr0 -TD +# * add invis to tek4115 sgr -TD +# +# 2010-09-11 +# * reformat acsc strings to canonical format -TD +# +# 2010-09-25 +# * add "XT" capability to entries for terminals that support both +# xterm-style mouse- and title-controls, for "screen" which +# special-cases TERM beginning with "xterm" or "rxvt" -TD +# +# 2010-10-02 +# * fill in no-parameter forms of cursor-movement where a parameterized +# form is available -TD +# * fill in missing cursor controls where the form of the controls is +# ANSI -TD +# * add parameterized cursor-controls to linux-basic (report by Dae) -TD +# +# 2010-10-09 +# * correct comparison used for setting 16-colors in linux-16color +# entry (Novell #644831) -TD +# * improve linux-16color entry, using "dim" for color-8 which makes it +# gray rather than black like color-0 -TD +# +# 2010-11-20 +# * make "vte" the principal entry defining "gnome", since GNOME terminal +# is merely one of several terminals whose behavior is provided by this +# library -TD +# +# 2010-11-27 +# * fix typo in rmso for tek4106 -Goran Weinholt +# +# 2010-12-11 +# * suppress ncv in screen entry, allowing underline -Alejandro R. Sedeno +# * also suppress ncv in konsole-base -TD +# +# 2011-02-05 +# * add U8 feature to denote entries for terminal emulators which do not +# support VT100 SI/SO when processing UTF-8 encoding -TD +# * add xterm-utf8 as a demo of the U8 feature -TD +# +# 2011-02-20 +# * add cons25-debian entry (Brian M Carlson, Debina #607662). +# ######## SHANTIH! SHANTIH! SHANTIH! diff --git a/tools/tic/Makefile b/tools/tic/Makefile index 24b050dde..5d236c72f 100644 --- a/tools/tic/Makefile +++ b/tools/tic/Makefile @@ -7,8 +7,6 @@ HOST_SRCS= compile.c hash.c TERMINFODIR= ${NETBSDSRCDIR}/lib/libterminfo .include "${.CURDIR}/../Makefile.host" -.ifndef __MINIX .include "${TERMINFODIR}/Makefile.hash" -.endif .PATH: ${TERMINFODIR}