[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with wide characters
From: |
Ruben Pollan |
Subject: |
Re: problems with wide characters |
Date: |
Mon, 15 Jun 2009 19:46:25 -0400 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
Thank you. It works now.
On 18:53, Mon 15 Jun 09, Thomas Dickey wrote:
> On Mon, Jun 15, 2009 at 06:25:10PM -0400, Ruben Pollan wrote:
> > #include <ncursesw/ncurses.h>
> > #include <wchar.h>
> > #include <stdio.h>
>
> #include <locale.h>
>
> > int main()
> > {
>
> setlocale(LC_ALL, "");
>
> > initscr();
> > clear();
> > echo();
> > keypad(stdscr, TRUE);
> > cbreak();
> > curs_set(1);
> > refresh();
> >
> > wint_t ch = L'\0';
> > wchar_t str[32];
> > int i = 0;
> > while ((i < 32) && (ch != L'q'))
> > {
> > move (0,0);
> > get_wch(&ch);
>
> you're not checking the return value here (just in case...)
>
> > str[i] = ch;
> > i++;
> > str[i] = L'\0';
> > clear();
> > move (2, 0);
> > addwstr(L"string: ");
> > addwstr(str);
> > refresh();
> > }
> >
> > clear();
> > refresh();
> > endwin();
> > }
>
>
> --
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net
--
Rubén Pollán | jabber:address@hidden
http://vagamundo.cauterized.net/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Cuando los que mandan pierden la vergüenza,
los que obedecen pierden el respeto.
signature.asc
Description: Digital signature