home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_02
/
1n02077a
< prev
next >
Wrap
Text File
|
1990-07-09
|
697b
|
30 lines
/* get_response() is the menu() and dir_menu() operator selection function */
/* that returns the character selected by keyboard or the mouse selection */
/* if mouse_flag is not zero */
static int get_response()
{
int ret_val= -1;
while(ret_val == -1)
{
if((mouse_flag != MOUSE_ONLY) && kbhit())
{
ret_val=getch();
if(ret_val==ALT)
ret_val=get_extended_key();
/* clear the keyboard buffer */
while(kbhit())
getch();
}
else
if(mouse_flag != KEYBOARD_ONLY)
ret_val=mouse_read();
}
return ret_val;
}