[gtkhtml] Coding style and whitespace cleanup.



commit 368230ab70567dc189acb4e7b9e836422159cd06
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Aug 5 16:36:43 2012 -0400

    Coding style and whitespace cleanup.

 a11y/object.c                              |    2 +-
 a11y/text.c                                |   22 ++--
 components/editor/gtkhtml-spell-language.c |    2 +-
 gtkhtml/dllmain.c                          |    2 +-
 gtkhtml/gtkhtml-stream.c                   |    2 +-
 gtkhtml/gtkhtml.c                          |  111 +++++++++--------
 gtkhtml/gtkhtmldebug.c                     |    6 +-
 gtkhtml/htmlbutton.c                       |    2 +-
 gtkhtml/htmlclue.c                         |    2 +-
 gtkhtml/htmlclueflow.c                     |    6 +-
 gtkhtml/htmlcluev.c                        |    4 +-
 gtkhtml/htmlcursor.c                       |    2 +-
 gtkhtml/htmlembedded.c                     |   44 +++----
 gtkhtml/htmlengine-edit-table.c            |    2 +-
 gtkhtml/htmlengine-save.c                  |    8 +-
 gtkhtml/htmlengine.c                       |  178 ++++++++++++++--------------
 gtkhtml/htmlentity.c                       |    2 +-
 gtkhtml/htmliframe.c                       |    2 +-
 gtkhtml/htmlimageinput.c                   |    4 +-
 gtkhtml/htmlpainter.c                      |    4 +-
 gtkhtml/htmlprinter.c                      |    4 +-
 gtkhtml/htmlshape.c                        |   72 ++++++------
 gtkhtml/htmltable.c                        |    2 +-
 gtkhtml/htmltablecell.c                    |    2 +-
 gtkhtml/htmltext.c                         |    2 +-
 gtkhtml/htmltextarea.c                     |    2 +-
 gtkhtml/htmltokenizer.c                    |    6 +-
 gtkhtml/test-stress.c                      |    4 +-
 gtkhtml/test-suite.c                       |    4 +-
 gtkhtml/testgtkhtml.c                      |   94 ++++++++-------
 30 files changed, 300 insertions(+), 299 deletions(-)
---
diff --git a/a11y/object.c b/a11y/object.c
index 767837d..207dc53 100644
--- a/a11y/object.c
+++ b/a11y/object.c
@@ -338,7 +338,7 @@ gtk_html_a11y_cursor_changed_cb (GtkWidget *widget)
 			gint offset;
 
 			offset = (GTK_HTML (widget))->engine->cursor->offset;
-			g_signal_emit_by_name(focus_object, "text_caret_moved",offset);
+			g_signal_emit_by_name (focus_object, "text_caret_moved",offset);
 		}
 	}
 }
diff --git a/a11y/text.c b/a11y/text.c
index 2eb64c2..383de00 100644
--- a/a11y/text.c
+++ b/a11y/text.c
@@ -123,7 +123,7 @@ action_get_name (AtkAction *action,
                  gint i)
 {
 	if (i == 0)
-                return _("grab focus");
+		return _("grab focus");
 
 	return NULL;
 }
@@ -829,7 +829,7 @@ html_a11y_text_get_run_attributes (AtkText *text,
 	/* Get attributes */
 	if ((pango_string = (PangoAttrString *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_FAMILY)) != NULL) {
-		value = g_strdup_printf("%s", pango_string->value);
+		value = g_strdup_printf ("%s", pango_string->value);
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_FAMILY_NAME,
 				value);
@@ -844,7 +844,7 @@ html_a11y_text_get_run_attributes (AtkText *text,
 
 	if ((pango_int = (PangoAttrInt *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_WEIGHT)) != NULL) {
-		value = g_strdup_printf("%i", pango_int->value);
+		value = g_strdup_printf ("%i", pango_int->value);
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_WEIGHT,
 				value);
@@ -865,7 +865,7 @@ html_a11y_text_get_run_attributes (AtkText *text,
 	}
 	if ((pango_int = (PangoAttrInt *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_SIZE)) != NULL) {
-		value = g_strdup_printf("%i", pango_int->value / PANGO_SCALE);
+		value = g_strdup_printf ("%i", pango_int->value / PANGO_SCALE);
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_SIZE,
 				value);
@@ -886,21 +886,21 @@ html_a11y_text_get_run_attributes (AtkText *text,
 	}
 	if ((pango_int = (PangoAttrInt *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_RISE)) != NULL) {
-		value = g_strdup_printf("%i", pango_int->value);
+		value = g_strdup_printf ("%i", pango_int->value);
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_RISE,
 				value);
 	}
 	if ((pango_lang = (PangoAttrLanguage *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_LANGUAGE)) != NULL) {
-		value = g_strdup ( pango_language_to_string ( pango_lang->value));
+		value = g_strdup (pango_language_to_string (pango_lang->value));
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_LANGUAGE,
 				value);
 	}
 	if ((pango_float = (PangoAttrFloat *) pango_attr_iterator_get (iter,
 						PANGO_ATTR_SCALE)) != NULL) {
-		value = g_strdup_printf("%g", pango_float->value);
+		value = g_strdup_printf ("%g", pango_float->value);
 		attrib_set = gail_misc_add_attribute (attrib_set,
 				ATK_TEXT_ATTR_SCALE,
 				value);
@@ -1057,7 +1057,7 @@ html_a11y_text_set_text_contents (AtkEditableText *text,
 	html_engine_paste_text (html->engine, string, -1);
 	html_engine_show_cursor (html->engine);
 
-        g_signal_emit_by_name(html, "grab_focus");
+	g_signal_emit_by_name (html, "grab_focus");
 }
 
 static void
@@ -1127,7 +1127,7 @@ html_a11y_text_cut_text (AtkEditableText *text,
 	html_engine_cut (html->engine);
 	html_engine_show_cursor (html->engine);
 
-        g_signal_emit_by_name(html, "grab_focus");
+	g_signal_emit_by_name (html, "grab_focus");
 }
 
 static void
@@ -1146,7 +1146,7 @@ html_a11y_text_delete_text (AtkEditableText *text,
 
 	html_cursor_jump_to (html->engine->cursor, html->engine, HTML_OBJECT (t), start_pos);
 	html_engine_delete_n (html->engine, end_pos - start_pos, TRUE);
-        g_signal_emit_by_name(html, "grab_focus");
+	g_signal_emit_by_name (html, "grab_focus");
 }
 
 static void
@@ -1168,7 +1168,7 @@ html_a11y_text_paste_text (AtkEditableText *text,
 	html_engine_paste (html->engine);
 	html_engine_show_cursor (html->engine);
 
-        g_signal_emit_by_name(html, "grab_focus");
+	g_signal_emit_by_name (html, "grab_focus");
 }
 
 static void
diff --git a/components/editor/gtkhtml-spell-language.c b/components/editor/gtkhtml-spell-language.c
index 9bab4b2..bc9d8ef 100644
--- a/components/editor/gtkhtml-spell-language.c
+++ b/components/editor/gtkhtml-spell-language.c
@@ -98,7 +98,7 @@ _get_isocodeslocaledir (void)
 		return retval;
 
 	strcpy (retval, _get_iso_codes_prefix ());
-	strcat (retval, "\\share\\locale" );
+	strcat (retval, "\\share\\locale");
 	beenhere = 1;
 	return retval;
 }
