comparison src/util.h @ 8341:fec4c1fb2ac8

[gaim-migrate @ 9065] Alright, I had to lay down a little bit of smack. Here goes: -Work around the rate-limit problem caused by Gaim auto-requesting away messages too quickly. Basically there is now a 1.2sec gap between each request. The downside is that it takes a bit longer for Gaim to get everyone's away message initially. Adium shouldn't need to do anything to take advantage of this. Fire (they use libfaim, right?) will need to add a callback for AIM_CB_LOC_REQUESTINFOTIMEOUT. Just search oscar.c for gaim_reqinfo_timeout() and copy what that thing does. -Attempt to do a better job showing away messages in tooltips. Hopefully & and greater than and less than will show up correctly now. I don't think there should be any side effects, but if you mouse over someone and it crashes or you get a pango error let me know. -Remove/combine some silly functions in util.c that few things use. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 26 Feb 2004 08:29:32 +0000
parents da57fb60680a
children 33cc36f5a7a6
comparison
equal deleted inserted replaced
8340:ab6ffc260785 8341:fec4c1fb2ac8
407 * @return A new string where the special variables are expanded. 407 * @return A new string where the special variables are expanded.
408 */ 408 */
409 const char *gaim_str_sub_away_formatters(const char *str, const char *name); 409 const char *gaim_str_sub_away_formatters(const char *str, const char *name);
410 410
411 /** 411 /**
412 * Copies a string and replaces all HTML linebreaks with newline characters.
413 *
414 * @param dest The destination string.
415 * @param src The source string.
416 * @param dest_len The destination string length.
417 *
418 * @see gaim_strncpy_withhtml()
419 * @see gaim_strdup_withhtml()
420 */
421 void gaim_strncpy_nohtml(char *dest, const char *src, size_t dest_len);
422
423 /**
424 * Copies a string and replaces all newline characters with HTML linebreaks.
425 *
426 * @param dest The destination string.
427 * @param src The source string.
428 * @param dest_len The destination string length.
429 *
430 * @see gaim_strncpy_nohtml()
431 * @see gaim_strdup_withhtml()
432 */
433 void gaim_strncpy_withhtml(gchar *dest, const gchar *src, size_t dest_len);
434
435 /**
436 * Duplicates a string and replaces all newline characters from the 412 * Duplicates a string and replaces all newline characters from the
437 * source string with HTML linebreaks. 413 * source string with HTML linebreaks.
438 * 414 *
439 * @param src The source string. 415 * @param src The source string.
440 * 416 *
441 * @return The new string. 417 * @return The new string. Must be g_free'd by the caller.
442 * 418 */
443 * @see gaim_strncpy_nohtml() 419 gchar *gaim_strdup_withhtml(const gchar *src);
444 * @see gaim_strncpy_withhtml()
445 */
446 char *gaim_strdup_withhtml(const char *src);
447 420
448 /** 421 /**
449 * Ensures that all linefeeds have a matching carriage return. 422 * Ensures that all linefeeds have a matching carriage return.
450 * 423 *
451 * @param str The source string. 424 * @param str The source string.
468 * @param string The string from which to replace stuff. 441 * @param string The string from which to replace stuff.
469 * @param delimiter The substring you want replaced. 442 * @param delimiter The substring you want replaced.
470 * @param replacement The substring you want inserted in place 443 * @param replacement The substring you want inserted in place
471 * of the delimiting substring. 444 * of the delimiting substring.
472 */ 445 */
473 char *gaim_strreplace(const char *string, const char *delimiter, 446 gchar *gaim_strreplace(const char *string, const char *delimiter,
474 const char *replacement); 447 const char *replacement);
448
449 /**
450 * Given a string, this replaces one substring with another
451 * ignoring case and returns a newly allocated string.
452 *
453 * @param string The string from which to replace stuff.
454 * @param delimiter The substring you want replaced.
455 * @param replacement The substring you want inserted in place
456 * of the delimiting substring.
457 */
458 gchar *gaim_strcasereplace(const char *string, const char *delimiter,
459 const char *replacement);
475 460
476 /** 461 /**
477 * This is like strstr, except that it ignores ASCII case in 462 * This is like strstr, except that it ignores ASCII case in
478 * searching for the substring. 463 * searching for the substring.
479 * 464 *