OSDN Git Service

[Refactor] #37353 '#ifndef JP' を '#ifdef JP/#else'に差し替え / Changed pre-processor ...
authorHourier <hourier@users.sourceforge.jp>
Mon, 13 Jan 2020 15:08:43 +0000 (00:08 +0900)
committerHourier <hourier@users.sourceforge.jp>
Mon, 13 Jan 2020 15:08:43 +0000 (00:08 +0900)
16 files changed:
src/cmd/cmd-activate.c
src/cmd/cmd-dump.c
src/cmd/cmd-dump.h
src/files.c
src/main-win.c
src/monster-status.c
src/monster1.c
src/mspells1.c
src/mspells2.c
src/object-flavor.c
src/object2.c
src/player-status.c
src/quest.c
src/spells1.c
src/targeting.c
src/wizard1.c

index e4ec407..14fa598 100644 (file)
@@ -549,7 +549,8 @@ void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
                                        {
                                                char buf[80];
                                                concptr t;
-#ifndef JP
+#ifdef JP
+#else
                                                bool quote = FALSE;
 #endif
 
index ceca7de..8a2bb4c 100644 (file)
@@ -367,8 +367,8 @@ static void close_auto_dump(void)
 }
 
 
-#ifndef JP
-
+#ifdef JP
+#else
 /*!
  * @brief Return suffix of ordinal number
  * @param num number
index f31e89f..c2e6f86 100644 (file)
@@ -45,7 +45,8 @@
 
 
 /* cmd4.c */
-#ifndef JP
+#ifdef JP
+#else
 extern concptr get_ordinal_number_suffix(int num);
 #endif
 extern errr exe_write_diary(player_type *creature_ptr, int type, int num, concptr note);
index 8ca87fe..b83e83b 100644 (file)
@@ -5954,7 +5954,8 @@ void print_tomb(player_type *dead_ptr)
        center_string(buf, dead_ptr->name);
        put_str(buf, 6, 11);
 
-#ifndef JP
+#ifdef JP
+#else
        center_string(buf, "the");
        put_str(buf, 7, 11);
 #endif
