Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 2004 03:19:33 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/72371: 64 bits cleanup patches for fcitx 2.0.1
Message-ID:  <200410060319.i963JXFU032286@www.freebsd.org>
Resent-Message-ID: <200410060320.i963KNok065518@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         72371
>Category:       ports
>Synopsis:       64 bits cleanup patches for fcitx 2.0.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 06 03:20:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     David Xu
>Release:        6.0 CURRENT
>Organization:
FreeBSD
>Environment:
FreeBSD alona.xuyifeng.com 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Wed Oct  6 10:07:32 CST 2004     davidxu@alona.xuyifeng.com:/d1/src/sys/amd64/compile/alona  amd64

>Description:
ports chinese/fcitx is not 64 bits clean, running it under AMD64 cause it to abort.

>How-To-Repeat:
setenv XMODIFIERS "@im=fcitx"
and put:
fcitx & 
at first line of ~/.xinitrc
then startx and presses ctrl + space, and input some characters, it will abort.

>Fix:
patches:
diff -u ./InputWindow.c.old ./InputWindow.c
--- ./InputWindow.c.old	Tue Dec 30 15:54:47 2003
+++ ./InputWindow.c	Wed Oct  6 11:04:54 2004
@@ -110,7 +110,7 @@
     char            str1[] = "Ay&#20013;";
     char            str2[10];
     char           *ps1, *ps2;
-    int             l1, l2;
+    size_t         l1, l2;
 
     if (!xftFont)
 	return;
@@ -120,7 +120,7 @@
     ps2 = str2;
     ps1 = str1;
 
-    l1 = iconv (convUTF8, (char **) &ps1, &l1, &ps2, &l2);
+    l1 = iconv (convUTF8, (const char **) &ps1, &l1, &ps2, &l2);
 
     XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents);
     iInputWindowHeight = extents.height * 2 + extents.height / 2 + 8;
diff -u ./ui.c.old ./ui.c
--- ./ui.c.old	Wed Oct  6 11:05:19 2004
+++ ./ui.c	Wed Oct  6 11:04:54 2004
@@ -284,7 +284,7 @@
     XGlyphInfo      extents;
     char            str1[100];
     char           *ps, *ps1;
-    int             l1, l2;
+    size_t         l1, l2;
 
     if (!xftFont)
 	return 0;
@@ -294,7 +294,7 @@
     ps = str1;
     ps1 = str;
 
-    l1 = iconv (convUTF8, (char **) &str, &l1, &ps, &l2);
+    l1 = iconv (convUTF8, (const char **) &str, &l1, &ps, &l2);
     *ps = '\0';
     XftTextExtentsUtf8 (dpy, xftFont, str1, strlen (str1), &extents);
     return extents.width;
@@ -323,7 +323,7 @@
 void OutputString (Window window, char *str, int x, int y, XColor color)
 {
     char            strOutput[100] = "";	//&#35813;&#38271;&#24230;&#24212;&#35813;&#22815;&#29992;&#20102;
-    int             l1, l2;
+    size_t          l1, l2;
     char           *ps;
     XftColor        xftColor;
     XRenderColor    renderColor;
@@ -339,7 +339,7 @@
     l2 = 99;
     ps = strOutput;
 
-    l1 = iconv (convUTF8, (char **) (&str), &l1, &ps, &l2);
+    l1 = iconv (convUTF8, (const char **) (&str), &l1, &ps, &l2);
 
     renderColor.red = color.red;
     renderColor.green = color.green;
diff -u ./xim.c.old ./xim.c
--- ./xim.c.old	Wed Oct  6 11:05:19 2004
+++ ./xim.c	Wed Oct  6 11:04:54 2004
@@ -336,7 +336,7 @@
     char           *ps;
 
     if (bIsUtf8) {
-	int             l1, l2;
+	size_t            l1, l2;
 
 	ps = strOutput;
 	l1 = strlen (strHZ);

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410060319.i963JXFU032286>