xref: /freebsd/contrib/ncurses/include/MKhashsize.sh (revision 0e3d540892016a47f6a68ec9ba2879d35ce5f7c2)
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