galat****@lists*****
galat****@lists*****
2006年 10月 27日 (金) 09:49:44 JST
Index: gtalk/strings_eucjp.h diff -u gtalk/strings_eucjp.h:1.3 gtalk/strings_eucjp.h:1.4 --- gtalk/strings_eucjp.h:1.3 Thu Oct 19 12:27:08 2006 +++ gtalk/strings_eucjp.h Fri Oct 27 09:49:44 2006 @@ -1,4 +1,4 @@ -/* $Id: strings_eucjp.h,v 1.3 2006/10/19 03:27:08 sako Exp $ */ +/* $Id: strings_eucjp.h,v 1.4 2006/10/27 00:49:44 sako Exp $ */ #define TOKEN_MEISHI "名詞" #define TOKEN_DOUSHI "動詞" #define TOKEN_KEIYOUSHI "形容詞" @@ -100,3 +100,4 @@ #define ZENKAKU_ALPHABET_SECOND_BYTE_MAX 0xFA #define ACCENT_MARK "’" +#define is_ZENKAKU_ALPNUM(x,y) ((x) == ZENKAKU_ALPHABET_FIRST_BYTE) Index: gtalk/strings_sjis.h diff -u gtalk/strings_sjis.h:1.3 gtalk/strings_sjis.h:1.4 --- gtalk/strings_sjis.h:1.3 Thu Oct 19 12:27:08 2006 +++ gtalk/strings_sjis.h Fri Oct 27 09:49:44 2006 @@ -1,4 +1,4 @@ -/* $Id: strings_sjis.h,v 1.3 2006/10/19 03:27:08 sako Exp $ */ +/* $Id: strings_sjis.h,v 1.4 2006/10/27 00:49:44 sako Exp $ */ #define TOKEN_MEISHI "¼" #define TOKEN_DOUSHI "®" #define TOKEN_KEIYOUSHI "`e" @@ -100,3 +100,5 @@ #define ZENKAKU_ALPHABET_SECOND_BYTE_MAX 0x9A #define ACCENT_MARK "f" +#define is_ZENKAKU_ALPNUM(x,y) ( (x) == ZENKAKU_ALPHABET_FIRST_BYTE & ( \ +( ((y) >= ZENKAKU_NUMBER_SECOND_BYTE_MIN) & ((y) <= ZENKAKU_ALPHABET_SECOND_BYTE_MAX)))) Index: gtalk/text.c diff -u gtalk/text.c:1.28 gtalk/text.c:1.29 --- gtalk/text.c:1.28 Thu Oct 19 21:32:18 2006 +++ gtalk/text.c Fri Oct 27 09:49:44 2006 @@ -6,7 +6,7 @@ /* by Studio ARC */ /* 2003.08.10 */ /* version as of 2003.08.18 */ -/* $Id: text.c,v 1.28 2006/10/19 12:32:18 sako Exp $ */ +/* $Id: text.c,v 1.29 2006/10/27 00:49:44 sako Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -1012,7 +1012,8 @@ } else { strncpy( utterance+p, ZENKAKU_COLON, 2 ); p += 2; } - } else if ( *text == (char)ZENKAKU_ALPHABET_FIRST_BYTE ) { + /* } else if ( *text == (char)ZENKAKU_ALPHABET_FIRST_BYTE ) { */ + } else if( is_ZENKAKU_ALPNUM( *text, *(text+1))){ text++; if ( *text >= (char)ZENKAKU_NUMBER_SECOND_BYTE_MIN && *text <= (char)ZENKAKU_NUMBER_SECOND_BYTE_MAX ) { char han;