I'm certainly novice in C, but as I was reading, I wondered about this {"get",getCommand,2,"r",0,NULL,1,1,1,0,0}, "The fourth field, set to "r", is specifying that the command is read only and doesn’t modify any keys’ value or state. There are a whole bunch of one letter flags that you can specify in this string that are explained in detail in the nearby block comment. The field following this string should always be…
In defence of the technique, the command table is quite succinct and arguably more readable at a glance than if there were a bunch of constants |ed together. I have no idea whether this was the original motivation though.
ACTUALLY! It reminds me of a technique Bisqwit used when he made his emulator. He used strings to define the behavior of certain instructions, the strings were actually interpreted at compile time. Though I think this is a C++ specific trick.
http://www.youtube.com/watch?v=y71lli8MS8s
he brings in the instruction table at 1:30