From: nicm Date: Fri, 23 Aug 2024 15:13:58 +0000 (+0000) Subject: Generate tabset files using a script. ok deraadt millert X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f313ac3fa12918dfaad47589c74da85d1638e8c2;p=openbsd Generate tabset files using a script. ok deraadt millert --- diff --git a/share/tabset/Makefile b/share/tabset/Makefile index c90b2354f99..687f9549cbe 100644 --- a/share/tabset/Makefile +++ b/share/tabset/Makefile @@ -1,12 +1,15 @@ -# $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 diff --git a/share/tabset/gentabset.sh b/share/tabset/gentabset.sh new file mode 100644 index 00000000000..da8d1fdceab --- /dev/null +++ b/share/tabset/gentabset.sh @@ -0,0 +1,25 @@ +#!/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 diff --git a/share/tabset/std b/share/tabset/std deleted file mode 100644 index e93f737f0e3..00000000000 --- a/share/tabset/std +++ /dev/null @@ -1 +0,0 @@ - 3 1 1 1 1 1 1 1 1 1 1 1 1 1 diff --git a/share/tabset/stdcrt b/share/tabset/stdcrt deleted file mode 100644 index 66ba12f64da..00000000000 --- a/share/tabset/stdcrt +++ /dev/null @@ -1 +0,0 @@ - 3 1 1 1 1 1 1 1 1 1 \ No newline at end of file diff --git a/share/tabset/vt100 b/share/tabset/vt100 deleted file mode 100644 index 8828d19da74..00000000000 --- a/share/tabset/vt100 +++ /dev/null @@ -1,3 +0,0 @@ - - -H H H H H H H H H H H H H H H H diff --git a/share/tabset/vt300 b/share/tabset/vt300 deleted file mode 100644 index b1f9ce16d13..00000000000 --- a/share/tabset/vt300 +++ /dev/null @@ -1,3 +0,0 @@ - - -P2$t9/17/25/33/41/49/57/65/73/81/89/97/105/113/121/129\