OSDN Git Service

[Refactor] #38861 cptr を concptrに改名 / rename cptr to concptr.
[hengband/hengband.git] / src / files.c
index bc6854e..8a894c0 100644 (file)
@@ -14,6 +14,9 @@
 
 
 #include "angband.h"
+#include "world.h"
+#include "player-status.h"
+#include "sort.h"
 
 
 /*
@@ -189,7 +192,7 @@ typedef struct named_num named_num;
 
 struct named_num
 {
-       cptr name;              /* The name of this thing */
+       concptr name;           /* The name of this thing */
        int num;                        /* A number associated with it */
 };
 
@@ -603,7 +606,6 @@ errr process_pref_file_command(char *buf)
                        /* Find the colon */
                        char *t = my_strchr(buf + 2, ':');
 
-                       /* Oops */
                        if (!t) return 1;
 
                        /* Nuke the colon */
@@ -755,9 +757,9 @@ errr process_pref_file_command(char *buf)
  *   result
  * </pre>
  */
-cptr process_pref_file_expr(char **sp, char *fp)
+concptr process_pref_file_expr(char **sp, char *fp)
 {
-       cptr v;
+       concptr v;
 
        char *b;
        char *s;
@@ -783,8 +785,8 @@ cptr process_pref_file_expr(char **sp, char *fp)
        /* Analyze */
        if (*s == b1)
        {
-               const char *p;
-               const char *t;
+               concptr p;
+               concptr t;
 
                /* Skip b1 */
                s++;
@@ -792,7 +794,6 @@ cptr process_pref_file_expr(char **sp, char *fp)
                /* First */
                t = process_pref_file_expr(&s, &f);
 
-               /* Oops */
                if (!*t)
                {
                        /* Nothing */
@@ -880,7 +881,6 @@ cptr process_pref_file_expr(char **sp, char *fp)
                        }
                }
 
-               /* Oops */
                else
                {
                        while (*s && (f != b2))
@@ -1036,11 +1036,7 @@ cptr process_pref_file_expr(char **sp, char *fp)
 
        /* Save */
        (*fp) = f;
-
-       /* Save */
        (*sp) = s;
-
-       /* Result */
        return (v);
 }
 
@@ -1064,7 +1060,7 @@ cptr process_pref_file_expr(char **sp, char *fp)
  *   result
  * </pre>
  */
-static errr process_pref_file_aux(cptr name, int preftype)
+static errr process_pref_file_aux(concptr name, int preftype)
 {
        FILE *fp;
 
@@ -1112,7 +1108,7 @@ static errr process_pref_file_aux(cptr name, int preftype)
                if ((buf[0] == '?') && (buf[1] == ':'))
                {
                        char f;
-                       cptr v;
+                       concptr v;
                        char *s;
 
                        /* Start */
@@ -1123,8 +1119,6 @@ static errr process_pref_file_aux(cptr name, int preftype)
 
                        /* Set flag */
                        bypass = (streq(v, "0") ? TRUE : FALSE);
-
-                       /* Continue */
                        continue;
                }
 
@@ -1159,8 +1153,6 @@ static errr process_pref_file_aux(cptr name, int preftype)
 
                        /* Set back depth level */
                        depth_count--;
-
-                       /* Continue */
                        continue;
                }
 
@@ -1188,11 +1180,7 @@ static errr process_pref_file_aux(cptr name, int preftype)
                msg_format(_("('%s'を解析中)", "Parsing '%s'"), old);
                msg_print(NULL);
        }
-
-       /* Close the file */
        my_fclose(fp);
-
-       /* Result */
        return (err);
 }
 
@@ -1209,7 +1197,7 @@ static errr process_pref_file_aux(cptr name, int preftype)
  * allow conditional evaluation and filename inclusion.
  * </pre>
  */
-errr process_pref_file(cptr name)
+errr process_pref_file(concptr name)
 {
        char buf[1024];
 
@@ -1474,8 +1462,6 @@ errr check_load_init(void)
 
                break;
        }
-
-       /* Close the file */
        my_fclose(fp);
 
 #endif
@@ -1651,14 +1637,14 @@ static struct
  * @param attr 項目表示の色
  * @return なし
  */
