#!/bin/sh
CAPS="${1-Caps}"
cat <<EOF
/*
* parametrized.h --- is a termcap capability parametrized?
*
* Note: this file is generated using MKparametrized.sh, do not edit by hand.
* A value of -1 in the table means suppress both pad and % translations.
* A value of 0 in the table means do pad but not % translations.
* A value of 1 in the table means do both pad and % translations.
*/
static short const parametrized[] = {
EOF
${AWK-awk} <$CAPS '
$3 != "str" {next;}
$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
$0 ~ / {print "0,\t/* ", $2, " */"; count++;}
END {printf("} /* %d entries */;\n\n", count);}
'