Simplify SPDX copyright lines to the shortest canonical form...
[open-adventure.git] / misc.c
diff --git a/misc.c b/misc.c
index 0d540c65d7518eadf448f1941f9e2f7b16936a7a..c853237f742195bd1a837f8779737cac5de7df64 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -1,8 +1,7 @@
 /*
  * I/O and support routines.
  *
- * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods
- * SPDX-FileCopyrightText: 2017 by Eric S. Raymond
+ * SPDX-FileCopyrightText: (C) 1977, 2005 by Will Crowther and Don Woods
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
@@ -432,6 +431,7 @@ static void get_vocab_metadata(const char* word, vocab_t* id, word_type_t* type)
     vocab_t ref_num;
 
     ref_num = get_motion_vocab_id(word);
+    // Second conjunct is because the magic-word placeholder is a bit special
     if (ref_num != WORD_NOT_FOUND) {
         *id = ref_num;
         *type = MOTION;
@@ -446,7 +446,7 @@ static void get_vocab_metadata(const char* word, vocab_t* id, word_type_t* type)
     }
 
     ref_num = get_action_vocab_id(word);
-    if (ref_num != WORD_NOT_FOUND) {
+    if (ref_num != WORD_NOT_FOUND && ref_num != PART) {
         *id = ref_num;
         *type = ACTION;
         return;
@@ -600,11 +600,11 @@ void put(obj_t object, loc_t where, int pval)
  *  negated game.prop values for the repository objects. */
 {
     move(object, where);
-#ifndef FOUNDBOOL
-    game.objects[object].prop = (-1) - pval;;  // Needs to stay synchronized with PROP_STASHED
-#else
-    game.objects[object].prop = - pval;;       // Needs to stay synchronized with PROP_STASHED
-    game.objects[object].found = true;
+    /* (ESR) Read this in combination with the macro defintions in advebt.h.
+     */
+    game.objects[object].prop = PROP_STASHIFY(pval);
+#ifdef PROP_SET_SEEN
+    PROP_SET_SEEN(object);
 #endif
 }