|
|
1.1 ! root 1: #********************************************************************* ! 2: # COPYRIGHT NOTICE * ! 3: #********************************************************************* ! 4: # This software is copyright (C) 1982 by Pavel Curtis * ! 5: # * ! 6: # Permission is granted to reproduce and distribute * ! 7: # this file by any means so long as no fee is charged * ! 8: # above a nominal handling fee and so long as this * ! 9: # notice is always included in the copies. * ! 10: # * ! 11: # Other rights are reserved except as explicitly granted * ! 12: # by written permission of the author. * ! 13: # Pavel Curtis * ! 14: # Computer Science Dept. * ! 15: # 405 Upson Hall * ! 16: # Cornell University * ! 17: # Ithaca, NY 14853 * ! 18: # * ! 19: # Ph- (607) 256-4934 * ! 20: # * ! 21: # Pavel.Cornell@Udel-Relay (ARPAnet) * ! 22: # decvax!cornell!pavel (UUCPnet) * ! 23: #********************************************************************/ ! 24: ! 25: # ! 26: # $Header: /src386/usr/lib/ncurses/RCS/MKcaptab.awk,v 1.1 92/03/26 11:44:26 bin Exp Locker: bin $ ! 27: # ! 28: ! 29: ! 30: BEGIN { ! 31: print "/*" ! 32: print " * comp_captab.c -- The names of the capabilities in a form ready for" ! 33: print " * the making of a hash table for the compiler." ! 34: print " *" ! 35: print " */" ! 36: print "" ! 37: print "" ! 38: print "#include \"compiler.h\"" ! 39: print "#include \"term.h\"" ! 40: print "" ! 41: print "" ! 42: print "struct name_table_entry cap_table[] =" ! 43: print "{" ! 44: } ! 45: ! 46: ! 47: $4 == "bool" { ! 48: printf "\t0,%15s,\tBOOLEAN,\t%3d,\n", $2, BoolCount++ ! 49: } ! 50: ! 51: ! 52: $4 == "number" { ! 53: printf "\t0,%15s,\tNUMBER,\t\t%3d,\n", $2, NumCount++ ! 54: } ! 55: ! 56: ! 57: $4 == "str" { ! 58: printf "\t0,%15s,\tSTRING,\t\t%3d,\n", $2, StrCount++ ! 59: } ! 60: ! 61: ! 62: END { ! 63: print "};" ! 64: print "" ! 65: printf "struct name_table_entry *cap_hash_table[%d];\n",(BoolCount + NumCount + StrCount) * 2 ! 66: print "" ! 67: printf "int Hashtabsize = %d;\n",(BoolCount + NumCount + StrCount) * 2 ! 68: printf "int Captabsize = %d;\n", BoolCount + NumCount + StrCount ! 69: print "" ! 70: print "" ! 71: printf "#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n",BoolCount, NumCount, StrCount ! 72: print " --> term.h and comp_captab.c disagree about the <--" ! 73: print " --> numbers of booleans, numbers and/or strings <--" ! 74: print "#endif" ! 75: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.