3 /^
[\t ]*#[\t ]*define[\t _]*KEY_[A-Z0-9_]*[\t ]/ {
4 keyindex =
index($
0, "KEY_")
5 keytail =
substr($
0, keyindex
, 80)
7 keynam =
substr(tmp
[1], 5, 30)
8 if (keynam
!= "MIN" && keynam
!= "MAX" && keynam
!= "CODE_YES") {
9 name
[nkeydefs
++] = keynam
14 printf("static const struct zcurses_namenumberpair keypad_names[] = {\n")
15 for (i =
0; i
< 0 + nkeydefs
; i
++)
16 printf(" {\"%s\", KEY_%s},\n", name
[i
], name
[i
])
17 printf(" {NULL, 0}\n")