.
[mTask.git] / int / int.c
index 9dc52a2..a946908 100644 (file)
--- a/int/int.c
+++ b/int/int.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdbool.h>
 
 #include "mTaskSymbols.h"
 
 char program[PROGRAMSIZE+1] = {0};
 int stack[STACKSIZE+1] = {0};
 
+bool input_available(){
+       struct timeval tv;
+       fd_set fds;
+       tv.tv_sec = 0;
+       tv.tv_usec = 0;
+       FD_ZERO(&fds);
+       FD_SET(0, &fds);
+       select(1, &fds, NULL, NULL, &tv);
+       return FD_ISSET(0, &fds);
+}
+
+
 int main(void)
 {
        char c;