index f9d2811..e798f29 100644 (file)
@@ -3379,7 +3379,9 @@ static void setup_menus(void)
                MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
        EnableMenuItem(hm, IDM_OPTIONS_SOUND,
                MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
-#ifndef JP
+#ifdef JP
+#else
+
        EnableMenuItem(hm, IDM_OPTIONS_SAVER,
                MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
 #endif
@@ -3408,7 +3410,9 @@ static void setup_menus(void)
                (arg_sound ? MF_CHECKED : MF_UNCHECKED));
        CheckMenuItem(hm, IDM_OPTIONS_BG,
                (use_bg ? MF_CHECKED : MF_UNCHECKED));
-#ifndef JP
+#ifdef JP
+#else
+
        CheckMenuItem(hm, IDM_OPTIONS_SAVER,
                (hwndSaver ? MF_CHECKED : MF_UNCHECKED));
 #endif
index 85eb59d..6837b42 100644 (file)
@@ -744,7 +744,9 @@ static void process_monsters_mtimed_aux(player_type *target_ptr, MONSTER_IDX m_i
                if (is_seen(m_ptr))
                {
                        GAME_TEXT m_name[MAX_NLEN];
-#ifndef JP
+#ifdef JP
+#else
+
                        char m_poss[80];
 
                        /* Acquire the monster possessive */
index 123a5db..cd6e983 100644 (file)
@@ -523,7 +523,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                        hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
                        old = TRUE;
                }
-#ifndef JP
+#ifdef JP
+#else
                hooked_roff("moves");
 #endif
 
@@ -740,7 +741,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                        {
                                hooked_roff(_("少なくとも", " at the least"));
                        }
-#ifndef JP
+#ifdef JP
+#else
                        hooked_roff(" contain ");
 #endif                 
                        for(n = 0; n < A_MAX; n++)
@@ -1655,7 +1657,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                /* Intro */
                hooked_roff(format(
                        _("%^sは", "%^s may carry"), wd_he[msex]));
-#ifndef JP
+#ifdef JP
+#else
                /* No "n" needed */
                sin = FALSE;
 #endif
@@ -1668,7 +1671,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                if (n == 1)
                {
                        hooked_roff(_("一つの", " a"));
-#ifndef JP
+#ifdef JP
+#else
                        sin = TRUE;
 #endif
                }
@@ -1698,7 +1702,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                else if (flags1 & RF1_DROP_GOOD)
                {
                        p = _("上質な", " good");
-#ifndef JP
+#ifdef JP
+#else
                        sin = FALSE;
 #endif
                }
@@ -1713,7 +1718,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                if (drop_item)
                {
                        /* Handle singular "an" */
-#ifndef JP
+#ifdef JP
+#else
                        if (sin) hooked_roff("n");
                        sin = FALSE;
 #endif
@@ -1723,7 +1729,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                        hooked_roff(
                                _("アイテム", " object"));
 
-#ifndef JP
+#ifdef JP
+#else
                        if (n != 1) hooked_roff("s");
 #endif
 
@@ -1734,7 +1741,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                /* Treasures */
                if (drop_gold)
                {
-#ifndef JP
+#ifdef JP
+#else
                        /* Cancel prefix */
                        if (!p) sin = FALSE;
 
@@ -1746,7 +1754,8 @@ static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
                        /* Dump "treasure(s)" */
                        if (p) hooked_roff(p);
                        hooked_roff(_("財宝", " treasure"));
-#ifndef JP
+#ifdef JP
+#else
                        if (n != 1) hooked_roff("s");
 #endif
 
@@ -2018,7 +2027,9 @@ void roff_top(MONRACE_IDX r_idx)
        /* Reset the cursor */
        Term_gotoxy(0, 0);
 
-#ifndef JP
+#ifdef JP
+#else
+
        /* A title (use "The" for non-uniques) */
        if (!(r_ptr->flags1 & RF1_UNIQUE))
        {
index de3d44c..0f14f0c 100644 (file)
@@ -1343,7 +1343,9 @@ static bool adjacent_grid_check(player_type *target_ptr, monster_type *m_ptr, PO
  */
 bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr)
 {
-#ifndef JP
+#ifdef JP
+#else
+
        char m_poss[80];
 #endif
        /* Extract the "see-able-ness" */
@@ -1637,7 +1639,9 @@ bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr)
        GAME_TEXT m_name[MAX_NLEN];
        monster_desc(m_name, m_ptr, 0x00);
 
-#ifndef JP
+#ifdef JP
+#else
+
        /* Get the monster possessive ("his"/"her"/"its") */
        monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
 #endif
index 326c4f0..91fef78 100644 (file)
@@ -267,7 +267,9 @@ bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx)
        GAME_TEXT m_name[160];
        GAME_TEXT t_name[160];
 
-#ifndef JP
+#ifdef JP
+#else
+
        char m_poss[160];
 #endif
 
@@ -661,7 +663,9 @@ bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx)
        /* Get the monster name (or "it") */
        monster_desc(m_name, m_ptr, 0x00);
 
-#ifndef JP
+#ifdef JP
+#else
+
        /* Get the monster possessive ("his"/"her"/"its") */
        monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
 #endif
index 3189551..67a5222 100644 (file)
@@ -1007,7 +1007,9 @@ static flag_insc_table flag_insc_sust[] =
  */
 static char *inscribe_flags_aux(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE], bool kanji, char *ptr)
 {
-#ifndef JP
+#ifdef JP
+#else
+
        (void)kanji;
 #endif
 
@@ -2102,7 +2104,9 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
                        kindname = "";
                }
 
-#ifndef JP
+#ifdef JP
+#else
+
                /* Pluralizer */
                else if (*s == '~')
                {
@@ -2672,7 +2676,9 @@ void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode)
                        else if (have_flag(flgs, TR_BLOWS))
                        {
                                t = object_desc_str(t, _("攻撃", " attack"));
-#ifndef JP
+#ifdef JP
+#else
+
                                if (ABS(o_ptr->pval) != 1) t = object_desc_chr(t, 's');
 #endif
                        }
index 37818fd..74396fc 100644 (file)
@@ -4195,7 +4195,9 @@ OBJECT_IDX drop_near(player_type *owner_ptr, object_type *j_ptr, PERCENTAGE chan
        bool flag = FALSE;
        bool done = FALSE;
 
-#ifndef JP
+#ifdef JP
+#else
+
        /* Extract plural */
        bool plural = (j_ptr->number != 1);
 #endif
index f39d41c..428044d 100644 (file)
@@ -5275,7 +5275,9 @@ void sanity_blast(player_type *creature_ptr, monster_type *m_ptr, bool necro)
 
                get_mon_num_prep(NULL, NULL);
 
-#ifndef JP
+#ifdef JP
+#else
+
                if (!(r_ptr->flags1 & RF1_UNIQUE))
                        sprintf(m_name, "%s %s", (is_a_vowel(desc[0]) ? "an" : "a"), desc);
                else
index 593d3bf..a2aac0b 100644 (file)
@@ -356,7 +356,8 @@ void quest_discovery(QUEST_IDX q_idx)
 
        if (q_num != 1)
        {
-#ifndef JP
+#ifdef JP
+#else
                plural_aux(name);
 #endif
                msg_format(_("注意しろ!この階は%d体の%sによって守られている!", "Be warned, this level is guarded by %d %s!"), q_num, name);
index 1920506..46bee92 100644 (file)
@@ -796,7 +796,9 @@ static bool project_o(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSI
 
                concptr note_kill = NULL;
 
-#ifndef JP
+#ifdef JP
+#else
+
                /* Get the "plural"-ness */
                bool plural = (o_ptr->number > 1);
 #endif
index a995f61..51f7782 100644 (file)
@@ -943,7 +943,8 @@ static char target_set_aux(player_type *subject_ptr, POSITION y, POSITION x, BIT
        {
                s2 = _("の入口", "");
        }
-#ifndef JP
+#ifdef JP
+#else
        else if (have_flag(f_ptr->flags, FF_FLOOR) ||
                have_flag(f_ptr->flags, FF_TOWN) ||
                have_flag(f_ptr->flags, FF_SHALLOW) ||
index 3dcf907..5d05178 100644 (file)
@@ -2067,7 +2067,8 @@ static void spoil_mon_info(concptr fname)
                }
                else
                {
-#ifndef JP
+#ifdef JP
+#else
                        spoil_out("The ");
 #endif
                }