svn commit: r275689 - in projects/building-blocks: contrib/file/doc contrib/file/src etc etc/autofs lib/libc/net lib/libc/stdio sbin/mount share/termcap sys/conf sys/dev/mii sys/dev/xen/grant_table...

Garrett Cooper ngie at FreeBSD.org
Wed Dec 10 20:44:56 UTC 2014


Author: ngie
Date: Wed Dec 10 20:44:51 2014
New Revision: 275689
URL: https://svnweb.freebsd.org/changeset/base/275689

Log:
  MFhead @ r275688

Added:
  projects/building-blocks/etc/autofs/special_media
     - copied unchanged from r275688, head/etc/autofs/special_media
  projects/building-blocks/share/termcap/termcap
     - copied unchanged from r275688, head/share/termcap/termcap
  projects/building-blocks/sys/dev/xen/grant_table/
     - copied from r275688, head/sys/dev/xen/grant_table/
  projects/building-blocks/usr.sbin/fstyp/
     - copied from r275688, head/usr.sbin/fstyp/
Deleted:
  projects/building-blocks/share/termcap/reorder
  projects/building-blocks/share/termcap/termcap.src
  projects/building-blocks/sys/xen/gnttab.c
Modified:
  projects/building-blocks/contrib/file/doc/file.man
  projects/building-blocks/contrib/file/src/elfclass.h
  projects/building-blocks/contrib/file/src/file.h
  projects/building-blocks/contrib/file/src/funcs.c
  projects/building-blocks/contrib/file/src/readelf.c
  projects/building-blocks/contrib/file/src/softmagic.c
  projects/building-blocks/etc/auto_master
  projects/building-blocks/etc/autofs/Makefile
  projects/building-blocks/etc/devd.conf
  projects/building-blocks/lib/libc/net/sctp_sys_calls.c
  projects/building-blocks/lib/libc/stdio/fflush.c
  projects/building-blocks/sbin/mount/mount.8
  projects/building-blocks/share/termcap/Makefile
  projects/building-blocks/share/termcap/README
  projects/building-blocks/sys/conf/files
  projects/building-blocks/sys/dev/mii/micphy.c
  projects/building-blocks/sys/powerpc/aim/trap.c
  projects/building-blocks/sys/powerpc/booke/trap.c
  projects/building-blocks/sys/x86/xen/xen_intr.c
  projects/building-blocks/sys/x86/xen/xenpv.c
  projects/building-blocks/sys/xen/gnttab.h
  projects/building-blocks/usr.sbin/Makefile
  projects/building-blocks/usr.sbin/autofs/auto_master.5
Directory Properties:
  projects/building-blocks/   (props changed)
  projects/building-blocks/contrib/file/   (props changed)
  projects/building-blocks/etc/   (props changed)
  projects/building-blocks/lib/libc/   (props changed)
  projects/building-blocks/sbin/   (props changed)
  projects/building-blocks/share/   (props changed)
  projects/building-blocks/sys/   (props changed)
  projects/building-blocks/sys/conf/   (props changed)

Modified: projects/building-blocks/contrib/file/doc/file.man
==============================================================================
--- projects/building-blocks/contrib/file/doc/file.man	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/doc/file.man	Wed Dec 10 20:44:51 2014	(r275689)
@@ -1,5 +1,5 @@
 .\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $
-.Dd January 30, 2014
+.Dd December 3, 2014
 .Dt FILE __CSECTION__
 .Os
 .Sh NAME
@@ -385,6 +385,7 @@ options.
 .Xr hexdump 1 ,
 .Xr od 1 ,
 .Xr strings 1 ,
+.Xr fstyp 8
 .Sh STANDARDS CONFORMANCE
 This program is believed to exceed the System V Interface Definition
 of FILE(CMD), as near as one can determine from the vague language

Modified: projects/building-blocks/contrib/file/src/elfclass.h
==============================================================================
--- projects/building-blocks/contrib/file/src/elfclass.h	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/src/elfclass.h	Wed Dec 10 20:44:51 2014	(r275689)
@@ -35,10 +35,12 @@
 	switch (type) {
 #ifdef ELFCORE
 	case ET_CORE:
+		phnum = elf_getu16(swap, elfhdr.e_phnum);
+		if (phnum > MAX_PHNUM)
+			return toomany(ms, "program", phnum);
 		flags |= FLAGS_IS_CORE;
 		if (dophn_core(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_phoff),
-		    elf_getu16(swap, elfhdr.e_phnum), 
+		    (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
 		    (size_t)elf_getu16(swap, elfhdr.e_phentsize),
 		    fsize, &flags) == -1)
 			return -1;
@@ -46,18 +48,24 @@
 #endif
 	case ET_EXEC:
 	case ET_DYN:
+		phnum = elf_getu16(swap, elfhdr.e_phnum);
+		if (phnum > MAX_PHNUM)
+			return toomany(ms, "program", phnum);
+		shnum = elf_getu16(swap, elfhdr.e_shnum);
+		if (shnum > MAX_SHNUM)
+			return toomany(ms, "section", shnum);
 		if (dophn_exec(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_phoff),
-		    elf_getu16(swap, elfhdr.e_phnum), 
+		    (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
 		    (size_t)elf_getu16(swap, elfhdr.e_phentsize),
-		    fsize, &flags, elf_getu16(swap, elfhdr.e_shnum))
-		    == -1)
+		    fsize, &flags, shnum) == -1)
 			return -1;
 		/*FALLTHROUGH*/
 	case ET_REL:
+		shnum = elf_getu16(swap, elfhdr.e_shnum);
+		if (shnum > MAX_SHNUM)
+			return toomany(ms, "section", shnum);
 		if (doshn(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_shoff),
-		    elf_getu16(swap, elfhdr.e_shnum),
+		    (off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
 		    (size_t)elf_getu16(swap, elfhdr.e_shentsize),
 		    fsize, &flags, elf_getu16(swap, elfhdr.e_machine),
 		    (int)elf_getu16(swap, elfhdr.e_shstrndx)) == -1)

Modified: projects/building-blocks/contrib/file/src/file.h
==============================================================================
--- projects/building-blocks/contrib/file/src/file.h	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/src/file.h	Wed Dec 10 20:44:51 2014	(r275689)
@@ -482,6 +482,14 @@ protected int file_regexec(file_regex_t 
 protected void file_regfree(file_regex_t *);
 protected void file_regerror(file_regex_t *, int, struct magic_set *);
 
+typedef struct {
+	char *buf;
+	uint32_t offset;
+} file_pushbuf_t;
+
+protected file_pushbuf_t *file_push_buffer(struct magic_set *);
+protected char  *file_pop_buffer(struct magic_set *, file_pushbuf_t *);
+
 #ifndef COMPILE_ONLY
 extern const char *file_names[];
 extern const size_t file_nnames;

Modified: projects/building-blocks/contrib/file/src/funcs.c
==============================================================================
--- projects/building-blocks/contrib/file/src/funcs.c	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/src/funcs.c	Wed Dec 10 20:44:51 2014	(r275689)
@@ -491,3 +491,43 @@ file_regerror(file_regex_t *rx, int rc, 
 	file_magerror(ms, "regex error %d for `%s', (%s)", rc, rx->pat,
 	    errmsg);
 }
+
+protected file_pushbuf_t *
+file_push_buffer(struct magic_set *ms)
+{
+	file_pushbuf_t *pb;
+
+	if (ms->event_flags & EVENT_HAD_ERR)
+		return NULL;
+
+	if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL)
+		return NULL;
+
+	pb->buf = ms->o.buf;
+	pb->offset = ms->offset;
+
+	ms->o.buf = NULL;
+	ms->offset = 0;
+
+	return pb;
+}
+
+protected char *
+file_pop_buffer(struct magic_set *ms, file_pushbuf_t *pb)
+{
+	char *rbuf;
+
+	if (ms->event_flags & EVENT_HAD_ERR) {
+		free(pb->buf);
+		free(pb);
+		return NULL;
+	}
+
+	rbuf = ms->o.buf;
+
+	ms->o.buf = pb->buf;
+	ms->offset = pb->offset;
+
+	free(pb);
+	return rbuf;
+}

