libpurple/protocols/gg/utils.c

changeset 34389
6c08701e549f
parent 34384
c81441091162
child 34394
ed78b0fc180e
equal deleted inserted replaced
34388:aae07f956000 34389:6c08701e549f
100 return FALSE; 100 return FALSE;
101 return g_regex_match_simple("^[ a-zA-Z0-9~`!@#$%^&*()_+=[\\]{};':\",./?" 101 return g_regex_match_simple("^[ a-zA-Z0-9~`!@#$%^&*()_+=[\\]{};':\",./?"
102 "<>\\\\|-]+$", password, 0, 0); 102 "<>\\\\|-]+$", password, 0, 0);
103 } 103 }
104 104
105 guint64 ggp_microtime(void)
106 {
107 // replace with g_get_monotonic_time, when gtk 2.28 will be available
108 GTimeVal time_s;
109
110 g_get_current_time(&time_s);
111
112 return ((guint64)time_s.tv_sec << 32) | time_s.tv_usec;
113 }
114
115 gchar * ggp_utf8_strndup(const gchar *str, gsize n) 105 gchar * ggp_utf8_strndup(const gchar *str, gsize n)
116 { 106 {
117 int raw_len = strlen(str); 107 int raw_len = strlen(str);
118 gchar *end_ptr; 108 gchar *end_ptr;
119 if (str == NULL) 109 if (str == NULL)

mercurial