| 1526 imhtml_find_protocol(const char *url, gboolean reverse) |
1526 imhtml_find_protocol(const char *url, gboolean reverse) |
| 1527 { |
1527 { |
| 1528 GtkIMHtmlClass *klass; |
1528 GtkIMHtmlClass *klass; |
| 1529 GList *iter; |
1529 GList *iter; |
| 1530 GtkIMHtmlProtocol *proto = NULL; |
1530 GtkIMHtmlProtocol *proto = NULL; |
| 1531 int length = reverse ? strlen(url) : -1; |
1531 gssize length = reverse ? (gssize)strlen(url) : -1; |
| 1532 |
1532 |
| 1533 klass = g_type_class_ref(GTK_TYPE_IMHTML); |
1533 klass = g_type_class_ref(GTK_TYPE_IMHTML); |
| 1534 for (iter = klass->protocols; iter; iter = iter->next) { |
1534 for (iter = klass->protocols; iter; iter = iter->next) { |
| 1535 proto = iter->data; |
1535 proto = iter->data; |
| 1536 if (g_ascii_strncasecmp(url, proto->name, reverse ? MIN(length, proto->length) : proto->length) == 0) { |
1536 if (g_ascii_strncasecmp(url, proto->name, reverse ? MIN(length, proto->length) : proto->length) == 0) { |