diff options
Diffstat (limited to 'contrib/ncurses/include/MKhashsize.sh')
-rwxr-xr-x | contrib/ncurses/include/MKhashsize.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/ncurses/include/MKhashsize.sh b/contrib/ncurses/include/MKhashsize.sh new file mode 100755 index 000000000000..d11d7bf23c8a --- /dev/null +++ b/contrib/ncurses/include/MKhashsize.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# MKhashsize.sh --- generate size include for hash functions +# +echo "/*" +echo " * hashsize.h -- hash and token table constants" +echo " */" + +CAPS="${1-Caps}" +TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l` + +echo "" +echo "#define CAPTABSIZE ${TABSIZE}" +echo "#define HASHTABSIZE (${TABSIZE} * 2)" |