-static void display_player_one_line(int entry, cptr val, TERM_COLOR attr)
+static void display_player_one_line(int entry, concptr val, TERM_COLOR attr)
 {
        char buf[40];
 
        int row = disp_player_line[entry].row;
        int col = disp_player_line[entry].col;
        int len = disp_player_line[entry].len;
-       cptr head = disp_player_line[entry].header;
+       concptr head = disp_player_line[entry].header;
 
        int head_len = strlen(head);
 
@@ -1931,7 +1917,7 @@ static TERM_COLOR likert_color = TERM_WHITE;
  * @param y 技能値に対するランク基準比
  * @return なし
  */
-static cptr likert(int x, int y)
+static concptr likert(int x, int y)
 {
        static char dummy[20] = "", dummy2[20] = "";
        memset(dummy, 0, strlen(dummy));
@@ -2033,7 +2019,7 @@ static void display_player_various(void)
        int                     xthn, xthb, xfos, xsrh;
        int                     xdis, xdev, xsav, xstl;
        int                     xdig;
-       cptr            desc;
+       concptr         desc;
        int         muta_att = 0;
        BIT_FLAGS flgs[TR_FLAG_SIZE];
        int             shots, shot_frac;
@@ -2988,7 +2974,7 @@ typedef struct {
  * @param mode 表示オプション
  * @return なし
  */
-static void display_flag_aux(TERM_LEN row, TERM_LEN col, cptr header,
+static void display_flag_aux(TERM_LEN row, TERM_LEN col, concptr header,
                                    int flag1, all_player_flags *f, u16b mode)
 {
        int     i;
@@ -3539,23 +3525,14 @@ static void display_player_stat_info(void)
        row = 3;
 
        /* Print out the labels for the columns */
-#ifdef JP
-c_put_str(TERM_WHITE, "能力", row, stat_col+1);
-c_put_str(TERM_BLUE, "  基本", row, stat_col+7);
-c_put_str(TERM_L_BLUE, " 種 職 性 装 ", row, stat_col+13);
-c_put_str(TERM_L_GREEN, "合計", row, stat_col+28);
-c_put_str(TERM_YELLOW, "現在", row, stat_col+35);
-#else
-       c_put_str(TERM_WHITE, "Stat", row, stat_col+1);
-       c_put_str(TERM_BLUE, "  Base", row, stat_col+7);
-       c_put_str(TERM_L_BLUE, "RacClaPerMod", row, stat_col+13);
-       c_put_str(TERM_L_GREEN, "Actual", row, stat_col+26);
-       c_put_str(TERM_YELLOW, "Current", row, stat_col+32);
-#endif
-
+       c_put_str(TERM_WHITE, _("能力", "Stat"), row, stat_col+1);
+       c_put_str(TERM_BLUE, _("  基本", "  Base"), row, stat_col+7);
+       c_put_str(TERM_L_BLUE, _(" 種 職 性 装 ", "RacClaPerMod"), row, stat_col+13);
+       c_put_str(TERM_L_GREEN, _("合計", "Actual"), row, stat_col+28);
+       c_put_str(TERM_YELLOW, _("現在", "Current"), row, stat_col+35);
 
        /* Display the stats */
-       for (i = 0; i < 6; i++)
+       for (i = 0; i < A_MAX; i++)
        {
                int r_adj;
 
@@ -3646,14 +3623,13 @@ c_put_str(TERM_YELLOW, "現在", row, stat_col+35);
        /* Process equipment */
        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
-               /* Access object */
                o_ptr = &inventory[i];
 
                /* Acquire "known" flags */
                object_flags_known(o_ptr, flgs);
 
                /* Initialize color based of sign of pval. */
-               for (stat = 0; stat < 6; stat++)
+               for (stat = 0; stat < A_MAX; stat++)
                {
                        /* Default */
                        a = TERM_SLATE;
@@ -3712,7 +3688,7 @@ c_put_str(TERM_YELLOW, "現在", row, stat_col+35);
        player_flags(flgs);
 
        /* Check stats */
-       for (stat = 0; stat < 6; stat++)
+       for (stat = 0; stat < A_MAX; stat++)
        {
                /* Default */
                a = TERM_SLATE;
@@ -3817,15 +3793,12 @@ c_put_str(TERM_YELLOW, "現在", row, stat_col+35);
  * Mode 4 = mutations
  * </pre>
  */
-void display_player(BIT_FLAGS mode)
+void display_player(int mode)
 {
        int i;
+       char buf[80];
+       char tmp[64];
 
-       char    buf[80];
-       char    tmp[64];
-
-
-       /* XXX XXX XXX */
        if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && display_mutations)
                mode = (mode % 5);
        else
@@ -3878,7 +3851,7 @@ void display_player(BIT_FLAGS mode)
 
 
                /* Display the stats */
-               for (i = 0; i < 6; i++)
+               for (i = 0; i < A_MAX; i++)
                {
                        /* Special treatment of "injured" stats */
                        if (p_ptr->stat_cur[i] < p_ptr->stat_max[i])
@@ -4075,7 +4048,6 @@ static void dump_aux_display_player(FILE *fff)
        char c;
        char buf[1024];
 
-       /* Display player */
        display_player(0);
 
        /* Dump part of the screen */
@@ -4203,7 +4175,7 @@ static void dump_aux_pet(FILE *fff)
        int i;
        bool pet = FALSE;
        bool pet_settings = FALSE;
-       char pet_name[80];
+       GAME_TEXT pet_name[MAX_NLEN];
 
        for (i = m_max - 1; i >= 1; i--)
        {
@@ -4264,7 +4236,7 @@ static void dump_aux_class_special(FILE *fff)
                int l2 = 0;
                int num = 0;
                int spellnum[MAX_MONSPELLS];
-               s32b f4 = 0, f5 = 0, f6 = 0;
+               BIT_FLAGS f4 = 0, f5 = 0, f6 = 0;
                char p[60][80];
                int col = 0;
                bool pcol = FALSE;
@@ -4363,7 +4335,7 @@ static void dump_aux_class_special(FILE *fff)
        else if (p_ptr->pclass == CLASS_MAGIC_EATER)
        {
                char s[EATER_EXT][MAX_NLEN];
-               OBJECT_TYPE_VALUE tval;
+               OBJECT_TYPE_VALUE tval = 0;
                int ext;
                KIND_OBJECT_IDX k_idx;
                OBJECT_SUBTYPE_VALUE i;
@@ -4834,7 +4806,7 @@ static void dump_aux_virtues(FILE *fff)
                else fprintf(fff, "Your current Life Rating is ???.\n\n");
                fprintf(fff, "Limits of maximum stats\n");
 #endif
-               for (v_nr = 0; v_nr < 6; v_nr++)
+               for (v_nr = 0; v_nr < A_MAX; v_nr++)
                {
                        if ((p_ptr->knowledge & KNOW_STAT) || p_ptr->stat_max[v_nr] == p_ptr->stat_max_max[v_nr]) fprintf(fff, "%s 18/%d\n", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
                        else fprintf(fff, "%s ???\n", stat_names[v_nr]);
@@ -4869,7 +4841,7 @@ static void dump_aux_mutations(FILE *fff)
 static void dump_aux_equipment_inventory(FILE *fff)
 {
        int i;
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
 
        /* Dump the equipment */
        if (equip_cnt)
@@ -4912,7 +4884,7 @@ static void dump_aux_equipment_inventory(FILE *fff)
  */
 static void dump_aux_home_museum(FILE *fff)
 {
-       char o_name[MAX_NLEN];
+       GAME_TEXT o_name[MAX_NLEN];
        store_type  *st_ptr;
 
        /* Do we need it?? */
@@ -5020,10 +4992,10 @@ errr make_character_dump(FILE *fff)
  * @param name 出力ファイル名
  * @return エラーコード
  * @details
- * XXX XXX XXX Allow the "full" flag to dump additional info,
+ * Allow the "full" flag to dump additional info,
  * and trigger its usage from various places in the code.
  */
-errr file_character(cptr name)
+errr file_character(concptr name)
 {
        int             fd = -1;
        FILE            *fff = NULL;
@@ -5042,8 +5014,6 @@ errr file_character(cptr name)
        if (fd >= 0)
        {
                char out_val[160];
-
-               /* Close the file */
                (void)fd_close(fd);
 
                /* Build query */
@@ -5097,7 +5067,7 @@ errr file_character(cptr name)
  * You can use any single character in place of the "|".
  * </pre>
  */
-static void show_file_aux_line(cptr str, int cy, cptr shower)
+static void show_file_aux_line(concptr str, int cy, concptr shower)
 {
        static const char tag_str[] = "[[[[";
        byte color = TERM_WHITE;
@@ -5122,7 +5092,7 @@ static void show_file_aux_line(cptr str, int cy, cptr shower)
                int showercol = len + 1;
                int bracketcol = len + 1;
                int endcol = len;
-               cptr ptr;
+               concptr ptr;
 
                /* Search for a shower string in the line */
                if (shower)
@@ -5226,7 +5196,7 @@ static void show_file_aux_line(cptr str, int cy, cptr shower)
  * Return FALSE on 'q' to exit from a deep, otherwise TRUE.
  * </pre>
  */
-bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode)
+bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAGS mode)
 {
        int i, n, skey;
 
@@ -5246,10 +5216,10 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
        FILE *fff = NULL;
 
        /* Find this string (if any) */
-       cptr find = NULL;
+       concptr find = NULL;
 
        /* Jump to this tag */
-       cptr tag = NULL;
+       concptr tag = NULL;
 
        /* Hold strings to find/show */
        char finder_str[81];
@@ -5257,7 +5227,7 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
        char back_str[81];
 
        /* String to show */
-       cptr shower = NULL;
+       concptr shower = NULL;
 
        /* Filename */
        char filename[1024];
@@ -5315,7 +5285,7 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
        /* Redirect the name */
        name = filename;
 
-       /* Hack XXX XXX XXX */
+       /* Hack */
        if (what)
        {
                /* Caption */
@@ -5371,13 +5341,11 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                fff = my_fopen(path, "r");
        }
 
-       /* Oops */
        if (!fff)
        {
                msg_format(_("'%s'をオープンできません。", "Cannot open '%s'."), name);
                msg_print(NULL);
 
-               /* Oops */
                return (TRUE);
        }
 
@@ -5436,8 +5404,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
 
        /* start from bottom when reverse mode */
        if (line == -1) line = ((size-1)/rows)*rows;
-
-       /* Clear screen */
        Term_clear();
 
        /* Display the file */
@@ -5456,7 +5422,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                        /* Hack -- Re-Open the file */
                        fff = my_fopen(path, "r");
 
-                       /* Oops */
                        if (!fff) return (FALSE);
 
                        /* File has been restarted */
@@ -5479,7 +5444,7 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                /* Dump the next 20, or rows, lines of the file */
                for (i = 0; i < rows; )
                {
-                       cptr str = buf;
+                       concptr str = buf;
 
                        /* Hack -- track the "first" line */
                        if (!i) line = next;
@@ -5742,7 +5707,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
 
                        ffp = my_fopen(buff, "w");
 
-                       /* Oops */
                        if (!(fff && ffp))
                        {
                                msg_print(_("ファイルを開けません。", "Failed to open file."));
@@ -5774,8 +5738,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
                /* Exit on the q key */
                if (skey == 'q') break;
        }
-
-       /* Close the file */
        my_fclose(fff);
 
        /* Escape */
@@ -5794,13 +5756,10 @@ bool show_file(bool show_version, cptr name, cptr what, int line, BIT_FLAGS mode
  */
 void do_cmd_help(void)
 {
-       /* Save screen */
        screen_save();
 
        /* Peruse the main help file */
        (void)show_file(TRUE, _("jhelp.hlp", "help.hlp"), NULL, 0, 0);
-
-       /* Load screen */
        screen_load();
 }
 
@@ -5920,11 +5879,11 @@ void process_player_name(bool sf)
 #endif
        if (!savefile_base[0] && savefile[0])
        {
-               cptr s;
+               concptr s;
                s = savefile;
                while (1)
                {
-                       cptr t;
+                       concptr t;
                        t = my_strstr(s, PATH_SEP);
                        if (!t)
                                break;
@@ -5972,7 +5931,7 @@ void process_player_name(bool sf)
  * Assumes that "display_player(0)" has just been called
  * Perhaps we should NOT ask for a name (at "birth()") on
  * Unix machines?  XXX XXX
- * What a horrible name for a global function.  XXX XXX XXX
+ * What a horrible name for a global function.  
  * </pre>
  */
 void get_name(void)
@@ -6114,19 +6073,15 @@ void do_cmd_save_game(int is_autosave)
        }
        else
        {
-               /* Disturb the player */
-               disturb(1, 1);
+               disturb(TRUE, TRUE);
        }
 
        /* Clear messages */
        msg_print(NULL);
-
-       /* Handle stuff */
        handle_stuff();
 
        prt(_("ゲームをセーブしています...", "Saving game..."), 0, 0);
 
-       /* Refresh */
        Term_fresh();
 
        /* The player is not dead */
@@ -6150,7 +6105,6 @@ void do_cmd_save_game(int is_autosave)
        /* Allow suspend again */
        signals_handle_tstp();
 
-       /* Refresh */
        Term_fresh();
 
        /* Note that the player is not dead */
@@ -6159,8 +6113,7 @@ void do_cmd_save_game(int is_autosave)
        /* HACK -- don't get sanity blast on updating view */
        is_loading_now = FALSE;
 
-       /* Update stuff */
-       update_stuff();
+       update_creature(p_ptr);
 
        /* Initialize monster process */
        mproc_init();
@@ -6258,7 +6211,7 @@ long total_points(void)
  * @return なし
  * @details
  */
-static void center_string(char *buf, cptr str)
+static void center_string(char *buf, concptr str)
 {
        int i, j;
 
@@ -6299,7 +6252,7 @@ static void make_bones(void)
                {
                        char tmp[128];
 
-                       /* XXX XXX XXX "Bones" name */
+                       /* "Bones" name */
                        sprintf(tmp, "bone.%03d", dun_level);
 
                        /* Build the filename */
@@ -6368,7 +6321,7 @@ static void print_tomb(void)
        /* Print the text-tombstone */
        if (!done)
        {
-               cptr   p;
+               concptr   p;
                char   tmp[160];
                char   buf[1024];
                char   dummy[80];
@@ -6378,8 +6331,6 @@ static void print_tomb(void)
 #ifdef JP
                int    extra_line = 0;
 #endif
-
-               /* Clear screen */
                Term_clear();
 
                /* Build the filename */
@@ -6507,7 +6458,7 @@ static void print_tomb(void)
                {
                        if (dun_level == 0)
                        {
-                               cptr field_name = p_ptr->town_num ? "街" : "荒野";
+                               concptr field_name = p_ptr->town_num ? "街" : "荒野";
                                if (streq(p_ptr->died_from, "途中終了"))
                                {
                                        sprintf(tmp, "%sで死んだ", field_name);
@@ -6605,15 +6556,12 @@ static void show_info(void)
 
        /* Hack -- Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
 
        /* Flush all input keys */
        flush();
 
-       /* Flush messages */
-       msg_print(NULL);
+       msg_erase();
 
 
        /* Describe options */
@@ -6636,20 +6584,14 @@ static void show_info(void)
 
                /* Return means "show on screen" */
                if (!out_val[0]) break;
-
-               /* Save screen */
                screen_save();
 
                /* Dump a character file */
                (void)file_character(out_val);
-
-               /* Load screen */
                screen_load();
        }
 
        update_playtime();
-
-       /* Display player */
        display_player(0);
 
        /* Prompt for inventory */
@@ -6665,8 +6607,7 @@ static void show_info(void)
        if (equip_cnt)
        {
                Term_clear();
-               item_tester_full = TRUE;
-               (void)show_equip(0);
+               (void)show_equip(0, USE_FULL);
                prt(_("装備していたアイテム: -続く-", "You are using: -more-"), 0, 0);
 
                if (inkey() == ESCAPE) return;
@@ -6676,8 +6617,7 @@ static void show_info(void)
        if (inven_cnt)
        {
                Term_clear();
-               item_tester_full = TRUE;
-               (void)show_inven(0);
+               (void)show_inven(0, USE_FULL);
                prt(_("持っていたアイテム: -続く-", "You are carrying: -more-"), 0, 0);
 
                if (inkey() == ESCAPE) return;
@@ -6694,13 +6634,12 @@ static void show_info(void)
                        /* Display contents of the home */
                        for (k = 0, i = 0; i < st_ptr->stock_num; k++)
                        {
-                               /* Clear screen */
                                Term_clear();
 
                                /* Show 12 items */
                                for (j = 0; (j < 12) && (i < st_ptr->stock_num); j++, i++)
                                {
-                                       char o_name[MAX_NLEN];
+                                       GAME_TEXT o_name[MAX_NLEN];
                                        char tmp_val[80];
 
                                        /* Acquire item */
@@ -6732,7 +6671,6 @@ static void show_info(void)
  */
 static bool check_score(void)
 {
-       /* Clear screen */
        Term_clear();
 
        /* No score file */
@@ -6805,9 +6743,7 @@ void close_game(void)
        char buf[1024];
        bool do_send = TRUE;
 
-/*     cptr p = "[i:キャラクタの情報, f:ファイル書き出し, t:スコア, x:*鑑定*, ESC:ゲーム終了]"; */
-
-       /* Handle stuff */
+/*     concptr p = "[i:キャラクタの情報, f:ファイル書き出し, t:スコア, x:*鑑定*, ESC:ゲーム終了]"; */
        handle_stuff();
 
        /* Flush the messages */
@@ -6857,8 +6793,6 @@ void close_game(void)
 
                /* Show more info */
                show_info();
-
-               /* Clear screen */
                Term_clear();
 
                if (check_score())
@@ -6892,7 +6826,7 @@ void close_game(void)
                /* Save the game */
                do_cmd_save_game(FALSE);
 
-               /* Prompt for scores XXX XXX XXX */
+               /* Prompt for scores */
                prt(_("リターンキーか ESC キーを押して下さい。", "Press Return (or Escape)."), 0, 40);
                play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_EXIT);
 
@@ -6939,7 +6873,7 @@ void exit_game_panic(void)
        prt("", 0, 0);
 
        /* Hack -- turn off some things */
-       disturb(1, 1);
+       disturb(TRUE, TRUE);
 
        /* Mega-Hack -- Delay death */
        if (p_ptr->chp < 0) p_ptr->is_dead = FALSE;
@@ -6973,7 +6907,7 @@ void exit_game_panic(void)
  * Based on the monster speech patch by Matt Graham,
  * </pre>
  */
-errr get_rnd_line(cptr file_name, int entry, char *output)
+errr get_rnd_line(concptr file_name, int entry, char *output)
 {
        FILE    *fp;
        char    buf[1024];
@@ -7065,8 +6999,6 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
                /* Copy the line */
                if (one_in_(counter + 1)) strcpy(output, buf);
        }
-
-       /* Close the file */
        my_fclose(fp);
 
        /* Success */
@@ -7084,7 +7016,7 @@ errr get_rnd_line(cptr file_name, int entry, char *output)
  * @return エラーコード
  * @details
  */
-errr get_rnd_line_jonly(cptr file_name, int entry, char *output, int count)
+errr get_rnd_line_jonly(concptr file_name, int entry, char *output, int count)
 {
        int  i, j, kanji;
        errr result = 1;
@@ -7106,7 +7038,7 @@ errr get_rnd_line_jonly(cptr file_name, int entry, char *output, int count)
  * @param name ファイル名
  * @details
  */
-errr process_autopick_file(cptr name)
+errr process_autopick_file(concptr name)
 {
        char buf[1024];
 
@@ -7116,8 +7048,6 @@ errr process_autopick_file(cptr name)
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
        err = process_pref_file_aux(buf, PREF_TYPE_AUTOPICK);
-
-       /* Result */
        return (err);
 }
 
@@ -7129,7 +7059,7 @@ errr process_autopick_file(cptr name)
  * @return エラーコード
  * @details
  */
-errr process_histpref_file(cptr name)
+errr process_histpref_file(concptr name)
 {
        char buf[1024];
        errr err = 0;
@@ -7144,8 +7074,6 @@ errr process_histpref_file(cptr name)
        err = process_pref_file_aux(buf, PREF_TYPE_HISTPREF);
 
        character_xtra = old_character_xtra;
-
-       /* Result */
        return (err);
 }
 
@@ -7418,7 +7346,6 @@ static void handle_signal_simple(int sig)
                /* Display the cause */
                Term_putstr(0, 0, -1, TERM_WHITE, _("熟慮の上の自殺!", "Contemplating suicide!"));
 
-               /* Flush */
                Term_fresh();
        }