4 print "#include <stdlib.h>"
5 print "#include \"curses.h\""
12 print "struct kn key_names[] = {"
15 {printf "\t{\"%s\", %s,},\n", $1, $2;}
20 print "char *keyname(int c)"
22 print "int i, size = sizeof(key_names)/sizeof(struct kn);"
24 print "\tfor (i = 0; i < size; i++) {"
25 print "\t\tif (key_names[i].code == c) return key_names[i].name;"
27 print "\treturn NULL;"