xref: /freebsd/contrib/ncurses/include/MKhashsize.sh (revision 996e78ff53b7cce34b8d704f8991e1065d40916a)
1#!/bin/sh
2#
3# MKhashsize.sh --- generate size include for hash functions
4#
5echo "/*"
6echo " * hashsize.h -- hash and token table constants"
7echo " */"
8
9CAPS="${1-Caps}"
10TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
11
12echo ""
13echo "#define CAPTABSIZE	${TABSIZE}"
14echo "#define HASHTABSIZE	(${TABSIZE} * 2)"
15