OSDN Git Service

Change the KWD_* macros to be constant string pointers with definitions in cmd-spell... vmacos2.2.1-7f
authorEric Branlund <ebranlund@fastmail.com>
Wed, 20 Jan 2021 23:02:38 +0000 (15:02 -0800)
committerEric Branlund <ebranlund@fastmail.com>
Wed, 20 Jan 2021 23:02:38 +0000 (15:02 -0800)
src/cmd-spell.c
src/cmd-spell.h

index be80d19..f983add 100644 (file)
 #include "player-status.h"
 #include "object-hook.h"
 
+/*
+ * Define these here, rather than use preprocessor macros set in cmd-spell.h,
+ * so that the preprocessing done to switch character encoding works on the
+ * platforms that use configure/automake.
+ */
+concptr KWD_DAM = _("損傷:", "dam ");
+concptr KWD_RANGE = _("射程:", "rng ");
+concptr KWD_DURATION = _("期間:", "dur ");
+concptr KWD_SPHERE = _("範囲:", "range ");
+concptr KWD_HEAL = _("回復:", "heal ");
+concptr KWD_RANDOM = _("ランダム", "random");
+
 /*!
  * @brief
  * 魔法の効果を「キャプション:ダイス+定数値」のフォーマットで出力する / Generate dice info string such as "foo 2d10"
index 9e1ebef..32829d9 100644 (file)
@@ -1,9 +1,9 @@
-#define KWD_DAM      _("損傷:", "dam ")
-#define KWD_RANGE    _("射程:", "rng ")
-#define KWD_DURATION _("期間:", "dur ")
-#define KWD_SPHERE   _("範囲:", "range ")
-#define KWD_HEAL     _("回復:", "heal ")
-#define KWD_RANDOM   _("ランダム", "random")
+extern concptr KWD_DAM;
+extern concptr KWD_RANGE;
+extern concptr KWD_DURATION;
+extern concptr KWD_SPHERE;
+extern concptr KWD_HEAL;
+extern concptr KWD_RANDOM;
 
 extern concptr info_string_dice(concptr str, DICE_NUMBER dice, DICE_SID sides, int base);
 extern concptr info_damage(DICE_NUMBER dice, DICE_SID sides, int base);