Modified: projects/building-blocks/contrib/file/src/readelf.c
==============================================================================
--- projects/building-blocks/contrib/file/src/readelf.c	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/src/readelf.c	Wed Dec 10 20:44:51 2014	(r275689)
@@ -60,6 +60,18 @@ private uint16_t getu16(int, uint16_t);
 private uint32_t getu32(int, uint32_t);
 private uint64_t getu64(int, uint64_t);
 
+#define MAX_PHNUM	256
+#define	MAX_SHNUM	1024
+
+private int
+toomany(struct magic_set *ms, const char *name, uint16_t num)
+{
+	if (file_printf(ms, ", too many %s header sections (%u)", name, num
+	    ) == -1)
+		return -1;
+	return 0;
+}
+
 private uint16_t
 getu16(int swap, uint16_t value)
 {
@@ -477,6 +489,13 @@ donote(struct magic_set *ms, void *vbuf,
 	uint32_t namesz, descsz;
 	unsigned char *nbuf = CAST(unsigned char *, vbuf);
 
+	if (xnh_sizeof + offset > size) {
+		/*
+		 * We're out of note headers.
+		 */
+		return xnh_sizeof + offset;
+	}
+
 	(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
 	offset += xnh_sizeof;
 
@@ -492,13 +511,13 @@ donote(struct magic_set *ms, void *vbuf,
 	if (namesz & 0x80000000) {
 	    (void)file_printf(ms, ", bad note name size 0x%lx",
 		(unsigned long)namesz);
-	    return offset;
+	    return 0;
 	}
 
 	if (descsz & 0x80000000) {
 	    (void)file_printf(ms, ", bad note description size 0x%lx",
 		(unsigned long)descsz);
-	    return offset;
+	    return 0;
 	}
 
 
@@ -900,6 +919,7 @@ doshn(struct magic_set *ms, int clazz, i
 	Elf32_Shdr sh32;
 	Elf64_Shdr sh64;
 	int stripped = 1;
+	size_t nbadcap = 0;
 	void *nbuf;
 	off_t noff, coff, name_off;
 	uint64_t cap_hw1 = 0;	/* SunOS 5.x hardware capabilites */
@@ -988,6 +1008,8 @@ doshn(struct magic_set *ms, int clazz, i
 				goto skip;
 			}
 
+			if (nbadcap > 5)
+				break;
 			if (lseek(fd, xsh_offset, SEEK_SET) == (off_t)-1) {
 				file_badseek(ms);
 				return -1;
@@ -1053,6 +1075,8 @@ doshn(struct magic_set *ms, int clazz, i
 					    (unsigned long long)xcap_tag,
 					    (unsigned long long)xcap_val) == -1)
 						return -1;
+					if (nbadcap++ > 2)
+						coff = xsh_size;
 					break;
 				}
 			}
@@ -1233,7 +1257,7 @@ file_tryelf(struct magic_set *ms, int fd
 	int flags = 0;
 	Elf32_Ehdr elf32hdr;
 	Elf64_Ehdr elf64hdr;
-	uint16_t type;
+	uint16_t type, phnum, shnum;
 
 	if (ms->flags & (MAGIC_MIME|MAGIC_APPLE))
 		return 0;

Modified: projects/building-blocks/contrib/file/src/softmagic.c
==============================================================================
--- projects/building-blocks/contrib/file/src/softmagic.c	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/contrib/file/src/softmagic.c	Wed Dec 10 20:44:51 2014	(r275689)
@@ -67,6 +67,9 @@ private void cvt_32(union VALUETYPE *, c
 private void cvt_64(union VALUETYPE *, const struct magic *);
 
 #define OFFSET_OOB(n, o, i)	((n) < (o) || (i) > ((n) - (o)))
+
+#define MAX_RECURSION_LEVEL	10
+
 /*
  * softmagic - lookup one file in parsed, in-memory copy of database
  * Passed the name and FILE * of one file to be typed.
@@ -1193,14 +1196,15 @@ mget(struct magic_set *ms, const unsigne
     int flip, int recursion_level, int *printed_something,
     int *need_separator, int *returnval)
 {
-	uint32_t soffset, offset = ms->offset;
+	uint32_t offset = ms->offset;
 	uint32_t lhs;
+	file_pushbuf_t *pb;
 	int rv, oneed_separator, in_type;
-	char *sbuf, *rbuf;
+	char *rbuf;
 	union VALUETYPE *p = &ms->ms_value;
 	struct mlist ml;
 
-	if (recursion_level >= 20) {
+	if (recursion_level >= MAX_RECURSION_LEVEL) {
 		file_error(ms, 0, "recursion nesting exceeded");
 		return -1;
 	}
@@ -1644,19 +1648,23 @@ mget(struct magic_set *ms, const unsigne
 	case FILE_INDIRECT:
 		if (offset == 0)
 			return 0;
+
 		if (nbytes < offset)
 			return 0;
-		sbuf = ms->o.buf;
-		soffset = ms->offset;
-		ms->o.buf = NULL;
-		ms->offset = 0;
+
+		if ((pb = file_push_buffer(ms)) == NULL)
+			return -1;
+
 		rv = file_softmagic(ms, s + offset, nbytes - offset,
 		    recursion_level, BINTEST, text);
+
 		if ((ms->flags & MAGIC_DEBUG) != 0)
 			fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
-		rbuf = ms->o.buf;
-		ms->o.buf = sbuf;
-		ms->offset = soffset;
+
+		rbuf = file_pop_buffer(ms, pb);
+		if (rbuf == NULL && ms->event_flags & EVENT_HAD_ERR)
+			return -1;
+
 		if (rv == 1) {
 			if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
 			    file_printf(ms, F(ms, m, "%u"), offset) == -1) {
@@ -1674,13 +1682,13 @@ mget(struct magic_set *ms, const unsigne
 	case FILE_USE:
 		if (nbytes < offset)
 			return 0;
-		sbuf = m->value.s;
-		if (*sbuf == '^') {
-			sbuf++;
+		rbuf = m->value.s;
+		if (*rbuf == '^') {
+			rbuf++;
 			flip = !flip;
 		}
-		if (file_magicfind(ms, sbuf, &ml) == -1) {
-			file_error(ms, 0, "cannot find entry `%s'", sbuf);
+		if (file_magicfind(ms, rbuf, &ml) == -1) {
+			file_error(ms, 0, "cannot find entry `%s'", rbuf);
 			return -1;
 		}
 

Modified: projects/building-blocks/etc/auto_master
==============================================================================
--- projects/building-blocks/etc/auto_master	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/etc/auto_master	Wed Dec 10 20:44:51 2014	(r275689)
@@ -3,3 +3,6 @@
 # Automounter master map, see auto_master(5) for details.
 #
 /net		-hosts		-nobrowse,nosuid
+# When using the -media special map, make sure to edit devd.conf(5)
+# to move the call to "automount -c" out of the comments section.
+#/media		-media		-nosuid

Modified: projects/building-blocks/etc/autofs/Makefile
==============================================================================
--- projects/building-blocks/etc/autofs/Makefile	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/etc/autofs/Makefile	Wed Dec 10 20:44:51 2014	(r275689)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-FILES=		include_ldap special_hosts special_null
+FILES=		include_ldap special_hosts special_media special_null
 
 NO_OBJ=
 FILESDIR=	/etc/autofs

Copied: projects/building-blocks/etc/autofs/special_media (from r275688, head/etc/autofs/special_media)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/building-blocks/etc/autofs/special_media	Wed Dec 10 20:44:51 2014	(r275689, copy of r275688, head/etc/autofs/special_media)
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# Print newline-separated list of devices available for mounting.
+# If there is a filesystem label - use it, otherwise use device name.
+print_available() {
+	local _fstype _fstype_and_label _label _p
+
+	for _p in ${providers}; do
+		_fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)"
+		if [ $? -ne 0 ]; then
+			# Ignore devices for which we were unable
+			# to determine filesystem type.
+			continue
+		fi
+
+		_fstype="${_fstype_and_label%% *}"
+		if [ "${_fstype}" != "${_fstype_and_label}" ]; then
+			_label="${_fstype_and_label#* }"
+			echo "${_label}"
+			continue
+		fi
+
+		echo "${_p}"
+	done
+}
+
+# Print a single map entry.
+print_one() {
+	local _fstype _fstype_and_label _label _key _p
+
+	_key="$1"
+
+	_fstype="$(fstyp "/dev/${_key}" 2> /dev/null)"
+	if [ $? -eq 0 ]; then
+		echo "-fstype=${_fstype},nosuid	:/dev/${_key}" 
+		return
+	fi
+
+	for _p in ${providers}; do
+		_fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)"
+		if [ $? -ne 0 ]; then
+			# Ignore devices for which we were unable
+			# to determine filesystem type.
+			continue
+		fi
+
+		_fstype="${_fstype_and_label%% *}"
+		if [ "${_fstype}" = "${_fstype_and_label}" ]; then
+			# No label, try another device.
+			continue
+		fi
+
+		_label="${_fstype_and_label#* }"
+		if [ "${_label}" != "${_key}" ]; then
+			# Labels don't match, try another device.
+			continue
+		fi
+
+		echo "-fstype=${_fstype},nosuid	:/dev/${_p}" 
+	done
+
+	# No matching device - don't print anything, autofs will handle it.
+}
+
+# Obtain a list of (geom-provider-name, access-count) pairs, turning this:
+#
+# z0xfffff80005085d00 [shape=hexagon,label="ada0\nr2w2e3\nerr#0\nsector=512\nstripe=0"];
+#
+# Into this:
+#
+# ada0 r2w2e3
+#
+# XXX: It would be easier to use kern.geom.conftxt instead, but it lacks
+#      access counts.
+pairs=$(sysctl kern.geom.confdot | sed -n 's/^.*hexagon,label="\([^\]*\)\\n\([^\]*\).*/\1 \2/p')
+
+# Obtain a list of GEOM providers that are not already open - not mounted,
+# and without other GEOM class, such as gpart, attached.  In other words,
+# grep for "r0w0e0".  Skip providers with names containing slashes; we're
+# not interested in geom_label(4) creations.
+providers=$(echo "$pairs" | awk '$2 == "r0w0e0" && $1 !~ /\// { print $1 }')
+
+if [ $# -eq 0 ]; then
+	print_available
+	exit 0
+fi
+
+print_one "$1"
+exit 0
+

Modified: projects/building-blocks/etc/devd.conf
==============================================================================
--- projects/building-blocks/etc/devd.conf	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/etc/devd.conf	Wed Dec 10 20:44:51 2014	(r275689)
@@ -318,4 +318,16 @@ notify 0 {
 	action			"/usr/local/etc/rc.d/postgresql restart";
 };
 
+# Discard autofs caches, useful for the -media special map.  The one
+# second delay is for GEOM to finish tasting.
+#
+# XXX: We should probably have a devctl(4) event that fires after GEOM
+#      tasting.
+#
+notify 100 {
+	match "system" "DEVFS";
+	match "cdev" "(da|mmcsd)[0-9]+";
+	action "sleep 1 && /usr/sbin/automount -c";
+};
+
 */

Modified: projects/building-blocks/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- projects/building-blocks/lib/libc/net/sctp_sys_calls.c	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/lib/libc/net/sctp_sys_calls.c	Wed Dec 10 20:44:51 2014	(r275689)
@@ -886,7 +886,7 @@ sctp_recvv(int sd,
 	struct sctp_rcvinfo *rcvinfo;
 	struct sctp_nxtinfo *nxtinfo;
 
-	if (((info != NULL) && (infolen == NULL)) |
+	if (((info != NULL) && (infolen == NULL)) ||
 	    ((info == NULL) && (infolen != NULL) && (*infolen != 0)) ||
 	    ((info != NULL) && (infotype == NULL))) {
 		errno = EINVAL;

Modified: projects/building-blocks/lib/libc/stdio/fflush.c
==============================================================================
--- projects/building-blocks/lib/libc/stdio/fflush.c	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/lib/libc/stdio/fflush.c	Wed Dec 10 20:44:51 2014	(r275689)
@@ -124,11 +124,13 @@ __sflush(FILE *fp)
 		t = _swrite(fp, (char *)p, n);
 		if (t <= 0) {
 			/* Reset _p and _w. */
-			if (p > fp->_p)	/* Some was written. */
+			if (p > fp->_p) {
+				/* Some was written. */
 				memmove(fp->_p, p, n);
-			fp->_p += n;
-			if ((fp->_flags & (__SLBF | __SNBF)) == 0)
-				fp->_w -= n;
+				fp->_p += n;
+				if ((fp->_flags & (__SLBF | __SNBF)) == 0)
+					fp->_w -= n;
+			}
 			fp->_flags |= __SERR;
 			return (EOF);
 		}

Modified: projects/building-blocks/sbin/mount/mount.8
==============================================================================
--- projects/building-blocks/sbin/mount/mount.8	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/sbin/mount/mount.8	Wed Dec 10 20:44:51 2014	(r275689)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd November 22, 2014
+.Dd December 3, 2014
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -549,6 +549,7 @@ support for a particular file system mig
 .Xr fstab 5 ,
 .Xr procfs 5 ,
 .Xr automount 8 ,
+.Xr fstyp 8 ,
 .Xr kldload 8 ,
 .Xr mount_cd9660 8 ,
 .Xr mount_msdosfs 8 ,

Modified: projects/building-blocks/share/termcap/Makefile
==============================================================================
--- projects/building-blocks/share/termcap/Makefile	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/share/termcap/Makefile	Wed Dec 10 20:44:51 2014	(r275689)
@@ -9,10 +9,7 @@ MAN=	termcap.5
 
 FILES=		termcap termcap.db
 FILESDIR=	${BINDIR}/misc
-CLEANFILES+=	termcap termcap.db
-
-termcap: reorder termcap.src
-	TERM=dumb TERMCAP=dumb: ex - ${.CURDIR}/termcap.src < ${.CURDIR}/reorder
+CLEANFILES+=	termcap.db
 
 .include <bsd.endian.mk>
 .if ${TARGET_ENDIANNESS} == "1234"

Modified: projects/building-blocks/share/termcap/README
==============================================================================
--- projects/building-blocks/share/termcap/README	Wed Dec 10 20:43:17 2014	(r275688)
+++ projects/building-blocks/share/termcap/README	Wed Dec 10 20:44:51 2014	(r275689)
@@ -1,4 +1,6 @@
 #	@(#)README	8.1 (Berkeley) 6/8/93
+#
+#	$FreeBSD$
 
 << 12 May 1983 >>
 To install this directory on your system:
@@ -19,7 +21,7 @@ common and really should go near the fro
 Third, if you are not a super user and cannot create the directory
 /usr/lib/tabset, make a corresponding directory somewhere you can and add
 a line to reorder to globally change all /usr/lib/tabset's to your own
-path name.  This change is better than just changing the termcap.src file
+path name.  This change is better than just changing the termcap file
 because it makes it easier to diff it from newer distributed versions.
 Try to keep the source as is whenever possible, and put mungings into
 reorder.

Copied: projects/building-blocks/share/termcap/termcap (from r275688, head/share/termcap/termcap)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/building-blocks/share/termcap/termcap	Wed Dec 10 20:44:51 2014	(r275689, copy of r275688, head/share/termcap/termcap)
@@ -0,0 +1,4667 @@
+# Copyright (c) 1980, 1985, 1989, 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. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#	This product includes software developed by the University of
+#	California, Berkeley and its contributors.
+# 4. 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.
+#
+#	@(#)termcap.src	8.2 (Berkeley) 11/17/93
+# $FreeBSD$
+
+#	Termcap source file
+#	John Kunze, Berkeley
+#	Craig Leres, Berkeley
+#
+# Please submit changes via https://bugs.freebsd.org/submit/
+#
+# << EOH - after reordering, above header lines survive and this line dies >>
+#
+# DESCRIPTION:
+# This file describes capabilities of various terminals, as needed by
+# software such as screen editors.  It does not attempt to describe
+# printing terminals very well, nor graphics terminals.  Someday.
+# See termcap(5) in the Unix Programmers Manual for documentation.
+#
+# Conventions: First entry is canonical name for model or mode, last entry
+# is verbose description.  Others are mnemonic synonyms for the terminal.
+#
+# Terminal naming conventions:
+# Terminal names look like <manufacturer> <model> - <modes/options>
+# Certain abbreviations (e.g. c100 for concept100) are also allowed
+# for upward compatibility.  The part to the left of the dash, if a
+# dash is present, describes the particular hardware of the terminal.
+# The part to the right can be used for flags indicating special ROM's,
+# extra memory, particular terminal modes, or user preferences.
+# All names should be in lower case, for consistency in typing.
+#
+# The following are conventionally used flags:
+#	rv	Terminal in reverse video mode (black on white)
+#	2p	Has two pages of memory.  Likewise 4p, 8p, etc.
+#	w	Wide - in 132 column mode.
+#	pp	Has a printer port which is used.
+#	na	No arrow keys - termcap ignores arrow keys which are
+#		actually there on the terminal, so the user can use
+#		the arrow keys locally.
+#
+# To easily test a new terminal description, put it in $HOME/.termcap
+# and programs will look there before looking in /etc/termcap.
+# You can also setenv TERMPATH to a list of full pathnames (separated
+# by spaces or colons) to be searched by tgetent() in the order listed.
+# The TERMCAP environment variable is usually set to the termcap
+# entry itself to avoid reading files when starting up a program.
+#
+# If you absolutely MUST check for a specific terminal (this is discouraged)
+# check for the 2nd entry (the canonical form) since all other codes are
+# subject to change.  We would much rather put in special capabilities
+# to describe your terminal than have you key on the name.
+#
+#  Special manufacturer codes:
+#	A: hardcopy daisy wheel terminals
+#	M: Misc. (with only a few terminals)
+#	q: Homemade
+#	s: special (dialup, etc.)
+#
+# Comments in this file begin with # - they cannot appear in the middle
+# of a termcap entry.  Individual entries are commented out by
+# placing a period between the colon and the capability name.
+#
+# To add a termcap entry under FreeBSD for a new terminal type, insert
+# the entry in the appropriate location in /etc/termcap then issue this
+# command:
+#
+#  cap_mkdb -f /usr/share/misc/termcap /etc/termcap
+#
+# Terminfo source entries can be converted to termcap entries with the
+# tic program that is part of the ncurses distribution, see the ports
+# section.
+#
+#
+#  This file is to be installed with an editor script (reorder)
+#  that moves the most common terminals to the front of the file.
+# 
# --------------------------------
+#
+# A: DAISY WHEEL PRINTERS
+#
+# The A manufacturer represents Diablo, DTC, Xerox, Qume, and other Daisy
+# wheel terminals until such time as termcap distinguishes between them
+# enough to justify separate codes.
+# This is an "experimental" entry for the SRI Agiles.
+# It has been tried in a minimal way -- the Agile did not blow up!
+# However, it has not been exhaustively tested.
+# Anyone who tries it and finds it wanting should get in touch with:
+#	Ralph Keirstead (ralph at sri-unix);
+#	EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025
+agile|agiles|sri agiles:\
+	:bs:hc:os:pl:co#132:do=^J:kb=^H:up=\E\n:\
+	:hu=\E0:hd=\E9:if=/usr/share/tabset/std:is=\EE\EF\EJ:
+1620|1720|450|ipsi|diablo 1620:\
+	:do=^J:ct=\E2:st=\E1:ch=\E\t%i%.:\
+	:if=/usr/share/tabset/xerox1720:\
+	:kb=^H:le=^H:bs:co#132:hc:hu=\EU:hd=\ED:os:pt:up=\E\n:
+1620-m8|1640-m8|diablo 1620 w/8 column left margin:\
+	:do=^J:co#124:is=\r        \E9:tc=1620:
+1640|1740|630|1730|x1700|diablo|xerox|diablo 1640:\
+	:if=/usr/share/tabset/xerox1730:\
+	:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
+1640-lm|1740-lm|630-lm|1730-lm|x1700-lm|diablo-lm|xerox-lm|\
+	diablo 1640 with indented left margin:\
+	:if=/usr/share/tabset/xerox1730-lm:\
+	:co#124:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
+# DTC 382 with VDU.  Has no cd so we fake it with ce.  Standout works but
+# won't go away without dynamite.  The terminal has tabs, but I'm getting
+# tired of fighting the braindamage.  If no tab is set or the terminal's
+# in a bad mood, it glitches the screen around all of memory.  Note that
+# return puts a blank ("a return character") in the space the cursor was
+# at, so we use ^P return (and thus ^P newline for newline).  Note also
+# that if you turn off pt and let Unix expand tabs, curses won't work
+# (current version) because it doesn't turn off this bit, and cursor
+# addressing sends a tab for row/column 9.  What a losing terminal!  I
+# have been unable to get tabs set in all 96 lines - it always leaves at
+# least one line with no tabs in it, and once you tab through that line,
+# it completely weirds out.
+dtc|ps|dtc382|382:\
+	:do=^J:al=^P^Z:am:le=^H:\
+	:bs:co#80:ce=^P^U:cl=20^P^]:cm=%r^P^Q%.%.:dc=^X:\
+	:dl=^P^S:ei=^Pi:ho=^P^R:im=^PI:ve=^Pb:vs=^PB:pc=\177:te=20^P^]:\
+	:li#24:nd=^PR:.se=^P \200:.so=^P \002^PF:us=^P \020:ue=^P \200:\
+	:up=^P^L:nc:xr:xs:da:db:.pt:cr=^P^M:cd=^P^U^P^S^P^S:\
+	:if=/usr/share/tabset/dtc382:
+dtc300s|300|300s|dtc 300s:\
+	:ct=\E3:st=\E1:do=^J:\
+	:kb=^h:le=^H:bs:co#132:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
+gsi:\
+	:le=^H:bs:co#132:hc:hd=\Eh:hu=\EH:os:pt:up=^Z:do=^J:
+# This used to have :pl: - maybe they meant :pt:?
+aj830|aj832|aj|anderson jacobson:\
+	:do=^J:le=^H:bs:hc:hd=\E9:hu=\E8:os:up=\E7:
+# From Chris Torek <chris at gyre.umd.edu> Thu, 7 Nov 85 18:21:58 EST
+aj510|AJ510|Anderson-Jacobson model 510:\
+	:ip=.1*:so=\E"I:us=\E"U:cd=\E'P:ce=\E'L:cl=^L:cm=\E#%+ %+ :\
+	:dl=2*\E&D:ue=\E"U:co#80:li#24:se=\E"I:al=2*\E&I:im=\E'I:ei=\E'J:\
+	:dc=.1*\E'D:up=\EY:nd=\EX:bs:am:mi:ti=\E"N:te=\E"N:\
+	:ku=\EY:kd=\EZ:kl=\EW:kr=\EX:pc=\177:
+# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981
+# This is incomplete, but it's a start.
+5520|nec|spinwriter|nec 5520:\
+	:ct=\E3:st=\E1:do=^J:kb=^h:le=^H:bs:co#132:hc:hu=\E]s\E9\E]W:\
+	:hd=\E]s\n\E]W:os:pt:up=\E9:
+qume5|qume|Qume Sprint 5:\
+	:ct=\E3:st=\E1:do=^J:\
+	:kb=^h:le=^H:bs:co#80:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
+q102|qume102|Qume 102:\
+	:al=\EE:am:bs:bt=\EI:\
+	:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:ct=\E3:\
+	:dc=\EW:dl=\ER:do=^J:ho=^^:ic=\EQ:\
+	:k0=^A@\r:k1=^AA\r:k2=^AB\r:k3=^AC\r:kd=^J:kl=^H:kr=^L:ku=^K:\
+	:le=^H:li#24:ma=^K^P^L :nd=^L:\
+	:se=\EG0:sg#1:so=\EG4:st=\E1:\
+	:ue=\EG0:ug#1:up=^K:us=\EG8:
+# From ucbvax!mtxinu!sybase!tim (Tim Wood) Fri Sep 27 10:25:24 PDT 1985
+# This entry supports line and character insert and delete, scroll up and
+# down and the arrow keys.  To use it, perform the following on your qvt-101
+#	1) enter SET-UP mode, select the SET 3 line;
+#	2) move the cursor to the EMULATION item and hit SPACE
+#	   until QVT-101B appears
+#	3) enter SHIFT-S
+#	4) exit SET-UP - the terminal is now configured
+q101|qvt101|qvt-101|Qume 101 $310 special:\
+	:al=\EE:am:bt=\EI:ce=\Et:cl=\E*:dc=\EW:\
+	:dl=\ER:do=^J:ic=\EQ:md=\E(:me=\EG0:mh=\E):\
+	:le=^H:bs:cm=\E=%+ %+ :cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:ku=^K:\
+	:vs=\EM4\040\200\200\200:mr=\EG4:ms:so=\EG4:se=\EG1:
+# I suspect the xerox1720 is the same as the diablo 1620.
+x1720|1700|x1750|xerox 1720:\
+	:co#132:le=^H:bs:hc:os:pt:do=^J:ct=\E2:st=\E1:
+# 
# --------------------------------
+#
+# B: AT&T ATT
+#
+# AT&T Teletype 5410 Terminal (a.k.a. 4410)
+# From: carvalho%kepler at Berkeley.EDU (Marcio de Carvalho)
+# Date: Thu, 26 Feb 87 09:16:50 PST
+#
+# Although the 5410 supports labels, it blanks the screen after
+# each label is programmed creating to much visual activity.
+# To use the labels, use FL=\E[%d;00q%-16s
+#
+5410|4410|tty5410|att4410|AT&T Teletype 5410 terminal with 80 columns:\
+	:al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
+	:cm=5\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:ic=\E[@:\
+	:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\
+	:li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\
+	:ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\
+	:KM=/usr/lib/ua/kmap.5410:is=\E[0m^O\E[?6l:kn#8:\
+	:k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k4=\EOg:k6=\EOh:\
+	:k7=\EOi:k8=\EOj:ko=nd,up,ho:
+# AT&T 630 MTG DMD from muller%sdcc7 at ucsd.edu (Keith Muller)
+att630|dmd630|ATT630|630DMD|630dmd|630MTG|AT&T 630 windowing terminal:\
+	:am:da:db:ms:bs:co#80:it#8:li#60:lm#0:\
+	:up=\E[A:do=\E[B:nd=\E[C:le=\b:UP=\E[%dA:DO=\E[%dB:RI=\E[%dC:\
+	:LE=\E[%dD:cm=\E[%i%d;%dH:ho=\E[H:bt=\E[Z:\
+	:sf=\n:sr=\EM:SF=\E[%dS:SR=\E[%dT:us=\E[4m:ue=\E[m:so=\E[7m:se=\E[m:\
+	:mr=\E[7m:mh=\E[2m:mb=\E[5m:me=\E[m:ce=\E[K:cd=\E[J:cl=\E[H\E[J:\
+	:dc=\E[P:dl=\E[M:al=\E[L:DC=\E[%dP:DL=\E[%dM:AL=\E[%dL:\
+	:ic=\E[@:IC=\E[%d@:sc=\E7:rc=\E8:i2=\E[m:rs=\Ec:\
+	:pf=\E[?4i:po=\E[?5i:\
+	:kb=\b:kC=\E[2J:kh=\E[H:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:
+dmd630-24|att630-24|ATT630-24|630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines:\
+	:li#24:tc=att630:
+dmd615|att615|ATT615|615DMD|615MTG|AT&T 615 windowing terminal 80 column:\
+	:li#24:tc=att630:
+dmd615-w|att615-w|ATT615-w|615DMD-w|615MTG-w|AT&T 615 windowing terminal 132 column:\
+	:li#24:co#132:tc=att630:
+dmd620|att620|ATT620|620DMD|620MTG|AT&T 620 windowing terminal 80 column:\
+	:li#24:tc=att630:
+dmd620-w|att620-w|ATT620-w|620DMD-w|620MTG-w|AT&T 620 windowing terminal 132 column:\
+	:li#24:co#132:tc=att630:
+# AT&T Teletype 5420 Terminal (a.k.a. 4415) June 5, 1985
+5420|4415|tty5420|att4415|AT&T Teletype 5420 terminal:\
+	:al=\E[L:am:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
+	:cm=\E[%i%2;%2H:co#80:dc=\E[P:dl=\E[M:im=\E[4h:ei=\E[4l:\
+	:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\
+	:li#24:nd=\E[C:se=\E[m:so=\E[2;7m:sr=\EM:\
+	:ue=\E[m:up=\E[A:us=\E[4m:EE=\E[m:BO=\E[0;7m:DS=\E[2m:\
+	:KM=/usr/lib/ua/kmap.5420:\
+	:is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6;97;99l\E[?7h\E[4i\Ex\E[25;1j\212\E[8;0j\E[9;0j\E[10;0j\E[19;1j:\
+	:db:mi:pt:kn#8:k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:\
+	:k7=\EOi:k8=\EOj:ve=\E[11;0j:\
+	:vs=\E[11;1j:ko=bt,nd,up,dc,dl,ho,im,al:
+# AT&T Teletype 5425 Terminal (a.k.a 4425) June 5, 1985
+5425|4425|tty5425|att4425|AT&T Teletype 5425:\
+	:FL=\E[%d;00q%-16s\E~:FE=\E|:KM=/usr/lib/ua/kmap.5425:\
+	:is=\E[0m^O\E[1;2;3;4;6l\E[12;13;14;20l\E[?6l\E[?7h\E[4i\E[9;0j\E[10;0j\E[11;0j\E[21;1j\E[25;1j\212:\
+	:ve=\E[12;0j:vs=\E[12;1j:tc=5420:
+t4|4420|tty4420|Teletype 4420:\
+	:vs=\ER:ve=\ER:am:da:db:mi:cr=\EG:\
+	:nl=\EG\EB:li#23:\
+	:co#80:cl=\EH\EJ:cd=\EJ:cm=\EY%+ %+ :\
+	:bs:up=\E7:do=\EB:nd=\EC:al=\EL:\
+	:dl=\EM:dc=\EP:ic=\E\136:sf=\EH\EM\EY5 :sr=\ET:kb=^H:
+pc6300plus|6300|6300plus:\
+	:al=\E[1L:am:bs:cd=\E[0J:ce=\E[0K:cl=\E[2J\E[H:cm=\E[%i%2;%2H:co#80:\
+	:dc=\E[1P:dl=\E[1M:do=\E[B:ho=\E[H:\
+	:ic=\E[1@:kb=\10:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:li#24:\
+	:k1=\EOc:k2=\EOd:k3=\EOe:k4=\EOf:k5=\EOg:k6=\EOh:k7=\EOi:k8=\EOj:\
+	:k9=\EOk:k10=\EOu:nd=\E[C:se=\E[m:so=\E[7m:ue=\E[m:up=\E[A:us=\E[4m:\
+	:EE=\E[m:BO=\E[0;7m:CV=\E[=C:CI=\E[=1C:KM=/usr/lib/ua/kmap.s5:
+# AT&T 6386 decompiled and hacked from SVR3.1 terminfo
+# From: caron at polya.Stanford.EDU (Ilan G. Caron)
+# Problems:  (1) The mode lines are screwed up - they're not in standout
+# (an extraneous ESC-RD sequence is prepended to each mode line).
+# (2) Cursor addressing into the mode line is often off-by-one,
+# in particular, when the percentage indicator is updated.
+# (3) When reverting to a single window (C-x 1), the display
+# needs refreshing (an extraneous ESC-S seems to be generated).
+# (The above 3 might be manifestations of the same problem).
+# (4) Deletes sometime don't, especially when done fast - does this
+# suggest that I need to pad something?
+AT386|at386|386AT|386at|at/386 console:\
+	:am:bw:eo:xo:Co#8:NC#3:co#80:li#25:pa#64:kn#6:\
+	:@7=\E[Y:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:\
+	:F1=\EOZ:F2=\EOA:IC=\E[%d@:LE=\E[%dD:RI=\E[%dC:\
+	:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\
+	:ac=``a1fxgqh0jYk?lZm at nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~:\
+	:ae=\E[10m:al=\E[1L:as=\E[12m:bl=^G:cd=\E[J:ce=\E[K:\
+	:cl=\E[2J\E[H:cm=\E[%i%2;%2H:cr=\r:dc=\E[P:dl=\E[1M:\
+	:do=\E[B:ho=\E[H:ic=\E[1@:is=\E[0;10;39m:k1=\EOP:\
+	:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:\
+	:k8=\EOW:k9=\EOX:k;=\EOY:kB=^]:kC=\E[2J:kD=\E[P:\
+	:kI=\E[@:kM=\E0:kN=\E[U:kP=\E[V:kb=\b:kd=\E[B:kh=\E[H:\
+	:kl=\E[D:kr=\E[C:ku=\E[A:le=\E[D:mb=\E[5m:md=\E[1m:\
+	:me=\E[0;10m:mk=\E[9m:mr=\E[7m:nd=\E[C:op=\E[0m:\
+	:se=\E[m:sf=\E[S:so=\E[43;30m:ta=\t:ue=\E[m:up=\E[A:\
+	:sr=\E[T:TC=\E[%d@:IC=\E[%d@:\
+	:us=\E[4m:vb=^G:bc=\E[D:
+s4|PC7300|unixpc|pc7300|7300|3b1|Safari 4:\
+	:so=\E[2;7m:DS=\E[2m:XS=\E[9m:KM=/usr/lib/ua/kmap.s4:tc=pc6300plus:
+# AT&T Teletype 610 Terminal
+b610|610|610bct|tty610:\
+	:CV=\E[25h:CI=\E[25l:KM=/usr/lib/ua/kmap.s4:\
+	:FL=\E[%d;00q%-16s\E[0p:FE=\E[2p:cl=\E[1;1H\E[J:\
+	:is=\E[0m^O\E[25;1|^J\E[8;0|\E[4;13;20l\E[?5l\E[12h\E[?7h\E[?4i:\
+	:ve=\E[?12l:vs=\E[?12h:tc=5420:
+# 
# --------------------------------
+#
+# C: CONTROL DATA
+#
+cdc456|cdc:\
+	:do=^J:li#24:co#80:cl=^Y^X:nd=^L:up=^Z:le=^H:bs:\
+	:cm=\E1%+ %+ :ho=^Y:al=\E\114:dl=\E\112:ce=^V:cd=^X:am:
+cdc456tst:\
+	:do=^J:li#24:co#80:cl=^y^x:le=^H:bs:cm=\E1%+ %+ :am:
+# 
# --------------------------------
+#
+# D: DATAMEDIA
+#
+dm1520|dm1521|1521|1520|datamedia 1520:\
+	:do=^J:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+ %+ :co#80:ho=^Y:\
+	:ku=^_:kd=^J:kl=^H:kr=^\:kh=^Y:\
+	:li#24:nd=^\:up=^_:xn:ma=^\ ^_^P^YH:pt:
+dm2500|datamedia2500|2500|datamedia 2500:\
+	:do=^J:al=15^P\n^X^]^X^]:le=^H:bs:ce=^W:cl=^^^^\177:\
+	:cm=^L%r%n%.%.:co#80:dc=10*^P\b^X^]:dl=10*^P^Z^X^]:\
+	:dm=^P:ed=^X^]:ei=10\377\377^X^]:ho=^B:ic=10*^P^\^X^]:\
+	:im=^P:li#24:nc:nd=^\:pc=\377:so@=^N:se=^X^]:up=^Z:
+dm3025|datamedia 3025a:\
+	:MT:is=\EQ\EU\EV:do=^J:\
+	:al=130\EP\n\EQ:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :\
+	:co#80:dc=6\b:dl=130\EP\EA\EQ:dm=\EP:ed=\EQ:ei=\EQ:ho=\EH:\
+	:im=\EP:ip=6:li#24:nd=\EC:pt:so=\EO1:se=\EO0:up=\EA:
+3045|dm3045|datamedia 3045a:\
+	:is=\EU\EV:do=^J:\
+	:am:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :co#80:\
+	:dc=6\EB:ei=\EP:ho=\EH:im=\EP:ip=6:\
+	:k0=\Ey\r:k1=\Ep\r:k2=\Eq\r:k3=\Er\r:k4=\Es\r:\
+	:k5=\Et\r:k6=\Eu\r:k7=\Ev\r:k8=\Ew\r:k9=\Ex\r:\
+	:kh=\EH:ku=\EA:kr=\EC:li#24:nd=\EC:pc=\177:pt:eo:ul:up=\EA:xn:
+# dt80/1 is a vt100 lookalike, but it doesn't seem to need any padding.
+dt80|dmdt80|dm80|datamedia dt80/1:\
+	:do=^J:cd=\E[J:ce=\E[K:cl=\E[2J\E[H:cm=%i\E[%d;%dH:ho=\E[H:\
+	:nd=\E[C:sr=\EM:so=\E[7m:se=\E[m:up=\E[A:us=\E[4m:ue=\E[m:tc=vt100:
+# except in 132 column mode, where it needs a little padding.
+# This is still less padding than the vt100, and you can always turn on
+# the ^S/^Q handshaking, so you can use vt100 flavors for things like
+# reverse video.
+dt80w|dmdt80w|dm80w|datamedia dt80/1 in 132 char mode:\
+	:do=^J:cd=20\E[0J:co#132:ce=20\E[0K:\
+	:cm=5\E[%i%d;%dH:cl=50\E[H\E[2J:up=5\E[A:tc=dmdt80:
+# 
# --------------------------------
+#
+# H: HAZELTINE
+#
+# Since nd is blank, when you want to erase something you
+# are out of luck.  You will have to do ^L's a lot to
+# redraw the screen.  h1000 is untested.  It doesn't work in
+# vi - this terminal is too dumb for even vi.  (The code is
+# there but it isn't debugged for this case.)
+h1000|hazeltine 1000:\
+	:le=^H:bs:ho=^K:cl=^L:nd= :co#80:li#12:do=^J:
+# Note: the h1552 appears to be the first Hazeltine terminal which
+# is not braindamaged.  It has tildes and backprimes and everything!
+# Be sure the auto lf/cr switch is set to cr.
+h1552|hazeltine 1552:\
+	:do=^J:al=\EE:dl=\EO:k1=\EP:l1=blue:k2=\EQ:\
+	:l2=red:k3=\ER:l3=green:tc=vt52:
+h1552rv|hazeltine 1552 reverse video:\
+	:do=^J:so=\ES:se=\ET:tc=h1552:
+# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981
+h1420|hazeltine 1420:\
+	:do=^J:le=^H:bs:am:li#24:co#80:al=\E^Z:dl=\E^S:cd=\E^X:cl=\E\034:\
+	:up=\E^L:nd=^P:ce=\E^O:ta=^N:cm=\E^Q%r%.%+ :so=\E\037:se=\E^Y:
+# New "safe" cursor movement (11/87) from cgs at umd5.  Prevents freakout with
+# out-of-range args and tn3270.  No hz since it needs to receive ~'s.
+h1500|hazeltine 1500:\
+	:al=40~^Z:am:bs:cd=10~^X:ce=~^O:cl=~^\:cm=~^Q%r%>^^ %+`%+`:\
+	:co#80:dl=40~^S:do=~^K:ho=~^R:kh=~^R:kr=^P:ku=~^L:kd=^J:kl=^H:\
+	:le=^H:li#24:nd=^P:so=~^_:se=~^Y:up=~^L:.cm=~^Q%r%.%.:
+# h1510 assumed to be in sane escape mode.  Else use h1500.
+h1510|hazeltine 1510:\
+	:do=^J:al=\E^Z:am:le=^H:bs:cd=\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%.%.:\
+	:co#80:dl=\E^S:do=\E^K:hz:li#24:nd=^P:.se=\E^_:.so=\E^Y:up=\E^L:
+h1520|hazeltine 1520:\
+	:do=^J:al=~^Z:am:le=^H:bs:cd=~^X:ce=~^O:cl=~\034:cm=~^Q%r%.%.\200:\
+	:co#80:dl=~^S:do=~^K:hz:li#24:nd=^P:se=~^Y:so=~\037:up=~^L:ho=~^R:
+# Note: h2000 won't work well because of a clash between upper case and ~'s.
+h2000|hazeltine 2000:\
+	:do=^J:al=6~^z:am:le=^H:bs:cl=6~^\:cm=~^q%r%.%.:co#74:\
+	:dl=6~^s:ho=~^r:li#27:nc:pc=\177:
+# Hazeltine esprit entries from Univ of Utah  Tue Feb  1 06:39:37 1983
+# J.Lepreau, lepreau at utah-cs, harpo!utah-cs!lepreau
+esprit|hazeltine esprit:\
+	:al=40\E^Z:bs:cd=5\E^X:ce=\E^O:cl=\E^\:cm=\E^Q%r%>^^ %+`%+`:co#80:\
+	:dl=40\E^S:do=\E^K:ho=\E^R:li#24:nd=^P:se=\E^Y:so=\E^_:up=\E^L:
+esprit-am|hazeltine esprit auto-margin:\
+	:am:tc=esprit:
+# 
# --------------------------------
+#
+# I: IBM
+#
+# ibm61 and ibm63 from Warren Gish (cswarren at violet.berkeley.edu).
+# installed 12-17-86.
+# 3161 only opens a new line if a null line exists on the screen.
+# To ensure a null line exists, an SBA is performed, positioning the
+# Buffer Address in column 0 of the last line.  The last line is then
+# cleared to nulls, BA mode is canceled, and the new line is opened
+# at the cursor position.
+ibm61|ibm3161|3161|IBM 3161-11:\
+	:am:bs:bw:cl=\EL:li#24:co#80:cd=\EJ:al=\EX7 \EI\E Z\EN:\
+	:ce=\EI:cm=\EY%+\040%+\040:nd=\EC:up=\EA:do=\EB:\
+	:dl=\EO:dc=\EQ:kd=\EB:ku=\EA:kl=\ED:kr=\EC:kh=\EH:\
+	:us=\E4\102:ue=\E4\100:so=\E4\110:se=\E4\100:
+# From seth at sirius.ctr.columbia.edu Sun May 20 11:02:34 1990
+ibm3163|ibm63|i3163|3163|IBM 3163:\
+	:al=\EN:am:bs:bt=\E2:cd=\EJ:ce=\EI:cl=\EL:\
+	:cm=\EY%+\040%+\040:co#80:ct=\E 1:dc=\EQ:\
+	:dl=\EO:do=\EB:ds=\E#\072:es:fs=\E=:ho=\EH:\
+	:hs:ic=\EP:kA=\EN:kB=\E2:kC=\EQ:\
+	:kD=\EQ:kE=\EI:kI=\EI:kL=\EO:kS=\EJ:\
+	:kb=^H:kd=\EB:kl=\ED:kr=\EC:ku=\EA:kh=\EH:\
+	:le=\ED:li#24:mb=\E4D:md=\E4H:me=\E4@:\
+	:mk=\E4P:mr=\E4A:nd=\EC:\
+	:ds=\E#\::es:fs=\E=\E#;:hs:ts=\E=:ws#80:\
+	:se=\E4@:so=\E4I:ue=\E4@:up=\EA:us=\E4B:
+ibm|ibm3101|3101|i3101|IBM 3101-10:\
+	:do=^J:ct=\EH:st=\E0:\
+	:if=/usr/share/tabset/ibm3101:\
+	:am:le=^H:bs:cl=\EK:li#24:co#80:nd=\EC:up=\EA:cd=\EJ:ce=\EI:\
+	:kd=\EB:kl=\ED:kr=\EC:ku=\EA:ho=\EH:cm=\EY%+\40%+\40:pt:
+ibm327-789|ibm-3277-2|ibm-3278-2|ibm-3278-3|ibm-3278-4|ibm-3278-5|ibm-3279-2|ibm-3279-3:\
+	:tc=ibm327-56:
+ibm327-56|ibm-3275-2|ibm-3276-2|ibm-3276-3|ibm-3276-4|line mode IBM 3270 style:\
+	:gn:ce=\r:cl=\r\n:ho=\r:
+ibm-apl|apl|IBM apl terminal simulator:\
+	:li#25:tc=dm1520:
+# ibmapa* and ibmmono entries come from ACIS 4.3 distribution
+rtpc|ibmapa16|ibm6155|IBM 6155 Extended Monochrome Graphics Display:\
+	:ts=\Ej\EY@%+ \Eo:ds=\Ej\EY@\40\EI\Ek:li#32:tc=ibmconsole:
+# Advanced Monochrome (6153) and Color (6154) Graphics Display:
+ibmapa8c|ibmapa8|ibm6154|ibm6153|IBM 6153/4 Advanced Graphics Display:\
+	:ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:tc=ibmconsole:
+ibmapa8c-c|ibm6154-c|IBM 6154 Advanced Color Graphics Display color termcap:\
+	:ts=\Ej\EY?%+ \Eo:ds=\Ej\EY?\40\EI\Ek:li#31:mh=\EF\Ef7;:tc=ibmega-c:
+ibmmono|ibmconsole|ibm5151|IBM workstation monochrome:\
+	:se=\Ez:so=\EZ:sr=\EA:al=\EL:dl=\EM:\
+	:kb=^H:us=\EW:ue=\Ew:\
+	:k1=\ES:k2=\ET:k3=\EU:k4=\EV:k5=\EW:k6=\EP:k7=\EQ:k8=\ER:k9=\EY:\
+	:k0=\E<:I0=f10:kI=\000:kh=\EH:kR=\EG:kP=\Eg:kF=\EE:kN=\EE:\
+	:md=\EZ:me=\Ew\Eq\Ez\EB:mk=\EF\Ef0;\Eb0;:mr=\Ep:\
+	:ts=\Ej\EY8%+ \Eo:fs=\Ek:ds=\Ej\EY8\40\EI\Ek:es:hs:sb:tc=ibm3101:
+ibmega-c|ibm5154-c|IBM Enhanced Color Display color termcap:\
+	:se=\EB:so=\EF\Ef3;:ue=\EB:us=\EF\Ef2;:tc=ibmconsole:
+# from marc pawliger--marc at ibminet.awdpa.ibm.com
+# also in /usr/lpp/bos/bsdsysadmin.
+hft-c|ibm8512|ibm8513|IBM High Function Terminal:\
+	:co#80:li#25:am:ht:\
+	:cm=\E[%i%d;%dH:ti=\E[20;4l\E[?7h\Eb:te=\E[20h:\
+	:nd=\E[C:up=\E[A:do=^J:ho=\E[H:\
+	:ec=\E[%dX:\
+	:cl=\E[H\E[J:cd=\E[J:el=\E[K:\
+	:AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\
+	:im=\E[4h:ei=\E[4l:mi:\
+	:dm=\E[4h:ed=\E[4l:\
+	:so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:ms:\
+	:md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
+	:as=^N:ae=^O:sc=\E[s:rc=\E[u:\
+	:kb=\E[D:kf=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\
+	:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\
+	:k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\
+	:is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J:
+hft|AIWS High Function Terminal:\
+	:al=\E[L:cr=^M:do=^J:sf=^J:bl=^G:am:le=^H:cd=\E[J:\
+	:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:co#80:li#25:\
+	:dc=\E[P:dl=\E[M:ho=\E[H:\
+	:ic=\E[@:im=\E6:ei=\E6:\
+	:md=\E[1m:mr=\E[7m:mb=\E[5m:mk=\E[8m:me=\E[0m:\
+	:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:kh=\E[H:kb=^H:\
+	:nd=\E[C:ta=^I:up=\E[A:xo:\
+	:ue=\E[m:us=\E[4m:se=\E[m:so=\E[7m:\
+	:kP=\E[159q:kN=\E[153q:\
+	:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:\
+	:k5=\E[005q:k6=\E[006q:k7=\E[007q:k8=\E[008q:\
+	:k9=\E[009q:ka=\E[010q:
+# From pryor at math.berkeley.edu

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list