Updating libcurses, libterminfo and terminfo.

The three are updated together as they are tightly coupled.

Change-Id: I9e1f07b6adc6e8ae10833e6f1402f8472d2d34b8
This commit is contained in:
Lionel Sambuc 2012-12-04 11:42:24 +01:00
parent f14fb60209
commit 0c3ae37f52
69 changed files with 1952 additions and 2511 deletions

View file

@ -1337,7 +1337,7 @@ get_term()
*/
static int costcount;
typedef void (*tputfunc)(int);
typedef int (*tputfunc)(int);
/*ARGSUSED*/
static int

View file

@ -7,11 +7,6 @@
#include <string.h>
#include <termcap.h>
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) {

View file

@ -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

View file

@ -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:

View file

@ -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 <bsd.own.mk>
@ -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 \

View file

@ -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 <sys/cdefs.h>
#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

View file

@ -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 */

View file

@ -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 <sys/cdefs.h>
#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 <stdlib.h>
@ -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;

View file

@ -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));
}

View file

@ -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 <sys/cdefs.h>
__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];

View file

@ -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)

View file

@ -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)

View file

@ -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 <sys/cdefs.h>
#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;
}

View file

@ -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

View file

@ -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 <sys/cdefs.h>
#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;

View file

@ -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

View file

@ -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 *);

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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 <sys/cdefs.h>
#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 <string.h>
@ -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 */

View file

@ -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;

View file

@ -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 <ctype.h>
#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);
}
}

View file

@ -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 <sys/cdefs.h>
#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++;
}

View file

@ -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 <sys/cdefs.h>
#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;

View file

@ -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 <sys/cdefs.h>
#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 */

View file

@ -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 <sys/cdefs.h>
#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);
}

View file

@ -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 <sys/cdefs.h>
#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);
}
}

View file

@ -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;
}
/*

View file

@ -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;

View file

@ -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++)

View file

@ -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];

View file

@ -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 ||

View file

@ -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

View file

@ -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 <sys/ioctl.h>
#include <errno.h>
@ -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();
}

View file

@ -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;
}
/*

View file

@ -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 <bsd.own.mk>
.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 <Makefile.hash>
# 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 <bsd.own.mk>
.include <bsd.shlib.mk>
.if ${MKLINKLIB} != "no"

View file

@ -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

View file

@ -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 <sys/cdefs.h>
__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 <sys/endian.h>
@ -51,7 +51,7 @@ __RCSID("$NetBSD: compile.c,v 1.4 2010/03/02 14:11:11 roy Exp $");
#include <term_private.h>
#include <term.h>
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);

View file

@ -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
}
};

View file

@ -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 <sys/cdefs.h>
__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 <assert.h>
#include <stdlib.h>
#include <string.h>
#include <term_private.h>
#include <term.h>
#include <termios.h>
#include <stdio.h>
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);
}

View file

@ -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 <<EOF
@ -85,7 +85,6 @@ EOF
}
cat <<EOF
/* \$NetBSD\$ */
/* DO NOT EDIT
* Automatically generated from term.h */
@ -93,9 +92,6 @@ cat <<EOF
#include "nbtool_config.h"
#endif
#include <sys/cdefs.h>
__RCSID("\$NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $");
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

View file

@ -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

View file

@ -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 <<EOF
/* \$NetBSD\$ */
/* DO NOT EDIT
* Automatically generated from termcap.c */
#include <sys/cdefs.h>
__RCSID("\$NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $");
#include <stdint.h>
#include <stdlib.h>
#include <term_private.h>
@ -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

View file

@ -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 <sys/cdefs.h>
__RCSID("$NetBSD: hash.c,v 1.4 2010/02/12 10:18:56 roy Exp $");
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <term_private.h>
#include <term.h>
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 <stdlib.h>
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 <stdlib.h>
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 <stdlib.h>
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;
}

View file

@ -1,5 +0,0 @@
NETBSDINCLUDES= /usr/include/
CPPFLAGS+= -D_NETBSD_SOURCE
MKLINKLIB= yes

View file

@ -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 <sys/cdefs.h>
__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 <assert.h>
#include <err.h>
@ -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:

View file

@ -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

View file

@ -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 <sys/cdefs.h>
__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 <sys/stat.h>
#include <assert.h>
#include <cdbr.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <ndbm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -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);
}
}

View file

@ -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 <sys/cdefs.h>
__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 <termcap.h>
__END_DECLS
#endif

View file

@ -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)

View file

@ -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

View file

@ -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 <sys/cdefs.h>
__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 <assert.h>
#include <ctype.h>
@ -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.

View file

@ -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;

View file

@ -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 <sys/cdefs.h>
__RCSID("$NetBSD: termcap_hash.c,v 1.3 2010/02/12 10:18:56 roy Exp $");
#include <stdint.h>
#include <stdlib.h>
#include <term_private.h>
#include <stdlib.h>
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 <stdlib.h>
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 <stdlib.h>
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;
}

View file

@ -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

View file

@ -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.

View file

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <assert.h>
#include <ctype.h>
@ -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(&params, 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);
}

View file

@ -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

View file

@ -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 <bsd.prog.mk>

File diff suppressed because it is too large Load diff

View file

@ -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}