X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2FMKcaptab.sh;h=c800023d105a46a375d06216f0f6341ca96b1006;hp=20c94a639b9ab96e74a395eee59e812f87e253af;hb=HEAD;hpb=03f728e5bb3630a54fffc4a2ff2f8dbfcce9088e diff --git a/ncurses/tinfo/MKcaptab.sh b/ncurses/tinfo/MKcaptab.sh old mode 100755 new mode 100644 index 20c94a63..5f413502 --- a/ncurses/tinfo/MKcaptab.sh +++ b/ncurses/tinfo/MKcaptab.sh @@ -1,6 +1,7 @@ #!/bin/sh ############################################################################## -# Copyright (c) 2007-2010,2011 Free Software Foundation, Inc. # +# Copyright 2019-2020,2023 Thomas E. Dickey # +# Copyright 2007-2010,2011 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -26,11 +27,28 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKcaptab.sh,v 1.14 2011/10/22 16:34:50 tom Exp $ -AWK=${1-awk} -OPT1=${2-0} -OPT2=${3-tinfo/MKcaptab.awk} -DATA=${4-../include/Caps} +# $Id: MKcaptab.sh,v 1.20 2023/04/22 15:12:57 tom Exp $ + +if test $# != 0 +then + AWK="$1"; shift 1 +else + AWK=awk +fi + +if test $# != 0 +then + OPT1="$1"; shift 1 +else + OPT1="-0" +fi + +if test $# != 0 +then + OPT2="$1"; shift 1 +else + OPT2="tinfo/MKcaptab.awk" +fi cat < #include +/* *INDENT-OFF* */ EOF -./make_hash 1 info $OPT1 <$DATA -./make_hash 3 cap $OPT1 <$DATA +cat "$@" |./make_hash 1 info $OPT1 +cat "$@" |./make_hash 3 cap $OPT1 -$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA +cat "$@" |$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias -$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias <$DATA +cat "$@" |$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias cat <