oups .. added missing files, added Makefile + .cvsignore list
[my-code/ivac.git] / src / input.c
diff --git a/src/input.c b/src/input.c
new file mode 100644 (file)
index 0000000..47f808b
--- /dev/null
@@ -0,0 +1,37 @@
+/* input.c -- input management stuff
+ *
+ * author: hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#include "input.h"
+
+int input_init(t_input *input) {
+
+  puts("[input] initializing input system ...");
+
+  if((input->content=(char *)malloc(MAX_CONTENT))==NULL) {
+    perror("[input] malloc call");
+    return K_ERROR;
+  }
+
+  return K_SUCCESS;
+}
+
+int input_shutdown(t_input *input) {
+
+  free(input->content);
+  puts("[input] shutdown");
+
+  return K_SUCCESS;
+}
+
+int input_get_char(t_input *input) {
+
+  char data[64];
+
+  puts("a hopefully nice display for user interaction will popup soon ;)");
+  read(0,data,64);
+
+  return K_SUCCESS;
+}