]> git.meshlink.io Git - catta/blob - util.h
5c085504bdd2c3ec05b858d23ae0b12cd698349d
[catta] / util.h
1 #ifndef fooutilhfoo
2 #define fooutilhfoo
3
4 #include <glib.h>
5
6 gchar *flx_normalize_name(const gchar *s); /* g_free() the result! */
7 gchar *flx_get_host_name(void); /* g_free() the result! */
8
9 gint flx_timeval_compare(const GTimeVal *a, const GTimeVal *b);
10 glong flx_timeval_diff(const GTimeVal *a, const GTimeVal *b);
11
12 gint flx_set_cloexec(gint fd);
13 gint flx_set_nonblock(gint fd);
14 gint flx_wait_for_write(gint fd);
15
16 GTimeVal *flx_elapse_time(GTimeVal *tv, guint msec, guint jitter);
17
18 gint flx_age(const GTimeVal *a);
19
20 guint flx_domain_hash(const gchar *p);
21 gboolean flx_domain_cmp(const gchar *a, const gchar *b);
22 gboolean flx_domain_equal(const gchar *a, const gchar *b);
23
24 void flx_hexdump(gconstpointer p, guint size);
25
26 #endif