From: nothere Date: Sun, 14 Dec 2003 16:51:25 +0000 (+0000) Subject: 1.174の警告除去で "倒したユニーク数が10体以下の時ランキングがダンプに X-Git-Tag: v2.1.2~718 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cb3158ebcf2c10d15aef08cc29b6e507dcd3cd98;p=hengbandforosx%2Fhengbandosx.git 1.174の警告除去で "倒したユニーク数が10体以下の時ランキングがダンプに 載らない" というバグを修正していたことに関連し, モンスター数のデータ 型をunsigned longからlongに直した. --- diff --git a/src/files.c b/src/files.c index ae6e75152..25007aa87 100644 --- a/src/files.c +++ b/src/files.c @@ -4593,8 +4593,8 @@ static void dump_aux_monsters(FILE *fff) /* Monsters slain */ int k; - unsigned long uniq_total = 0; - unsigned long norm_total = 0; + long uniq_total = 0; + long norm_total = 0; s16b *who; /* Sort by monster level */ @@ -4655,9 +4655,9 @@ static void dump_aux_monsters(FILE *fff) else if (uniq_total == 0) { #ifdef JP - fprintf(fff,"%luÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", norm_total); + fprintf(fff,"%ldÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", norm_total); #else - fprintf(fff,"You have defeated %lu %s.\n", norm_total, norm_total == 1 ? "enemy" : "enemies"); + fprintf(fff,"You have defeated %ld %s.\n", norm_total, norm_total == 1 ? "enemy" : "enemies"); #endif } @@ -4665,9 +4665,9 @@ static void dump_aux_monsters(FILE *fff) else /* if (uniq_total > 0) */ { #ifdef JP - fprintf(fff, "%luÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ò´Þ¤à¡¢¹ç·×%luÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", uniq_total, norm_total); + fprintf(fff, "%ldÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ò´Þ¤à¡¢¹ç·×%ldÂΤÎŨ¤òÅݤ·¤Æ¤¤¤Þ¤¹¡£\n", uniq_total, norm_total); #else - fprintf(fff, "You have defeated %lu %s including %lu unique monster%s in total.\n", norm_total, norm_total == 1 ? "enemy" : "enemies", uniq_total, (uniq_total == 1 ? "" : "s")); + fprintf(fff, "You have defeated %ld %s including %ld unique monster%s in total.\n", norm_total, norm_total == 1 ? "enemy" : "enemies", uniq_total, (uniq_total == 1 ? "" : "s")); #endif @@ -4679,13 +4679,13 @@ static void dump_aux_monsters(FILE *fff) ang_sort(who, &why, uniq_total); #ifdef JP - fprintf(fff, "\n¡Ô¾å°Ì%luÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¡Õ\n", MIN(uniq_total, 10)); + fprintf(fff, "\n¡Ô¾å°Ì%ldÂΤΥæ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¡Õ\n", MIN(uniq_total, 10)); #else - fprintf(fff, "\n< Unique monsters top %lu >\n", MIN(uniq_total, 10)); + fprintf(fff, "\n< Unique monsters top %ld >\n", MIN(uniq_total, 10)); #endif /* Print top 10 */ - for (k = uniq_total - 1; k >= 0 && k >= (long)uniq_total - 10; k--) + for (k = uniq_total - 1; k >= 0 && k >= uniq_total - 10; k--) { monster_race *r_ptr = &r_info[who[k]];