Address GitLab issue #45: OSX Compile issue
authorEric S. Raymond <esr@thyrsus.com>
Fri, 30 Nov 2018 14:49:23 +0000 (09:49 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 30 Nov 2018 14:50:25 +0000 (09:50 -0500)
actions.c
advent.h
main.c
misc.c

index ceb728a0d86c6ae0f706ce2ca9179c790f4a0f58..9c3eb77a45039c5ca63a5663157c403c21655c5f 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -211,11 +211,11 @@ static int bigwords(vocab_t id)
             if (game.place[EGGS] == LOC_NOWHERE && game.place[TROLL] == LOC_NOWHERE && game.prop[TROLL] == TROLL_UNPAID)
                 game.prop[TROLL] = TROLL_PAIDONCE;
             if (HERE(EGGS))
-                pspeak(EGGS, look, EGGS_VANISHED, true);
+                pspeak(EGGS, look, true, EGGS_VANISHED);
             else if (game.loc == objects[EGGS].plac)
-                pspeak(EGGS, look, EGGS_HERE, true);
+                pspeak(EGGS, look, true, EGGS_HERE);
             else
-                pspeak(EGGS, look, EGGS_DONE, true);
+                pspeak(EGGS, look, true, EGGS_DONE);
             move(EGGS, objects[EGGS].plac);
 
             return GO_CLEAROBJ;
@@ -500,7 +500,7 @@ static int discard(verb_t verb, obj_t obj)
     if (obj == COINS && HERE(VEND)) {
         DESTROY(COINS);
         drop(BATTERY, game.loc);
-        pspeak(BATTERY, look, FRESH_BATTERIES, true);
+        pspeak(BATTERY, look, true, FRESH_BATTERIES);
         return GO_CLEAROBJ;
     }
 
@@ -640,7 +640,7 @@ static int extinguish(verb_t verb, obj_t obj)
         if (game.prop[URN] != URN_EMPTY) {
             state_change(URN, URN_DARK);
         } else {
-            pspeak(URN, change, URN_DARK, true);
+            pspeak(URN, change, true, URN_DARK);
         }
         break;
     case LAMP:
@@ -869,7 +869,7 @@ static int inven(void)
             rspeak(NOW_HOLDING);
             empty = false;
         }
-        pspeak(i, touch, -1, false);
+        pspeak(i, touch, false, -1);
     }
     if (TOTING(BEAR))
         rspeak(TAME_BEAR);
@@ -939,7 +939,7 @@ static int listen(void)
          * depending on whether player has drunk dragon's blood. */
         if (i == BIRD)
             mi += 3 * game.blooded;
-        pspeak(i, hear, mi, true, game.zzword);
+        pspeak(i, hear, true, mi, game.zzword);
         rspeak(NO_MESSAGE);
         if (i == BIRD && mi == BIRD_ENDSTATE)
             DESTROY(BIRD);
@@ -1108,7 +1108,7 @@ static int read(command_t command)
                game.prop[command.obj] == STATE_NOTFOUND) {
         speak(actions[command.verb].message);
     } else
-        pspeak(command.obj, study, game.prop[command.obj], true);
+        pspeak(command.obj, study, true, game.prop[command.obj]);
     return GO_CLEAROBJ;
 }
 
index 09f5ad99271d427f31f3b347ba5f6e9097799d80..76d63e093ea24a0be018f222ceb0ba2384796e12 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -209,7 +209,7 @@ extern struct settings_t settings;
 extern bool get_command_input(command_t *);
 extern void speak(const char*, ...);
 extern void sspeak(int msg, ...);
-extern void pspeak(vocab_t, enum speaktype, int, bool, ...);
+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);
diff --git a/main.c b/main.c
index adb0c9974c8cf15e78981aabfbb5d0c67579e4aa..1865483964d109c9a4aa7c5b7dd69d0d373d0d6a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -710,7 +710,7 @@ static void playermove( int motion)
                      * game.prop[TROLL]=TROLL_UNPAID.)  Special stuff
                      * for bear. */
                     if (game.prop[TROLL] == TROLL_PAIDONCE) {
-                        pspeak(TROLL, look, TROLL_PAIDONCE, true);
+                        pspeak(TROLL, look, true, TROLL_PAIDONCE);
                         game.prop[TROLL] = TROLL_UNPAID;
                         move(TROLL2, LOC_NOWHERE);
                         move(TROLL2 + NOBJECTS, IS_FREE);
@@ -956,7 +956,7 @@ static void listobjects(void)
                 kk = (game.loc == game.fixed[STEPS])
                      ? STEPS_UP
                      : STEPS_DOWN;
-            pspeak(obj, look, kk, true);
+            pspeak(obj, look, true, kk);
         }
     }
 }
@@ -992,7 +992,7 @@ bool get_preprocessed_command_input(command_t *command)
          *  separate from their respective piles. */
         if (game.closed) {
             if (game.prop[OYSTER] < 0 && TOTING(OYSTER))
-                pspeak(OYSTER, look, 1, true);
+                pspeak(OYSTER, look, true, 1);
             for (size_t i = 1; i <= NOBJECTS; i++) {
                 if (TOTING(i) && game.prop[i] < 0)
                     game.prop[i] = STASHED(i);
diff --git a/misc.c b/misc.c
index 0d9405eb589551c5d2b7c21fc40b616af36bc6c6..56872582b95cfe80540da380c674346d715f1761 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -139,7 +139,7 @@ void sspeak(const int msg, ...)
     va_end(ap);
 }
 
-void pspeak(vocab_t msg, enum speaktype mode, int skip, bool blank, ...)
+void pspeak(vocab_t msg, enum speaktype mode, bool blank, int skip, ...)
 /* Find the skip+1st message from msg and print it.  Modes are:
  * feel = for inventory, what you can touch
  * look = the full description for the state the object is in
@@ -147,7 +147,7 @@ void pspeak(vocab_t msg, enum speaktype mode, int skip, bool blank, ...)
  * study = text on the object. */
 {
     va_list ap;
-    va_start(ap, blank);
+    va_start(ap, skip);
     switch (mode) {
     case touch:
         vspeak(objects[msg].inventory, blank, ap);
@@ -708,7 +708,7 @@ void state_change(obj_t obj, int state)
 /* Object must have a change-message list for this to be useful; only some do */
 {
     game.prop[obj] = state;
-    pspeak(obj, change, state, true);
+    pspeak(obj, change, true, state);
 }
 
 /* end */