X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=src%2Finput.c;fp=src%2Finput.c;h=47f808b80b679cda6b20d93f017d48d89c87f4a2;hb=c8c162c2b1f82f32160bcaa4159ea8735a8582c5;hp=0000000000000000000000000000000000000000;hpb=4546108a81317af1135683e85b9340715e585339;p=my-code%2Fivac.git diff --git a/src/input.c b/src/input.c new file mode 100644 index 0000000..47f808b --- /dev/null +++ b/src/input.c @@ -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; +}