[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: getch() in linux?



Read man select.
You can pass the file descriptor for stdin & a time out. U can check the
return value of select to see whether any data is
available. Alternatively, you can put the terminal to raw mode (man stty).
Then reading from stdin should return immediately.

Sreeji

On Wed, 15 Nov 2000, Anand D Sankruthi wrote:

> Hi all,
> can anyone tell me a function in linux which works similar to getch() in
> dos, i.e., it should take in one character at a time, without waiting for a
> ENTER. i found one in <curses.h>, but am not able to figure out how to use
> it??
> -----Original Message-----
> From: Arvind Devarajan <arvindd@xxxxxxxxxxxx>
> To: linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
> <linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx>
> Date: Wednesday, November 15, 2000 11:09 AM
> Subject: [Re:] [LIP] mbuf
> 
> 
> >hi shridhar,
> > structures in Linux similar to mbuf in BSD is sk_buff. It has
> >all the layer header unions, etc. and, voluminously big! go
> >have a look at it in /usr/include/linux/skbuff.h.
> > regarding books - well, there is an online book - The Linux
> >Kernel - you can get it at www.linux.org or www.linuxdoc.org.
> >it is a pretty good book - but i am not sure whether it would
> >suffice. another book by addison-wesley - The Linux Kernel Internals
> >- some 5 or 6 authors (don't remember their names).
> >
> >cheers,
> >arvind.
> >
> >On Wed, 15 Nov 2000 10:02:44 +0530 (IST)
> >SRIDHAR wrote:
> >
> >>Hi guys,
> >>
> >> Can you please tell me about corresponding structures for mbuf
> >>in linux and also in case of clusters where is the reference
> >count stored.
> >>Since i'm new to linux please suggest a good  reference book.
> >>
> >>thanks
> >>
> >>cheers
> >>sridhar
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>---------------------------------------------
> >>An alpha version of a web based tool to manage
> >>your subscription with this mailing list is at
> >>http://lists.linux-india.org/cgi-bin/mj_wwwusr
> >>
> >>
> >
> >
> >
> >--------------------------------------------------------------------------
> >Global Internet phone calls, voicemail, fax, e-mail and instant messaging.
> >Sign-up today for FREE account at http://www.hotvoice.com
> 
> 
> ---------------------------------------------
> The mailing list archives are available at
> http://lists.linux-india.org/cgi-bin/wilma/LIP
>