comparison libpurple/util.c @ 19408:cc36a5aac908

Fix some conversion warnings about using negative values with unsigned types. There are more, but these were easy fixes. You may think that I'm changing the API, but I'm really not - it was just wrong.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 24 Aug 2007 19:43:41 +0000
parents 450090c68351
children 47a2d00ab060
comparison
equal deleted inserted replaced
19407:41417f94afe9 19408:cc36a5aac908
1372 g_string_append_printf(plain, " <%s>", g_strstrip(url->str)); 1372 g_string_append_printf(plain, " <%s>", g_strstrip(url->str));
1373 if (cdata) { 1373 if (cdata) {
1374 g_string_free(cdata, TRUE); 1374 g_string_free(cdata, TRUE);
1375 cdata = NULL; 1375 cdata = NULL;
1376 } 1376 }
1377 1377
1378 } 1378 }
1379 if(tags == tag) 1379 if(tags == tag)
1380 break; 1380 break;
1381 tags = g_list_remove(tags, pt); 1381 tags = g_list_remove(tags, pt);
1382 g_free(pt); 1382 g_free(pt);
1423 ALLOW_TAG("q"); 1423 ALLOW_TAG("q");
1424 ALLOW_TAG("span"); 1424 ALLOW_TAG("span");
1425 ALLOW_TAG("strong"); 1425 ALLOW_TAG("strong");
1426 ALLOW_TAG("ul"); 1426 ALLOW_TAG("ul");
1427 1427
1428 1428
1429 /* we skip <HR> because it's not legal in XHTML-IM. However, 1429 /* we skip <HR> because it's not legal in XHTML-IM. However,
1430 * we still want to send something sensible, so we put a 1430 * we still want to send something sensible, so we put a
1431 * linebreak in its place. <BR> also needs special handling 1431 * linebreak in its place. <BR> also needs special handling
1432 * because putting a </BR> to close it would just be dumb. */ 1432 * because putting a </BR> to close it would just be dumb. */
1433 if((!g_ascii_strncasecmp(c, "<br", 3) 1433 if((!g_ascii_strncasecmp(c, "<br", 3)
2537 * This function is long and beautiful, like my--um, yeah. Anyway, 2537 * This function is long and beautiful, like my--um, yeah. Anyway,
2538 * it includes lots of error checking so as we don't overwrite 2538 * it includes lots of error checking so as we don't overwrite
2539 * people's settings if there is a problem writing the new values. 2539 * people's settings if there is a problem writing the new values.
2540 */ 2540 */
2541 gboolean 2541 gboolean
2542 purple_util_write_data_to_file(const char *filename, const char *data, size_t size) 2542 purple_util_write_data_to_file(const char *filename, const char *data, gssize size)
2543 { 2543 {
2544 const char *user_dir = purple_user_dir(); 2544 const char *user_dir = purple_user_dir();
2545 gchar *filename_temp, *filename_full; 2545 gchar *filename_temp, *filename_full;
2546 FILE *file; 2546 FILE *file;
2547 size_t real_size, byteswritten; 2547 size_t real_size, byteswritten;
4303 g_error_free(error); 4303 g_error_free(error);
4304 fputs(message, filestream); 4304 fputs(message, filestream);
4305 } 4305 }
4306 } 4306 }
4307 4307
4308 gboolean purple_message_meify(char *message, size_t len) 4308 gboolean purple_message_meify(char *message, gssize len)
4309 { 4309 {
4310 char *c; 4310 char *c;
4311 gboolean inside_html = FALSE; 4311 gboolean inside_html = FALSE;
4312 4312
4313 g_return_val_if_fail(message != NULL, FALSE); 4313 g_return_val_if_fail(message != NULL, FALSE);