3 # $NetBSD: mkkeysym.sh,v 1.1 1998/12/28 14:01:17 hannken Exp $
5 # Build a table of keysyms from a file describing keysyms as:
8 # #define KS_name 0xval
18 printf("/* DO NOT EDIT: AUTOMATICALLY GENERATED FROM '$1' */\n\n");
19 printf("struct ksym {\n\tconst char *name;\n\tint value;\n};\n\n");
20 printf("struct ksym ksym_tab_by_name[] = {\n");
27 $1 == "/*BEGINKEYSYMDECL*/" {
31 $1 == "/*ENDKEYSYMDECL*/" {
35 $1 ~ /^#[ ]*define/ && $2 ~ /^KS_/ && $3 ~ /^0x[0-9a-f]*/ {
37 printf("\t{ \"%s\", %s },\n", substr($2, 4), $3);