OSDN Git Service

[Refactor] #39076 冗長なコメントを削除 (/* Build the filename */)
authordeskull <deskull@users.sourceforge.jp>
Mon, 17 Jun 2019 14:11:03 +0000 (23:11 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 17 Jun 2019 14:11:03 +0000 (23:11 +0900)
src/autopick.c
src/cmd-dump.c
src/cmd-read.c
src/core.c
src/dungeon-file.c
src/files.c
src/init.c
src/main-win.c
src/scores.c
src/wizard1.c
src/wizard2.c

index 3487659..f688d83 100644 (file)
@@ -2903,8 +2903,6 @@ static bool write_text_lines(concptr filename, concptr *lines_list)
 
        int lines = 0;
        char buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, filename);
        
        /* Open the file */
index c07d785..126459f 100644 (file)
@@ -438,8 +438,6 @@ errr do_cmd_write_nikki(int type, int num, concptr note)
 
        /* different filne name to avoid mixing */
        sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base);
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name);
 
        /* File type is "TEXT" */
@@ -831,8 +829,6 @@ static void do_cmd_disp_nikki(void)
                                           "Quest of The World's Greatest Brain"};
 #endif
        sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base);
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name);
 
        if (p_ptr->pclass == CLASS_WARRIOR || p_ptr->pclass == CLASS_MONK || p_ptr->pclass == CLASS_SAMURAI || p_ptr->pclass == CLASS_BERSERKER)
@@ -901,8 +897,6 @@ static void do_cmd_erase_nikki(void)
 
        if (!get_check(_("本当に記録を消去しますか?", "Do you really want to delete all your record? "))) return;
                sprintf(file_name,_("playrecord-%s.txt", "playrec-%s.txt"),savefile_base);
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name);
        fd_kill(buf);
 
@@ -1400,8 +1394,6 @@ static errr macro_dump(concptr fname)
        int i;
 
        char buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -1556,8 +1548,6 @@ static errr keymap_dump(concptr fname)
                mode = KEYMAP_MODE_ORIG;
        }
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -2154,8 +2144,6 @@ void do_cmd_visuals(void)
 
                        /* Get a filename */
                        if (!askfor(tmp, 70)) continue;
-
-                       /* Build the filename */
                        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
 
                        /* Append to the file */
@@ -2205,8 +2193,6 @@ void do_cmd_visuals(void)
 
                        /* Get a filename */
                        if (!askfor(tmp, 70)) continue;
-
-                       /* Build the filename */
                        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
 
                        /* Append to the file */
@@ -2272,8 +2258,6 @@ void do_cmd_visuals(void)
 
                        /* Get a filename */
                        if (!askfor(tmp, 70)) continue;
-
-                       /* Build the filename */
                        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
 
                        /* Append to the file */
@@ -2728,8 +2712,6 @@ void do_cmd_colors(void)
 
                        /* Get a filename */
                        if (!askfor(tmp, 70)) continue;
-
-                       /* Build the filename */
                        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
 
                        /* Append to the file */
@@ -3619,8 +3601,6 @@ void do_cmd_load_screen(void)
        TERM_LEN wid, hgt;
 
        Term_get_size(&wid, &hgt);
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "dump.txt");
 
        /* Append to the file */
@@ -3924,8 +3904,6 @@ void do_cmd_save_screen_html_aux(char *filename, int message)
                return;
        }
        if (message) screen_save();
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "htmldump.prf");
        tmpfff = my_fopen(buf, "r");
        if (!tmpfff) {
@@ -4032,8 +4010,6 @@ static void do_cmd_save_screen_html(void)
 
        if (!get_string(_("ファイル名: ", "File name: "), tmp, 80))
                return;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, tmp);
 
        msg_print(NULL);
@@ -4105,8 +4081,6 @@ void do_cmd_save_screen(void)
                SYMBOL_CODE c = ' ';
                FILE *fff;
                char buf[1024];
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "dump.txt");
 
                /* File type is "TEXT" */
index fc1be77..3265455 100644 (file)
@@ -556,8 +556,6 @@ void exe_read(INVENTORY_IDX item, bool known)
 
                /* Display object description */
                object_desc(o_name, o_ptr, OD_NAME_ONLY);
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, q);
 
                /* Peruse the help file */
index a5dd42e..87c8203 100644 (file)
@@ -5314,8 +5314,6 @@ void play_game(bool new_game)
                
                /* Hack -- Character is now "icky" */
                current_world_ptr->character_icky = TRUE;
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
                /* Open the high score file, for reading/writing */
@@ -5783,8 +5781,6 @@ void close_game(void)
        /* Hack -- Character is now "icky" */
        current_world_ptr->character_icky = TRUE;
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
        /* Grab permissions */
