5 #include <event2/util.h>
7 void *mem_calloc(size_t nmemb
, size_t size
);
8 void *mem_malloc(size_t size
);
9 char *mem_strdup(const char *str
);
10 char *mem_strdup_n(const char *str
, size_t n
);
11 void mem_free(void *buf
);
14 TAILQ_ENTRY(token
) next
;
17 TAILQ_HEAD(token_list
, token
) token
;
19 size_t tokenize(const char *buf
, const char *sep
, int lim
,
20 struct token_list
*tokens
);
21 void token_list_clear(struct token_list
*tokens
);
23 ev_int64_t
get_int(const char *buf
, int base
);
31 struct url
*url_connect_tokenize(const char *str
);
32 struct url
*url_tokenize(const char *str
);
33 void url_free(struct url
*url
);
37 const char *format_addr(const struct sockaddr
*addr
);
38 const char *socket_error_string(evutil_socket_t s
);