Small change to the gcc argument.
[eco.git] / fd.h
blobd77c41ad476a12ce5a1ce00f0c2538c6728b992a
1 /*
2 * Copyright (C) 2009 Diego Hernan Borghetti.
3 * Eco
4 */
6 #ifndef _ECO_FD_H
7 #define _ECO_FD_H
9 typedef struct _E_Fd {
10 struct _E_Fd *next;
11 struct _E_Fd *prev;
13 /* file descriptor. */
14 int fd;
16 /* This function is called when the file have pending data. */
17 void (*read)(int, void *);
19 /* user data or NULL. */
20 void *data;
21 } E_Fd;
23 int e_fd_listen(void);
24 void e_fd_exec(void);
25 void e_fd_add(int fd, void (*func)(int, void *), void *data);
26 void e_fd_rem(int fd);
28 #endif /* _ECO_FD_H */