comparison src/util.h @ 9175:3e2ea5b69605

[gaim-migrate @ 9970] W and S are now implemented for /cmds in core. This means you can do /me with colors again. This was probably the hardest part of cmds that was left to do. So the rest should be fairly easy. Hopefully there's no major bugs in this. There's some inconsist use of g_utf8_isspace vs strchr(s, ' ') I want to clean up yet that will cause some oddness if you use a tab instead of a space as your argument separater. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sat, 05 Jun 2004 07:33:58 +0000
parents 66027eb31f97
children 9171e528d7e5
comparison
equal deleted inserted replaced
9174:a839ef5d2f34 9175:3e2ea5b69605
221 221
222 /** 222 /**
223 * Extracts a field of data from HTML. 223 * Extracts a field of data from HTML.
224 * 224 *
225 * This is a scary function. See protocols/msn/msn.c and 225 * This is a scary function. See protocols/msn/msn.c and
226 * protocols/yahoo/yahoo.c for example usage. 226 * protocols/yahoo/yahoo_profile.c for example usage.
227 * 227 *
228 * @param str The string to parse. 228 * @param str The string to parse.
229 * @param len The size of str. 229 * @param len The size of str.
230 * @param dest The destination GString to append the new 230 * @param dest The destination GString to append the new
231 * field info to. 231 * field info to.
296 * 296 *
297 * @return the text with HTML entities literalized 297 * @return the text with HTML entities literalized
298 */ 298 */
299 char *gaim_unescape_html(const char *html); 299 char *gaim_unescape_html(const char *html);
300 300
301 /**
302 * Returns a newly allocated substring of the HTML UTF-8 string "str".
303 * The markup is preserved such that the substring will have the same
304 * formatting as original string, even though some tags may have been
305 * opened before "x", or may close after "y". All open tags are closed
306 * at the end of the returned string, in the proper order.
307 *
308 * Note that x and y are in character offsets, not byte offsets, and
309 * are offsets into an unformatted version of str. Because of this,
310 * this function may be sensitive to changes in GtkIMHtml and may break
311 * when used with other UI's. libgaim users are encouraged to report and
312 * work out any problems encountered.
313 *
314 * @param str The input NUL terminated, HTML, UTF-8 (or ASCII) string.
315 * @param x The character offset into an unformatted version of str to
316 * begin at.
317 * @param y The character offset (into an unformatted vesion of str) of
318 * one past the last character to include in the slice.
319 *
320 * @return The HTML slice of string, with all formatting retained.
321 */
322 char *gaim_markup_slice(const char *str, guint x, guint y);
323
324 /**
325 * Returns a newly allocated string containing the name of the tag
326 * located at "tag". Tag is expected to point to a '<', and contain
327 * a '>' sometime after that. If there is no '>' and the string is
328 * not NUL terminated, this function can be expected to segfault.
329 *
330 * @param tag The string starting a HTML tag.
331 * @return A string containing the name of the tag.
332 */
333 char *gaim_markup_get_tag_name(const char *tag);
334
301 /*@}*/ 335 /*@}*/
302 336
303 337
304 /**************************************************************************/ 338 /**************************************************************************/
305 /** @name Path/Filename Functions */ 339 /** @name Path/Filename Functions */