Introduce command encapsulation structure.
This commit is contained in:
parent
6c4f140333
commit
7a3f3ec7a6
3 changed files with 85 additions and 79 deletions
8
advent.h
8
advent.h
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue