diff options
Diffstat (limited to 'utils.h')
| -rw-r--r-- | utils.h | 16 |
1 files changed, 7 insertions, 9 deletions
| @@ -18,8 +18,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
| 18 | 18 | ||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #ifndef __LOG_H__ | 21 | #ifndef __UTILS_H__ |
| 22 | #define __LOG_H__ | 22 | #define __UTILS_H__ |
| 23 | 23 | ||
| 24 | #include <poll.h> | 24 | #include <poll.h> |
| 25 | 25 | ||
| @@ -29,19 +29,17 @@ enum fdowner { | |||
| 29 | FD_USB | 29 | FD_USB |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | typedef struct { | 32 | struct fdlist { |
| 33 | int count; | 33 | int count; |
| 34 | int capacity; | 34 | int capacity; |
| 35 | enum fdowner *owners; | 35 | enum fdowner *owners; |
| 36 | struct pollfd *fds; | 36 | struct pollfd *fds; |
| 37 | } fdlist; | 37 | }; |
| 38 | 38 | ||
| 39 | void fdlist_create(fdlist *list); | 39 | void fdlist_create(struct fdlist *list); |
| 40 | void fdlist_add(fdlist *list, enum fdowner owner, int fd, short events); | 40 | void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events); |
| 41 | void fdlist_free(fdlist *list); | 41 | void fdlist_free(struct fdlist *list); |
| 42 | 42 | ||
| 43 | #define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) | 43 | #define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) |
| 44 | 44 | ||
| 45 | |||
| 46 | |||
| 47 | #endif | 45 | #endif |
