oups .. added missing files, added Makefile + .cvsignore list
[my-code/ivac.git] / src / input.c
1 /* input.c -- input management stuff
2  *
3  * author: hackbard@hackdaworld.dyndns.org
4  *
5  */
6
7 #include "input.h"
8
9 int input_init(t_input *input) {
10
11   puts("[input] initializing input system ...");
12
13   if((input->content=(char *)malloc(MAX_CONTENT))==NULL) {
14     perror("[input] malloc call");
15     return K_ERROR;
16   }
17
18   return K_SUCCESS;
19 }
20
21 int input_shutdown(t_input *input) {
22
23   free(input->content);
24   puts("[input] shutdown");
25
26   return K_SUCCESS;
27 }
28
29 int input_get_char(t_input *input) {
30
31   char data[64];
32
33   puts("a hopefully nice display for user interaction will popup soon ;)");
34   read(0,data,64);
35
36   return K_SUCCESS;
37 }