bug-ncurses
[Top][All Lists]
Advanced

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

Re: Fwd: cdk problem


From: Thomas Dickey
Subject: Re: Fwd: cdk problem
Date: Wed, 11 Jun 2008 05:58:38 -0400 (EDT)

On Tue, 10 Jun 2008, ?????? wrote:

hi:

I have use newest CDK in my project, but the CDK distribute seem
cannot show chinese, my locale was zh_CN.UTF-8.

i have look for CDK source for why, found writeChtypeAttrib() function
seem has problem, and change it to below(303-314),

thanks (agree that the move's don't work with multicolumn characters).


290 /*
291  * This writes out a chtype * string * with the given attributes added.
292  */
293 void writeChtypeAttrib (WINDOW *window, int xpos, int ypos, chtype
*string, chtype attr, int align, int start, int end)
294 {
295    int diff             = end - start;
296    int display          = 0;
297    int x                = 0;
298
299    if (align == HORIZONTAL)
300    {
301       /* Draw the message on a horizontal axis. */
302       display = MINIMUM(diff, getmaxx(window) - xpos);
303 #if 0
304       for (x=0; x < display; x++)
305       {
306          mvwaddch (window, ypos, xpos+x, string[x+start] | attr);
307       }
308 #else
309       wmove (window, ypos, xpos);
310       for (x=0; x < display ; x++)
311       {
312         waddch (window, string[x+start] | attr);
313       }
314 #endif
315    }
316    else
317    {
318       /* Draw the message on a vertical axis. */
319       display = MINIMUM(diff, getmaxy(window) - ypos);
320       for (x=0; x < display; x++)
321       {
322          mvwaddch (window, ypos+x, xpos, string[x+start] | attr);
323       }
324    }
325 }

thing will be ok.

is that real a problem?

In addition, the generated cdk_config.h has a PACKAGE macro, this is
conflict with package which use GNU autotools.


xiaohu
2008.06.10


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]