]> granicus.if.org Git - nethack/commitdiff
Revert "move struct propname to a header file"
authornhmall <nhmall@nethack.org>
Tue, 6 Sep 2022 12:01:50 +0000 (08:01 -0400)
committernhmall <nhmall@nethack.org>
Tue, 6 Sep 2022 12:01:50 +0000 (08:01 -0400)
This reverts commit 402b2bf5c864c04a673658d6ad9bed159b581ca6.

include/timeout.h
src/cmd.c
src/timeout.c

index f3a853b680e8f13d54c1e5c1c114782cf43c410a..45aab9545d869aad667c94a1f6052b4532903dd9 100644 (file)
@@ -60,9 +60,4 @@ typedef struct fe {
     Bitfield(needs_fixup, 1); /* does arg need to be patched? */
 } timer_element;
 
-struct propname {
-    int prop_num;
-    const char *prop_name;
-};
-
 #endif /* TIMEOUT_H */
index e6d0d5a1faf26742371b1cbd6d03d45e9e05666e..e2d9d1687685abb29e2848b312948e2c5d8b9918 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1952,7 +1952,10 @@ static int
 wiz_intrinsic(void)
 {
     if (wizard) {
-        extern const struct propname propertynames[]; /* timeout.c */
+        extern const struct propname {
+            int prop_num;
+            const char *prop_name;
+        } propertynames[]; /* timeout.c */
         static const char wizintrinsic[] = "#wizintrinsic";
         static const char fmt[] = "You are%s %s.";
         winid win;
index d4f01fca86c81376ce5c5929fc2782fb69d23b62..ed3a8ed38668e826696c61e83da865e0d08d2252 100644 (file)
@@ -21,7 +21,10 @@ static void cleanup_burn(ANY_P *, long);
 
 /* used by wizard mode #timeout and #wizintrinsic; order by 'interest'
    for timeout countdown, where most won't occur in normal play */
-const struct propname propertynames[] = {
+const struct propname {
+    int prop_num;
+    const char *prop_name;
+} propertynames[] = {
     { INVULNERABLE, "invulnerable" },
     { STONED, "petrifying" },
     { SLIMED, "becoming slime" },