Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR developer version 1.1.11
Thomas Sailer wrote:
>
> On Mon, 2002-09-30 at 11:00, Klaus Schmidinger wrote:
>
> > The reason why I still have '#ifdef's around the implementation of
> > the KBD stuff is because it uses the getch() function of 'ncurses'.
> > I didn't find another way of reading a single character from stdin
> > without blocking, and I didn't want to force everybody to have
>
> #include <termios.h>
>
> struct termios tm;
>
> if (!tcgetattr(0, &tm)) {
> tm.c_iflag = 0;
> tm.c_cc[VMIN] = 0;
> tm.c_cc[VTIME] = 0;
> tcsetattr(0, TCSANOW, &tm);
> }
> fcntl(0, F_SETFL, fcntl(0, F_GETFL, 0) | O_NONBLOCK);
>
> Afterwards, you can read characters with read(0, &ch, 1).
>
> Or did I misunderstand the problem?
No you didn't. I'll give this a try.
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index