diff src/util.h @ 6982:083d1e4a9c78

[gaim-migrate @ 7538] This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He rewrote the coreish IM image support so that the binary data gets ripped out in the prpl and put in an imgstore instead of just being passed in the same huge as char string as the actual message. This is good because it's prpl agnostic, or something. It also means we don't have a silly length of "-1" with pretty much every send or receive IM function. It should be crash free, bug free, and memleak free, but additional testing is always a good thing. If you like good stuff then you'll love this patch. But don't take my word for it--ba dun dunt! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 19:17:21 +0000
parents 4ae5d9c3d9ec
children 2343c3aa1dec
line wrap: on
line diff
--- a/src/util.h	Sat Sep 27 15:45:49 2003 +0000
+++ b/src/util.h	Sat Sep 27 19:17:21 2003 +0000
@@ -314,6 +314,16 @@
 					   const gchar *replacement);
 
 /**
+ * This is like strstr, except that it ignores ASCII case in
+ * searching for the substring.
+ *
+ * @param haystack The string to search in.
+ * @param needle   The substring to find.
+ * @return the location of the substring if found, or NULL if not
+ */
+const char *gaim_strcasestr(const char *haystack, const char *needle);
+
+/**
  * Returns a string representing a filesize in the appropriate
  * units (MB, KB, GB, etc.)
  *
@@ -321,6 +331,21 @@
  */
 char *gaim_get_size_string(size_t size);
 
+/**
+ * Finds a HTML tag matching the given name, locating its start
+ * and end, and storing its attributes in a GData hash table.
+ * The names of the attributes are lower-cased in the hash table,
+ * and the name of the tag is case insensitive.
+ *
+ * @param needle	the name of the tag
+ * @param haystack	the null-delimited string to search in
+ * @param start		a pointer to the start of the tag if found
+ * @param end		a pointer to the end of the tag if found
+ * @param attributes	the attributes, if the tag was found
+ * @return TRUE if the tag was found
+ */
+gboolean gaim_markup_find_tag(const char *needle, const char *haystack, const char **start, const char **end, GData **attributes);
+
 #ifdef __cplusplus
 }
 #endif