home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
337_01
/
l_getkey.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-14
|
693b
|
29 lines
/* Copyright (c) James L. Pinson 1990,1991 */
/********************** L_GETKEY.C ***************************/
#include "mydef.h"
/*****************************************************************
Usage: void get_key(char *ch, char *ext);
char *ch= character to read from keyboard.
char *ext= extended character (if any).
Reads character and extended character from keyboard.
*****************************************************************/
void get_key(char *ch, char *ext)
{
*ch=getch(); /* get the character */
if(!*ch){ /* if the character is zero (a special key) */
*ext=getch(); /* get the extension */
}
}