Major cleanups. Pre-process loop back in main loop, pre-processing abstracted into a function that makes sense.
This commit is contained in:
parent
b84a2392a1
commit
9475552be4
2 changed files with 178 additions and 180 deletions
13
misc.c
13
misc.c
|
@ -538,6 +538,19 @@ bool get_command_input(command_t *command)
|
|||
|
||||
tokenize(inputbuf, command);
|
||||
|
||||
#ifdef GDEBUG
|
||||
/* Needs to stay synced with enum word_type_t */
|
||||
const char *types[] = {"NO_WORD_TYPE", "MOTION", "OBJECT", "ACTION", "NUMERIC"};
|
||||
/* needs to stay synced with enum speechpart */
|
||||
const char *roles[] = {"unknown", "intransitive", "transitive"};
|
||||
printf("Command: role = %s type1 = %s, id1 = %ld, type2 = %s, id2 = %ld\n",
|
||||
roles[command->part],
|
||||
types[command->word[0].type],
|
||||
command->word[0].id,
|
||||
types[command->word[1].type],
|
||||
command->word[1].id);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue