[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chinput_3.0.1-7 unicon-im 3.0.3-3上载



On Fri, Jul 06, 2001 at 12:33:11AM +0800, ygh@debian.org wrote:
>   参考了www.linuxforum.net的huyou和bbs.smth.org的althea的patch, 现在
> chinput的智能拼音支持用户词库, 精确匹配拼音(如果没有精确匹配在进行模糊
> 匹配). 欢迎测试, 现在智能拼音顺手多了.
> 

Thanks. Could you also add this patch to scratch my itch? Then I won't
need to patch it myself everytime. It adds a chinput.punct resource to
set default punctuation style b/w Chinese and Western.

-- 
hashao|叠嶂西驰,万马回旋,众山欲东。正惊湍直下,跳珠倒溅,小桥横截,缺月初弓。
hashao|老合投闲,天教多事,检校长身十万松。吾庐小,在龙蛇影外,风雨声中。
hashao|争先见面重重。看爽气朝来三数峰。似谢家子弟,衣冠磊落,相如庭户,车骑雍容。
hashao|我觉其间,雄深雅健,如对文章太史公。新堤路,问偃湖何日,烟雨蒙蒙。
diff -ur -x *.o chinput-3.0.1.orig/resource/Chinput.ad chinput-3.0.1/resource/Chinput.ad
--- chinput-3.0.1.orig/resource/Chinput.ad	Fri Jul  6 10:52:14 2001
+++ chinput-3.0.1/resource/Chinput.ad	Fri Jul  6 13:00:00 2001
@@ -58,6 +58,10 @@
 chinput.dictionary		=	/usr/lib/unicon/modules/
 chinput.inputmethod.gb		=	ZNPY
 chinput.inputmethod.big5	=	PY
+
+! Default setting for CHINESE/WESTERN punctuation marks.
+chinput.punct			=	WESTERN
+
 !
 ! 16 point font set
 !
Only in chinput-3.0.1/src/IMdkit/lib: libXimd.a
Only in chinput-3.0.1/src: chinput
diff -ur -x *.o chinput-3.0.1.orig/src/init.c chinput-3.0.1/src/init.c
--- chinput-3.0.1.orig/src/init.c	Fri Jul  6 10:52:15 2001
+++ chinput-3.0.1/src/init.c	Fri Jul  6 13:00:21 2001
@@ -359,7 +359,7 @@
 	}
 
 	flag_corner = False;	//half
-	flag_punct = False;	//chinese punctuation
+	flag_punct = False;	//english punctuation
 	flag_lock = LOCK_NONE;	//encoding not locked
 	flag_ec  = True;	//chinese output
 	flag_english = False;	//no english
@@ -481,11 +481,11 @@
 				flag_client = HZSERVER_AREAMODE_SERVER;
 		} else if(!mystrcmp(line, "chinput.dictionary")){
                 	strcpy(dict_path, get_value(line));
-		} else if(!mystrcmp(line, "chinput.showime")){
-			if(!strcmp(get_value(line), "YES"))
-				flag_showime = 1;
-			else
-				flag_showime = 0;
+		} else if(!mystrcmp(line, "chinput.punct")){
+			if(!strcasecmp(get_value(line), "CHINESE"))
+				flag_punct = True;
+			else if(!strcasecmp(get_value(line), "WESTERN"))
+				flag_punct = False;
 		} else if(!mystrcmp(line, "chinput.font")){
                 	strcpy(font_latin, get_value(line));
         	} else if(!mystrcmp(line, "chinput.gbfont")){

Reply to: