home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
getakey.cc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1987-11-10
|
343 b
|
15 lines
get_akey(char *ch, char *list)
/* Wait until one of the charaacters in the list is pressed. ch will be set
to the upper case value of the key pressed.
*/
{
char scan;
strupr(list);
while(1) {
get_ca(ch,&scan);
if(*ch=='\x00') continue;
*ch=toupper(*ch);
if(strchr(list,*ch)) return;
}
}