View | Details | Raw Unified | Return to bug 45797
Collapse All | Expand All

(-)zhcon/Makefile (-3 / +7 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	zhcon
8
PORTNAME=	zhcon
9
PORTVERSION=	0.2
9
PORTVERSION=	0.2.1
10
PORTREVISION=	4
11
CATEGORIES=	chinese
10
CATEGORIES=	chinese
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 20-25 Link Here
20
CONFIGURE_ARGS=	--with-included-gettext=${LOCALBASE}
19
CONFIGURE_ARGS=	--with-included-gettext=${LOCALBASE}
21
USE_GMAKE=	yes
20
USE_GMAKE=	yes
22
USE_REINPLACE=	yes
21
USE_REINPLACE=	yes
22
REINPLACE_ARGS= # empty
23
23
24
MAN1=		zhcon.1
24
MAN1=		zhcon.1
25
25
Lines 27-33 Link Here
27
27
28
post-patch:
28
post-patch:
29
.if ${OSVERSION} > 500012
29
.if ${OSVERSION} > 500012
30
	@${FIND} ${WRKSRC}/src/ -name "*.cpp" | ${XARGS} ${REINPLACE_CMD} -e 's,machine/console.h>,sys/consio.h>\n#include <sys/fbio.h>\n#include <sys/kbio.h>\n,'
30
.for i in src/main.cpp src/zhcon.cpp src/inputmanager.cpp src/display/fbdev.cpp src/mouse.h
31
	${REINPLACE_CMD} 's,machine/console.h>,sys/consio.h>@#include <sys/fbio.h>@#include <sys/kbio.h>,' ${WRKSRC}/${i} | tr '@' '\n' > ${WRKSRC}/${i}.bak && \
32
	${MV} ${WRKSRC}/${i}.bak ${WRKSRC}/${i}
33
.endfor
34
	${REINPLACE_CMD} -i.bak -e 's,machine/mouse.h>,sys/mouse.h>,' ${WRKSRC}/src/mouse.h
31
.endif
35
.endif
32
36
33
.include <bsd.port.post.mk>
37
.include <bsd.port.post.mk>
(-)zhcon/distinfo (-1 / +1 lines)
Line 1 Link Here
1
MD5 (zhcon-0.2.tar.gz) = 67ea99f487c9c2d878238213e5162560
1
MD5 (zhcon-0.2.1.tar.gz) = 3171b538b8bb5c5eb70a8229e52bd28d
(-)zhcon/files/patch-configure (-17 / +7 lines)
Lines 1-21 Link Here
1
--- configure.orig	Fri Feb 15 21:01:04 2002
1
--- configure.orig	Mon Jun 10 10:29:34 2002
2
+++ configure	Sun Feb 24 14:25:34 2002
2
+++ configure	Wed Nov 27 20:03:03 2002
3
@@ -818,8 +818,9 @@
3
@@ -1671,7 +1671,7 @@
4
         CFLAGS=" -O2 -DNDEBUG -funsigned-char -Wall "
5
         CXXFLAGS=" -O2 -DNDEBUG -funsigned-char -Wall "
6
 fi
4
 fi
7
-LIBS=" -L/usr/lib/unicon"
8
+LIBS=" -L/usr/lib/unicon -L$ac_default_prefix/lib"
9
 LDFLAGS=" -Wl,-rpath=/usr/lib/unicon"
10
+CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include"
11
 
5
 
12
 
6
 
7
-ZHCON_LOCALE_DIR="/usr/share/locale"
8
+ZHCON_LOCALE_DIR="/usr/local/share/locale"
13
 
9
 
14
@@ -2780,6 +2781,7 @@
10
 if test "$ZHCON_ARCH" = "freebsd";then
15
 
11
     echo $ac_n "checking for main in -lintl""... $ac_c" 1>&6
16
 	     if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
17
 	       	       	       	       INTLLIBS="-lintl $LIBICONV"
18
+	       	       	       	       LIBS="-lintl $LIBS"
19
 	     fi
20
 
21
 	     gt_save_LIBS="$LIBS"
(-)zhcon/files/patch-intl::dcigettext.c (+15 lines)
Line 0 Link Here
1
--- intl/dcigettext.c.orig	Mon Nov 25 23:59:34 2002
2
+++ intl/dcigettext.c	Tue Nov 26 00:19:20 2002
3
@@ -57,10 +57,12 @@
4
 #include <stdlib.h>
5
 
6
 #include <string.h>
7
+#if 0
8
 #if !HAVE_STRCHR && !defined _LIBC
9
 # ifndef strchr
10
 #  define strchr index
11
 # endif
12
+#endif
13
 #endif
14
 
15
 #if defined HAVE_UNISTD_H || defined _LIBC
(-)zhcon/files/patch-po::Makefile.in.in (-16 lines)
Lines 1-16 Link Here
1
--- po/Makefile.in.in.orig	Mon Dec 17 21:02:37 2001
2
+++ po/Makefile.in.in	Sun Feb 24 14:25:34 2002
3
@@ -20,12 +20,9 @@
4
 top_srcdir = @top_srcdir@
5
 VPATH = @srcdir@
6
 
7
-prefix = #@prefix@
8
+prefix = @prefix@
9
 exec_prefix = @exec_prefix@
10
 datadir = @datadir@
11
-
12
-#force using /usr/share/locale as destdir of *.po files
13
-datadir = /usr/share
14
 localedir = $(datadir)/locale
15
 gettextsrcdir = $(datadir)/gettext/po
16
 
(-)zhcon/files/patch-po::zh_TW.Big5.po (-285 lines)
Lines 1-285 Link Here
1
--- po/zh_TW.Big5.po.orig	Tue Feb 19 12:58:16 2002
2
+++ po/zh_TW.Big5.po	Sun Feb 24 14:25:34 2002
3
@@ -6,166 +6,165 @@
4
 msgstr ""
5
 "Project-Id-Version: PACKAGE VERSION\n"
6
 "POT-Creation-Date: 2002-02-16 18:15+0000\n"
7
-"PO-Revision-Date: 2001-10-26 22:22PRC\n"
8
+"PO-Revision-Date: 2002-02-24 14:30+0800\n"
9
 "Last-Translator: ejoy <ejoy@users.sourceforge.net>\n"
10
 "Language-Team: \n"
11
 "MIME-Version: 1.0\n"
12
-"Content-Type: text/plain; charset=UTF-8\n"
13
+"Content-Type: text/plain; charset=Big5\n"
14
 "Content-Transfer-Encoding: 8bit\n"
15
 "X-Generator: KBabel 0.9.5\n"
16
 
17
 #: src/overspotclient.cpp:67 src/overspotclient.cpp:72
18
 #: src/overspotclient.cpp:215
19
 msgid "["
20
-msgstr ""
21
+msgstr "¡i"
22
 
23
 #: src/overspotclient.cpp:68
24
 msgid "Full"
25
-msgstr "��"
26
+msgstr "¥þ«¬"
27
 
28
 #: src/overspotclient.cpp:68
29
 msgid "Half"
30
-msgstr "モ�"
31
+msgstr "¥b«¬"
32
 
33
 #: src/overspotclient.cpp:69
34
 msgid "Ch"
35
-msgstr "〈"
36
+msgstr "¡C"
37
 
38
 #: src/overspotclient.cpp:69
39
 msgid "En"
40
-msgstr "◇"
41
+msgstr ".,"
42
 
43
 #: src/overspotclient.cpp:70 src/overspotclient.cpp:72
44
 #: src/overspotclient.cpp:217
45
 msgid "]"
46
-msgstr ""
47
+msgstr "¡j"
48
 
49
 #: src/configserver.cpp:27
50
 msgid "input option"
51
-msgstr "输入法选项"
52
+msgstr "¿é¤Jªk¿ï¶µ"
53
 
54
 #: src/configserver.cpp:28
55
 msgid "Select Encode"
56
-msgstr "叫匡拒襟截よΑ:"
57
+msgstr "½s½X¤è¦¡"
58
 
59
 #: src/configserver.cpp:29
60
 msgid "Encode-Detect Method"
61
-msgstr ""
62
+msgstr "½s½X°»´ú¤è¦¡"
63
 
64
 #: src/configserver.cpp:30
65
 msgid "Quit"
66
-msgstr "退出菜单"
67
+msgstr "°h¥X¿ï³æ"
68
 
69
 #: src/configserver.cpp:34 src/configserver.cpp:170
70
-#, fuzzy
71
 msgid "Current Encode-Detect Method:"
72
-msgstr "当前内码识别方式:"
73
+msgstr "¥Ø«e½s½X°»´ú¤è¦¡:"
74
 
75
 #: src/configserver.cpp:39 src/configserver.cpp:48 src/configserver.cpp:58
76
 msgid "Back"
77
-msgstr ""
78
+msgstr "ªð¦^¤W¯Å¿ï³æ"
79
 
80
 #: src/configserver.cpp:43
81
 msgid "Input Option:"
82
-msgstr "输入法选项:"
83
+msgstr "¿é¤Jªk¿ï¶µ:"
84
 
85
 #: src/configserver.cpp:44 src/configserver.cpp:235
86
 msgid "Auto Select Unique Word"
87
-msgstr "无重码自动上屏"
88
+msgstr "³æ¿W¦r¦Û°Ê¿ï¾Ü"
89
 
90
 #: src/configserver.cpp:46
91
 msgid "Input Encode"
92
-msgstr "输入法选项"
93
+msgstr "¿é¤Jªk½s½X"
94
 
95
 #: src/configserver.cpp:52
96
 msgid "Please Select Encode:"
97
-msgstr "请选择编码方式:"
98
+msgstr "½Ð¿ï¾Ü½s½X¤è¦¡:"
99
 
100
 #: src/configserver.cpp:63
101
 msgid "System Menu"
102
-msgstr "系统菜单"
103
+msgstr "¨t²Î¿ï³æ"
104
 
105
 #: src/configserver.cpp:123
106
 msgid "Current Encode:"
107
-msgstr "当前编码方式:"
108
+msgstr "¥Ø«e½s½X¤è¦¡:"
109
 
110
 #: src/configserver.cpp:211
111
 msgid "Current Input Encode(native only)"
112
-msgstr "当前输入法编码(native only)"
113
+msgstr "¥Ø«e¿é¤Jªk½s½X(native only)"
114
 
115
 #: src/zhcon.cpp:85
116
 msgid "Please visit zhcon.gnuchina.org for more information."
117
-msgstr ""
118
+msgstr "½Ð°Ñ¦Òzhconªº­º­¶zhcon.gnuchina.org¥HÀò±o§ó¦h¸ê°T¡C"
119
 
120
 #: src/zhcon.cpp:86
121
 msgid "Zhcon supports GB2312,GBK,BIG5,JIS,KSCM encode."
122
-msgstr ""
123
+msgstr "zhcon¤ä´©GB2312,GBK,BIG5,JIS,KSCM¤­ºØ½s½X¤è¦¡¡C"
124
 
125
 #: src/zhcon.cpp:87
126
 msgid "You can use CTRL-ALT-0 to toggle prompt bar."
127
-msgstr ""
128
+msgstr "¥i¥H¨Ï¥ÎCTRL-ALT-0¤Á´«´£¥Ü±ø¡C"
129
 
130
 #: src/zhcon.cpp:88
131
 msgid "Press CTRL-ALT-H for online help."
132
-msgstr ""
133
+msgstr "½Ð«ö CTRL-ALT-H Åã¥Ü¨D§U°T®§¡C"
134
 
135
 #: src/zhcon.cpp:89
136
 msgid "Zhcon supports 12,14,16,24 pixel fonts,you can change in zhcon.conf"
137
-msgstr ""
138
+msgstr "zhcon¤ä´©12,14,16,24µ¥¦hºØ¤£¦PÂI°}¦rÅé¡A±z¥i¥H¦bzhcon.conf¤¤³]©w¦rÅé¡C"
139
 
140
 #: src/zhcon.cpp:90
141
 msgid "You can use 24 pixel font on 17 monitor to get better visual effect."
142
-msgstr ""
143
+msgstr "¦b17¦TªºÅã¥Ü¾¹¤W¥i¥H¨Ï¥Î1024X768©M24ÂI°}¦rÅé¨ÓÀò±o§ó¦nªºÅã¥Ü®ÄªG¡C"
144
 
145
 #: src/zhcon.cpp:91
146
 msgid "Hit CTRL-D to quit zhcon."
147
-msgstr ""
148
+msgstr "¥i¥H¨Ï¥ÎCTRL-D¨Ó°h¥Xzhcon."
149
 
150
 #: src/zhcon.cpp:92
151
 msgid "You can find user manual in doc/."
152
-msgstr ""
153
+msgstr "¨Ï¥Î¤â¥U¦bdoc/¥Ø¿ý¤U¡C"
154
 
155
 #: src/zhcon.cpp:93
156
 msgid ""
157
 "Zhcon can use input methods from Unicon[TurboLinux],read manual for detail."
158
 msgstr ""
159
+"zhcon¯à¨Ï¥ÎUnicon[TurboLinux]¤¤ªº¿é¤Jªk¡A½Ð¾\Ū¤â¥U¥HÀò±o§ó¸Ô²Óªº¸ê°T¡C"
160
 
161
 #: src/zhcon.cpp:94
162
 msgid "Zhcon is optimized for running under Linux FrameBuffer."
163
-msgstr ""
164
+msgstr "zhcon¬°LinuxªºFrameBufferÅX°Ê§@¤F³Ì¨Î¤Æ¡A¦bFrameBuffer¤U¥i¥H±o¨ì³Ì¨Î®ÄªG¡C"
165
 
166
 #: src/zhcon.cpp:95
167
 msgid "Press CTRL-F7 to change input style"
168
-msgstr ""
169
+msgstr "¥i¥H¥ÎCTRL-F7¤Á´«¿é¤J­·®æ¡C"
170
 
171
 #: src/zhcon.cpp:603
172
 msgid "screen resolution"
173
-msgstr ""
174
+msgstr "¿Ã¹õ¸ÑªR«×"
175
 
176
 #: src/zhcon.cpp:606
177
-#, fuzzy
178
 msgid "default encode"
179
-msgstr "请选择编码方式:"
180
+msgstr "¹w³]½s½X  "
181
 
182
 #: src/inputmanager.cpp:706
183
 msgid "Press CTRL-ALT-H to exit help"
184
-msgstr ""
185
+msgstr "½Ð«ö CTRL-ALT-H °h¥X¨D§Uµ¡¤f"
186
 
187
 #: src/inputmanager.cpp:707
188
 msgid "ALT -SPACE  Open/Close CJK mode"
189
-msgstr ""
190
+msgstr "ALT-SPACE   ¥´¶}/Ãö³¬CJK¤è¦¡"
191
 
192
 #: src/inputmanager.cpp:708
193
 msgid "CTRL-SPACE  Open/Close input method"
194
-msgstr ""
195
+msgstr "CTRL-SPACE  ¥´¶}/Ãö³¬¿é¤Jªk"
196
 
197
 #: src/inputmanager.cpp:709
198
 msgid "SHIFT-PageUp/PageDown/Up/Down   Scroll & Display History"
199
-msgstr ""
200
+msgstr "SHIFT-PageUp/PageDown/Up/Down  ÂsÄý¾ú¥v¿Ã¹õ"
201
 
202
 #: src/inputmanager.cpp:711
203
 msgid "CTRL key:"
204
-msgstr ""
205
+msgstr "CTRL ¥\¯àÁä:"
206
 
207
 #: src/inputmanager.cpp:712
208
 msgid "F1  GB2312"
209
@@ -189,61 +188,60 @@
210
 
211
 #: src/inputmanager.cpp:717
212
 msgid "F9  Switch & Auto Detect"
213
-msgstr ""
214
+msgstr "F9  ¤Á´«¦Û°Ê°»´ú¤è¦¡"
215
 
216
 #: src/inputmanager.cpp:718
217
-#, fuzzy
218
 msgid "F10 Sys Menu"
219
-msgstr "系统菜单"
220
+msgstr "F10 ¿ï³æ"
221
 
222
 #: src/inputmanager.cpp:719
223
 msgid "F7  Input Style"
224
-msgstr ""
225
+msgstr "F7  ¤Á´«¿é¤J­·®æ"
226
 
227
 #: src/inputmanager.cpp:720
228
 msgid "D   Exit zhcon"
229
-msgstr ""
230
+msgstr "D   °h¥Xzhcon"
231
 
232
 #: src/inputmanager.cpp:722
233
 msgid "Chinese/English Mode:"
234
-msgstr ""
235
+msgstr "¤¤­^¤å¼Ò¦¡:"
236
 
237
 #: src/inputmanager.cpp:723
238
 msgid "CTRL-,  Full/Half Char"
239
-msgstr ""
240
+msgstr "Ctrl-,  ¤Á´«¥þ«¬/¥b«¬"
241
 
242
 #: src/inputmanager.cpp:724
243
 msgid "CTRL-.  Full/Half Comma"
244
-msgstr ""
245
+msgstr "Ctrl-.  ¤Á´«¤¤¤å¼ÐÂI"
246
 
247
 #: src/inputmanager.cpp:726
248
 msgid "CTRL-ALT-NUM:"
249
-msgstr ""
250
+msgstr "CTRL-ALT-¼Æ¦rÁä:"
251
 
252
 #: src/inputmanager.cpp:727
253
 msgid "0      Prompt Mode"
254
-msgstr ""
255
+msgstr "0      ¶i¤J´£¥Üª¬ºA"
256
 
257
 #: src/inputmanager.cpp:728
258
 msgid "1..9   Select IME 1..9"
259
-msgstr ""
260
+msgstr "1..9   ¿ï¾Ü¿é¤Jªk1..9"
261
 
262
 #: src/inputmanager.cpp:730
263
 msgid "Special Input Key:"
264
-msgstr ""
265
+msgstr "¿é¤J¥\¯àÁä:"
266
 
267
 #: src/inputmanager.cpp:731
268
 msgid "CTRL-SHIFT  Next IME"
269
-msgstr ""
270
+msgstr "CTRL-SHIFT  ¤Á´«¤U¤@­Ó¿é¤Jªk"
271
 
272
 #: src/inputmanager.cpp:732
273
 msgid "SPACE       Select Number 0"
274
-msgstr ""
275
+msgstr "SPACE     ¥Ø«eº~¦r¿ï¾Ü"
276
 
277
 #: src/inputmanager.cpp:733
278
 msgid "+/-         Next/Prev page"
279
-msgstr ""
280
+msgstr "+/-         ­Ô¿ï¦r«e«á½­¶"
281
 
282
 #: src/inputmanager.cpp:734
283
 msgid "ESC         Reset Input Area"
284
-msgstr ""
285
+msgstr "ESC       ²MªÅ¿é¤J±ø"
(-)zhcon/files/patch-src::Makefile.am (-15 lines)
Lines 1-15 Link Here
1
--- src/Makefile.am.orig	Tue Dec 18 20:39:48 2001
2
+++ src/Makefile.am	Sun Feb 24 14:25:34 2002
3
@@ -9,10 +9,10 @@
4
 
5
 install-data-local:
6
 	$(mkinstalldirs) $(libdir)/zhcon/
7
-	$(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf
8
+	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
9
 
10
 uninstall-local:
11
-	-rm -f /etc/zhcon.conf
12
+	-rm -f $(PREFIX)/etc/zhcon.conf
13
 
14
 bin_PROGRAMS = zhcon
15
 AM_INSTALL_PROGRAM_FLAGS= -m 4775
(-)zhcon/files/patch-src::Makefile.in (-10 / +24 lines)
Lines 1-15 Link Here
1
--- src/Makefile.in.orig	Sun Feb 17 02:15:15 2002
1
--- src/Makefile.in.orig	Tue Jun 11 10:25:52 2002
2
+++ src/Makefile.in	Sun Feb 24 14:25:35 2002
2
+++ src/Makefile.in	Tue Nov 26 01:37:47 2002
3
@@ -441,10 +441,10 @@
3
@@ -81,7 +81,7 @@
4
 LIB = @LIB@
5
 LIBICONV = @LIBICONV@
6
 LIBINTL = @LIBINTL@
7
-LIBS = @LIBS@
8
+LIBS = -lintl -lcurses @LIBS@ -I/usr/lib
9
 LN_S = @LN_S@
10
 LTLIB = @LTLIB@
11
 LTLIBICONV = @LTLIBICONV@
12
@@ -117,7 +117,7 @@
13
 PROGRAMS =  $(bin_PROGRAMS)
14
 
15
 
16
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
17
+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I/usr/include
18
 CPPFLAGS = @CPPFLAGS@
19
 zhcon_OBJECTS =  basefont.o big52gbdecoder.o big5decoder.o configfile.o \
20
 console.o gb2big5decoder.o gbdecoder.o gbkdecoder.o graphdev.o \
21
@@ -395,7 +395,7 @@
4
 
22
 
5
 install-data-local:
23
 install-data-local:
6
 	$(mkinstalldirs) $(libdir)/zhcon/
24
 	$(mkinstalldirs) $(DESTDIR)/etc
7
-	$(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf
25
-	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)/etc/zhcon.conf
8
+	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
26
+	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
27
 	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample
9
 
28
 
10
 uninstall-local:
29
 uninstall-local:
11
-	-rm -f /etc/zhcon.conf
12
+	-rm -f $(PREFIX)/etc/zhcon.conf
13
 
14
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
15
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)zhcon/files/patch-src::display::fbdev.cpp (-29 lines)
Lines 1-29 Link Here
1
--- src/display/fbdev.cpp.orig	Fri Feb 15 20:15:58 2002
2
+++ src/display/fbdev.cpp	Sun Feb 24 14:25:35 2002
3
@@ -202,7 +202,11 @@
4
     }
