X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=include%2FMKhashsize.sh;h=b311137ee4ec9bba82616f7a2f741bad4732ec90;hp=11b3111aff921cc8792032b2772c4d2139f8a5c3;hb=8890c8f28a1db5995ef17f52a7d8c0b9cf574210;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/include/MKhashsize.sh b/include/MKhashsize.sh index 11b3111a..b311137e 100755 --- a/include/MKhashsize.sh +++ b/include/MKhashsize.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright (c) 1998,2006 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2019 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKhashsize.sh,v 1.7 2006/10/22 00:45:39 tom Exp $ +# $Id: MKhashsize.sh,v 1.8 2019/04/06 22:53:17 tom Exp $ # # MKhashsize.sh --- generate size include for hash functions # @@ -34,8 +34,8 @@ 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` +test $# = 0 && set Caps +TABSIZE=`cat "$@" | grep -v '^[ #]' | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | grep -v "^userdef" | grep -v "^used_by" | wc -l` echo "" echo "#define CAPTABSIZE ${TABSIZE}"