-# $OpenBSD: Makefile,v 1.5 2019/12/21 21:40:01 espie Exp $
+# $OpenBSD: Makefile,v 1.6 2024/08/23 15:13:58 nicm Exp $
# from: @(#)Makefile 5.3 (Berkeley) 10/22/90
FILES= std stdcrt vt100 vt300
-NOOBJ= noobj
+CLEANFILES+= ${FILES}
-all clean cleandir tags:
+all: ${FILES}
-realinstall:
+${FILES}:
+ sh ${.CURDIR}/gentabset.sh ${.CURDIR}/obj
+
+realinstall: ${FILES}
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
${DESTDIR}${BINDIR}/tabset
--- /dev/null
+#!/bin/sh
+
+DESTDIR=$1
+
+#
+# Write out tabset file: arguments are prefix, number of tab stops,
+# tab stop sequence, postfix.
+#
+write_tabset() {
+ printf "$1"
+ for i in $(seq $2); do printf "$3"; done
+ printf "$4"
+}
+
+# Tabset files for HP terminals.
+write_tabset '\r\e3\r' 13 ' \e1' '\n' >$DESTDIR/std
+write_tabset '\r\e3\r' 9 ' \e1' '' >$DESTDIR/stdcrt
+
+# Tabset for VT100 and derivatives.
+write_tabset '\r\n\e[3g\n' 15 '\eH ' '\eH\n' >$DESTDIR/vt100
+
+# Tabset for VT3xx and VT4xx and derivatives.
+printf '\n\e[3g\n\eP2$t9/17/25/33/41/49/57/65/73/81/89/97/105/113/121/129\e\\\n' >$DESTDIR/vt300
+
+exit 0
+++ /dev/null
-\r\e3\r \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1
+++ /dev/null
-\r\e3\r \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1 \e1\r
\ No newline at end of file
+++ /dev/null
-\r
-\e[3g
-\eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH \eH
+++ /dev/null
-
-\e[3g
-\eP2$t9/17/25/33/41/49/57/65/73/81/89/97/105/113/121/129\e\