summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/MKkeyname.awk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libncurses/MKkeyname.awk')
-rw-r--r--lib/libncurses/MKkeyname.awk30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/libncurses/MKkeyname.awk b/lib/libncurses/MKkeyname.awk
deleted file mode 100644
index 12613ce..0000000
--- a/lib/libncurses/MKkeyname.awk
+++ /dev/null
@@ -1,30 +0,0 @@
-
-BEGIN {
- print ""
- print "#include <stdlib.h>"
- print "#include \"curses.h\""
- print ""
- print "struct kn {"
- print "\tchar *name;"
- print "\tint code;"
- print "};"
- print ""
- print "struct kn key_names[] = {"
-}
-
-{printf "\t{\"%s\", %s,},\n", $1, $2;}
-
-END {
- print "};"
- print ""
- print "char *keyname(int c)"
- print "{"
- print "int i, size = sizeof(key_names)/sizeof(struct kn);"
- print ""
- print "\tfor (i = 0; i < size; i++) {"
- print "\t\tif (key_names[i].code == c) return key_names[i].name;"
- print "\t}"
- print "\treturn NULL;"
- print "}"
- print ""
-}
OpenPOWER on IntegriCloud