projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more abstraction in network.* and input.*, first display stuff in ivac.*
[my-code/ivac.git]
/
src
/
input.h
diff --git
a/src/input.h
b/src/input.h
index
e31ebe2
..
a3d8dd4
100644
(file)
--- a/
src/input.h
+++ b/
src/input.h
@@
-6,6
+6,7
@@
/* includes */
#include <stdio.h>
#include <stdlib.h>
/* includes */
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <termios.h>
#include <unistd.h>
#include <errno.h>
#include <termios.h>
@@
-19,6
+20,9
@@
#define MAX_CONTENT 128
#define MAX_CONTENT 128
+#define LINE_BUFFERED (1<<0)
+#define CONTENT_BUFFER (1<<1)
+
/* input specific variables */
typedef struct s_input {
char *content;
/* input specific variables */
typedef struct s_input {
char *content;
@@
-29,7
+33,7
@@
typedef struct s_input {
/* function prototypes */
int input_init(t_input *input);
int input_shutdown(t_input *input);
/* function prototypes */
int input_init(t_input *input);
int input_shutdown(t_input *input);
-int input_get_
char
(t_input *input,int (*callback)(t_input *input,void *ptr),
+int input_get_
event
(t_input *input,int (*callback)(t_input *input,void *ptr),
void *ptr);
#endif
void *ptr);
#endif