conio.h
Go to the documentation of this file.
1 
31 #ifndef __CONIO_H_
32 #define __CONIO_H_
33 
34 #include <stdio.h>
35 #include <stdlib.h>
36 #include <string.h>
37 #include <sys/poll.h>
38 #include <termios.h>
39 #include <unistd.h>
40 #include <sys/time.h>
41 #include <sys/types.h>
42 #include <sys/stat.h>
43 #include <fcntl.h>
44 #include <errno.h>
45 
46 static struct termios term_attribs, term_attribs_old;
47 
48 static void restore_term(void)
49 {
50  if(tcsetattr(STDIN_FILENO, TCSAFLUSH, &term_attribs_old) < 0)
51  {
52  perror("tcsetattr: ");
53  exit(-1);
54  }
55 }
56 
57 // #ifdef _cplusplus
58 // extern "C" {
59 // #endif // _cplusplus
60 
67 int _kbhit();
68 
75 int getch();
76 
77 // #ifdef _cplusplus
78 // }
79 // #endif // _cplusplus
80 
81 #endif // __CONIO_H
82 
83 /******************************************************************************/
static struct termios term_attribs term_attribs_old
Definition: conio.h:46
static void restore_term(void)
Definition: conio.h:48
int getch()
gets character from keyboard input
Definition: conio.cpp:96
int _kbhit()
waits for user input on keyboard
Definition: conio.cpp:34


phua_haptic
Author(s): Pedro Cruz
autogenerated on Mon Mar 2 2015 01:32:36