2021-10-11 18:37:13 -03:00

28 lines
470 B
Sed

#! /bin/sh
#
# @(#)Doc.sed 1.1 94/10/31 SMI; from S5R3 1.4
#
# This script is used to strip info from the terminfo
# source files.
#
sed -n '
/^# \{1,\}Manufacturer:[ ]*\(.*\)/s//.M \1/p
/^# \{1,\}Class:[ ]*\(.*\)/s//.C \1/p
/^# \{1,\}Author:[ ]*\(.*\)/s//.A \1/p
/^# \{1,\}Info:[ ]*/,/^[^#][^ ]/ {
s/^# *Info:/.I/p
/^#[ ]\{1,\}/ {
s/#//p
}
/^#$/ i\
.IE
}
/^\([^# ][^ ]*\)|\([^|,]*\),[ ]*$/ {
s//Terminal:\
"\2"\
\1/
s/|/, /g
p
}
' $*