root/branches/dev/wminput/action_enum.awk
| Revision 29, 292 bytes (checked in by dsmith, 2 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | BEGIN { |
| 2 | print "#include <stdlib.h>" |
| 3 | print "#include <linux/input.h>" |
| 4 | print "#include \"conf.h\"" |
| 5 | |
| 6 | print "struct lookup_enum action_enum[] = {" |
| 7 | } |
| 8 | |
| 9 | /^#define/ { |
| 10 | printf "#ifdef %s\n", $2 |
| 11 | printf "\t{\"%s\",\t%s},\n", $2, $2 |
| 12 | print "#endif" |
| 13 | } |
| 14 | |
| 15 | END { |
| 16 | print "\t{NULL, 0}" |
| 17 | print "};" |
| 18 | } |
Note: See TracBrowser for help on using the browser.
