+int input_get_event(t_input *input,int (*callback)(t_input *input,void *ptr),
+ void *ptr) {
+
+ char data[MAX_CONTENT];
+ int count;
+
+ /* delete char counter if not buffered */
+ if(!(input->mode&CONTENT_BUFFER)) input->c_count=0;
+
+ if((count=read(0,data,MAX_CONTENT))==-1) {
+ perror("[input] read call");
+ return I_ERROR;
+ }
+
+ if(input->c_count>=MAX_CONTENT) {
+ puts("[input] max input length reached");
+ return I_ERROR;
+ }