bug-ncurses
[Top][All Lists]
Advanced

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

Re: Wrong signal for window resize


From: Thomas Dickey
Subject: Re: Wrong signal for window resize
Date: Thu, 20 Apr 2017 20:20:20 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Apr 20, 2017 at 04:43:34PM +0700, Igor Liferenko wrote:
> Hi all,
> 
> For get_wch() the same signal for window resize is
> passed as for getch() - 110011010.
> 
> While for getch() it is ok, as this value is outside
> of "char" type, this is wrong for wide-chars because
> it is a legal codepoint value U+019A
> (LATIN SMALL LETTER L WITH BAR)
> 
> The following program can be used to check this
> (compile with
> "gcc test.c -o test -lncursesw -D_XOPEN_SOURCE=600")
> 
> #include <ncursesw/curses.h>
> #include <wchar.h>
> #include <locale.h>
> int main(void)
> {
>   setlocale(LC_CTYPE, "C.UTF-8");
>   initscr();
>   wint_t c;
>   get_wch(&c);

man get_wch -

RETURN VALUES
       When  get_wch,  wget_wch,  mvget_wch, and mvwget_wch functions success‐
       fully report the pressing of a function key, they return  KEY_CODE_YES.
       When they successfully report a wide character, they return OK.  Other‐
       wise, they return ERR.

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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