diff --git a/gtkhtml/dllmain.c b/gtkhtml/dllmain.c
index eff7ee3..b939e64 100644
--- a/gtkhtml/dllmain.c
+++ b/gtkhtml/dllmain.c
@@ -43,7 +43,7 @@ replace_prefix (const gchar *runtime_prefix,
                 const gchar *configure_time_path)
 {
 	if (runtime_prefix &&
-            strncmp (configure_time_path, PREFIX "/",
+	    strncmp (configure_time_path, PREFIX "/",
 		     strlen (PREFIX) + 1) == 0)
 		return g_strconcat (runtime_prefix,
 				    configure_time_path + strlen (PREFIX),
diff --git a/gtkhtml/gtkhtml-stream.c b/gtkhtml/gtkhtml-stream.c
index e07c4ce..00a2abd 100644
--- a/gtkhtml/gtkhtml-stream.c
+++ b/gtkhtml/gtkhtml-stream.c
@@ -173,7 +173,7 @@ stream_log_write (GtkHTMLStream *stream,
 	gint i;
 
 	for (i = 0; i < size; i++)
-		fprintf (log->file, "%c", buffer [i]);
+		fprintf (log->file, "%c", buffer[i]);
 
 	gtk_html_stream_write (log->stream, buffer, size);
 
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 91abeca..ec30a76 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -1525,14 +1525,14 @@ mouse_change_pos (GtkWidget *widget,
 			/* FIXME this is broken */
 
 			if (type == HTML_TYPE_BUTTON ||
-			    type ==  HTML_TYPE_CHECKBOX ||
-			    type ==  HTML_TYPE_EMBEDDED ||
-			    type ==  HTML_TYPE_HIDDEN ||
-			    type ==  HTML_TYPE_IMAGEINPUT ||
-			    type ==  HTML_TYPE_RADIO ||
-			    type ==  HTML_TYPE_SELECT ||
-			    type ==  HTML_TYPE_TEXTAREA ||
-			    type ==  HTML_TYPE_TEXTINPUT ) {
+			    type == HTML_TYPE_CHECKBOX ||
+			    type == HTML_TYPE_EMBEDDED ||
+			    type == HTML_TYPE_HIDDEN ||
+			    type == HTML_TYPE_IMAGEINPUT ||
+			    type == HTML_TYPE_RADIO ||
+			    type == HTML_TYPE_SELECT ||
+			    type == HTML_TYPE_TEXTAREA ||
+			    type == HTML_TYPE_TEXTINPUT) {
 				return FALSE;
 			}
 		}
@@ -2393,61 +2393,68 @@ gtk_html_get_selection_plain_text (GtkHTML *html,
 
 static gchar *
 utf16_to_utf8_with_bom_check (guchar *data,
-                              guint len) {
-        const gchar *fromcode = NULL;
-        GError *error = NULL;
-        guint16 c;
-        gsize read_len,
-                              written_len;
-        gchar *utf8_ret;
+                              guint len)
+{
+	const gchar *fromcode = NULL;
+	GError *error = NULL;
+	guint16 c;
+	gsize read_len;
+	gsize written_len;
+	gchar *utf8_ret;
 
 	/*
 	 * Unicode Techinical Report 20
-	 * ( http://www.unicode.org/unicode/reports/tr20/ ) says to treat an
+	 * (http://www.unicode.org/unicode/reports/tr20/) says to treat an
 	 * initial 0xfeff (ZWNBSP) as a byte order indicator so that is
 	 * what we do.  If there is no indicator assume it is in the default
 	 * order
 	 */
 
-        memcpy (&c,
-                              data,
-                              2);
-        switch (c) {
-        case 0xfeff:
-        case 0xfffe:
-                fromcode = utf16_order (c == 0xfeff);
-                data += 2;
-                len  -= 2;
-                break;
-        default:
+	memcpy (&c, data, 2);
+
+	switch (c) {
+	case 0xfeff:
+	case 0xfffe:
+		fromcode = utf16_order (c == 0xfeff);
+		data += 2;
+		len  -= 2;
+		break;
+	default:
 		fromcode = "UTF-16";
-                break;
-        }
+		break;
+	}
 
-	utf8_ret = g_convert ((gchar *) data, len, "UTF-8", fromcode, &read_len, &written_len, &error);
+	utf8_ret = g_convert ((gchar *) data,
+			      len,
+			      "UTF-8",
+			      fromcode,
+			      &read_len,
+			      &written_len,
+			      &error);
 
-        if (error) {
+	if (error) {
 		g_warning ("g_convert error: %s\n", error->message);
-                g_error_free (error);
-        }
-        return (utf8_ret);
+		g_error_free (error);
+	}
+	return (utf8_ret);
 }
 
 /* removes useless leading BOM from UTF-8 string if present */
 static gchar *
-utf8_filter_out_bom (gchar *str) {
-        if (!str)
-                return NULL;
+utf8_filter_out_bom (gchar *str)
+{
+	if (!str)
+		return NULL;
 
 	/* input is always valid, NUL-terminated UTF-8 sequence, we don't need
 	 * to validated it again */
-        if (g_utf8_get_char (str) == 0xfeff) {
-                gchar *out = g_strdup (g_utf8_next_char (str));
-                g_free (str);
-                return out;
-        }
+	if (g_utf8_get_char (str) == 0xfeff) {
+		gchar *out = g_strdup (g_utf8_next_char (str));
+		g_free (str);
+		return out;
+	}
 
-        return str;
+	return str;
 }
 
 /* Initialization.  */
@@ -2801,7 +2808,7 @@ drag_data_received (GtkWidget *widget,
 		 HTMLObject *obj;
 		 gint list_len, len;
 		 gchar *uri;
-                 html_undo_level_begin (engine->undo, "Dropped URI(s)", "Remove Dropped URI(s)");
+		 html_undo_level_begin (engine->undo, "Dropped URI(s)", "Remove Dropped URI(s)");
 		 list_len = length;
 		 do {
 			 uri = next_uri ((guchar **) &data, &len, &list_len);
@@ -3314,7 +3321,7 @@ gtk_html_im_commit_cb (GtkIMContext *context,
 	html->priv->im_block_reset = TRUE;
 
 	if (html->priv->im_pre_len > 0) {
-                D_IM (printf ("IM delete last preedit %d + %d\n", html->priv->im_pre_pos, html->priv->im_pre_len);)
+		D_IM (printf ("IM delete last preedit %d + %d\n", html->priv->im_pre_pos, html->priv->im_pre_len);)
 
 		html_undo_freeze (html->engine->undo);
 		html_cursor_exactly_jump_to_position_no_spell (html->engine->cursor, html->engine, html->priv->im_pre_pos);
@@ -4559,11 +4566,11 @@ clipboard_get_contents_cb (GtkClipboard *clipboard,
 		gtk_selection_data_set (selection_data,
 					gdk_atom_intern ("text/html", FALSE), 8,
 					(const guchar *) contents->html_text,
-					(gint ) strlen (contents->html_text));
+					(gint) strlen (contents->html_text));
 	} else if (contents->plain_text) {
 		gtk_selection_data_set_text (selection_data,
 					     contents->plain_text,
-					     (gint ) strlen (contents->plain_text));
+					     (gint) strlen (contents->plain_text));
 	}
 }
 
@@ -4801,26 +4808,26 @@ void
 gtk_html_set_default_engine (GtkHTML *html,
                              gboolean engine_type)
 {
-	html_engine_set_engine_type ( html->engine, engine_type);
+	html_engine_set_engine_type (html->engine, engine_type);
 }
 
 gboolean
 gtk_html_get_default_engine (GtkHTML *html)
 {
-	return html_engine_get_engine_type ( html->engine);
+	return html_engine_get_engine_type (html->engine);
 }
 
 void
 gtk_html_set_default_content_type (GtkHTML *html,
                                    const gchar *content_type)
 {
-    html_engine_set_content_type ( html->engine, content_type);
+    html_engine_set_content_type (html->engine, content_type);
 }
 
 const gchar *
 gtk_html_get_default_content_type (GtkHTML *html)
 {
-    return html_engine_get_content_type ( html->engine);
+    return html_engine_get_content_type (html->engine);
 }
 
 gpointer
@@ -4969,7 +4976,7 @@ scroll_command (GtkHTML *html,
 		return FALSE;
 	}
 
-	d_s(printf("%f %f %f\n", value + delta, lower, MAX (0.0, upper - page_size));)
+	d_s (printf ("%f %f %f\n", value + delta, lower, MAX (0.0, upper - page_size));)
 
 	if (lower > (value + delta)) {
 		if (lower >= value)
diff --git a/gtkhtml/gtkhtmldebug.c b/gtkhtml/gtkhtmldebug.c
index cff716c..6d76095 100644
--- a/gtkhtml/gtkhtmldebug.c
+++ b/gtkhtml/gtkhtmldebug.c
@@ -164,7 +164,7 @@ gtk_html_debug_dump_object (HTMLObject *obj,
 			 clueflow_style_to_string (HTML_CLUEFLOW (obj)->style), HTML_CLUEFLOW (obj)->levels->len);
 		g_print (" levels: [");
 		for (i = 0; i < HTML_CLUEFLOW (obj)->levels->len; i++) {
-			g_print ("%d", HTML_CLUEFLOW (obj)->levels->data [i]);
+			g_print ("%d", HTML_CLUEFLOW (obj)->levels->data[i]);
 			if (i < HTML_CLUEFLOW (obj)->levels->len - 1)
 				g_print (" ");
 		}
@@ -208,7 +208,7 @@ gtk_html_debug_dump_object (HTMLObject *obj,
 		offset = 0;
 		while (offset < HTML_TEXT_SLAVE (obj)->posLen) {
 			tw += HTML_TEXT_SLAVE (obj)->owner->pi->entries[ii].widths[io];
-			g_print ("%d ", HTML_TEXT_SLAVE (obj)->owner->pi->entries [ii].widths [io]);
+			g_print ("%d ", HTML_TEXT_SLAVE (obj)->owner->pi->entries[ii].widths[io]);
 			html_text_pi_forward (HTML_TEXT_SLAVE (obj)->owner->pi, &ii, &io);
 			offset++;
 		}
@@ -232,7 +232,7 @@ gtk_html_debug_dump_object (HTMLObject *obj,
 /*		debug_spell_errors (text->spell_errors); */
 		if (text->pi) {
 			for (i =0; i < text->pi->n; i++)
-				g_print ("item %d offset: %d length: %d\n", i, text->pi->entries [i].glyph_item.item->offset, text->pi->entries [i].glyph_item.item->length);
+				g_print ("item %d offset: %d length: %d\n", i, text->pi->entries[i].glyph_item.item->offset, text->pi->entries[i].glyph_item.item->length);
 
 			for (i = 0; i < text->text_len; i++) {
 				union {
diff --git a/gtkhtml/htmlbutton.c b/gtkhtml/htmlbutton.c
index 3d934f9..0db028e 100644
--- a/gtkhtml/htmlbutton.c
+++ b/gtkhtml/htmlbutton.c
@@ -129,7 +129,7 @@ html_button_init (HTMLButton *button,
 
 	html_embedded_init (element, HTML_EMBEDDED_CLASS (klass), parent, name, value);
 
-	if ( strlen (element->value)) {
+	if (strlen (element->value)) {
 		widget = gtk_button_new_with_label (element->value);
 	} else {
 		switch (type) {
diff --git a/gtkhtml/htmlclue.c b/gtkhtml/htmlclue.c
index afc97b4..1920734 100644
--- a/gtkhtml/htmlclue.c
+++ b/gtkhtml/htmlclue.c
@@ -423,7 +423,7 @@ find_anchor (HTMLObject *self,
 	clue = HTML_CLUE (self);
 
 	for (obj = clue->head; obj != NULL; obj = obj->next) {
-		if ((anchor = html_object_find_anchor ( obj, name, x, y)) != 0 )
+		if ((anchor = html_object_find_anchor (obj, name, x, y)) != 0 )
 			return anchor;
 	}
 
diff --git a/gtkhtml/htmlclueflow.c b/gtkhtml/htmlclueflow.c
index 7cab960..9bbbe07 100644
--- a/gtkhtml/htmlclueflow.c
+++ b/gtkhtml/htmlclueflow.c
@@ -1516,7 +1516,7 @@ check_point (HTMLObject *self,
 	if (for_cursor)
 		x = MAX (x, get_indent (HTML_CLUEFLOW (self), painter));
 
-	for (p = clue->head; p; ) {
+	for (p = clue->head; p;) {
 
 		if (html_object_is_text (p))
 			p = p->next;
@@ -1526,7 +1526,7 @@ check_point (HTMLObject *self,
 		line_y  = line_ly;
 		line_ly = p->y + p->descent;
 
-		for (eol = p; eol && (eol->y - eol->ascent < line_ly || eol->ascent + eol->y == line_y); ) {
+		for (eol = p; eol && (eol->y - eol->ascent < line_ly || eol->ascent + eol->y == line_y);) {
 			line_ly = MAX (line_ly, eol->y + eol->descent);
 			do
 				eol = eol->next;
@@ -1534,7 +1534,7 @@ check_point (HTMLObject *self,
 		}
 
 		if (y >= line_y && y < line_ly)
-			for (cur = p; cur && cur != eol; ) {
+			for (cur = p; cur && cur != eol;) {
 				obj = html_object_check_point (cur, painter, x, for_cursor
 							       ? MIN (MAX (y, cur->y - cur->ascent),
 								      cur->y + cur->descent - 1) : y,
diff --git a/gtkhtml/htmlcluev.c b/gtkhtml/htmlcluev.c
index 33e20c5..b302770 100644
--- a/gtkhtml/htmlcluev.c
+++ b/gtkhtml/htmlcluev.c
@@ -419,9 +419,9 @@ draw (HTMLObject *o,
 	tx += o->x;
 	ty += o->y - o->ascent;
 
-	for ( aclue = HTML_CLUEV (o)->align_left_list;
+	for (aclue = HTML_CLUEV (o)->align_left_list;
 	      aclue != NULL;
-	      aclue = cluev_next_aligned (aclue) ) {
+	      aclue = cluev_next_aligned (aclue)) {
 		html_object_draw (aclue,
 				  p,
 				  x - o->x - aclue->parent->x,
diff --git a/gtkhtml/htmlcursor.c b/gtkhtml/htmlcursor.c
index cead86c..ab835a4 100644
--- a/gtkhtml/htmlcursor.c
+++ b/gtkhtml/htmlcursor.c
@@ -52,7 +52,7 @@ debug_location (const HTMLCursor *cursor)
 	HTMLObject *object;
 
 	if (gtk_html_cursor_debug_flag == -1) {
-		if (getenv("GTK_HTML_DEBUG_CURSOR") != NULL)
+		if (getenv ("GTK_HTML_DEBUG_CURSOR") != NULL)
 			gtk_html_cursor_debug_flag = 1;
 		else
 			gtk_html_cursor_debug_flag = 0;
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index ec71abd..1955c64 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -249,12 +249,12 @@ html_embedded_encode_string (const gchar *before,
 	    const gchar * str = before;
 	    static const gchar *safe = "$-._!*(),"; /* RFC 1738 */
 	unsigned pos = 0;
-        GString *encoded = g_string_new ("");
+	GString *encoded = g_string_new ("");
 	gchar buffer[5], *ptr;
 		guchar c;
 
 	    GIConv iconv_cd = generate_iconv_to (codepage);
-	    if ( is_valid_g_iconv (iconv_cd))
+	    if (is_valid_g_iconv (iconv_cd))
 	    {
 		str= convert_text_encoding (iconv_cd, before);
 		g_iconv_close (iconv_cd);
@@ -264,27 +264,19 @@ html_embedded_encode_string (const gchar *before,
 
 		c = (guchar) str[pos];
 
-		if ( (( c >= 'A') && ( c <= 'Z')) ||
-		     (( c >= 'a') && ( c <= 'z')) ||
-		     (( c >= '0') && ( c <= '9')) ||
-		     (strchr (safe, c))
-		     )
-			{
-				encoded = g_string_append_c (encoded, c);
-			}
-		else if (c == ' ')
-			{
-				encoded = g_string_append_c (encoded, '+');
-			}
-		else if (c == '\n')
-			{
-				encoded = g_string_append (encoded, "%0D%0A");
-			}
-		else if (c != '\r')
-			{
-				sprintf( buffer, "%%%02X", (gint)c );
-				encoded = g_string_append (encoded, buffer);
-				}
+		if ((( c >= 'A') && (c <= 'Z')) ||
+		    (( c >= 'a') && (c <= 'z')) ||
+		    (( c >= '0') && (c <= '9')) ||
+		    (strchr (safe, c))) {
+			encoded = g_string_append_c (encoded, c);
+		} else if (c == ' ') {
+			encoded = g_string_append_c (encoded, '+');
+		} else if (c == '\n') {
+			encoded = g_string_append (encoded, "%0D%0A");
+		} else if (c != '\r') {
+			sprintf (buffer, "%%%02X", (gint) c);
+			encoded = g_string_append (encoded, buffer);
+		}
 		pos++;
 	}
 
@@ -346,11 +338,11 @@ html_embedded_init (HTMLEmbedded *element,
 	if (name)
 		element->name = g_strdup (name);
 	else
-		element->name = g_strdup("");
+		element->name = g_strdup ("");
 	if (value)
 		element->value = g_strdup (value);
 	else
-		element->value = g_strdup("");
+		element->value = g_strdup ("");
 	element->widget = NULL;
 	element->parent = parent;
 	element->width  = 0;
@@ -397,7 +389,7 @@ html_embedded_new_widget (GtkWidget *parent,
 	/* pass em as the user_data so that the handler will disconnect
 	 * when the object is destoyed
 	 */
-	g_signal_connect(eb, "button_press_event", G_CALLBACK (html_embedded_grab_cursor), em);
+	g_signal_connect (eb, "button_press_event", G_CALLBACK (html_embedded_grab_cursor), em);
 	em->changed_id = g_signal_connect (eb, "changed", G_CALLBACK (html_embedded_object_changed), engine);
 	/* printf ("id %u\n", em->changed_id); */
 
diff --git a/gtkhtml/htmlengine-edit-table.c b/gtkhtml/htmlengine-edit-table.c
index 435fdb2..7e29330 100644
--- a/gtkhtml/htmlengine-edit-table.c
+++ b/gtkhtml/htmlengine-edit-table.c
@@ -516,7 +516,7 @@ html_engine_delete_table_column (HTMLEngine *e)
 	table = html_engine_get_table (e);
 	if (!table || !HTML_IS_TABLE (table) ||
 		!html_engine_get_table_start_end_cells (e, &start_cell, &end_cell))       {
-                g_warning ("Invalid table object! Row deletion failed!");
+		g_warning ("Invalid table object! Row deletion failed!");
 		return;
 	}
 
diff --git a/gtkhtml/htmlengine-save.c b/gtkhtml/htmlengine-save.c
index 8886110..44b01d4 100644
--- a/gtkhtml/htmlengine-save.c
+++ b/gtkhtml/htmlengine-save.c
@@ -109,7 +109,7 @@ html_encode_entities (const gchar *input,
 		} else {
 			gchar buf[10], *ptr;
 
-			g_snprintf(buf, 9, "&#%d;", uc);
+			g_snprintf (buf, 9, "&#%d;", uc);
 
 			ptr = buf;
 			while (*ptr != 0)
@@ -253,9 +253,9 @@ get_body (HTMLEngine *e)
 	gchar *url = NULL;
 
 	cset = e->settings->color_set;
-	text = (cset->changed [HTMLTextColor]) ? color_to_string ("TEXT", cset->color [HTMLTextColor]) : g_strdup ("");
-	link = (cset->changed [HTMLLinkColor]) ? color_to_string ("LINK", cset->color [HTMLLinkColor]) : g_strdup ("");
-	bg   = (cset->changed [HTMLBgColor]) ? color_to_string ("BGCOLOR", cset->color [HTMLBgColor]) : g_strdup ("");
+	text = (cset->changed[HTMLTextColor]) ? color_to_string ("TEXT", cset->color[HTMLTextColor]) : g_strdup ("");
+	link = (cset->changed[HTMLLinkColor]) ? color_to_string ("LINK", cset->color[HTMLLinkColor]) : g_strdup ("");
+	bg   = (cset->changed[HTMLBgColor]) ? color_to_string ("BGCOLOR", cset->color[HTMLBgColor]) : g_strdup ("");
 	bg_image = e->bgPixmapPtr ? g_strdup_printf (" BACKGROUND=\"%s\"",
 						     url = html_image_resolve_image_url
 						     (e->widget, ((HTMLImagePointer *) e->bgPixmapPtr)->url))
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 4c1bf9f..c530151 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -125,7 +125,7 @@ static void      element_parse_iframe      (HTMLEngine *e,
 					    HTMLObject *clue,
 					    const gchar *s);
 static void      update_embedded           (GtkWidget *widget,
-					    gpointer );
+					    gpointer);
 
 static void      html_engine_map_table_clear (HTMLEngine *e);
 static void      html_engine_id_table_clear (HTMLEngine *e);
@@ -281,7 +281,7 @@ html_element_new_parse (HTMLEngine *e,
 		const gchar *token = html_string_tokenizer_next_token (e->st);
 		gchar **attr;
 
-		DE(g_print ("token = %s\n", token));
+		DE (g_print ("token = %s\n", token));
 		attr = g_strsplit (token, "=", 2);
 
 		if (attr[0]) {
@@ -434,7 +434,7 @@ current_color (HTMLEngine *e)
 	HTMLElement *span;
 	GList *item;
 
-	g_return_val_if_fail ( HTML_IS_ENGINE (e), NULL );
+	g_return_val_if_fail (HTML_IS_ENGINE (e), NULL);
 
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
@@ -521,7 +521,7 @@ current_row_valign (HTMLEngine *e)
 	GList *item;
 	HTMLVAlignType rv = HTML_VALIGN_MIDDLE;
 
-	g_return_val_if_fail (HTML_IS_ENGINE (e), HTML_VALIGN_TOP );
+	g_return_val_if_fail (HTML_IS_ENGINE (e), HTML_VALIGN_TOP);
 
 	if (!html_stack_top (e->table_stack)) {
 		DT (g_warning ("missing table");)
@@ -531,7 +531,7 @@ current_row_valign (HTMLEngine *e)
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
 		if (span->style->display == DISPLAY_TABLE_ROW) {
-			DT(g_warning ("found row");)
+			DT (g_warning ("found row");)
 
 			rv = span->style->text_valign;
 
@@ -539,14 +539,14 @@ current_row_valign (HTMLEngine *e)
 		}
 
 		if (span->style->display == DISPLAY_TABLE) {
-			DT(g_warning ("found table before row");)
+			DT (g_warning ("found table before row");)
 			break;
 		}
 	}
 
 	DT (
 	if (ID_EQ (span->id, ID_TR))
-		DT(g_warning ("no row");)
+		DT (g_warning ("no row");)
 	);
 
 	return rv;
@@ -569,7 +569,7 @@ current_row_align (HTMLEngine *e)
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
 		if (span->style->display == DISPLAY_TABLE_ROW) {
-			DT(g_warning ("found row");)
+			DT (g_warning ("found row");)
 
 			if (span->style)
 				rv = span->style->text_align;
@@ -578,14 +578,14 @@ current_row_align (HTMLEngine *e)
 		}
 
 		if (span->style->display == DISPLAY_TABLE) {
-			DT(g_warning ("found table before row");)
+			DT (g_warning ("found table before row");)
 			break;
 		}
 	}
 
 	DT (
 	if (ID_EQ (span->id, ID_TR))
-		DT(g_warning ("no row");)
+		DT (g_warning ("no row");)
 	);
 	return rv;
 }
@@ -639,7 +639,7 @@ current_alignment (HTMLEngine *e)
 	GList *item;
 	gint maxLevel = 0;
 
-	g_return_val_if_fail (HTML_IS_ENGINE (e), HTML_HALIGN_NONE );
+	g_return_val_if_fail (HTML_IS_ENGINE (e), HTML_HALIGN_NONE);
 
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
@@ -1911,9 +1911,9 @@ element_parse_area (HTMLEngine *e,
 			type = g_strdup (token + 6);
 		} else if (g_ascii_strncasecmp (token, "href=", 5) == 0) {
 			href = g_strdup (token +5);
-		} else if ( g_ascii_strncasecmp (token, "target=", 7) == 0) {
+		} else if (g_ascii_strncasecmp (token, "target=", 7) == 0) {
 			target = g_strdup (token + 7);
-		} else if ( g_ascii_strncasecmp (token, "coords=", 7) == 0) {
+		} else if (g_ascii_strncasecmp (token, "coords=", 7) == 0) {
 			coords = g_strdup (token + 7);
 		}
 	}
@@ -2267,36 +2267,36 @@ element_parse_body (HTMLEngine *e,
 				html_image_factory_unregister (e->image_factory, e->bgPixmapPtr, NULL);
 			e->bgPixmapPtr = html_image_factory_register (e->image_factory, NULL, bgurl, FALSE);
 			g_free (bgurl);
-		} else if (g_ascii_strncasecmp( token, "text=", 5) == 0
-			    && !e->defaultSettings->forceDefault ) {
+		} else if (g_ascii_strncasecmp (token, "text=", 5) == 0
+			    && !e->defaultSettings->forceDefault) {
 			if (html_parse_color (token + 5, &color)) {
 				html_colorset_set_color (e->settings->color_set, &color, HTMLTextColor);
 				push_element (e, ID_BODY, NULL,
 					      html_style_add_color (NULL, html_colorset_get_color (e->settings->color_set, HTMLTextColor)));
 			}
-		} else if (g_ascii_strncasecmp( token, "link=", 5) == 0
-			    && !e->defaultSettings->forceDefault ) {
+		} else if (g_ascii_strncasecmp (token, "link=", 5) == 0
+			    && !e->defaultSettings->forceDefault) {
 			html_parse_color (token + 5, &color);
 			html_colorset_set_color (e->settings->color_set, &color, HTMLLinkColor);
-		} else if (g_ascii_strncasecmp( token, "vlink=", 6) == 0
-			    && !e->defaultSettings->forceDefault ) {
+		} else if (g_ascii_strncasecmp (token, "vlink=", 6) == 0
+			    && !e->defaultSettings->forceDefault) {
 			html_parse_color (token + 6, &color);
 			html_colorset_set_color (e->settings->color_set, &color, HTMLVLinkColor);
-		} else if (g_ascii_strncasecmp( token, "alink=", 6) == 0
-			    && !e->defaultSettings->forceDefault ) {
+		} else if (g_ascii_strncasecmp (token, "alink=", 6) == 0
+			    && !e->defaultSettings->forceDefault) {
 			html_parse_color (token + 6, &color);
 			html_colorset_set_color (e->settings->color_set, &color, HTMLALinkColor);
-		} else if (g_ascii_strncasecmp( token, "leftmargin=", 11) == 0) {
+		} else if (g_ascii_strncasecmp (token, "leftmargin=", 11) == 0) {
 			e->leftBorder = atoi (token + 11);
-		} else if (g_ascii_strncasecmp( token, "rightmargin=", 12) == 0) {
+		} else if (g_ascii_strncasecmp (token, "rightmargin=", 12) == 0) {
 			e->rightBorder = atoi (token + 12);
-		} else if (g_ascii_strncasecmp( token, "topmargin=", 10) == 0) {
+		} else if (g_ascii_strncasecmp (token, "topmargin=", 10) == 0) {
 			e->topBorder = atoi (token + 10);
-		} else if (g_ascii_strncasecmp( token, "bottommargin=", 13) == 0) {
+		} else if (g_ascii_strncasecmp (token, "bottommargin=", 13) == 0) {
 			e->bottomBorder = atoi (token + 13);
-		} else if (g_ascii_strncasecmp( token, "marginwidth=", 12) == 0) {
+		} else if (g_ascii_strncasecmp (token, "marginwidth=", 12) == 0) {
 			e->leftBorder = e->rightBorder = atoi (token + 12);
-		} else if (g_ascii_strncasecmp( token, "marginheight=", 13) == 0) {
+		} else if (g_ascii_strncasecmp (token, "marginheight=", 13) == 0) {
 			e->topBorder = e->bottomBorder = atoi (token + 13);
 		} else if (e->parser_clue && g_ascii_strncasecmp (token, "dir=", 4) == 0) {
 			if (!g_ascii_strncasecmp (token + 4, "ltr", 3))
@@ -2316,12 +2316,12 @@ element_parse_base (HTMLEngine *e,
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
-	html_string_tokenizer_tokenize( e->st, str + 5, " >" );
+	html_string_tokenizer_tokenize (e->st, str + 5, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar * token = html_string_tokenizer_next_token (e->st);
-		if (g_ascii_strncasecmp( token, "target=", 7 ) == 0) {
+		if (g_ascii_strncasecmp (token, "target=", 7) == 0) {
 			g_signal_emit (e, signals[SET_BASE_TARGET], 0, token + 7);
-		} else if (g_ascii_strncasecmp( token, "href=", 5 ) == 0) {
+		} else if (g_ascii_strncasecmp (token, "href=", 5) == 0) {
 			g_signal_emit (e, signals[SET_BASE], 0, token + 5);
 		}
 	}
@@ -2338,13 +2338,13 @@ element_parse_data (HTMLEngine *e,
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
-	html_string_tokenizer_tokenize (e->st, str + 5, " >" );
+	html_string_tokenizer_tokenize (e->st, str + 5, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar *token = html_string_tokenizer_next_token (e->st);
-		if (g_ascii_strncasecmp (token, "class=", 6 ) == 0) {
+		if (g_ascii_strncasecmp (token, "class=", 6) == 0) {
 			g_free (class_name);
 			class_name = g_strdup (token + 6);
-		} else if (g_ascii_strncasecmp (token, "key=", 4 ) == 0) {
+		} else if (g_ascii_strncasecmp (token, "key=", 4) == 0) {
 			g_free (key);
 			key = g_strdup (token + 4);
 		} else if (class_name && key && g_ascii_strncasecmp (token, "value=", 6) == 0) {
@@ -2426,52 +2426,52 @@ element_parse_input (HTMLEngine *e,
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar *token = html_string_tokenizer_next_token (e->st);
 
-		if (g_ascii_strncasecmp( token, "type=", 5 ) == 0) {
+		if (g_ascii_strncasecmp (token, "type=", 5) == 0) {
 			p = token + 5;
-			if (g_ascii_strncasecmp( p, "checkbox", 8 ) == 0)
+			if (g_ascii_strncasecmp (p, "checkbox", 8) == 0)
 				type = CheckBox;
-			else if (g_ascii_strncasecmp( p, "password", 8 ) == 0)
+			else if (g_ascii_strncasecmp (p, "password", 8) == 0)
 				type = Password;
-			else if (g_ascii_strncasecmp( p, "hidden", 6 ) == 0)
+			else if (g_ascii_strncasecmp (p, "hidden", 6) == 0)
 				type = Hidden;
-			else if (g_ascii_strncasecmp( p, "radio", 5 ) == 0)
+			else if (g_ascii_strncasecmp (p, "radio", 5) == 0)
 				type = Radio;
-			else if (g_ascii_strncasecmp( p, "reset", 5 ) == 0)
+			else if (g_ascii_strncasecmp (p, "reset", 5) == 0)
 				type = Reset;
-			else if (g_ascii_strncasecmp( p, "submit", 5 ) == 0)
+			else if (g_ascii_strncasecmp (p, "submit", 5) == 0)
 				type = Submit;
-			else if (g_ascii_strncasecmp( p, "button", 6 ) == 0)
+			else if (g_ascii_strncasecmp (p, "button", 6) == 0)
 				type = Button;
-			else if (g_ascii_strncasecmp( p, "text", 5 ) == 0)
+			else if (g_ascii_strncasecmp (p, "text", 5) == 0)
 				type = Text;
-			else if (g_ascii_strncasecmp( p, "image", 5 ) == 0)
+			else if (g_ascii_strncasecmp (p, "image", 5) == 0)
 				type = Image;
 		}
-		else if (g_ascii_strncasecmp( token, "name=", 5 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "name=", 5) == 0) {
 			name = g_strdup (token + 5);
 		}
-		else if (g_ascii_strncasecmp( token, "value=", 6 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "value=", 6) == 0) {
 			value = g_strdup (token + 6);
 		}
-		else if (g_ascii_strncasecmp( token, "size=", 5 ) == 0) {
-			size = atoi ( token + 5 );
+		else if (g_ascii_strncasecmp (token, "size=", 5) == 0) {
+			size = atoi (token + 5);
 		}
-		else if (g_ascii_strncasecmp( token, "maxlength=", 10 ) == 0) {
-			maxLen = atoi ( token + 10 );
+		else if (g_ascii_strncasecmp (token, "maxlength=", 10) == 0) {
+			maxLen = atoi (token + 10);
 		}
-		else if (g_ascii_strncasecmp( token, "checked", 7 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "checked", 7) == 0) {
 			checked = TRUE;
 		}
-		else if (g_ascii_strncasecmp( token, "src=", 4 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "src=", 4) == 0) {
 			imgSrc = g_strdup (token + 4);
 		}
-		else if (g_ascii_strncasecmp( token, "onClick=", 8 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "onClick=", 8) == 0) {
 			/* TODO: Implement Javascript */
 		}
-		else if (g_ascii_strncasecmp( token, "hspace=", 7 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "hspace=", 7) == 0) {
 			imgHSpace = atoi (token + 7);
 		}
-		else if (g_ascii_strncasecmp( token, "vspace=", 7 ) == 0) {
+		else if (g_ascii_strncasecmp (token, "vspace=", 7) == 0) {
 			imgVSpace = atoi (token + 7);
 		}
 	}
@@ -2545,12 +2545,12 @@ element_parse_form (HTMLEngine *e,
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar *token = html_string_tokenizer_next_token (e->st);
 
-		if (g_ascii_strncasecmp( token, "action=", 7 ) == 0) {
+		if (g_ascii_strncasecmp (token, "action=", 7) == 0) {
 			action = g_strdup (token + 7);
-		} else if (g_ascii_strncasecmp( token, "method=", 7 ) == 0) {
-			if (g_ascii_strncasecmp( token + 7, "post", 4 ) == 0)
+		} else if (g_ascii_strncasecmp (token, "method=", 7) == 0) {
+			if (g_ascii_strncasecmp (token + 7, "post", 4) == 0)
 				method = "POST";
-		} else if (g_ascii_strncasecmp( token, "target=", 7 ) == 0) {
+		} else if (g_ascii_strncasecmp (token, "target=", 7) == 0) {
 			target = g_strdup (token + 7);
 		}
 	}
@@ -2943,15 +2943,15 @@ element_parse_meta (HTMLEngine *e,
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
-	html_string_tokenizer_tokenize(e->st, str + 5, " >");
+	html_string_tokenizer_tokenize (e->st, str + 5, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar * token = html_string_tokenizer_next_token (e->st);
-		if (g_ascii_strncasecmp(token, "http-equiv=", 11) == 0 ) {
-			if (g_ascii_strncasecmp(token + 11, "refresh", 7) == 0 )
+		if (g_ascii_strncasecmp (token, "http-equiv=", 11) == 0) {
+			if (g_ascii_strncasecmp (token + 11, "refresh", 7) == 0 )
 				refresh = 1;
-			if (g_ascii_strncasecmp(token + 11, "content-type", 12) == 0 )
+			if (g_ascii_strncasecmp (token + 11, "content-type", 12) == 0 )
 				contenttype = 1;
-		} else if (g_ascii_strncasecmp(token, "content=", 8) == 0) {
+		} else if (g_ascii_strncasecmp (token, "content=", 8) == 0) {
 			const gchar *content;
 			content = token + 8;
 			if (contenttype)
@@ -2965,10 +2965,10 @@ element_parse_meta (HTMLEngine *e,
 				/* The time in seconds until the refresh */
 				refresh_delay = atoi (content);
 
-				html_string_tokenizer_tokenize(e->st, content, ",;> ");
+				html_string_tokenizer_tokenize (e->st, content, ",;> ");
 				while (html_string_tokenizer_has_more_tokens (e->st)) {
 					token = html_string_tokenizer_next_token (e->st);
-					if (g_ascii_strncasecmp( token, "url=", 4 ) == 0)
+					if (g_ascii_strncasecmp (token, "url=", 4) == 0)
 						refresh_url = g_strdup (token + 4);
 				}
 
@@ -3114,13 +3114,13 @@ element_parse_ol (HTMLEngine *e,
 
 	pop_element (e, ID_LI);
 
-	html_string_tokenizer_tokenize( e->st, str + 3, " >" );
+	html_string_tokenizer_tokenize (e->st, str + 3, " >");
 
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar * token;
 
 		token = html_string_tokenizer_next_token (e->st);
-		if (g_ascii_strncasecmp( token, "type=", 5 ) == 0)
+		if (g_ascii_strncasecmp (token, "type=", 5) == 0)
 			listType = get_list_type (token + 5);
 	}
 
@@ -3308,7 +3308,7 @@ element_parse_select (HTMLEngine *e,
 	element->style = html_style_set_display (element->style, DISPLAY_NONE);
 
 	e->formSelect = HTML_SELECT (html_select_new (GTK_WIDGET (e->widget), name, size, multi));
-	html_form_add_element (e->form, HTML_EMBEDDED ( e->formSelect ));
+	html_form_add_element (e->form, HTML_EMBEDDED (e->formSelect ));
 	append_element (e, clue, HTML_OBJECT (e->formSelect));
 	g_free (name);
 
@@ -3344,7 +3344,7 @@ block_end_table (HTMLEngine *e,
 
 	if (table) {
 		if (table->col == 0 && table->row == 0) {
-			DT(printf ("deleting empty table %p\n", table);)
+			DT (printf ("deleting empty table %p\n", table);)
 			html_object_destroy (HTML_OBJECT (table));
 			return;
 		}
@@ -3353,7 +3353,7 @@ block_end_table (HTMLEngine *e,
 
 			finish_flow (e, clue);
 
-			DT(printf ("unaligned table(%p)\n", table);)
+			DT (printf ("unaligned table(%p)\n", table);)
 			append_element (e, clue, HTML_OBJECT (table));
 
 			if (table_align == HTML_HALIGN_NONE && e->flow)
@@ -3369,7 +3369,7 @@ block_end_table (HTMLEngine *e,
 			HTMLClueAligned *aligned = HTML_CLUEALIGNED (html_cluealigned_new (NULL, 0, 0, clue->max_width, 100));
 			HTML_CLUE (aligned)->halign = table_align;
 
-			DT(printf ("ALIGNED table(%p)\n", table);)
+			DT (printf ("ALIGNED table(%p)\n", table);)
 
 			html_clue_append (HTML_CLUE (aligned), HTML_OBJECT (table));
 			append_element (e, clue, HTML_OBJECT (aligned));
@@ -3399,17 +3399,17 @@ close_current_table (HTMLEngine *e)
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
 
-		DT(printf ("%d:", span->id);)
+		DT (printf ("%d:", span->id);)
 		if (span->style->display == DISPLAY_TABLE)
 			break;
 
 		if (span->style->display == DISPLAY_TABLE_CELL) {
-			DT(printf ("found cell\n");)
+			DT (printf ("found cell\n");)
 			return;
 		}
 	}
 
-	DT(printf ("pop_table\n");)
+	DT (printf ("pop_table\n");)
 	pop_element_by_type (e, DISPLAY_TABLE);
 }
 
@@ -3568,9 +3568,9 @@ block_ensure_row (HTMLEngine *e)
 	for (item = e->span_stack->list; item; item = item->next) {
 		span = item->data;
 
-		DT(printf ("%d:", span->id);)
+		DT (printf ("%d:", span->id);)
 		if (span->style->display == DISPLAY_TABLE_ROW) {
-			DT(printf ("no ensure row\n");)
+			DT (printf ("no ensure row\n");)
 			return;
 		}
 
@@ -3617,7 +3617,7 @@ element_parse_tr (HTMLEngine *e,
 		}
 	}
 
-        if (html_element_get_attr (element, "background", &value) && value && *value)
+	if (html_element_get_attr (element, "background", &value) && value && *value)
 		element->style = html_style_add_background_image (element->style, value);
 
 	element->style = html_style_set_display (element->style, DISPLAY_TABLE_ROW);
@@ -3652,11 +3652,11 @@ element_parse_caption (HTMLEngine *e,
 	pop_element (e, ID_CAPTION);
 	*/
 
-	html_string_tokenizer_tokenize( e->st, str + 7, " >" );
+	html_string_tokenizer_tokenize (e->st, str + 7, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
 		const gchar * token = html_string_tokenizer_next_token (e->st);
-		if (g_ascii_strncasecmp( token, "align=", 6) == 0) {
-			if (g_ascii_strncasecmp( token+6, "top", 3) == 0)
+		if (g_ascii_strncasecmp (token, "align=", 6) == 0) {
+			if (g_ascii_strncasecmp (token + 6, "top", 3) == 0)
 				capAlign = HTML_VALIGN_TOP;
 		}
 	}
@@ -3728,7 +3728,7 @@ element_parse_cell (HTMLEngine *e,
 		}
 	}
 
-        if (html_element_get_attr (element, "background", &value) && value && *value)
+	if (html_element_get_attr (element, "background", &value) && value && *value)
 		element->style = html_style_add_background_image (element->style, value);
 	/* end shared with row */
 
@@ -3836,7 +3836,7 @@ element_parse_textarea (HTMLEngine *e,
 	}
 
 	e->formTextArea = HTML_TEXTAREA (html_textarea_new (GTK_WIDGET (e->widget), name, rows, cols));
-	html_form_add_element (e->form, HTML_EMBEDDED ( e->formTextArea ));
+	html_form_add_element (e->form, HTML_EMBEDDED (e->formTextArea ));
 
 	append_element (e, clue, HTML_OBJECT (e->formTextArea));
 
@@ -4892,7 +4892,7 @@ html_engine_begin (HTMLEngine *e,
 					  html_engine_stream_end,
 					  g_object_ref (e));
 #ifdef LOG_INPUT
-	if (getenv("GTK_HTML_LOG_INPUT_STREAM") != NULL)
+	if (getenv ("GTK_HTML_LOG_INPUT_STREAM") != NULL)
 		new_stream = gtk_html_stream_log_new (GTK_HTML (e->widget), new_stream);
 #endif
 	html_engine_opened_streams_set (e, 1);
@@ -6215,7 +6215,7 @@ html_engine_thaw (HTMLEngine *engine)
 void
 html_engine_thaw_idle_flush (HTMLEngine *e)
 {
-	DF (printf ("html_engine_thaw_idle_flush\n");fflush (stdout);)
+	DF (printf ("html_engine_thaw_idle_flush\n"); fflush (stdout);)
 
 	if (e->thaw_idle_id) {
 		g_source_remove (e->thaw_idle_id);
@@ -6382,7 +6382,7 @@ html_engine_get_spell_word (HTMLEngine *e)
 	gchar *word;
 	gunichar uc;
 	gboolean cited, cited_tmp, cited2;
-	g_return_val_if_fail ( e != NULL, NULL);
+	g_return_val_if_fail (e != NULL, NULL);
 
 	cited = FALSE;
 	if (!html_selection_spell_word (html_cursor_get_current_char (e->cursor), &cited) && !cited
@@ -6591,7 +6591,7 @@ HTMLObject *
 html_engine_get_object_by_id (HTMLEngine *e,
                               const gchar *id)
 {
-	g_return_val_if_fail ( e != NULL, NULL);
+	g_return_val_if_fail (e != NULL, NULL);
 	if (e->id_table == NULL)
 		return NULL;
 
@@ -6602,7 +6602,7 @@ GHashTable *
 html_engine_get_class_table (HTMLEngine *e,
                              const gchar *class_name)
 {
-	g_return_val_if_fail ( e != NULL, NULL);
+	g_return_val_if_fail (e != NULL, NULL);
 	return (class_name && e->class_data) ? g_hash_table_lookup (e->class_data, class_name) : NULL;
 }
 
@@ -6611,7 +6611,7 @@ get_class_table_sure (HTMLEngine *e,
                       const gchar *class_name)
 {
 	GHashTable *t = NULL;
-	g_return_val_if_fail ( e != NULL, t);
+	g_return_val_if_fail (e != NULL, t);
 
 	if (e->class_data == NULL)
 		e->class_data = g_hash_table_new (g_str_hash, g_str_equal);
@@ -6637,7 +6637,7 @@ html_engine_set_class_data (HTMLEngine *e,
 
 	/* printf ("set (%s) %s to %s (%p)\n", class_name, key, value, e->class_data); */
 	g_return_if_fail (class_name);
-	g_return_if_fail ( e != NULL );
+	g_return_if_fail (e != NULL);
 
 	t = get_class_table_sure (e, class_name);
 
diff --git a/gtkhtml/htmlentity.c b/gtkhtml/htmlentity.c
index e1750dd..f3b1a46 100644
--- a/gtkhtml/htmlentity.c
+++ b/gtkhtml/htmlentity.c
@@ -871,7 +871,7 @@ gulong
 html_entity_parse (const gchar *s,
                    guint len)
 {
-	struct _EntityEntry * result = html_entity_hash ( s, len);
+	struct _EntityEntry * result = html_entity_hash (s, len);
 	if (result == NULL )
 		return INVALID_ENTITY_CHARACTER_MARKER;
 	return result->value;
diff --git a/gtkhtml/htmliframe.c b/gtkhtml/htmliframe.c
index af905b0..3ed8aa2 100644
--- a/gtkhtml/htmliframe.c
+++ b/gtkhtml/htmliframe.c
@@ -709,7 +709,7 @@ html_iframe_init (HTMLIFrame *iframe,
 				     parent_html->engine->settings->color_set);
 	html_painter_set_focus (new_html->engine->painter, parent_html->engine->have_focus);
 	/*
-	g_signal_connect (html, "title_changed", G_CALLBACK (title_changed_cb), (gpointer)app);
+	g_signal_connect (html, "title_changed", G_CALLBACK (title_changed_cb), (gpointer) app);
 	g_signal_connect (html, "button_press_event", G_CALLBACK (on_button_press_event), popup_menu);
 	g_signal_connect (html, "redirect", G_CALLBACK (on_redirect), NULL);
 	g_signal_connect (html, "object_requested", G_CALLBACK (object_requested_cmd), NULL);
diff --git a/gtkhtml/htmlimageinput.c b/gtkhtml/htmlimageinput.c
index dc7ca03..ec9a1aa 100644
--- a/gtkhtml/htmlimageinput.c
+++ b/gtkhtml/htmlimageinput.c
@@ -123,7 +123,7 @@ encode (HTMLEmbedded *e,
 		encoding = g_string_assign (encoding, ptr);
 		g_free (ptr);
 
-		ptr = g_strdup_printf(".x=%d&", HTML_IMAGEINPUT(e)->m_x);
+		ptr = g_strdup_printf (".x=%d&", HTML_IMAGEINPUT (e)->m_x);
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
 
@@ -131,7 +131,7 @@ encode (HTMLEmbedded *e,
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
 
-		ptr = g_strdup_printf(".y=%d", HTML_IMAGEINPUT(e)->m_y);
+		ptr = g_strdup_printf (".y=%d", HTML_IMAGEINPUT (e)->m_y);
 		encoding = g_string_append (encoding, ptr);
 		g_free (ptr);
 	}
diff --git a/gtkhtml/htmlpainter.c b/gtkhtml/htmlpainter.c
index e63aabe..4e6255f 100644
--- a/gtkhtml/htmlpainter.c
+++ b/gtkhtml/htmlpainter.c
@@ -1010,14 +1010,14 @@ guint
 html_painter_get_page_width (HTMLPainter *painter,
                              HTMLEngine *e)
 {
-	return	(* HP_CLASS (painter)->get_page_width) (painter, e);
+	return (* HP_CLASS (painter)->get_page_width) (painter, e);
 }
 
 guint
 html_painter_get_page_height (HTMLPainter *painter,
                               HTMLEngine *e)
 {
-	return	(* HP_CLASS (painter)->get_page_height) (painter, e);
+	return (* HP_CLASS (painter)->get_page_height) (painter, e);
 }
 
 /**
diff --git a/gtkhtml/htmlprinter.c b/gtkhtml/htmlprinter.c
index fcd21e7..5962fe4 100644
--- a/gtkhtml/htmlprinter.c
+++ b/gtkhtml/htmlprinter.c
@@ -195,7 +195,7 @@ prepare_rectangle (HTMLPainter *painter,
 	y = SCALE_ENGINE_TO_GNOME_PRINT (_y);
 	cr = gtk_print_context_get_cairo_context (context);
 	cairo_new_path (cr);
-	cairo_rectangle (cr, x, y, x + width, y + height );
+	cairo_rectangle (cr, x, y, x + width, y + height);
 	cairo_close_path (cr);
 }
 
@@ -334,7 +334,7 @@ draw_border (HTMLPainter *painter,
 	cairo_move_to  (cr, x, y);
 	cairo_line_to  (cr, x + width, y);
 	cairo_line_to  (cr, x + width - bs, y + bs);
-	cairo_line_to  (cr, x + bs, y + bs );
+	cairo_line_to  (cr, x + bs, y + bs);
 	cairo_line_to  (cr, x + bs, y + height - bs);
 	cairo_line_to  (cr, x, y + height);
 	cairo_close_path (cr);
diff --git a/gtkhtml/htmlshape.c b/gtkhtml/htmlshape.c
index 567fa14..02ef740 100644
--- a/gtkhtml/htmlshape.c
+++ b/gtkhtml/htmlshape.c
@@ -35,47 +35,47 @@ struct _HTMLShape {
 };
 
 static HTMLLength *
-parse_length (const gchar **str) {
-        const gchar *cur = *str;
-        HTMLLength *len = g_new0 (HTMLLength,
-              1);
+parse_length (const gchar **str)
+{
+	const gchar *cur = *str;
+	HTMLLength *len = g_new0 (HTMLLength, 1);
 
 	/* g_warning ("begin \"%s\"", *str); */
 
-        while (isspace (*cur)) cur++;
+	while (isspace (*cur)) cur++;
 
-        len->val = atoi (cur);
-        len->type = HTML_LENGTH_TYPE_PIXELS;
+	len->val = atoi (cur);
+	len->type = HTML_LENGTH_TYPE_PIXELS;
 
-        while (isdigit (*cur) || *cur == '-') cur++;
+	while (isdigit (*cur) || *cur == '-') cur++;
 
-        switch (*cur) {
-        case '*':
-                if (len->val == 0)
-                        len->val = 1;
-                len->type = HTML_LENGTH_TYPE_FRACTION;
-                cur++;
-                break;
-        case '%':
-                len->type = HTML_LENGTH_TYPE_PERCENT;
-                cur++;
-                break;
-        }
+	switch (*cur) {
+	case '*':
+		if (len->val == 0)
+			len->val = 1;
+		len->type = HTML_LENGTH_TYPE_FRACTION;
+		cur++;
+		break;
+	case '%':
+		len->type = HTML_LENGTH_TYPE_PERCENT;
+		cur++;
+		break;
+	}
 
-        if (cur <= *str) {
-                g_free (len);
-                return NULL;
-        }
+	if (cur <= *str) {
+		g_free (len);
+		return NULL;
+	}
 
 	/* g_warning ("length len->val=%d, len->type=%d", len->val, len->type); */
 	*str = cur;
 	cur = strstr (cur, ",");
-        if (cur) {
-                cur++;
+	if (cur) {
+		cur++;
 		*str = cur;
-        }
+	}
 
-        return len;
+	return len;
 }
 
 void
@@ -89,7 +89,6 @@ html_length_array_parse (GPtrArray *array,
 
 	while ((length = parse_length (&str)))
 	       g_ptr_array_add (array, length);
-
 }
 
 void
@@ -159,19 +158,20 @@ html_shape_point (HTMLShape *shape,
 }
 
 static HTMLShapeType
-parse_shape_type (gchar *token) {
-        HTMLShapeType type = HTML_SHAPE_RECT;
+parse_shape_type (gchar *token)
+{
+	HTMLShapeType type = HTML_SHAPE_RECT;
 
 	if (!token || g_ascii_strncasecmp (token, "rect", 4) == 0)
-                type = HTML_SHAPE_RECT;
+		type = HTML_SHAPE_RECT;
 	else if (g_ascii_strncasecmp (token, "poly", 4) == 0)
-                type = HTML_SHAPE_POLY;
+		type = HTML_SHAPE_POLY;
 	else if (g_ascii_strncasecmp (token, "circle", 6) == 0)
-                type = HTML_SHAPE_CIRCLE;
+		type = HTML_SHAPE_CIRCLE;
 	else if (g_ascii_strncasecmp (token, "default", 7) == 0)
-                type = HTML_SHAPE_DEFAULT;
+		type = HTML_SHAPE_DEFAULT;
 
-        return type;
+	return type;
 }
 
 gchar *
diff --git a/gtkhtml/htmltable.c b/gtkhtml/htmltable.c
index 12d23bb..ee21d80 100644
--- a/gtkhtml/htmltable.c
+++ b/gtkhtml/htmltable.c
@@ -1911,7 +1911,7 @@ html_table_set_max_width (HTMLObject *o,
 	html_table_set_cells_max_width (table, painter, max_size);
 	set_columns_optimal_width (table, max_size, pixel_size);
 
-	/* printf ("max_width %d opt_width %d\n", o->max_width, COLUMN_OPT (table, table->totalCols) + ); */
+	/* printf ("max_width %d opt_width %d\n", o->max_width, COLUMN_OPT (table, table->totalCols) +); */
 
 	g_free (max_size);
 }
diff --git a/gtkhtml/htmltablecell.c b/gtkhtml/htmltablecell.c
index 8566635..a122ab5 100644
--- a/gtkhtml/htmltablecell.c
+++ b/gtkhtml/htmltablecell.c
@@ -325,7 +325,7 @@ save (HTMLObject *self,
 		   html_engine_save_get_paragraph_align (html_alignment_to_paragraph (HTML_CLUE (cell)->halign)) SE;
 	if (HTML_CLUE (cell)->valign != HTML_VALIGN_MIDDLE)
 		SB " VALIGN=\"%s\"",
-                   HTML_CLUE (cell)->valign == HTML_VALIGN_TOP ? "top" : "bottom" SE;
+		   HTML_CLUE (cell)->valign == HTML_VALIGN_TOP ? "top" : "bottom" SE;
 	SB ">\n" SE;
 	if (!(*HTML_OBJECT_CLASS (parent_class)->save) (self, state))
 		return FALSE;
diff --git a/gtkhtml/htmltext.c b/gtkhtml/htmltext.c
index aa1b577..7a06809 100644
--- a/gtkhtml/htmltext.c
+++ b/gtkhtml/htmltext.c
@@ -199,7 +199,7 @@ debug_word_width (HTMLText *t)
  *
 	printf ("words: %d | ", t->words);
 	for (i = 0; i < t->words; i++)
-		printf ("%d ", t->word_width [i]);
+		printf ("%d ", t->word_width[i]);
 	printf ("\n");
 }
  *
diff --git a/gtkhtml/htmltextarea.c b/gtkhtml/htmltextarea.c
index ef7116e..210fa95 100644
--- a/gtkhtml/htmltextarea.c
+++ b/gtkhtml/htmltextarea.c
@@ -59,7 +59,7 @@ copy (HTMLObject *self,
 static void
 reset (HTMLEmbedded *e)
 {
-	html_textarea_set_text ( HTML_TEXTAREA (e), HTML_TEXTAREA (e)->default_text);
+	html_textarea_set_text (HTML_TEXTAREA (e), HTML_TEXTAREA (e)->default_text);
 }
 
 static gchar *
diff --git a/gtkhtml/htmltokenizer.c b/gtkhtml/htmltokenizer.c
index 952a190..ddcd144 100644
--- a/gtkhtml/htmltokenizer.c
+++ b/gtkhtml/htmltokenizer.c
@@ -370,7 +370,7 @@ html_token_buffer_append_token (HTMLTokenBuffer *buf,
 	buf->data[buf->used] = 0;
 	buf->used++;
 
-	dt(printf ("html_token_buffer_append_token: '%s'\n", buf->data + buf->used - 1 - len));
+	dt (printf ("html_token_buffer_append_token: '%s'\n", buf->data + buf->used - 1 - len));
 
 	return TRUE;
 }
@@ -746,7 +746,7 @@ html_tokenizer_real_change (HTMLTokenizer *t,
 	if (p->content_type)
 		g_free (p->content_type);
 
-	p->content_type = g_ascii_strdown ( content_type, -1);
+	p->content_type = g_ascii_strdown (content_type, -1);
 
 	if (is_valid_g_iconv (p->iconv_cd))
 		g_iconv_close (p->iconv_cd);
@@ -1035,7 +1035,7 @@ in_script_or_style (HTMLTokenizer *t,
 	if (p->scriptCodeSize + 11 > p->scriptCodeMaxSize)
 		p->scriptCode = g_realloc (p->scriptCode, p->scriptCodeMaxSize += 1024);
 
-	if ((**src == '>' ) && ( p->searchFor[p->searchCount] == '>')) {
+	if ((**src == '>') && (p->searchFor[p->searchCount] == '>')) {
 		(*src)++;
 		p->scriptCode[p->scriptCodeSize] = 0;
 		p->scriptCode[p->scriptCodeSize + 1] = 0;
diff --git a/gtkhtml/test-stress.c b/gtkhtml/test-stress.c
index 41d07d5..1797c74 100644
--- a/gtkhtml/test-stress.c
+++ b/gtkhtml/test-stress.c
@@ -259,7 +259,7 @@ gint main (gint argc, gchar *argv[])
 		gint j, result;
 
 		if (tests[i].test_function) {
-			fprintf (stderr, "  %s ", tests [i].name);
+			fprintf (stderr, "  %s ", tests[i].name);
 			for (j = strlen (tests[i].name); j < 69; j++)
 				fputc ('.', stderr);
 			result = (*tests[i].test_function) (html);
@@ -269,7 +269,7 @@ gint main (gint argc, gchar *argv[])
 			if (result)
 				n_successful++;
 		} else {
-			fprintf (stderr, "* %s\n", tests [i].name);
+			fprintf (stderr, "* %s\n", tests[i].name);
 		}
 	}
 
diff --git a/gtkhtml/test-suite.c b/gtkhtml/test-suite.c
index 631d772..65f555e 100644
--- a/gtkhtml/test-suite.c
+++ b/gtkhtml/test-suite.c
@@ -755,7 +755,7 @@ gint main (gint argc, gchar *argv[])
 		gint j, result;
 
 		if (tests[i].test_function) {
-			fprintf (stderr, "  %s ", tests [i].name);
+			fprintf (stderr, "  %s ", tests[i].name);
 			for (j = strlen (tests[i].name); j < 69; j++)
 				fputc ('.', stderr);
 			result = (*tests[i].test_function) (html);
@@ -765,7 +765,7 @@ gint main (gint argc, gchar *argv[])
 			if (result)
 				n_successful++;
 		} else {
-			fprintf (stderr, "* %s\n", tests [i].name);
+			fprintf (stderr, "* %s\n", tests[i].name);
 		}
 	}
 
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index 5e6fec5..bc310de 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -212,7 +212,7 @@ example_changed_cb (GtkComboBox *combo_box,
 	if (example->filename) {
 		goto_url (example->filename, 0);
 	} else
-		goto_url("http://www.gnome.org";, 0);
+		goto_url ("http://www.gnome.org";, 0);
 }
 
 /* We want to sort "a2" < "b1" < "B1" < "b2" < "b12". Vastly
@@ -640,7 +640,7 @@ entry_goto_url (GtkWidget *widget,
 	} else {
 		gchar *url;
 
-		url = g_strdup_printf("http://%s";, tmpurl);
+		url = g_strdup_printf ("http://%s";, tmpurl);
 		on_set_base (NULL, url, NULL);
 		goto_url (url, 0);
 		g_free (url);
@@ -652,7 +652,7 @@ static void
 home_cb (GtkWidget *widget,
          gpointer data)
 {
-	goto_url("http://www.gnome.org";, 0);
+	goto_url ("http://www.gnome.org";, 0);
 }
 
 static void
@@ -773,30 +773,32 @@ on_set_base (GtkHTML *html,
 }
 
 static gboolean
-redirect_timer_event (gpointer data) {
-	g_print("Redirecting to '%s' NOW\n", redirect_url);
-        goto_url (redirect_url,
-                      0);
+redirect_timer_event (gpointer data)
+{
+	g_print ("Redirecting to '%s' NOW\n", redirect_url);
+	goto_url (redirect_url, 0);
 
 	/*	OBS: redirect_url is freed in goto_url */
 
-        return FALSE;
+	return FALSE;
 }
 
 static void
 on_redirect (GtkHTML *html,
              const gchar *url,
              gint delay,
-             gpointer data) {
-	g_print("Redirecting to '%s' in %d seconds\n", url, delay);
+             gpointer data)
+{
+	g_print ("Redirecting to '%s' in %d seconds\n", url, delay);
 
-        if (redirect_timerId == 0) {
+	if (redirect_timerId == 0) {
 
-                redirect_url = g_strdup (url);
+		redirect_url = g_strdup (url);
 
-                redirect_timerId = g_timeout_add (delay *1000,(GSourceFunc) redirect_timer_event,
-             NULL);
-        }
+		redirect_timerId = g_timeout_add (
+			delay * 1000,
+			(GSourceFunc) redirect_timer_event, NULL);
+	}
 }
 
 static void
@@ -804,26 +806,24 @@ on_submit (GtkHTML *html,
            const gchar *method,
            const gchar *action,
            const gchar *encoding,
-           gpointer data) {
-        GString *tmpstr = g_string_new (action);
-
-	g_print("submitting '%s' to '%s' using method '%s'\n", encoding, action, method);
+           gpointer data)
+{
+	GString *tmpstr = g_string_new (action);
 
-	if (g_ascii_strcasecmp(method, "GET") == 0) {
+	g_print (
+		"submitting '%s' to '%s' using method '%s'\n",
+		encoding, action, method);
 
-                tmpstr = g_string_append_c (tmpstr, '?');
-                tmpstr = g_string_append (tmpstr,
-           encoding);
+	if (g_ascii_strcasecmp (method, "GET") == 0) {
+		tmpstr = g_string_append_c (tmpstr, '?');
+		tmpstr = g_string_append (tmpstr, encoding);
 
-                goto_url (tmpstr->str,
-           0);
+		goto_url (tmpstr->str, 0);
 
-                g_string_free (tmpstr,
-           TRUE);
-        } else {
+		g_string_free (tmpstr, TRUE);
+	} else {
 		g_warning ("Unsupported submit method '%s'\n", method);
-        }
-
+	}
 }
 
 static void
@@ -871,7 +871,7 @@ object_timeout (GtkHTMLEmbedded *eb)
 	w = gtk_check_button_new ();
 	gtk_widget_show (w);
 
-	printf("inserting custom widget after a delay ...\n");
+	printf ("inserting custom widget after a delay ...\n");
 	gtk_html_embedded_set_descent (eb, rand () % 8);
 	gtk_container_add (GTK_CONTAINER (eb), w);
 	g_object_unref (eb);
@@ -1067,13 +1067,15 @@ go_list_cb (GtkWidget *widget,
 	}
 }
 
-static void remove_go_list (gpointer data, gpointer user_data) {
-	go_item *item = (go_item *) data;
+static void
+remove_go_list (gpointer data,
+                gpointer user_data) {
+        go_item *item = (go_item *) data;
 
-	if (item->widget)
-		gtk_widget_destroy (item->widget);
+        if (item->widget)
+                gtk_widget_destroy (item->widget);
 
-	item->widget = NULL;
+        item->widget = NULL;
 }
 
 static void
@@ -1198,7 +1200,7 @@ bug_cb (GtkWidget *widget,
 	gchar *cwd, *filename, *url;
 
 	cwd = g_get_current_dir ();
-	filename = g_strdup_printf("%s/bugs.html", cwd);
+	filename = g_strdup_printf ("%s/bugs.html", cwd);
 	url = g_filename_to_uri (filename, NULL, NULL);
 	goto_url (url, 0);
 	g_free (url);
@@ -1284,25 +1286,25 @@ main (gint argc,
 
 	gtk_table_attach (GTK_TABLE (main_table),
 			bar,
-                        /* X direction */       /* Y direction */
+			/* X direction */       /* Y direction */
 			0, 1,                   0, 1,
 			GTK_EXPAND | GTK_FILL,  GTK_SHRINK,
 			0,                      0);
 	gtk_table_attach (GTK_TABLE (main_table),
 			create_toolbars (),
-                        /* X direction */       /* Y direction */
+			/* X direction */       /* Y direction */
 			0, 1,                   1, 2,
 			GTK_EXPAND | GTK_FILL,  GTK_SHRINK,
 			0,                      0);
 	gtk_table_attach (GTK_TABLE (main_table),
 			scrolled_window,
-                        /* X direction */       /* Y direction */
+			/* X direction */       /* Y direction */
 			0, 1,                   2, 3,
 			GTK_EXPAND | GTK_FILL,  GTK_EXPAND | GTK_FILL,
 			0,                      0);
 	gtk_table_attach (GTK_TABLE (main_table),
 			statusbar,
-                        /* X direction */       /* Y direction */
+			/* X direction */       /* Y direction */
 			0, 1,                   3, 4,
 			GTK_EXPAND | GTK_FILL,  GTK_SHRINK,
 			0,                      0);
@@ -1342,11 +1344,11 @@ main (gint argc,
 
 	gtk_widget_set_events (html_widget, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
 
-	g_signal_connect (html, "title_changed", G_CALLBACK (title_changed_cb), (gpointer)app);
-	g_signal_connect (html, "url_requested", G_CALLBACK (url_requested), (gpointer)app);
-	g_signal_connect (html, "load_done", G_CALLBACK (load_done), (gpointer)app);
-	g_signal_connect (html, "on_url", G_CALLBACK (on_url), (gpointer)app);
-	g_signal_connect (html, "set_base", G_CALLBACK (on_set_base), (gpointer)app);
+	g_signal_connect (html, "title_changed", G_CALLBACK (title_changed_cb), (gpointer) app);
+	g_signal_connect (html, "url_requested", G_CALLBACK (url_requested), (gpointer) app);
+	g_signal_connect (html, "load_done", G_CALLBACK (load_done), (gpointer) app);
+	g_signal_connect (html, "on_url", G_CALLBACK (on_url), (gpointer) app);
+	g_signal_connect (html, "set_base", G_CALLBACK (on_set_base), (gpointer) app);
 	g_signal_connect (html, "button_press_event", G_CALLBACK (on_button_press_event), popup_menu);
 	g_signal_connect (html, "link_clicked", G_CALLBACK (on_link_clicked), NULL);
 	g_signal_connect (html, "redirect", G_CALLBACK (on_redirect), NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]