Introduce command encapsulation structure.

This commit is contained in:
Eric S. Raymond 2017-06-20 16:04:50 -04:00
parent 6c4f140333
commit 7a3f3ec7a6
3 changed files with 85 additions and 79 deletions

View file

@ -181,8 +181,14 @@ extern long AMBER, ATTACK, AXE, BACK, BATTERY, BEAR,
enum speechpart {unknown, intransitive, transitive};
struct command_t {
enum speechpart part;
vocab_t verb;
vocab_t obj;
};
void initialise(void);
int action(FILE *input, enum speechpart part, token_t verb, token_t obj);
int action(FILE *input, struct command_t command);
/* Phase codes for action returns.
* These were at one time FORTRAN line numbers.