OSDN Git Service

UTF-8化に伴った英語版のバグを修正。 / Fix bugs of English version for management of UTF-8.
authorDeskull <desull@users.sourceforge.jp>
Sun, 1 May 2016 12:37:42 +0000 (21:37 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 1 May 2016 12:37:42 +0000 (21:37 +0900)
src/chuukei.c
src/cmd4.c
src/grid.c
src/util.c

index 4916603..0aba397 100644 (file)
@@ -544,7 +544,7 @@ static errr send_text_to_chuukei_server(int x, int y, int len, byte col, cptr st
        }
        else
        {
-#ifdef SJIS
+#if defined(SJIS) && defined(JP)
                sjis2euc(buf2);
 #endif
                sprintf(buf, "t%c%c%c%c%s", x+1, y+1, len, col, buf2);
@@ -952,7 +952,7 @@ static bool flush_ringbuf_client(void)
                switch (id)
                {
                case 't': /* 通常 */
-#ifdef SJIS
+#if defined(SJIS) && defined(JP)
                        euc2sjis(mesg);
 #endif
                        update_term_size(x, y, len);
index 52e31ea..b87e363 100644 (file)
@@ -502,13 +502,17 @@ errr do_cmd_write_nikki(int type, int num, cptr note)
                case NIKKI_MAXDEAPTH:
                {
                        fprintf(fff, _(" %2d:%02d %20s %sの最深階%d階に到達した。\n",
-                                                  " %2d:%02d %20s reached level %d of %s for the first time.\n"), hour, min, note_level, d_name+d_info[dungeon_type].name, num);
+                                                  " %2d:%02d %20s reached level %d of %s for the first time.\n"), hour, min, note_level,
+                                                  _(d_name+d_info[dungeon_type].namem, num),
+                                                  _(num, d_name+d_info[dungeon_type].name));
                        break;
                }
                case NIKKI_TRUMP:
                {
                        fprintf(fff, _(" %2d:%02d %20s %s%sの最深階を%d階にセットした。\n",
-                                                  " %2d:%02d %20s reset recall level of %s to %d %s.\n"), hour, min, note_level, note, d_name + d_info[num].name, max_dlv[num]);
+                                                  " %2d:%02d %20s reset recall level of %s to %d %s.\n"), hour, min, note_level, note,
+                                                  _(d_name + d_info[num].name, max_dlv[num]),
+                                                  _(max_dlv[num], d_name + d_info[num].name));
                        break;
                }
                case NIKKI_STAIR:
index 5b5f9de..125975a 100644 (file)
@@ -1104,7 +1104,7 @@ static void short_seg_hack(int x1, int y1, int x2, int y2, int type, int count,
 /*!
  * @brief 特定の壁(永久壁など)を避けながら部屋間の通路を作成する / This routine maps a path from (x1, y1) to (x2, y2) avoiding SOLID walls.
  * @return なし
- * @todo 詳細調査
+ * @todo 詳細調査
  * @details
  * Permanent rock is ignored in this path finding- sometimes there is no\n
  * path around anyway -so there will be a crash if we try to find one.\n
@@ -1136,8 +1136,6 @@ bool build_tunnel2(int x1, int y1, int x2, int y2, int type, int cutoff)
 
                /* perturbation perpendicular to path */
                changex = (randint0(abs(dy) + 2) * 2 - abs(dy) - 1) / 2;
-
-               /* perturbation perpendicular to path */
                changey = (randint0(abs(dx) + 2) * 2 - abs(dx) - 1) / 2;
 
                /* Work out "mid" ponit */
index ba035e9..446b7e0 100644 (file)
@@ -503,7 +503,7 @@ errr my_fgets(FILE *fff, char *buf, huge n)
                        }
 #endif
                        /* Handle printables */
-                       else if (isprint(*s))
+                       else if (isprint((unsigned char)*s))
                        {
                                /* Copy */
                                buf[i++] = *s;