Address Gitlab isse #62: Comment typos.
[open-adventure.git] / advent.h
index a1fc4542da778986a9f4e83315ab96144d61f69a..a68613baf46798c955e918a26fae32bbeb2f56cb 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -13,7 +13,7 @@
 #define LCG_M 1048576L
 
 #define LINESIZE       1024
-#define TOKLEN         5          // # sigificant characters in a token */
+#define TOKLEN         5          // # outputting characters in a token */
 #define NDWARVES       6          // number of dwarves
 #define PIRATE         NDWARVES   // must be NDWARVES-1 when zero-origin
 #define DALTLC         LOC_NUGGET // alternate dwarf location
@@ -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
@@ -79,7 +81,7 @@
 #define FOREST(LOC)  CNDBIT(LOC, COND_FOREST)
 #define OUTSID(LOC)  (CNDBIT(LOC, COND_ABOVE) || FOREST(LOC))
 #define INSIDE(LOC)  (!OUTSID(LOC) || LOC == LOC_BUILDING)
-#define INDEEP(LOC)  ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
+#define INDEEP(LOC)  CNDBIT((LOC),COND_DEEP)
 #define BUG(x)       bug(x, #x)
 
 enum bugtype {
@@ -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*, ...);
@@ -222,8 +229,8 @@ extern void sspeak(int msg, ...);
 extern void pspeak(vocab_t, enum speaktype, bool, int, ...);
 extern void rspeak(vocab_t, ...);
 extern void echo_input(FILE*, const char*, const char*);
-extern bool silent_yes(void);
-extern bool yes(const char*, const char*, const char*);
+extern bool silent_yes_or_no(void);
+extern bool yes_or_no(const char*, const char*, const char*);
 extern void juggle(obj_t);
 extern void move(obj_t, loc_t);
 extern loc_t put(obj_t, int, int);