bug-ncurses
[Top][All Lists]
Advanced

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

in_wch and add_wch


From: Sadrul H Chowdhury
Subject: in_wch and add_wch
Date: Sat, 2 Sep 2006 20:12:04 -0400

Hi.

I am trying to in_wch a wide-character (cchar_t), change the attribute and add_wch that to the screen again in the same position. But I am not sure what I am doing wrong, because it's not behaving properly.

I have included a sample program which printw()s some multi-column characters (the meaning of which I don't know, btw), in_wch one of them, and add_wch that without changing anything in a different screen position. The output of printw is correct, but the output of add_wch is different (incorrect). The code is below:

/*** START ***/
#define _XOPEN_SOURCE_EXTENDED
#include <ncursesw/ncurses.h>
#include <locale.h>

int main()
{
    cchar_t ch;

    setlocale(LC_ALL, "");
    initscr();

    mvprintw(0, 0, "%s", "\u4e0a\u6d77\u6700\u4f4e\u6708\u5de5");

    if (mvin_wch(0, 0, &ch) == OK)
        mvadd_wch(1, 1, &ch);

    getch();
    endwin();
    return 0;
}
/*** END ***/

I also tried the wchgat family of functions, without much success. Anyone can please tell me what I am doing wrong?

Thanks,
Sadrul

reply via email to

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