5
 
6
     // printf ("len %d\n", mpBufLen);
7
+#if (__FreeBSD__ <= 3)
8
     if ((mFd = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) {
9
+#else
10
+    if ((mFd = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) {
11
+#endif
12
         throw(runtime_error("Can not open vga device.\n"));
13
     }
14
 
15
@@ -229,8 +233,13 @@
16
             throw(runtime_error("color depth unsupported in this version\n"
17
                 "use 8bpp instead!"));
18
     }
19
+#if (__FreeBSD__ <= 3)
20
+#define GRAPH_BASE 0x0
21
+#else
22
+#define GRAPH_BASE 0xA0000
23
+#endif
24
     mpBuf = static_cast<char *>(mmap(0, mpBufLen, PROT_READ | PROT_WRITE,
25
-                                MAP_SHARED, mFd, 0));
26
+			MAP_FILE|MAP_SHARED|MAP_FIXED, mFd, GRAPH_BASE));
27
 
28
     if (mpBuf == MAP_FAILED)
29
         throw(runtime_error("mmap() failed!"));
(-)zhcon/files/patch-src::graphdev.cpp (-11 lines)
Lines 1-11 Link Here
1
--- src/graphdev.cpp.ori	Tue Apr  9 14:54:28 2002
2
+++ src/graphdev.cpp	Tue Apr  9 15:27:14 2002
3
@@ -29,7 +29,7 @@
4
 
