diff src/gtkhtml.c @ 79:bfdc427b936d

[gaim-migrate @ 89] I'll save time and just post the email :-) Summary of changes: * Misc malloc/free cleanups, use g_malloc more places and other small stuff (e.g. lineardata not being freed in the error case in sound.c) * Misc signed/unsigned cleanups (use size_t more often) * read() can return -1 at any point, check return values more rigorously (read_rv variables used for this) * In can_play_audio, stat requires a pointer to an allocated stat_buf (the address of an automatic variable) * escape_text needs a buffer at least 4 times the size of the text being passed in (not 2 times); I can force core dumps with lots of newlines otherwise * There's a debug statement in netscape_command (browser.c) that was printf("Hello%d\n"); with no int for the %d; I threw in a getppid(), but the statement should probably come out eventually. Thanks, G Sumner Hayes! committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Wed, 05 Apr 2000 05:34:08 +0000
parents 3b479e2700c9
children fe81c8b4951d
line wrap: on
line diff
--- a/src/gtkhtml.c	Fri Mar 31 20:22:12 2000 +0000
+++ b/src/gtkhtml.c	Wed Apr 05 05:34:08 2000 +0000
@@ -535,8 +535,9 @@
 
 	g_strdown(font_name);
 		
-	if( my_font = 
-			g_datalist_id_get_data(&font_cache, g_quark_from_string(font_name)) )	
+	if( (my_font = 
+	     g_datalist_id_get_data(&font_cache, 
+				    g_quark_from_string(font_name)) ) )	
 	{
 		return my_font;
 	}
@@ -1110,7 +1111,7 @@
 		}
 		else
 		{
-			int st,
+			size_t st,
 			  en;
 			char *str;
 			if (html->num_end > html->num_start)
@@ -1136,7 +1137,7 @@
 	{
 		GtkHtmlBit *shb,
 		 *ehb;
-		int en,
+		size_t en,
 		  st;
 		int len,
 		  nlen;
@@ -2759,8 +2760,8 @@
 	int maxwidth;
 	gint lb;
 	GList *hbits;
-	int num = 0,
-	  i,
+	size_t num = 0;
+	int i,
 	  height;
 	GtkHtmlBit *hb;
 	gint hwidth,
@@ -3679,7 +3680,7 @@
 	GtkHtmlBit *hb = NULL,
 	 *hb2 = NULL;
 	gint y;
-	gint len,
+	size_t len,
 	  len2 = 0;
 
 	undraw_cursor(html);
@@ -3848,7 +3849,7 @@
 			html->cursor_pos = 0;
 		}
 	}
-	else if (html->cursor_pos > strlen(html->cursor_hb->text))
+	else if ((unsigned) html->cursor_pos > strlen(html->cursor_hb->text))
 	{
 		if (hbits->next)
 		{