Support execution of command script arguments.
[open-adventure.git] / advent.h
index a1fc4542da778986a9f4e83315ab96144d61f69a..840974905f0ca012cae93b6cdecc7d9b9c736d8f 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -45,6 +45,8 @@
  * which has its own meaning. */
 #define STASHED(obj)   (-1 - game.prop[obj])
 
+#define PROMPT "> "
+
 /*
  *  DESTROY(N)  = Get rid of an item by putting it in LOC_NOWHERE
  *  MOD(N,M)    = Arithmetic modulus
@@ -194,6 +196,10 @@ struct settings_t {
     FILE *logfp;
     bool oldstyle;
     bool prompt;
+    char **argv;
+    int argc;
+    int optind;
+    FILE *scriptfp;
 };
 
 typedef struct {
@@ -215,6 +221,7 @@ typedef struct {
 extern struct game_t game;
 extern struct settings_t settings;
 
+extern char *myreadline(const char *);
 extern bool get_command_input(command_t *);
 extern void clear_command(command_t *);
 extern void speak(const char*, ...);