Test Coverage -- lots of new pieces of actions.c
[open-adventure.git] / advent.h
index 1a6ab089f2838c19ee762fd3eade3e60ceca9fb0..f7551d0ebb56fc65e54f62983fd5861c42f4d79e 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -90,7 +90,7 @@ extern bool oldstyle, editline, prompt;
 extern void* xmalloc(size_t size);
 extern char* xstrdup(const char*);
 extern void packed_to_token(long, char token[]);
-extern void token_to_packed(char token[], long);
+extern void token_to_packed(char token[], long*);
 extern void speak(const char*);
 extern bool wordeq(token_t, token_t);
 extern bool wordempty(token_t);
@@ -181,8 +181,16 @@ 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;
+    token_t wd1, wd1x;
+    token_t wd2, wd2x;
+};
+
 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.