Blob


1 BEGIN {
2 print "static struct cmds { const char *cmd; void(*fn)(struct window*); } cmds[] = {";
3 }
5 /^CMD/ {
6 s = $2;
7 sub("^cmd_", "", s);
8 gsub("_", "-", s);
9 printf("\t{ \"%s\", %s },\n", s, $2);
10 next;
11 }
13 {
14 next;
15 }
17 END {
18 printf("\t{ NULL, NULL },\n");
19 print "};";
20 }