OSDN Git Service

半角カタカナの判定に unsigned charでも signed char でも正しく動くiskana()を使用。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 13 Oct 2003 01:48:59 +0000 (01:48 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 13 Oct 2003 01:48:59 +0000 (01:48 +0000)
src/autopick.c
src/util.c

index 9ed9d60..de6dd9b 100644 (file)
@@ -3290,9 +3290,8 @@ static byte get_string_for_search(object_type **o_handle, cptr *search_strp)
                        else
 #endif
                        {
-#ifdef SJIS
-                               if (pos < len &&
-                                   (isprint(c) || (0xa0 <= c && c <= 0xdf)))
+#ifdef JP
+                               if (pos < len && (isprint(c) || iskana(c)))
 #else
                                if (pos < len && isprint(c))
 #endif
index 67db09f..f167b92 100644 (file)
@@ -3327,9 +3327,8 @@ bool askfor_aux(char *buf, int len)
                        else
 #endif
                        {
-#ifdef SJIS
-                               if (pos < len &&
-                                   (isprint(c) || (0xa0 <= c && c <= 0xdf)))
+#ifdef JP
+                               if (pos < len && (isprint(c) || iskana(c)))
 #else
                                if (pos < len && isprint(c))
 #endif