aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/progs/MKtermsort.sh
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-05-21 05:30:25 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-05-21 05:30:25 +0000
commit39f2269fcb4873fd97d70af944ec49f4230fadea (patch)
treebd986d58f5a6e348466b5362637ba93e6cd5bf8c /contrib/ncurses/progs/MKtermsort.sh
parent7e6a63408cfb0b48f0e41f77ed82f5d0ca60bda5 (diff)
downloadsrc-39f2269fcb4873fd97d70af944ec49f4230fadea.tar.gz
src-39f2269fcb4873fd97d70af944ec49f4230fadea.zip
Import ncurses-5.2-20020518 onto the vendor branch.
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=97049
Diffstat (limited to 'contrib/ncurses/progs/MKtermsort.sh')
-rwxr-xr-xcontrib/ncurses/progs/MKtermsort.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/contrib/ncurses/progs/MKtermsort.sh b/contrib/ncurses/progs/MKtermsort.sh
index 5486fd743689..c3495c44ebae 100755
--- a/contrib/ncurses/progs/MKtermsort.sh
+++ b/contrib/ncurses/progs/MKtermsort.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: MKtermsort.sh,v 1.6 2000/01/25 11:35:36 tom Exp $
+# $Id: MKtermsort.sh,v 1.7 2001/05/26 23:37:57 tom Exp $
#
# MKtermsort.sh -- generate indirection vectors for the various sort methods
#
@@ -15,6 +15,11 @@ export LC_ALL
AWK=${1-awk}
DATA=${2-../include/Caps}
+data=data$$
+trap 'rm -f $data' 1 2 5 15
+sed -e 's/[ ]\+/ /g' < $DATA >$data
+DATA=$data
+
echo "/*";
echo " * termsort.c --- sort order arrays for use by infocmp.";
echo " *";
@@ -104,24 +109,26 @@ echo "";
echo "static const bool bool_from_termcap[] = {";
$AWK <$DATA '
-$3 == "bool" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
-$3 == "bool" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
+$3 == "bool" && substr($7, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
+$3 == "bool" && substr($7, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
'
echo "};";
echo "";
echo "static const bool num_from_termcap[] = {";
$AWK <$DATA '
-$3 == "num" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
-$3 == "num" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
+$3 == "num" && substr($7, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
+$3 == "num" && substr($7, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
'
echo "};";
echo "";
echo "static const bool str_from_termcap[] = {";
$AWK <$DATA '
-$3 == "str" && substr($5, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
-$3 == "str" && substr($5, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
+$3 == "str" && substr($7, 1, 1) == "-" {print "\tFALSE,\t/* ", $2, " */";}
+$3 == "str" && substr($7, 1, 1) == "Y" {print "\tTRUE,\t/* ", $2, " */";}
'
echo "};";
echo "";
+
+rm -f $data