5
 #include "display/fbdev.h"
6
 #include "display/vgadev.h"
7
-#if defined(linux)
8
+#if defined(linux) || defined(__FreeBSD__)
9
     #ifdef HAVE_GGI_LIB
10
     #include "display/libggi.h"
11
     #endif
(-)zhcon/files/patch-src::nativeinputserver.cpp (-45 lines)
Lines 1-45 Link Here
1
--- src/nativeinputserver.cpp.orig	Sun Feb 10 01:18:58 2002
2
+++ src/nativeinputserver.cpp	Sun Feb 24 14:25:35 2002
3
@@ -151,10 +151,31 @@
4
             }
5
             else {
6
                 mInput.erase(mInput.end() - 1);
7
-                Beep();
8
+                //Beep();
9
+                switch(c)
10
+                {
11
+                    case '0':
12
+                    case '1':
13
+                    case '2':
14
+                    case '3':
15
+                    case '4':
16
+                    case '5':
17
+                    case '6':
18
+                    case '7':
19
+                    case '8':
20
+                    case '9':
21
+                    case '+':
22
+                    case '=':
23
+                    case '-':
24
+                    case '_':
25
+                        goto Select;
26
+                    default:
27
+                        Beep();
28
+                }
29
             }
30
         }
31
     } else {
32
+Select:
33
         if (mList.mCount > 0) {
34
             switch (c) {
35
                 case 033:
36
@@ -210,6 +231,9 @@
37
                     if (c < mShownWords) {
38
                         s = Select(c);
39
                         rBuf = s;
40
+                        mpIme->Reset();
41
+                        mInput = "";
42
+                        mList.Reset();
43
                     } else
44
                         Beep();
45
                     break;
(-)zhcon/files/patch-src::zhcon.conf (+16 lines)
Line 0 Link Here
1
--- src/zhcon.conf.orig	Tue Nov 26 02:03:39 2002
2
+++ src/zhcon.conf	Tue Nov 26 02:03:50 2002
3
@@ -34,10 +34,10 @@
4
 #    FreeBSD wizard and ask him to compile a new kernel with VESA support
5
 #    for you and ... emmmm ... explain all these stuff to you ...
6
 #
7
-x_resolution = 800
8
-y_resolution = 600
9
+x_resolution = 640
10
+y_resolution = 480
11
 # 4 bits = 16 colors, 8 bits = 256 colors, 16 bits = 64K colors, and so on..
12
-color_depth = 8 
13
+color_depth = 4
14
 
15
 #blanklineheight must >= 0
16
 blanklineheight = 1
(-)zhcon/files/patch-src::zhcon.cpp (-49 / +5 lines)
Lines 1-55 Link Here
1
--- src/zhcon.cpp.orig	Sun Feb 17 02:12:17 2002
1
--- src/zhcon.cpp.orig	Tue Nov 26 01:35:04 2002
2
+++ src/zhcon.cpp	Sun Feb 24 14:31:41 2002
2
+++ src/zhcon.cpp	Tue Nov 26 01:35:25 2002
3
@@ -113,7 +113,7 @@
3
@@ -131,7 +131,7 @@
4
     string cfgfile = getenv("HOME");
4
     string cfgfile = getenv("HOME");
5
     cfgfile += "/.zhconrc";
5
     cfgfile += "/.zhconrc";
6
     if (access(cfgfile.c_str(), R_OK) != 0)
6
     if (access(cfgfile.c_str(), R_OK) != 0)
7
-        cfgfile = "/etc/zhcon.conf";
7
-        cfgfile = "/etc/zhcon.conf";
8
+        cfgfile = PREFIX"/etc/zhcon.conf";
8
+        cfgfile = PREFIX"/etc/zhcon.conf";
9
 
9
 
10
 //    char c;cin>>c;
10
     //for debug,a pause enable us to attach zhcon's pid in gdb
11
     ConfigFile f(cfgfile.c_str());
11
     //char c;cin>>c;
12
@@ -129,6 +129,7 @@
13
     InstallVtHandle();
14
     InstallSignal();
15
     ForkPty();
16
+    SetEncode(mDefaultEncode, mDefaultEncode);
17
     InitInputManager(f);
18
     if (f.GetOption("startupmsg",true))
19
         StartupMsg();
20
@@ -489,29 +490,30 @@
21
     string s;
22
     s = f.GetOption(string("defaultencode"), string("gb2312"));
23
     if (s == "gb2312") {
24
-        SetEncode(GB2312,GB2312);
25
+        //SetEncode(GB2312,GB2312);
26
         setenv("LC_ALL", "zh_CN.GB2312", 1);
27
         mDefaultEncode = GB2312;
28
     } else if (s == "gbk") {
29
-        SetEncode(GBK,GBK);
30
+        //SetEncode(GBK,GBK);
31
         setenv("LC_ALL", "zh_CN.GBK", 1);
32
         mDefaultEncode = GBK;
33
     } else if (s == "big5") {
34
-        SetEncode(BIG5,BIG5);
35
+        //SetEncode(BIG5,BIG5);
36
         setenv("LC_ALL", "zh_TW.Big5", 1);
37
         mDefaultEncode = BIG5;
38
     } else if (s == "jis") {
39
-        SetEncode(JIS,JIS);
40
+        //SetEncode(JIS,JIS);
41
         setenv("LC_ALL", "ja.JIS", 1);
42
         mDefaultEncode = JIS;
43
     } else if (s == "kscm") {
44
-        SetEncode(KSCM,KSCM);
45
+        //SetEncode(KSCM,KSCM);
46
         setenv("LC_ALL", "ko", 1);
47
         mDefaultEncode = GBK;
48
     } else {
49
         throw runtime_error("unable to set default encode!");
50
     }
51
 
52
+    setenv("LC_CTYPE", getenv("LC_ALL"), 1);
53
     s = f.GetOption(string("autoencode"), string("manual"));
54
     if (s == "auto")
55
         mAutoEncode = AUTO;
(-)zhcon/files/patch-tools::Makefile.in (+20 lines)
Line 0 Link Here
1
--- tools/Makefile.in.orig	Mon Nov 25 23:45:33 2002
2
+++ tools/Makefile.in	Mon Nov 25 23:49:43 2002
3
@@ -107,7 +107,7 @@
4
 LDFLAGS = 
5
 CXXFLAGS = 
6
 CCFLAGS = 
7
-LIBS = 
8
+LIBS = -lX11 -L/usr/X11R6/lib
9
 
10
 EXTRA_DIST = README getbpsf.txt gpm-1.19.6-pty.diff gpm-1.19.6-patched.tar.gz
11
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
12
@@ -116,7 +116,7 @@
13
 PROGRAMS =  $(bin_PROGRAMS)
14
 
15
 
16
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
17
+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I/usr/X11R6/include
18
 CPPFLAGS = @CPPFLAGS@
19
 uc2win_OBJECTS =  uc2win.o
20
 uc2win_LDADD = $(LDADD)
(-)zhcon/pkg-plist (-5 / +8 lines)
Lines 1-5 Link Here
1
bin/getbpsf
2
bin/uc2win
3
bin/win2mb
1
bin/zhcon
4
bin/zhcon
2
etc/zhcon.conf
5
etc/zhcon.conf
6
etc/zhcon.conf.sample
3
lib/zhcon/font/asc12.bpsf
7
lib/zhcon/font/asc12.bpsf
4
lib/zhcon/font/asc12x.bpsf
8
lib/zhcon/font/asc12x.bpsf
5
lib/zhcon/font/asc14.bpsf
9
lib/zhcon/font/asc14.bpsf
Lines 7-13 Link Here
7
lib/zhcon/font/asc16.bpsf
11
lib/zhcon/font/asc16.bpsf
8
lib/zhcon/font/asc24.bpsf
12
lib/zhcon/font/asc24.bpsf
9
lib/zhcon/font/big5-12-ming.bpsf
13
lib/zhcon/font/big5-12-ming.bpsf
10
lib/zhcon/font/big5-16-ming.bpsf
11
lib/zhcon/font/big5-16.bpsf
14
lib/zhcon/font/big5-16.bpsf
12
lib/zhcon/font/gb-16.bpsf
15
lib/zhcon/font/gb-16.bpsf
13
lib/zhcon/font/gb-24-kai.bpsf
16
lib/zhcon/font/gb-24-kai.bpsf
Lines 16-22 Link Here
16
lib/zhcon/font/hzk14.bpsf
19
lib/zhcon/font/hzk14.bpsf
17
lib/zhcon/font/hzk16.bpsf
20
lib/zhcon/font/hzk16.bpsf
18
lib/zhcon/font/jis-16.bpsf
21
lib/zhcon/font/jis-16.bpsf
19
lib/zhcon/font/kscm-16.bpsf
22
lib/zhcon/font/ksc-16.bpsf
20
lib/zhcon/input/big5-ary30.mb
23
lib/zhcon/input/big5-ary30.mb
21
lib/zhcon/input/big5-cj.mb
24
lib/zhcon/input/big5-cj.mb
22
lib/zhcon/input/big5-liu5.mb
25
lib/zhcon/input/big5-liu5.mb
Lines 36-42 Link Here
36
lib/zhcon/input/winsp.mb
39
lib/zhcon/input/winsp.mb
37
lib/zhcon/input/winzm.mb
40
lib/zhcon/input/winzm.mb
38
share/locale/ja/LC_MESSAGES/zhcon.mo
41
share/locale/ja/LC_MESSAGES/zhcon.mo
39
share/locale/kr/LC_MESSAGES/zhcon.mo
42
share/locale/ko/LC_MESSAGES/zhcon.mo
40
share/locale/zh_CN.GB2312/LC_MESSAGES/zhcon.mo
43
share/locale/zh_CN.GB2312/LC_MESSAGES/zhcon.mo
41
share/locale/zh_CN.GBK/LC_MESSAGES/zhcon.mo
44
share/locale/zh_CN.GBK/LC_MESSAGES/zhcon.mo
42
share/locale/zh_TW.Big5/LC_MESSAGES/zhcon.mo
45
share/locale/zh_TW.Big5/LC_MESSAGES/zhcon.mo
Lines 46-53 Link Here
46
@dirrm share/locale/zh_CN.GBK
49
@dirrm share/locale/zh_CN.GBK
47
@dirrm share/locale/zh_CN.GB2312/LC_MESSAGES
50
@dirrm share/locale/zh_CN.GB2312/LC_MESSAGES
48
@dirrm share/locale/zh_CN.GB2312
51
@dirrm share/locale/zh_CN.GB2312
49
@dirrm share/locale/kr/LC_MESSAGES
52
@dirrm share/locale/ko/LC_MESSAGES
50
@dirrm share/locale/kr
53
@dirrm share/locale/ko
51
@dirrm lib/zhcon/input
54
@dirrm lib/zhcon/input
52
@dirrm lib/zhcon/font
55
@dirrm lib/zhcon/font
53
@dirrm lib/zhcon
56
@dirrm lib/zhcon

Return to bug 45797