OSDN Git Service

1.86の修正が日本語版にも影響し, 思い出テキスト中に余分な空白が混入し
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 24 Jan 2004 13:29:42 +0000 (13:29 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 24 Jan 2004 13:29:42 +0000 (13:29 +0000)
て文章がずれていたバグを修正. 日本語版では構築済みテキスト文末と新規
テキスト文頭のどちらかが日本語であれば空白追加処理を行わないように修
正. なお, lib/data/r_info_j.rawは自動更新されないので, 手動で削除する
必要がある.

src/init1.c

index d6e8591..d8d3a09 100644 (file)
@@ -879,8 +879,15 @@ static bool add_text(u32b *offset, header *head, cptr buf)
                 * fill up a space as a correct separator of two words.
                 */
                if (head->text_size > 0 &&
-                   *(head->text_ptr + head->text_size - 1) != ' ' &&
-                   buf[0] != ' ')
+#ifdef JP
+                   (*(head->text_ptr + head->text_size - 1) != ' ') &&
+                   ((head->text_size == 1) || !iskanji(*(head->text_ptr + head->text_size - 2))) && 
+                   (buf[0] != ' ') && !iskanji(buf[0])
+#else
+                   (*(head->text_ptr + head->text_size - 1) != ' ') &&
+                   (buf[0] != ' ')
+#endif
+                   )
                {
                        /* Append a space */
                        *(head->text_ptr + head->text_size) = ' ';