Submitted by noty on Mon, 09/01/2006 - 20:25.
( categories: )
Hi all I know that conio.h is not part of C standard but I want to use it . Is there any way to use it under linux ? thanks
|
Submitted by noty on Mon, 09/01/2006 - 20:25.
( categories: )
Hi all I know that conio.h is not part of C standard but I want to use it . Is there any way to use it under linux ? thanks |
User loginNavigationActive forum topicsUpcoming eventsPollHow to refresh EGLUG? more events 23% more active members 10% find more places for events 7% more members meetings 7% All above 49% none of that 5% Total votes: 166
NewsForgeLinux Counter Egypt StatisticsWho's newWho's onlineThere are currently 0 users and 5 guests online.
|
DOS only thing
Is getch an unbuffered character read, or sommat?
What're you trying to use out of conio.h?
- I'm a code junkie security enthusiast
- http://pronco.manalaa.net
it may be
it may be clrsrc()
Diaa Radwan
Nothing doing
conio.h is a Borland kaka for working with DOS console IO. DOS. Not linux.
Linux uses something called curses.
-- Panem et *burp* circenses
As I mentioned
it's a DOS only thing
If he does resurface, tell him to take a peek at setvbuf + getc and ncurses
setvbuf(stdin, 0, _IONBF, 0); c = getchar();
Dunno. It looks plausible to me, but I haven't tried it.
Would probably break 'doze sommat chronic'
- I'm a code junkie security enthusiast
- http://pronco.manalaa.net
As you mentioned where?
n/t
-- Panem et *burp* circenses
Here
DOS only thing
- I'm a code junkie security enthusiast
- http://pronco.manalaa.net
I've found this
I've found this solution . it works good
int getch( )
{
struct termios oldt,
newt;
int ch;
tcgetattr( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
return ch;
}