index cecbeb4..4bae064 100644 (file)
@@ -4917,8 +4917,6 @@ errr process_dungeon_file(concptr name, int ymin, int xmin, int ymax, int xmax)
        bool bypass = FALSE;
        int x = xmin, y = ymin;
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, name);
 
        /* Open the file */
index 379e61b..be6dd7c 100644 (file)
@@ -1274,8 +1274,6 @@ errr process_pref_file(concptr name)
        char buf[1024];
 
        errr err1, err2;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_PREF, name);
 
        /* Process the system pref file */
@@ -1284,8 +1282,6 @@ errr process_pref_file(concptr name)
        /* Stop at parser errors, but not at non-existing file */
        if (err1 > 0) return err1;
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
        
        /* Process the user pref file */
@@ -1370,8 +1366,6 @@ errr check_time_init(void)
 
        char    buf[1024];
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "time.txt");
 
        /* Open the file */
@@ -1496,8 +1490,6 @@ errr check_load_init(void)
        char    temphost[MAXHOSTNAMELEN+1];
        char    thishost[MAXHOSTNAMELEN+1];
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, "load.txt");
 
        /* Open the "load" file */
@@ -5051,8 +5043,6 @@ errr file_character(concptr name)
        int             fd = -1;
        FILE            *fff = NULL;
        char            buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
        /* File type is "TEXT" */
@@ -5352,8 +5342,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
        {
                /* Caption */
                sprintf(caption, _("ヘルプ・ファイル'%s'", "Help file '%s'"), name);
-
-               /* Build the filename */
                path_build(path, sizeof(path), ANGBAND_DIR_HELP, name);
 
                /* Open the file */
@@ -5365,8 +5353,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
        {
                /* Caption */
                sprintf(caption, _("スポイラー・ファイル'%s'", "Info file '%s'"), name);
-
-               /* Build the filename */
                path_build(path, sizeof(path), ANGBAND_DIR_INFO, name);
 
                /* Open the file */
@@ -5376,7 +5362,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
        /* Look in "info" */
        if (!fff)
        {
-               /* Build the filename */
                path_build(path, sizeof(path), ANGBAND_DIR, name);
 
                for (i = 0; path[i]; i++)
@@ -5744,8 +5729,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
 
                        if (!get_string(_("ファイル名: ", "File name: "), xtmp, 80)) continue;
                        my_fclose(fff);
-
-                       /* Build the filename */
                        path_build(buff, sizeof(buff), ANGBAND_DIR_USER, xtmp);
 
                        /* Hack -- Re-Open the file */
@@ -5953,8 +5936,6 @@ void process_player_name(bool sf)
                /* Rename the savefile, using the p_ptr->base_name */
                (void)sprintf(temp, "%s", p_ptr->base_name);
 #endif
-
-               /* Build the filename */
                path_build(savefile, sizeof(savefile), ANGBAND_DIR_SAVE, temp);
        }
 
@@ -6148,8 +6129,6 @@ static void make_bones(void)
 
                        /* "Bones" name */
                        sprintf(tmp, "bone.%03d", current_floor_ptr->dun_level);
-
-                       /* Build the filename */
                        path_build(str, sizeof(str), ANGBAND_DIR_BONE, tmp);
 
                        /* Attempt to open the bones file */
@@ -6226,8 +6205,6 @@ void print_tomb(void)
                int    extra_line = 0;
 #endif
                Term_clear();
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("dead_j.txt", "dead.txt"));
 
                /* Open the News file */
@@ -6620,8 +6597,6 @@ errr get_rnd_line(concptr file_name, int entry, char *output)
        int     counter, test;
        int     line_num = 0;
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, file_name);
 
        /* Open the file */
@@ -6749,8 +6724,6 @@ errr process_autopick_file(concptr name)
        char buf[1024];
 
        errr err = 0;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
        err = process_pref_file_aux(buf, PREF_TYPE_AUTOPICK);
@@ -6770,8 +6743,6 @@ errr process_histpref_file(concptr name)
        char buf[1024];
        errr err = 0;
        bool old_character_xtra = current_world_ptr->character_xtra;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
        /* Hack -- prevent modification birth options in this file */
index 0db5277..95e9671 100644 (file)
@@ -312,8 +312,6 @@ static errr check_modification_date(int fd, concptr template_file)
        char buf[1024];
 
        struct stat txt_stat, raw_stat;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, template_file);
 
        /* Access stats on text file */
