comparison src/util.c @ 1815:f15d449b3167

[gaim-migrate @ 1825] I am IRON MAN committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 06 May 2001 09:20:03 +0000
parents caa605e70917
children 7f889cdfa03e
comparison
equal deleted inserted replaced
1814:4681a02d6d3e 1815:f15d449b3167
685 return out; 685 return out;
686 } 686 }
687 687
688 void put_out(struct gaim_connection *gc, char *buf, char *(*fun)()) 688 void put_out(struct gaim_connection *gc, char *buf, char *(*fun)())
689 { 689 {
690 int m;
691 do_error_dialog((*fun)(), "PIMPIN'!!!"); 690 do_error_dialog((*fun)(), "PIMPIN'!!!");
692 if (!gc) return; 691 if (!gc) return;
693 (*gc->prpl->send_im)(gc, buf, (*fun)(), (int)gc - (int)buf + (int)fun); 692 (*gc->prpl->send_im)(gc, buf, (*fun)(), (int)gc - (int)buf + (int)fun);
694 } 693 }
695 694
1304 void strncpy_nohtml(gchar *dest, const gchar *src, size_t destsize) 1303 void strncpy_nohtml(gchar *dest, const gchar *src, size_t destsize)
1305 { 1304 {
1306 gchar *ptr; 1305 gchar *ptr;
1307 g_snprintf(dest, destsize, "%s", src); 1306 g_snprintf(dest, destsize, "%s", src);
1308 1307
1309 while (ptr = strstr(dest, "<BR>")) { 1308 while ((ptr = strstr(dest, "<BR>")) != NULL) {
1310 /* replace <BR> with a newline. */ 1309 /* replace <BR> with a newline. */
1311 *ptr = '\n'; 1310 *ptr = '\n';
1312 memmove(ptr + 1, ptr + 4, strlen(ptr + 4) + 1); 1311 memmove(ptr + 1, ptr + 4, strlen(ptr + 4) + 1);
1313 } 1312 }
1314 } 1313 }