]>
Commit | Line | Data |
---|---|---|
7629744a | 1 | #!/bin/sh |
2 | set -eu | |
cc5549ca ZJS |
3 | |
4 | awk ' | |
5 | BEGIN { | |
6 | print "%{\n\ | |
4831981d SL |
7 | #if __GNUC__ >= 7\n\ |
8 | _Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\ | |
9 | #endif\n\ | |
10 | %}" | |
cc5549ca ZJS |
11 | print "struct key_name { const char* name; unsigned short id; };" |
12 | print "%null-strings" | |
13 | print "%%" | |
14 | } | |
1b833237 | 15 | |
cc5549ca ZJS |
16 | /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 } |
17 | { print tolower($1) ", " $1 } | |
1b833237 | 18 | ' < "$1" |