@@ -477,8 +475,6 @@ static errr init_info(concptr filename, header *head,
 #ifdef ALLOW_TEMPLATES
 
        /*** Load the binary image file ***/
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
 
 
@@ -521,8 +517,6 @@ static errr init_info(concptr filename, header *head,
 
                /*** Load the ascii template file ***/
 
-               /* Build the filename */
-
                path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, format("%s.txt", filename));
 
                /* Open the file */
@@ -579,8 +573,6 @@ static errr init_info(concptr filename, header *head,
 
                /* File type is "DATA" */
                FILE_TYPE(FILE_TYPE_DATA);
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
 
 
@@ -633,8 +625,6 @@ static errr init_info(concptr filename, header *head,
 
 
                /*** Load the binary image file ***/
-
-               /* Build the filename */
                path_build(buf, sizeof(buf), ANGBAND_DIR_DATA, format(_("%s_j.raw", "%s.raw"), filename));
 
                /* Attempt to open the "raw" file */
@@ -1728,8 +1718,6 @@ void init_angband(void)
 
 
        /*** Verify the "news" file ***/
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
 
        /* Attempt to open the file */
@@ -1750,8 +1738,6 @@ void init_angband(void)
 
        /*** Display the "news" file ***/
        Term_clear();
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
 
        /* Open the News file */
@@ -1778,8 +1764,6 @@ void init_angband(void)
 
 
        /*** Verify (or create) the "high score" file ***/
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
        /* Attempt to open the high score file */
index 964a818..245beef 100644 (file)
@@ -3982,8 +3982,6 @@ static void process_menus(WORD wCmd)
                case IDM_FILE_SCORE:
                {
                        char buf[1024];
-
-                       /* Build the filename */
                        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
                        /* Open the binary high score file, for reading */
@@ -5590,8 +5588,6 @@ static void init_stuff(void)
        validate_dir(ANGBAND_DIR_SAVE, FALSE);
        validate_dir(ANGBAND_DIR_USER, TRUE);
        validate_dir(ANGBAND_DIR_XTRA, TRUE);
-
-       /* Build the filename */
        path_build(path, sizeof(path), ANGBAND_DIR_FILE, _("news_j.txt", "news.txt"));
 
        /* Hack -- Validate the "news.txt" file */
@@ -5607,8 +5603,6 @@ static void init_stuff(void)
 
        /* Validate the "font" directory */
        validate_dir(ANGBAND_DIR_XTRA_FONT, TRUE);
-
-       /* Build the filename */
        path_build(path, sizeof(path), ANGBAND_DIR_XTRA_FONT, "8X13.FON");
 
        /* Hack -- Validate the basic font */
index 1626e70..a15b120 100644 (file)
@@ -407,8 +407,6 @@ void display_scores_aux(int from, int to, int note, high_score *score)
 void display_scores(int from, int to)
 {
        char buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
        /* Open the binary high score file, for reading */
@@ -688,8 +686,6 @@ void show_highclass(void)
        char buf[1024], out_val[256];
 
        screen_save();
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
        highscore_fd = fd_open(buf, O_RDONLY);
@@ -769,8 +765,6 @@ void race_score(int race_num)
        sprintf(tmp_str,_("最高の%s", "The Greatest of all the %s"), race_info[race_num].title);
 
        prt(tmp_str, 5, 15);
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
 
        highscore_fd = fd_open(buf, O_RDONLY);
index 0233f1f..79c7b34 100644 (file)
@@ -311,8 +311,6 @@ static void spoil_obj_desc(concptr fname)
        char chance[80];
        char dam[80];
 
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -1606,8 +1604,6 @@ static void spoil_artifact(concptr fname)
        object_type *q_ptr;
        obj_desc_list artifact;
        char buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -1690,8 +1686,6 @@ static void spoil_mon_desc(concptr fname)
        char ac[80];
        char hp[80];
        char exp[80];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -2024,8 +2018,6 @@ static void spoil_mon_info(concptr fname)
 
        u16b why = 2;
        MONRACE_IDX *who;
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -2232,8 +2224,6 @@ static void spoil_mon_evol(concptr fname)
        monster_race *r_ptr;
        int **evol_tree, i, j, n, r_idx;
        int *evol_tree_zero; /* For C_KILL() */
-
-       /* Build the filename */
        path_build(buf, sizeof buf, ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
@@ -2530,8 +2520,6 @@ void spoil_random_artifact(concptr fname)
        object_type *q_ptr;
 
        char buf[1024];
-
-       /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
 
        /* File type is "TEXT" */
index 515df08..d09876e 100644 (file)
@@ -1590,8 +1590,6 @@ static void do_cmd_dump_options(void)
        FILE *fff;
        char buf[1024];
        int  **exist;
-
-       /* Build the filename */
        path_build(buf, sizeof buf, ANGBAND_DIR_USER, "opt_info.txt");
 
        /* File type is "TEXT" */