Here is getch.h Will work without using curses
-----Original Message-----
From: Robert Stickel [mailto:">rstickel@mindspring.com]
Sent: Tuesday, January 11, 2000 2:20 PM
To: Chris Fowler
Subject: Re: [ale] getch()
This is annoyingly complicated. The details vary between *nix
dialects and versions. For Linux, check the man pages for
tcsetattr(3) and fcntl(2), and under /usr/include/ look at
fcntl.h termios.h and bits/termios.h. I went through this for
Linux a year ago and for HPUX last month so I could probably
scrape up some code if you're interested.
--bs
Chris Fowler wrote:
>
> What is the equivalent to getch() in Linux?
>
> I found getch() in curses.h and ncurses.h.
>
> I'm used to getch() being in stdio.h
>
> I tried getchar() but getchar dispalys any character till I press the
return
> key.
>
> Is there a simple getch() function I sould create in my own include file?
>
> #include
> int getch()
> {
> return(getchar());
> }
>
> but getchar will display everything that I type until I press the return
> key. Correct?
>
> Thanks,
> Chris Fowler
--
Robert Stickel
">rstickel@mindspring.com
application/octet-stream attachment: getch.h
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.