AlcapDAQ  1
keyb.h
Go to the documentation of this file.
1 /*
2 kbhit() and getch() for Linux/UNIX
3 Chris Giese <geezer@execpc.com> http://my.execpc.com/~geezer
4 */
5 
6 #ifndef READOUT_TEST_KEYB
7 #define READOUT_TEST_KEYB
8 
9 #ifdef linux
10  #include <sys/time.h> /* struct timeval, select() */
11  #include <termios.h> /* tcgetattr(), tcsetattr() */
12  #include <stdlib.h> /* atexit(), exit() */
13  #include <unistd.h> /* read() */
14  #include <stdio.h> /* printf() */
15  #include <string.h> /* memcpy() */
16 
17  #define CLEARSCR "clear"
18 
19 /*****************************************************************************/
20 /* SLEEP */
21 /*****************************************************************************/
22 void Sleep(int t);
23 
24 /*****************************************************************************/
25 /* GETCH */
26 /*****************************************************************************/
27 int getch(void);
28 
29 /*****************************************************************************/
30 /* KBHIT */
31 /*****************************************************************************/
32 int kbhit();
33 
34 
35 #else // Windows
36 
37  #include <conio.h>
38 
39  #define CLEARSCR "cls"
40 #endif
41 
42 #endif