150276Speter#!/bin/sh 2166124Srafan############################################################################## 3166124Srafan# Copyright (c) 1998,2006 Free Software Foundation, Inc. # 4166124Srafan# # 5166124Srafan# Permission is hereby granted, free of charge, to any person obtaining a # 6166124Srafan# copy of this software and associated documentation files (the "Software"), # 7166124Srafan# to deal in the Software without restriction, including without limitation # 8166124Srafan# the rights to use, copy, modify, merge, publish, distribute, distribute # 9166124Srafan# with modifications, sublicense, and/or sell copies of the Software, and to # 10166124Srafan# permit persons to whom the Software is furnished to do so, subject to the # 11166124Srafan# following conditions: # 12166124Srafan# # 13166124Srafan# The above copyright notice and this permission notice shall be included in # 14166124Srafan# all copies or substantial portions of the Software. # 15166124Srafan# # 16166124Srafan# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # 17166124Srafan# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # 18166124Srafan# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # 19166124Srafan# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # 20166124Srafan# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # 21166124Srafan# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # 22166124Srafan# DEALINGS IN THE SOFTWARE. # 23166124Srafan# # 24166124Srafan# Except as contained in this notice, the name(s) of the above copyright # 25166124Srafan# holders shall not be used in advertising or otherwise to promote the sale, # 26166124Srafan# use or other dealings in this Software without prior written # 27166124Srafan# authorization. # 28166124Srafan############################################################################## 29166124Srafan# $Id: MKhashsize.sh,v 1.7 2006/10/22 00:45:39 tom Exp $ 3050276Speter# 3150276Speter# MKhashsize.sh --- generate size include for hash functions 3250276Speter# 3350276Speterecho "/*" 3450276Speterecho " * hashsize.h -- hash and token table constants" 3550276Speterecho " */" 3650276Speter 3750276SpeterCAPS="${1-Caps}" 3850276SpeterTABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l` 3950276Speter 4050276Speterecho "" 4150276Speterecho "#define CAPTABSIZE ${TABSIZE}" 4250276Speterecho "#define HASHTABSIZE (${TABSIZE} * 2)" 43