Mercurial > pidgin.yaz
diff src/util.c @ 11780:8cb75ba77f9d
[gaim-migrate @ 14071]
I've been time travelling, I bumped into Gtk 2.0 on my way. Gaim now works
with Gtk 2.0 again.
Next stop: gtk 1.2 ... erm. what? ... NO!
PS. resiak: I won!
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 24 Oct 2005 00:31:41 +0000 |
parents | 2350fe2bef87 |
children | f672349cfc1c |
line wrap: on
line diff
--- a/src/util.c Mon Oct 24 00:18:37 2005 +0000 +++ b/src/util.c Mon Oct 24 00:31:41 2005 +0000 @@ -2388,21 +2388,29 @@ gboolean gaim_str_has_prefix(const char *s, const char *p) { +#if GLIB_CHECK_VERSION(2,2,0) + return g_str_has_prefix(s, p); +#else if (!strncmp(s, p, strlen(p))) return TRUE; return FALSE; +#endif } gboolean gaim_str_has_suffix(const char *s, const char *x) { +#if GLIB_CHECK_VERSION(2,2,0) + return g_str_has_suffix(s, x); +#else int off = strlen(s) - strlen(x); if (off >= 0 && !strcmp(s + off, x)) return TRUE; return FALSE; +#endif } char *