Bug 72371 - 64 bits cleanup patches for fcitx 2.0.1
Summary: 64 bits cleanup patches for fcitx 2.0.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-06 04:20 UTC by David Xu
Modified: 2004-10-15 09:10 UTC (History)
0 users

See Also:


Attachments
file.diff (2.11 KB, patch)
2004-10-06 04:20 UTC, David Xu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Xu freebsd_committer freebsd_triage 2004-10-06 04:20:22 UTC
ports chinese/fcitx is not 64 bits clean, running it under AMD64 cause it to abort.

Fix: patches:
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.
Comment 1 Dryice Liu 2004-10-14 16:46:08 UTC
Thanks for the patch. Maintainer approve.

Here's a clean-up version to make the ports committer's life easier :)

Added files:

files/patch-InputWindow.c
files/patch-ui.c
files/patch-xim.c


----------------------------------------------------------------------
diff -ruN fcitx.orig/files/patch-InputWindow.c fcitx/files/patch-InputWindo=
w.c
--- fcitx.orig/files/patch-InputWindow.c	Thu Jan  1 08:00:00 1970
+++ fcitx/files/patch-InputWindow.c	Thu Oct 14 23:22:24 2004
@@ -0,0 +1,20 @@
+--- InputWindow.c.orig	Tue Dec 30 15:54:47 2003
++++ InputWindow.c	Thu Oct 14 23:18:49 2004
+@@ -110,7 +110,7 @@
+     char            str1[] =3D "Ay=D6=D0";
+     char            str2[10];
+     char           *ps1, *ps2;
+-    int             l1, l2;
++    size_t          l1, l2;
+=20
+     if (!xftFont)
+ 	return;
+@@ -120,7 +120,7 @@
+     ps2 =3D str2;
+     ps1 =3D str1;
+=20
+-    l1 =3D iconv (convUTF8, (char **) &ps1, &l1, &ps2, &l2);
++    l1 =3D iconv (convUTF8, (const char **) &ps1, &l1, &ps2, &l2);
+=20
+     XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents);
+     iInputWindowHeight =3D extents.height * 2 + extents.height / 2 + 8;
diff -ruN fcitx.orig/files/patch-ui.c fcitx/files/patch-ui.c
--- fcitx.orig/files/patch-ui.c	Thu Jan  1 08:00:00 1970
+++ fcitx/files/patch-ui.c	Thu Oct 14 23:23:50 2004
@@ -0,0 +1,38 @@
+--- ui.c.orig	Sun Jan  4 15:42:01 2004
++++ ui.c	Thu Oct 14 23:20:27 2004
+@@ -284,7 +284,7 @@
+     XGlyphInfo      extents;
+     char            str1[100];
+     char           *ps, *ps1;
+-    int             l1, l2;
++    size_t          l1, l2;
+=20
+     if (!xftFont)
+ 	return 0;
+@@ -294,7 +294,7 @@
+     ps =3D str1;
+     ps1 =3D str;
+=20
+-    l1 =3D iconv (convUTF8, (char **) &str, &l1, &ps, &l2);
++    l1 =3D iconv (convUTF8, (const char **) &str, &l1, &ps, &l2);
+     *ps =3D '\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] =3D "";	//=B8=C3=B3=A4=B6=C8=D3=A6=B8=
=C3=B9=BB=D3=C3=C1=CB
+-    int             l1, l2;
++    size_t          l1, l2;
+     char           *ps;
+     XftColor        xftColor;
+     XRenderColor    renderColor;
+@@ -339,7 +339,7 @@
+     l2 =3D 99;
+     ps =3D strOutput;
+=20
+-    l1 =3D iconv (convUTF8, (char **) (&str), &l1, &ps, &l2);
++    l1 =3D iconv (convUTF8, (const char **) (&str), &l1, &ps, &l2);
+=20
+     renderColor.red =3D color.red;
+     renderColor.green =3D color.green;
diff -ruN fcitx.orig/files/patch-xim.c fcitx/files/patch-xim.c
--- fcitx.orig/files/patch-xim.c	Thu Jan  1 08:00:00 1970
+++ fcitx/files/patch-xim.c	Thu Oct 14 23:22:53 2004
@@ -0,0 +1,11 @@
+--- xim.c.orig	Tue Jan  6 14:12:11 2004
++++ xim.c	Thu Oct 14 23:21:07 2004
+@@ -336,7 +336,7 @@
+     char           *ps;
+=20
+     if (bIsUtf8) {
+-	int             l1, l2;
++	size_t          l1, l2;
+=20
+ 	ps =3D strOutput;
+ 	l1 =3D strlen (strHZ);
----------------------------------------------------------------------


--=20
Cheers,
Dryice

http://dryice.3322.org
Comment 2 David Xu freebsd_committer freebsd_triage 2004-10-15 00:24:07 UTC
Looks good to me.
Thanks.

David Xu


Dryice Liu wrote:

>Thanks for the patch. Maintainer approve.
>
>Here's a clean-up version to make the ports committer's life easier :)
>
>Added files:
>
>files/patch-InputWindow.c
>files/patch-ui.c
>files/patch-xim.c
>
>  
>
Comment 3 Clive Lin freebsd_committer freebsd_triage 2004-10-15 09:09:51 UTC
State Changed
From-To: open->closed

Committed, thanks.