summaryrefslogtreecommitdiff
path: root/conio.c
diff options
context:
space:
mode:
Diffstat (limited to 'conio.c')
-rw-r--r--conio.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/conio.c b/conio.c
deleted file mode 100644
index 9b87cc9..0000000
--- a/conio.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "./conio.h"
-#include <termios.h>
-#include <unistd.h>
-#include <stdio.h>
-int getch(void) {
- struct termios oldattr, newattr;
- int ch;
- tcgetattr(STDIN_FILENO, &oldattr);
- newattr = oldattr;
- newattr.c_lflag &= ~(ICANON | ECHO);
- tcsetattr(STDIN_FILENO, TCSANOW, &newattr);
- ch = getchar();
- tcsetattr(STDIN_FILENO, TCSANOW, &oldattr);
- return ch;
-}