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

(-)./InputWindow.c (-2 / +2 lines)
Lines 110-116 Link Here
110
    char            str1[] = "Ay中";
110
    char            str1[] = "Ay中";
111
    char            str2[10];
111
    char            str2[10];
112
    char           *ps1, *ps2;
112
    char           *ps1, *ps2;
113
    int             l1, l2;
113
    size_t         l1, l2;
114
114
115
    if (!xftFont)
115
    if (!xftFont)
116
	return;
116
	return;
Lines 120-126 Link Here
120
    ps2 = str2;
120
    ps2 = str2;
121
    ps1 = str1;
121
    ps1 = str1;
122
122
123
    l1 = iconv (convUTF8, (char **) &ps1, &l1, &ps2, &l2);
123
    l1 = iconv (convUTF8, (const char **) &ps1, &l1, &ps2, &l2);
124
124
125
    XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents);
125
    XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents);
126
    iInputWindowHeight = extents.height * 2 + extents.height / 2 + 8;
126
    iInputWindowHeight = extents.height * 2 + extents.height / 2 + 8;
(-)./ui.c (-4 / +4 lines)
Lines 284-290 Link Here
284
    XGlyphInfo      extents;
284
    XGlyphInfo      extents;
285
    char            str1[100];
285
    char            str1[100];
286
    char           *ps, *ps1;
286
    char           *ps, *ps1;
287
    int             l1, l2;
287
    size_t         l1, l2;
288
288
289
    if (!xftFont)
289
    if (!xftFont)
290
	return 0;
290
	return 0;
Lines 294-300 Link Here
294
    ps = str1;
294
    ps = str1;
295
    ps1 = str;
295
    ps1 = str;
296
296
297
    l1 = iconv (convUTF8, (char **) &str, &l1, &ps, &l2);
297
    l1 = iconv (convUTF8, (const char **) &str, &l1, &ps, &l2);
298
    *ps = '\0';
298
    *ps = '\0';
299
    XftTextExtentsUtf8 (dpy, xftFont, str1, strlen (str1), &extents);
299
    XftTextExtentsUtf8 (dpy, xftFont, str1, strlen (str1), &extents);
300
    return extents.width;
300
    return extents.width;
Lines 323-329 Link Here
323
void OutputString (Window window, char *str, int x, int y, XColor color)
323
void OutputString (Window window, char *str, int x, int y, XColor color)
324
{
324
{
325
    char            strOutput[100] = "";	//该长度应该够用了
325
    char            strOutput[100] = "";	//该长度应该够用了
326
    int             l1, l2;
326
    size_t          l1, l2;
327
    char           *ps;
327
    char           *ps;
328
    XftColor        xftColor;
328
    XftColor        xftColor;
329
    XRenderColor    renderColor;
329
    XRenderColor    renderColor;
Lines 339-345 Link Here
339
    l2 = 99;
339
    l2 = 99;
340
    ps = strOutput;
340
    ps = strOutput;
341
341
342
    l1 = iconv (convUTF8, (char **) (&str), &l1, &ps, &l2);
342
    l1 = iconv (convUTF8, (const char **) (&str), &l1, &ps, &l2);
343
343
344
    renderColor.red = color.red;
344
    renderColor.red = color.red;
345
    renderColor.green = color.green;
345
    renderColor.green = color.green;
(-)./xim.c (-1 / +1 lines)
Lines 336-342 Link Here
336
    char           *ps;
336
    char           *ps;
337
337
338
    if (bIsUtf8) {
338
    if (bIsUtf8) {
339
	int             l1, l2;
339
	size_t            l1, l2;
340
340
341
	ps = strOutput;
341
	ps = strOutput;
342
	l1 = strlen (strHZ);
342
	l1 = strlen (strHZ);

Return to bug 72371