ref: f0ac2d01765f938a4f3656efef440cf2c1bca69d
dir: /sys/src/cmd/syscall/mktab.awk/
#!/bin/awk -f { e = e $2 ", " s = s sprintf("[%s] \"%s\", (int(*)(...))%s,\n", $2, tolower($2), tolower($2)) } END{ e = e "READ, WRITE, NTAB" s = s "[READ] \"read\", (int(*)(...))read,\n" s = s "[WRITE] \"write\", (int(*)(...))write,\n" s = s "[NTAB] nil, 0\n" print "enum{", e, "};" print "struct Call tab[] = {\n", s, "};" }