[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nodelay(...), not working with get_wch
From: |
Thomas Dickey |
Subject: |
Re: nodelay(...), not working with get_wch |
Date: |
Sat, 6 Jul 2024 13:11:05 -0400 |
On Sat, Jul 06, 2024 at 07:26:00AM -0500, G. Branden Robinson wrote:
> Hi Giorgos,
>
> At 2024-07-06T11:42:53+0300, Giorgos Xou wrote:
> > Here's an example:
> >
> > #include <ncurses.h>
> >
> > int main (int argc, char ** argv)
> > {
> > wint_t ch;
> > // int ch;
> >
> > initscr();
> > noecho();
> > nodelay(stdscr, true);
> > refresh();
> >
> > while (true) {
> > get_wch(&ch); // It should return -1 but it doesn't
>
> Observe that even if it did "return -1", you're _not checking this
> function's return value_. You're discarding it.
agree - see attached.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
foo.c
Description: Text Data
signature.asc
Description: PGP signature