1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Bull Inc., 1987                *
 4    *                                                         *
 5    * Copyright, (C) Honeywell Information Systems Inc., 1986 *
 6    *                                                         *
 7    *********************************************************** */
 8 
 9 /* HISTORY COMMENTS:
10   1) change(86-08-22,Lee), approve(87-07-13,MCR7580), audit(87-07-13,Leskiw),
11      install(87-08-07,MR12.1-1072):
12      Created.
13                                                    END HISTORY COMMENTS */
14 
15 /* : PROCEDURE FUNCTION (get_kb_key)
16 
17 returns 0 if no key was pressed
18 returns 1 if a key was pressed; the value of the key will be
19    placed in 'ch'; an extended ASCII character code is encoded
20    by adding 256
21 */
22 
23 #include <emulator.h>
24 
25 #if EM_DEBUG
26 
27 get_kb_key (ch)
28 
29 int *ch;
30 {
31    if (!kbhit())
32       return(0);
33    *ch = getch();
34 
35 /* : if extended character, added 256 to next character */
36 
37    if (*ch == 0 && kbhit())
38       *ch = 0x100 | getch();
39    return(1);
40 }
41 #else
42 get_kb_key ()
43 {}
44 #endif
45 ^Z