[gtkhtml] Prefer GLib basic types over C types.



commit 36707d2e68cdde4175c4c986faab913252ea7214
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 28 13:29:25 2009 -0400

    Prefer GLib basic types over C types.
---
 a11y/factory.c                          |    2 +-
 a11y/object.c                           |   10 +-
 a11y/table.c                            |    4 +-
 a11y/text.c                             |    2 +-
 gtkhtml/dllmain.c                       |   26 +++---
 gtkhtml/gtkhtml-compat.h                |    2 +-
 gtkhtml/gtkhtml-embedded.c              |   12 +-
 gtkhtml/gtkhtml-embedded.h              |   20 ++--
 gtkhtml/gtkhtml-private.h               |   20 ++--
 gtkhtml/gtkhtml-properties.c            |    2 +-
 gtkhtml/gtkhtml-stream.c                |   24 ++--
 gtkhtml/gtkhtml-stream.h                |   10 +-
 gtkhtml/gtkhtml-types.h                 |    2 +-
 gtkhtml/gtkhtml.c                       |  158 ++++++++++++++--------------
 gtkhtml/gtkhtml.h                       |   60 +++++-----
 gtkhtml/gtkhtmldebug.c                  |    6 +-
 gtkhtml/htmlanchor.c                    |    2 +-
 gtkhtml/htmlclue.c                      |    2 +-
 gtkhtml/htmlclueflow.c                  |   76 +++++++-------
 gtkhtml/htmlcluev.c                     |    2 +-
 gtkhtml/htmlcluev.h                     |    2 +-
 gtkhtml/htmlcolorset.c                  |    6 +-
 gtkhtml/htmlcursor.c                    |    2 +-
 gtkhtml/htmlembedded.c                  |    6 +-
 gtkhtml/htmlembedded.h                  |    2 +-
 gtkhtml/htmlengine-edit-cut-and-paste.c |   12 +-
 gtkhtml/htmlengine-edit-cut-and-paste.h |    6 +-
 gtkhtml/htmlengine-edit-text.c          |    8 +-
 gtkhtml/htmlengine-edit-text.h          |    2 +-
 gtkhtml/htmlengine-edit.c               |    4 +-
 gtkhtml/htmlengine-edit.h               |    2 +-
 gtkhtml/htmlengine-save.c               |   14 ++--
 gtkhtml/htmlengine-save.h               |    6 +-
 gtkhtml/htmlengine.c                    |  180 +++++++++++++++---------------
 gtkhtml/htmlengine.h                    |   12 +-
 gtkhtml/htmlentity.c                    |   12 +-
 gtkhtml/htmlentity.h                    |    2 +-
 gtkhtml/htmlform.c                      |    6 +-
 gtkhtml/htmlform.h                      |    2 +-
 gtkhtml/htmlframe.c                     |   12 +-
 gtkhtml/htmlframe.h                     |    6 +-
 gtkhtml/htmlframeset.c                  |   12 +-
 gtkhtml/htmlframeset.h                  |    4 +-
 gtkhtml/htmlgdkpainter.c                |   12 +-
 gtkhtml/htmliframe.c                    |   14 ++--
 gtkhtml/htmliframe.h                    |    6 +-
 gtkhtml/htmlimage.c                     |   20 ++--
 gtkhtml/htmlimage.h                     |    2 +-
 gtkhtml/htmlinterval.c                  |    2 +-
 gtkhtml/htmlmap.c                       |    4 +-
 gtkhtml/htmlmap.h                       |    4 +-
 gtkhtml/htmlmarshal.c                   |    2 +-
 gtkhtml/htmlobject.c                    |   34 +++---
 gtkhtml/htmlobject.h                    |   26 +++---
 gtkhtml/htmlpainter.c                   |   14 ++--
 gtkhtml/htmlpainter.h                   |   24 ++--
 gtkhtml/htmlprinter.c                   |    4 +-
 gtkhtml/htmlrule.c                      |    2 +-
 gtkhtml/htmlsearch.c                    |    4 +-
 gtkhtml/htmlselect.c                    |    2 +-
 gtkhtml/htmlsettings.c                  |    2 +-
 gtkhtml/htmlshape.c                     |   20 ++--
 gtkhtml/htmlshape.h                     |    6 +-
 gtkhtml/htmlstyle.c                     |   38 ++++----
 gtkhtml/htmlstyle.h                     |   18 ++--
 gtkhtml/htmltable.c                     |    8 +-
 gtkhtml/htmltablecell.c                 |    2 +-
 gtkhtml/htmltext.c                      |   78 +++++++-------
 gtkhtml/htmltext.h                      |   40 ++++----
 gtkhtml/htmltextinput.c                 |    2 +-
 gtkhtml/htmltextslave.c                 |   82 +++++++-------
 gtkhtml/htmltextslave.h                 |    6 +-
 gtkhtml/htmltokenizer.c                 |   14 ++--
 gtkhtml/htmltokenizer.h                 |    2 +-
 gtkhtml/htmlurl.c                       |    6 +-
 gtkhtml/test-stress.c                   |   26 +++---
 gtkhtml/test-suite.c                    |   86 ++++++++--------
 gtkhtml/test.c                          |   34 +++---
 gtkhtml/testgtkhtml.c                   |   28 +++---
 79 files changed, 718 insertions(+), 718 deletions(-)

diff --git a/a11y/factory.c b/a11y/factory.c
index c495b76..51fb52f 100644
--- a/a11y/factory.c
+++ b/a11y/factory.c
@@ -49,7 +49,7 @@ gtk_html_a11y_factory_get_type (void)
 	return t;
 }
 
-static int accessibility_initialized = FALSE;
+static gint accessibility_initialized = FALSE;
 
 void
 gtk_html_accessibility_init (void)
diff --git a/a11y/object.c b/a11y/object.c
index 77a7020..211a9e8 100644
--- a/a11y/object.c
+++ b/a11y/object.c
@@ -45,7 +45,7 @@ get_n_actions (AtkAction *action)
 	return 1;
 }
 
-static G_CONST_RETURN gchar*
+static G_CONST_RETURN gchar *
 get_description (AtkAction *action, gint i)
 {
 	if (i == 0)
@@ -54,7 +54,7 @@ get_description (AtkAction *action, gint i)
 	return NULL;
 }
 
-static G_CONST_RETURN gchar*
+static G_CONST_RETURN gchar *
 action_get_name (AtkAction *action, gint i)
 {
 	if (i == 0)
@@ -249,7 +249,7 @@ gtk_html_a11y_ref_child (AtkObject *accessible, gint index)
 	return accessible_child;
 }
 
-static G_CONST_RETURN gchar*
+static G_CONST_RETURN gchar *
 gtk_html_a11y_get_name (AtkObject *obj)
 {
 	if (obj->name != NULL) {
@@ -347,7 +347,7 @@ gtk_html_a11y_cursor_changed_cb (GtkWidget *widget)
 }
 
 static void
-gtk_html_a11y_insert_object_cb (GtkWidget * widget, int pos, int len)
+gtk_html_a11y_insert_object_cb (GtkWidget * widget, gint pos, gint len)
 {
 	AtkObject * a11y, *obj;
 
@@ -371,7 +371,7 @@ gtk_html_a11y_insert_object_cb (GtkWidget * widget, int pos, int len)
 }
 
 static void
-gtk_html_a11y_delete_object_cb (GtkWidget * widget, int pos, int len)
+gtk_html_a11y_delete_object_cb (GtkWidget * widget, gint pos, gint len)
 {
 	AtkObject * a11y, *obj;
 
diff --git a/a11y/table.c b/a11y/table.c
index 003f070..0a9e51b 100644
--- a/a11y/table.c
+++ b/a11y/table.c
@@ -339,10 +339,10 @@ html_a11y_table_get_row_header (AtkTable *table, gint row)
 
   AtkObject*
                     (* get_caption)              (AtkTable      *table);
-  G_CONST_RETURN gchar*
+  G_CONST_RETURN gchar *
                     (* get_column_description)   (AtkTable      *table,
                                                   gint          column);
-  G_CONST_RETURN gchar*
+  G_CONST_RETURN gchar *
                     (* get_row_description)      (AtkTable      *table,
                                                   gint          row);
   AtkObject*        (* get_summary)              (AtkTable      *table);
diff --git a/a11y/text.c b/a11y/text.c
index 49f7dcc..5e471a9 100644
--- a/a11y/text.c
+++ b/a11y/text.c
@@ -119,7 +119,7 @@ get_n_actions (AtkAction *action)
         return 1;
 }
 
-static G_CONST_RETURN gchar*
+static G_CONST_RETURN gchar *
 action_get_name (AtkAction *action, gint      i)
 {
         if (i == 0)
diff --git a/gtkhtml/dllmain.c b/gtkhtml/dllmain.c
index 39b7d4c..18310a9 100644
--- a/gtkhtml/dllmain.c
+++ b/gtkhtml/dllmain.c
@@ -27,23 +27,23 @@
 /* localedir uses system codepage as it is passed to the non-UTF8ified
  * gettext library
  */
-static const char *localedir = NULL;
+static const gchar *localedir = NULL;
 
 /* The others are in UTF-8 */
-static char *prefix;
-static const char *libdir;
-static const char *datadir;
-static const char *sysconfdir;
-static const char *icondir;
-static const char *gtkhtml_datadir;
-static const char *glade_datadir;
+static gchar *prefix;
+static const gchar *libdir;
+static const gchar *datadir;
+static const gchar *sysconfdir;
+static const gchar *icondir;
+static const gchar *gtkhtml_datadir;
+static const gchar *glade_datadir;
 
 static gpointer hmodule;
 G_LOCK_DEFINE_STATIC (mutex);
 
-static char *
-replace_prefix (const char *runtime_prefix,
-                const char *configure_time_path)
+static gchar *
+replace_prefix (const gchar *runtime_prefix,
+                const gchar *configure_time_path)
 {
         if (runtime_prefix &&
             strncmp (configure_time_path, PREFIX "/",
@@ -58,7 +58,7 @@ replace_prefix (const char *runtime_prefix,
 static void
 setup (void)
 {
-	char *cp_prefix;
+	gchar *cp_prefix;
 
         G_LOCK (mutex);
         if (localedir != NULL) {
@@ -114,7 +114,7 @@ DllMain (HINSTANCE hinstDLL,
 #include "gtkhtml-private.h"
 
 #define GETTER(varbl)				\
-const char *					\
+const gchar *					\
 _get_##varbl (void)				\
 {						\
         setup ();				\
diff --git a/gtkhtml/gtkhtml-compat.h b/gtkhtml/gtkhtml-compat.h
index 85b8182..b87d347 100644
--- a/gtkhtml/gtkhtml-compat.h
+++ b/gtkhtml/gtkhtml-compat.h
@@ -7,7 +7,7 @@
 #pragma alloca
 #  else
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+gchar *alloca ();
 #   endif
 #  endif
 # endif
diff --git a/gtkhtml/gtkhtml-embedded.c b/gtkhtml/gtkhtml-embedded.c
index 4362fb7..dfc64b0 100644
--- a/gtkhtml/gtkhtml-embedded.c
+++ b/gtkhtml/gtkhtml-embedded.c
@@ -73,7 +73,7 @@ gtk_html_embedded_get_type (void)
 }
 
 static void
-free_param(void *key, void *value, void *data)
+free_param(gpointer key, gpointer value, gpointer data)
 {
 	g_free (key);
 	g_free (value);
@@ -260,7 +260,7 @@ gtk_html_embedded_init (GtkHTMLEmbedded *ge)
  * Return value: A new GtkHTMLEmbedded widget.
  **/
 GtkWidget *
-gtk_html_embedded_new (char *classid, char *name, char *type, char *data, int width, int height)
+gtk_html_embedded_new (gchar *classid, gchar *name, gchar *type, gchar *data, gint width, gint height)
 {
 	GtkHTMLEmbedded *em;
 
@@ -286,8 +286,8 @@ gtk_html_embedded_new (char *classid, char *name, char *type, char *data, int wi
  *
  * Returns: the value of the parameter.
  */
-char *
-gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, char *param)
+gchar *
+gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, gchar *param)
 {
 	return g_hash_table_lookup (ge->params, param);
 }
@@ -301,7 +301,7 @@ gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, char *param)
  * The parameter named @name to the @value.
  */
 void
-gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, char *param, char *value)
+gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, gchar *param, gchar *value)
 {
 	gchar *lookup;
 
@@ -323,7 +323,7 @@ gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, char *param, char *value)
  * Set the descent of the widget beneath the baseline.
  */
 void
-gtk_html_embedded_set_descent (GtkHTMLEmbedded *ge, int descent)
+gtk_html_embedded_set_descent (GtkHTMLEmbedded *ge, gint descent)
 {
 	if (ge->descent == descent)
 		return;
diff --git a/gtkhtml/gtkhtml-embedded.h b/gtkhtml/gtkhtml-embedded.h
index 6fe2cab..98c1732 100644
--- a/gtkhtml/gtkhtml-embedded.h
+++ b/gtkhtml/gtkhtml-embedded.h
@@ -36,18 +36,18 @@ struct _GtkHTMLEmbedded {
 	GtkBin bin;
 
 	/* class id of this object */
-	char *classid;
-	char *name;
-        char *type;
-        char *data;
+	gchar *classid;
+	gchar *name;
+        gchar *type;
+        gchar *data;
 
 	/* parameters to class */
-	int width, height;
+	gint width, height;
 	GHashTable *params;
 
 	GtkHTMLEmbeddedPrivate *priv;
 
-	int descent;
+	gint descent;
 };
 
 struct _GtkHTMLEmbeddedClass {
@@ -63,10 +63,10 @@ struct _GtkHTMLEmbeddedClass {
    themselves for a form */
 
 GType		 gtk_html_embedded_get_type	(void);
-GtkWidget	*gtk_html_embedded_new (char *classid, char *name, char *type, char *data, int width, int height);
+GtkWidget	*gtk_html_embedded_new (gchar *classid, gchar *name, gchar *type, gchar *data, gint width, gint height);
 
-void gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, char *param, char *value);
-char *gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, char *param);
-void gtk_html_embedded_set_descent (GtkHTMLEmbedded *ge, int descent);
+void gtk_html_embedded_set_parameter (GtkHTMLEmbedded *ge, gchar *param, gchar *value);
+gchar *gtk_html_embedded_get_parameter (GtkHTMLEmbedded *ge, gchar *param);
+void gtk_html_embedded_set_descent (GtkHTMLEmbedded *ge, gint descent);
 
 #endif /* ! _GTK_HTML_EMBEDDED_H */
diff --git a/gtkhtml/gtkhtml-private.h b/gtkhtml/gtkhtml-private.h
index effc24b..9133de8 100644
--- a/gtkhtml/gtkhtml-private.h
+++ b/gtkhtml/gtkhtml-private.h
@@ -41,7 +41,7 @@ struct _GtkHTMLPrivate {
 
 	gint selection_type;
 
-	char  *base_url;
+	gchar  *base_url;
 
 	GtkWidget *search_input_line;
 
@@ -78,7 +78,7 @@ struct _GtkHTMLPrivate {
 
 	gboolean in_key_binding;
 
-	char *caret_first_focus_anchor;
+	gchar *caret_first_focus_anchor;
 };
 
 void  gtk_html_private_calc_scrollbars  (GtkHTML                *html,
@@ -100,14 +100,14 @@ gchar *gtk_html_filename_from_uri	(const gchar		*uri);
 
 #ifdef G_OS_WIN32
 
-const char *_get_icondir (void) G_GNUC_CONST;
-const char *_get_gtkhtml_datadir (void) G_GNUC_CONST;
-const char *_get_localedir (void) G_GNUC_CONST;
-const char *_get_glade_datadir (void) G_GNUC_CONST;
-const char *_get_prefix (void) G_GNUC_CONST;
-const char *_get_sysconfdir (void) G_GNUC_CONST;
-const char *_get_datadir (void) G_GNUC_CONST;
-const char *_get_libdir (void) G_GNUC_CONST;
+const gchar *_get_icondir (void) G_GNUC_CONST;
+const gchar *_get_gtkhtml_datadir (void) G_GNUC_CONST;
+const gchar *_get_localedir (void) G_GNUC_CONST;
+const gchar *_get_glade_datadir (void) G_GNUC_CONST;
+const gchar *_get_prefix (void) G_GNUC_CONST;
+const gchar *_get_sysconfdir (void) G_GNUC_CONST;
+const gchar *_get_datadir (void) G_GNUC_CONST;
+const gchar *_get_libdir (void) G_GNUC_CONST;
 
 #undef ICONDIR
 #define ICONDIR _get_icondir ()
diff --git a/gtkhtml/gtkhtml-properties.c b/gtkhtml/gtkhtml-properties.c
index 4df8365..80b17ad 100644
--- a/gtkhtml/gtkhtml-properties.c
+++ b/gtkhtml/gtkhtml-properties.c
@@ -46,7 +46,7 @@ get_locale_language (void)
 	locale = g_win32_getlocale ();
 #endif
 	if (locale && strcmp (locale, "C") && strcmp (locale, "POSIX")) {
-		char *codeset, *lang;
+		gchar *codeset, *lang;
 
 		if ((codeset = strchr (locale, '.')))
 			lang = g_strndup (locale, codeset - locale);
diff --git a/gtkhtml/gtkhtml-stream.c b/gtkhtml/gtkhtml-stream.c
index 5cb8cfd..6d64b04 100644
--- a/gtkhtml/gtkhtml-stream.c
+++ b/gtkhtml/gtkhtml-stream.c
@@ -79,16 +79,16 @@ gtk_html_stream_write (GtkHTMLStream *stream,
 		stream->write_func (stream, buffer, size, stream->user_data);
 }
 
-int
+gint
 gtk_html_stream_vprintf (GtkHTMLStream *stream,
-			 const char *format,
+			 const gchar *format,
 			 va_list ap)
 {
 	size_t len;
-	char *buf = NULL;
-	char *mbuf = NULL;
-	char *result_string = NULL;
-	int rv;
+	gchar *buf = NULL;
+	gchar *mbuf = NULL;
+	gchar *result_string = NULL;
+	gint rv;
 	va_list ap_copy;
 
 	G_VA_COPY (ap_copy, ap);
@@ -112,13 +112,13 @@ gtk_html_stream_vprintf (GtkHTMLStream *stream,
 	return rv;
 }
 
-int
+gint
 gtk_html_stream_printf (GtkHTMLStream *stream,
-			const char *format,
+			const gchar *format,
 			...)
 {
 	va_list ap;
-	int rv;
+	gint rv;
 
 	va_start (ap, format);
 	rv = gtk_html_stream_vprintf (stream, format, ap);
@@ -139,7 +139,7 @@ gtk_html_stream_close (GtkHTMLStream *stream,
 	gtk_html_stream_destroy (stream);
 }
 
-char **
+gchar **
 gtk_html_stream_get_types (GtkHTMLStream *stream)
 {
 	if (stream->types_func != NULL)
@@ -154,7 +154,7 @@ struct _GtkHTMLLog {
 	FILE *file;
 };
 
-static char **
+static gchar **
 stream_log_types (GtkHTMLStream *stream,
 		  gpointer user_data)
 {
@@ -198,7 +198,7 @@ gtk_html_stream_log_new (GtkHTML *html, GtkHTMLStream *stream)
 	GtkHTMLLog *log;
 	GtkHTMLStream *new_stream;
 	gchar *fname;
-	static int log_num = 0;
+	static gint log_num = 0;
 
 	log = g_new (GtkHTMLLog, 1);
 	log->stream = stream;
diff --git a/gtkhtml/gtkhtml-stream.h b/gtkhtml/gtkhtml-stream.h
index a7c2d3e..a0c1837 100644
--- a/gtkhtml/gtkhtml-stream.h
+++ b/gtkhtml/gtkhtml-stream.h
@@ -44,15 +44,15 @@ void           gtk_html_stream_write     (GtkHTMLStream          *stream,
 void           gtk_html_stream_destroy   (GtkHTMLStream          *stream);
 void           gtk_html_stream_close     (GtkHTMLStream          *stream,
 					  GtkHTMLStreamStatus     status);
-char **        gtk_html_stream_get_types (GtkHTMLStream *stream);
+gchar **        gtk_html_stream_get_types (GtkHTMLStream *stream);
 
 GtkHTMLStream *gtk_html_stream_log_new   (GtkHTML *html, GtkHTMLStream *stream);
 
-int            gtk_html_stream_vprintf   (GtkHTMLStream *stream,
-					  const char *format,
+gint            gtk_html_stream_vprintf   (GtkHTMLStream *stream,
+					  const gchar *format,
 					  va_list ap);
-int            gtk_html_stream_printf    (GtkHTMLStream *stream,
-					  const char *format,
+gint            gtk_html_stream_printf    (GtkHTMLStream *stream,
+					  const gchar *format,
 					  ...) G_GNUC_PRINTF (2, 3);
 
 #endif /* _GTKHTML_STREAM_H */
diff --git a/gtkhtml/gtkhtml-types.h b/gtkhtml/gtkhtml-types.h
index 400c60c..63e539f 100644
--- a/gtkhtml/gtkhtml-types.h
+++ b/gtkhtml/gtkhtml-types.h
@@ -36,7 +36,7 @@ typedef struct _GtkHTMLEmbeddedPrivate GtkHTMLEmbeddedPrivate;
 typedef struct _GtkHTMLPrivate GtkHTMLPrivate;
 typedef struct _GtkHTMLStream GtkHTMLStream;
 
-typedef char **(* GtkHTMLStreamTypesFunc) (GtkHTMLStream *stream,
+typedef gchar **(* GtkHTMLStreamTypesFunc) (GtkHTMLStream *stream,
 					   gpointer user_data);
 typedef void   (* GtkHTMLStreamCloseFunc) (GtkHTMLStream *stream,
 					   GtkHTMLStreamStatus status,
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index c203234..bbf5c72 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -490,7 +490,7 @@ html_engine_url_requested_cb (HTMLEngine *engine,
 			      gpointer data)
 {
 	GtkHTML *gtk_html;
-	char *expanded = NULL;
+	gchar *expanded = NULL;
 	gtk_html = GTK_HTML (data);
 
 	if (engine->stopped)
@@ -515,7 +515,7 @@ html_engine_draw_pending_cb (HTMLEngine *engine,
 static void
 html_engine_redirect_cb (HTMLEngine *engine,
 			 const gchar *url,
-			 int delay,
+			 gint delay,
 			 gpointer data)
 {
 	GtkHTML *gtk_html;
@@ -835,7 +835,7 @@ gtk_html_get_top_html (GtkHTML *html)
 static cairo_font_options_t *
 get_font_options (void)
 {
-	char *antialiasing, *hinting, *subpixel_order;
+	gchar *antialiasing, *hinting, *subpixel_order;
 	GConfClient *gconf = gconf_client_get_default ();
 	cairo_font_options_t *font_options = cairo_font_options_create ();
 
@@ -899,11 +899,11 @@ gtk_html_set_fonts (GtkHTML *html, HTMLPainter *painter)
 	GtkWidget *top_level;
 	GtkStyle *style;
 	PangoFontDescription *fixed_desc = NULL;
-	char *fixed_name = NULL;
-	const char *fixed_family = NULL;
+	gchar *fixed_name = NULL;
+	const gchar *fixed_family = NULL;
 	gint  fixed_size = 0;
 	gboolean  fixed_points = FALSE;
-	const char *font_var = NULL;
+	const gchar *font_var = NULL;
 	gint  font_var_size = 0;
 	gboolean  font_var_points = FALSE;
 	cairo_font_options_t *font_options;
@@ -953,7 +953,7 @@ gtk_html_set_fonts (GtkHTML *html, HTMLPainter *painter)
 	}
 
 	html_font_manager_set_default (&painter->font_manager,
-				       (char *)font_var, (char *)fixed_family,
+				       (gchar *)font_var, (gchar *)fixed_family,
 				       font_var_size, font_var_points,
 				       fixed_size, fixed_points);
 	if (fixed_desc)
@@ -1244,7 +1244,7 @@ gtk_html_size_request (GtkWidget *widget, GtkRequisition *requisition)
 {
 	HTMLEngine *e = GTK_HTML (widget)->engine;
 	if (!e->writing) {
-		int old_width, old_height;
+		gint old_width, old_height;
 
 		old_width = e->width;
 		old_height = e->height;
@@ -1341,7 +1341,7 @@ size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 }
 
 static void
-set_pointer_url (GtkHTML *html, const char *url)
+set_pointer_url (GtkHTML *html, const gchar *url)
 {
 	if (url == html->pointer_url)
 		return;
@@ -1526,10 +1526,10 @@ mouse_change_pos (GtkWidget *widget, GdkWindow *window, gint x, gint y, gint sta
 	return TRUE;
 }
 
-static const char *
-skip_host (const char *url)
+static const gchar *
+skip_host (const gchar *url)
 {
-	const char *host;
+	const gchar *host;
 
 	host = url;
 	while (*host && (*host != '/') && (*host != ':'))
@@ -1557,11 +1557,11 @@ skip_host (const char *url)
 }
 
 static size_t
-path_len (const char *base, gboolean absolute)
+path_len (const gchar *base, gboolean absolute)
 {
-	const char *last;
-	const char *cur;
-	const char *start;
+	const gchar *last;
+	const gchar *cur;
+	const gchar *start;
 
 	start = last = skip_host (base);
 	if (!absolute) {
@@ -1575,12 +1575,12 @@ path_len (const char *base, gboolean absolute)
 }
 
 #if 0
-char *
-collapse_path (char *url)
+gchar *
+collapse_path (gchar *url)
 {
-	char *start;
-	char *end;
-	char *cur;
+	gchar *start;
+	gchar *end;
+	gchar *cur;
 	size_t len;
 
 	start = skip_host (url);
@@ -1609,7 +1609,7 @@ collapse_path (char *url)
 #endif
 
 static gboolean
-url_is_absolute (const char *url)
+url_is_absolute (const gchar *url)
 {
 	/*
 	  URI Syntactic Components
@@ -1635,10 +1635,10 @@ url_is_absolute (const char *url)
 	return *url && *url == ':';
 }
 
-static char *
-expand_relative (const char *base, const char *url)
+static gchar *
+expand_relative (const gchar *base, const gchar *url)
 {
-	char *new_url = NULL;
+	gchar *new_url = NULL;
 	size_t base_len, url_len;
 	gboolean absolute = FALSE;
 
@@ -1678,20 +1678,20 @@ expand_relative (const char *base, const char *url)
 	return new_url;
 }
 
-char *
-gtk_html_get_url_base_relative (GtkHTML *html, const char *url)
+gchar *
+gtk_html_get_url_base_relative (GtkHTML *html, const gchar *url)
 {
 	return expand_relative (gtk_html_get_base (html), url);
 }
 
-static char *
-expand_frame_url (GtkHTML *html, const char *url)
+static gchar *
+expand_frame_url (GtkHTML *html, const gchar *url)
 {
-	char *new_url;
+	gchar *new_url;
 
 	new_url = gtk_html_get_url_base_relative (html, url);
 	while (html->iframe_parent) {
-		char *expanded;
+		gchar *expanded;
 
 		expanded = gtk_html_get_url_base_relative (GTK_HTML (html->iframe_parent),
 						       new_url);
@@ -1703,8 +1703,8 @@ expand_frame_url (GtkHTML *html, const char *url)
 	return new_url;
 }
 
-char *
-gtk_html_get_url_object_relative (GtkHTML *html, HTMLObject *o, const char *url)
+gchar *
+gtk_html_get_url_object_relative (GtkHTML *html, HTMLObject *o, const gchar *url)
 {
 	HTMLEngine *e;
 	HTMLObject *parent;
@@ -2107,7 +2107,7 @@ gtk_html_keymap_direction_changed (GdkKeymap *keymap, GtkHTML *html)
 static gboolean
 goto_caret_anchor (GtkHTML *html)
 {
-	int x = 0, y = 0;
+	gint x = 0, y = 0;
 
 	g_return_val_if_fail (html != NULL, FALSE);
 	g_return_val_if_fail (GTK_IS_HTML (html), FALSE);
@@ -2205,7 +2205,7 @@ enter_notify_event (GtkWidget *widget, GdkEventCrossing *event)
 
 /* X11 selection support.  */
 
-static const char *
+static const gchar *
 utf16_order (gboolean swap)
 {
 	gboolean be;
@@ -2227,11 +2227,11 @@ utf16_order (gboolean swap)
 
 }
 
-static char *
-get_selection_string (GtkHTML *html, int *len, gboolean selection, gboolean primary, gboolean html_format)
+static gchar *
+get_selection_string (GtkHTML *html, gint *len, gboolean selection, gboolean primary, gboolean html_format)
 {
 	HTMLObject *selection_object = NULL;
-	char *selection_string = NULL;
+	gchar *selection_string = NULL;
 	gboolean free_object = FALSE;
 
 	if (selection && html_engine_is_selection_active (html->engine)) {
@@ -2279,22 +2279,22 @@ get_selection_string (GtkHTML *html, int *len, gboolean selection, gboolean prim
 }
 
 /* returned pointer should be freed with g_free */
-char *
-gtk_html_get_selection_html (GtkHTML *html, int *len)
+gchar *
+gtk_html_get_selection_html (GtkHTML *html, gint *len)
 {
 	return get_selection_string (html, len, TRUE, FALSE, TRUE);
 }
 
 /* returned pointer should be freed with g_free */
-char *
-gtk_html_get_selection_plain_text (GtkHTML *html, int *len)
+gchar *
+gtk_html_get_selection_plain_text (GtkHTML *html, gint *len)
 {
 	return get_selection_string (html, len, TRUE, FALSE, FALSE);
 }
 
 static gchar *
 utf16_to_utf8_with_bom_check (guchar  *data, guint len) {
-	const char *fromcode = NULL;
+	const gchar *fromcode = NULL;
 	GError  *error = NULL;
 	guint16 c;
 	gsize read_len, written_len;
@@ -2372,7 +2372,7 @@ setup_class_properties (GtkHTML *html)
 		klass->properties = gtk_html_class_properties_new (GTK_WIDGET (html));
 
 		if (!gconf_is_initialized ()) {
-			char *argv[] = { (char *) "gtkhtml", NULL };
+			gchar *argv[] = { (gchar *) "gtkhtml", NULL };
 
 			g_warning ("gconf is not initialized, please call gconf_init before using GtkHTML library. "
 				   "Meanwhile it's initialized by gtkhtml itself.");
@@ -2561,14 +2561,14 @@ drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *sel
 					 * The data contains the URL, a \n, then the
 					 * title of the web page.
 					 */
-					char *utf16;
-					char *utf8;
+					gchar *utf16;
+					gchar *utf8;
 					gsize written_len;
 					GdkAtom atom;
 
 					if (HTML_IS_TEXT (obj)) {
 						Link *link = html_text_get_link_at_offset (HTML_TEXT (obj), offset);
-						char *text;
+						gchar *text;
 
 						g_return_if_fail (link);
 						text = g_strndup (HTML_TEXT (obj)->text + link->start_index, link->end_index - link->start_index);
@@ -2630,12 +2630,12 @@ next_uri (guchar **uri_list, gint *len, gint *list_len)
 }
 
 static HTMLObject *
-new_img_obj_from_uri (HTMLEngine *e, char *uri, char *title, gint len)
+new_img_obj_from_uri (HTMLEngine *e, gchar *uri, gchar *title, gint len)
 {
 	if (!strncmp (uri, "file:", 5)) {
 		if (!HTML_IS_PLAIN_PAINTER(e->painter)) {
 			GdkPixbuf *pixbuf = NULL;
-			char *img_path = g_filename_from_uri (uri, NULL, NULL);
+			gchar *img_path = g_filename_from_uri (uri, NULL, NULL);
 			if (img_path) {
 				pixbuf = gdk_pixbuf_new_from_file(img_path, NULL);
 				g_free(img_path);
@@ -3401,7 +3401,7 @@ gtk_html_im_retrieve_surrounding_cb (GtkIMContext *context, GtkHTML *html)
 
 	text = get_surrounding_text (html->engine, &offset);
 	if (text) {
-		/* convert char offset to byte offset */
+		/* convert gchar offset to byte offset */
 		offset = g_utf8_offset_to_pointer (text, offset) - text;
 		gtk_im_context_set_surrounding (context, text, -1, offset);
 		g_free (text);
@@ -3628,8 +3628,8 @@ gtk_html_allow_selection (GtkHTML *html,
  */
 GtkHTMLStream *
 gtk_html_begin_full (GtkHTML           *html,
-		     char              *target_frame,
-		     const char        *content_type,
+		     gchar              *target_frame,
+		     const gchar        *content_type,
 		     GtkHTMLBeginFlags flags)
 {
 	GtkHTMLStream *handle;
@@ -3785,7 +3785,7 @@ gtk_html_get_title (GtkHTML *html)
  *
  **/
 void
-gtk_html_set_title (GtkHTML *html, const char *title)
+gtk_html_set_title (GtkHTML *html, const gchar *title)
 {
 	g_return_if_fail (html != NULL);
 	g_return_if_fail (GTK_IS_HTML (html));
@@ -3841,7 +3841,7 @@ gtk_html_save (GtkHTML *html,
  **/
 gboolean
 gtk_html_export (GtkHTML *html,
-		 const char *content_type,
+		 const gchar *content_type,
 		 GtkHTMLSaveReceiverFn receiver,
 		 gpointer user_data)
 {
@@ -4134,7 +4134,7 @@ gtk_html_get_caret_mode(const GtkHTML *html)
  *             or NULL to not look for the anchor.
  **/
 void
-gtk_html_set_caret_first_focus_anchor (GtkHTML *html, const char *name)
+gtk_html_set_caret_first_focus_anchor (GtkHTML *html, const gchar *name)
 {
 	g_return_if_fail (GTK_IS_HTML (html));
 	g_return_if_fail (html->priv != NULL);
@@ -4183,7 +4183,7 @@ gtk_html_load_from_string  (GtkHTML *html, const gchar *str, gint len)
 }
 
 void
-gtk_html_set_base (GtkHTML *html, const char *url)
+gtk_html_set_base (GtkHTML *html, const gchar *url)
 {
 	g_return_if_fail (GTK_IS_HTML (html));
 
@@ -4191,7 +4191,7 @@ gtk_html_set_base (GtkHTML *html, const char *url)
 	html->priv->base_url = g_strdup (url);
 }
 
-const char *
+const gchar *
 gtk_html_get_base (GtkHTML *html)
 {
 	g_return_val_if_fail (GTK_IS_HTML (html), NULL);
@@ -4478,7 +4478,7 @@ clipboard_paste_received_cb (GtkClipboard     *clipboard,
 		} else if ((utf8 = (gchar *) gtk_selection_data_get_text (selection_data))) {
 			utf8 = utf8_filter_out_bom (utf8);
 			if (as_cite) {
-				char *encoded;
+				gchar *encoded;
 
 				encoded = html_encode_entities (utf8, g_utf8_strlen (utf8, -1), NULL);
 				g_free (utf8);
@@ -4520,7 +4520,7 @@ static ClipboardContents *
 create_clipboard_contents (GtkHTML *html)
 {
 	ClipboardContents *contents;
-	int html_len, text_len;
+	gint html_len, text_len;
 
 	contents = g_new0 (ClipboardContents, 1);
 
@@ -4606,7 +4606,7 @@ static void
 update_primary_selection (GtkHTML *html)
 {
 	GtkClipboard *clipboard;
-	int text_len;
+	gint text_len;
 	gchar *text;
 
 	g_return_if_fail (html != NULL);
@@ -4670,7 +4670,7 @@ gtk_html_set_default_content_type (GtkHTML *html, const gchar *content_type)
     html_engine_set_content_type( html->engine, content_type);
 }
 
-const gchar*
+const gchar *
 gtk_html_get_default_content_type (GtkHTML *html)
 {
     return html_engine_get_content_type( html->engine);
@@ -6340,11 +6340,11 @@ gtk_html_flush (GtkHTML *html)
 	html_engine_flush (html->engine);
 }
 
-const char *
-gtk_html_get_object_id_at (GtkHTML *html, int x, int y)
+const gchar *
+gtk_html_get_object_id_at (GtkHTML *html, gint x, gint y)
 {
 	HTMLObject *o = html_engine_get_object_at (html->engine, x, y, NULL, FALSE);
-	const char *id = NULL;
+	const gchar *id = NULL;
 
 	while (o) {
 		id = html_object_get_id (o);
@@ -6356,11 +6356,11 @@ gtk_html_get_object_id_at (GtkHTML *html, int x, int y)
 	return id;
 }
 
-char *
-gtk_html_get_url_at (GtkHTML *html, int x, int y)
+gchar *
+gtk_html_get_url_at (GtkHTML *html, gint x, gint y)
 {
 	HTMLObject *obj;
-	int offset;
+	gint offset;
 
 	g_return_val_if_fail (GTK_IS_HTML (html), NULL);
 
@@ -6372,11 +6372,11 @@ gtk_html_get_url_at (GtkHTML *html, int x, int y)
 	return NULL;
 }
 
-char *
+gchar *
 gtk_html_get_cursor_url (GtkHTML *html)
 {
 	HTMLObject *obj;
-	int offset;
+	gint offset;
 
 	g_return_val_if_fail (GTK_IS_HTML (html), NULL);
 
@@ -6392,8 +6392,8 @@ gtk_html_get_cursor_url (GtkHTML *html)
 	return NULL;
 }
 
-char *
-gtk_html_get_image_src_at (GtkHTML *html, int x, int y)
+gchar *
+gtk_html_get_image_src_at (GtkHTML *html, gint x, gint y)
 {
 	HTMLObject *obj;
 	gint offset;
@@ -6414,7 +6414,7 @@ gtk_html_get_image_src_at (GtkHTML *html, int x, int y)
 	return NULL;
 }
 
-char *
+gchar *
 gtk_html_get_cursor_image_src (GtkHTML *html)
 {
 	HTMLObject *obj;
@@ -6535,8 +6535,8 @@ gchar *
 gtk_html_filename_to_uri (const gchar *filename)
 {
 	gchar *fake_filename, *fake_uri, *retval;
-	const char dummy_prefix[] = "file:///dummy/";
-	const int dummy_prefix_len = sizeof (dummy_prefix) - 1;
+	const gchar dummy_prefix[] = "file:///dummy/";
+	const gint dummy_prefix_len = sizeof (dummy_prefix) - 1;
 #ifdef G_OS_WIN32
 	gchar drive_letter = 0;
 #else
@@ -6623,7 +6623,7 @@ gtk_html_filename_to_uri (const gchar *filename)
  * build with -DUNIT_TEST_URI_CONVERSIONS.
  */
 
-static const char *const tests[][3] = {
+static const gchar *const tests[][3] = {
 	/* Each test case has three strings:
 	 *
 	 * 0) a URI, the source for the uri->filename conversion test,
@@ -6670,11 +6670,11 @@ static const char *const tests[][3] = {
   { NULL, NULL }
 };
 
-int
-main (int argc, char **argv)
+gint
+main (gint argc, gchar **argv)
 {
-	int failures = 0;
-	int i;
+	gint failures = 0;
+	gint i;
 
 	for (i = 0; i < G_N_ELEMENTS (tests); i++) {
 		gchar *filename;
diff --git a/gtkhtml/gtkhtml.h b/gtkhtml/gtkhtml.h
index 2c931e4..c8a504b 100644
--- a/gtkhtml/gtkhtml.h
+++ b/gtkhtml/gtkhtml.h
@@ -80,7 +80,7 @@ struct _GtkHTMLClass {
 	void (* set_base_target) (GtkHTML *html, const gchar *base_url);
 
 	void (* on_url)		 (GtkHTML *html, const gchar *url);
-	void (* redirect)        (GtkHTML *html, const gchar *url, int delay);
+	void (* redirect)        (GtkHTML *html, const gchar *url, gint delay);
 	void (* submit)          (GtkHTML *html, const gchar *method, const gchar *url, const gchar *encoding);
 	gboolean (* object_requested)(GtkHTML *html, GtkHTMLEmbedded *);
 
@@ -99,8 +99,8 @@ struct _GtkHTMLClass {
 	void     (* cursor_move)          (GtkHTML *html, GtkDirectionType dir_type, GtkHTMLCursorSkipType skip);
 	gboolean (* command)              (GtkHTML *html, GtkHTMLCommandType com_type);
 	void (* cursor_changed)       (GtkHTML *html);
-	void (* object_inserted)       (GtkHTML *html, int pos, int len);
-	void (* object_delete)        (GtkHTML *html, int pos, int len);
+	void (* object_inserted)       (GtkHTML *html, gint pos, gint len);
+	void (* object_delete)        (GtkHTML *html, gint pos, gint len);
 
 	/* properties */
 	GtkHTMLClassProperties *properties;
@@ -157,8 +157,8 @@ void                       gtk_html_select_all                    (GtkHTML
 /* Loading.  */
 GtkHTMLStream             *gtk_html_begin                         (GtkHTML                   *html);
 GtkHTMLStream             *gtk_html_begin_full                    (GtkHTML                   *html,
-								   char                      *target_frame,
-								   const char                *content_type,
+								   gchar                      *target_frame,
+								   const gchar                *content_type,
 								   GtkHTMLBeginFlags         flags);
 
 void                       gtk_html_write                         (GtkHTML                   *html,
@@ -176,13 +176,13 @@ void                       gtk_html_load_from_string              (GtkHTML
 
 /* Saving.  */
 gboolean                   gtk_html_export                        (GtkHTML                   *html,
-								   const char                *type,
+								   const gchar                *type,
 								   GtkHTMLSaveReceiverFn      receiver,
 								   gpointer                   data);
-char *                     gtk_html_get_selection_html            (GtkHTML                   *html,
-								   int                       *len);
-char *                     gtk_html_get_selection_plain_text      (GtkHTML                   *html,
-								   int                       *len);
+gchar *                     gtk_html_get_selection_html            (GtkHTML                   *html,
+								   gint                       *len);
+gchar *                     gtk_html_get_selection_plain_text      (GtkHTML                   *html,
+								   gint                       *len);
 
 /* Editable support.  */
 void                       gtk_html_set_editable                  (GtkHTML                   *html,
@@ -204,7 +204,7 @@ void                       gtk_html_set_caret_mode                (GtkHTML
 gboolean                   gtk_html_get_caret_mode                (const GtkHTML             *html);
 
 void			   gtk_html_set_caret_first_focus_anchor  (GtkHTML		     *html,
-								   const char                *name);
+								   const gchar                *name);
 
 /* Animated Images */
 void                       gtk_html_set_animate                   (GtkHTML                   *html,
@@ -238,7 +238,7 @@ GtkPrintOperationResult	   gtk_html_print_operation_run		  (GtkHTML
 
 /* Title.  */
 const gchar               *gtk_html_get_title                     (GtkHTML                   *html);
-void                       gtk_html_set_title                     (GtkHTML                   *html, const char *title);
+void                       gtk_html_set_title                     (GtkHTML                   *html, const gchar *title);
 
 /* Anchors.  */
 gboolean                   gtk_html_jump_to_anchor                (GtkHTML                   *html,
@@ -281,9 +281,9 @@ void                       gtk_html_append_html                   (GtkHTML
 /* misc utils */
 gpointer                   gtk_html_get_object_by_id              (GtkHTML                   *html,
 								   const gchar               *id);
-const char *               gtk_html_get_object_id_at              (GtkHTML                   *html,
-								   int                        x,
-								   int                        y);
+const gchar *               gtk_html_get_object_id_at              (GtkHTML                   *html,
+								   gint                        x,
+								   gint                        y);
 gboolean                   gtk_html_command                       (GtkHTML                   *html,
 								   const gchar               *command_name);
 gboolean                   gtk_html_edit_make_cursor_visible      (GtkHTML                   *html);
@@ -298,13 +298,13 @@ void                       gtk_html_set_allow_frameset            (GtkHTML
 								   gboolean                   allow);
 gboolean                   gtk_html_get_allow_frameset            (GtkHTML                   *html);
 void                       gtk_html_set_base                      (GtkHTML                   *html,
-								   const char                *url);
-const char                *gtk_html_get_base                      (GtkHTML                   *html);
-char                      *gtk_html_get_url_base_relative         (GtkHTML                   *html,
-								   const char                *url);
-char                      *gtk_html_get_url_object_relative       (GtkHTML                   *html,
+								   const gchar                *url);
+const gchar                *gtk_html_get_base                      (GtkHTML                   *html);
+gchar                      *gtk_html_get_url_base_relative         (GtkHTML                   *html,
+								   const gchar                *url);
+gchar                      *gtk_html_get_url_object_relative       (GtkHTML                   *html,
 								   HTMLObject                *o,
-								   const char                *url);
+								   const gchar                *url);
 void                       gtk_html_images_ref                    (GtkHTML                   *html);
 void                       gtk_html_images_unref                  (GtkHTML                   *html);
 void                       gtk_html_image_ref                     (GtkHTML                   *html,
@@ -319,15 +319,15 @@ void                       gtk_html_set_images_blocking           (GtkHTML
 								   gboolean                   block);
 gboolean                   gtk_html_has_undo                      (GtkHTML                   *html);
 void                       gtk_html_drop_undo                     (GtkHTML                   *html);
-char *                     gtk_html_get_url_at                    (GtkHTML                   *html,
-								   int                        x,
-								   int                        y);
-char *                     gtk_html_get_cursor_url                (GtkHTML                   *html);
+gchar *                     gtk_html_get_url_at                    (GtkHTML                   *html,
+								   gint                        x,
+								   gint                        y);
+gchar *                     gtk_html_get_cursor_url                (GtkHTML                   *html);
 
-char *                     gtk_html_get_image_src_at              (GtkHTML                   *html,
-								   int                        x,
-								   int                        y);
-char *                     gtk_html_get_cursor_image_src          (GtkHTML                   *html);
+gchar *                     gtk_html_get_image_src_at              (GtkHTML                   *html,
+								   gint                        x,
+								   gint                        y);
+gchar *                     gtk_html_get_cursor_image_src          (GtkHTML                   *html);
 
 void                       gtk_html_set_tokenizer                 (GtkHTML                   *html,
 								   HTMLTokenizer             *tokenizer);
@@ -335,7 +335,7 @@ void                       gtk_html_set_tokenizer                 (GtkHTML
 /* DEPRECATED */
 #if 1
 gboolean                   gtk_html_build_with_gconf              (void);
-const gchar*               gtk_html_get_default_content_type              (GtkHTML                   *html);
+const gchar *               gtk_html_get_default_content_type              (GtkHTML                   *html);
 void                       gtk_html_set_default_content_type              (GtkHTML                   *html,
 								   const gchar                     *content_type);
 void			   gtk_html_set_default_engine		  (GtkHTML *html,
diff --git a/gtkhtml/gtkhtmldebug.c b/gtkhtml/gtkhtmldebug.c
index 083ef70..06418cd 100644
--- a/gtkhtml/gtkhtmldebug.c
+++ b/gtkhtml/gtkhtmldebug.c
@@ -100,7 +100,7 @@ clueflow_style_to_string (HTMLClueFlowStyle style)
 	}
 }
 
-static const char *
+static const gchar *
 direction_to_string (HTMLDirection dir)
 {
 	switch (dir) {
@@ -171,8 +171,8 @@ gtk_html_debug_dump_object (HTMLObject *obj,
 	}
 	else if (HTML_OBJECT_TYPE (obj) == HTML_TYPE_TEXTSLAVE) {
 		GSList *cur;
-		int width;
-		int ii, io, tw, offset;
+		gint width;
+		gint ii, io, tw, offset;
 		gchar *sl_text = g_strndup (html_text_get_text (HTML_TEXT (HTML_TEXT_SLAVE (obj)->owner),
 								HTML_TEXT_SLAVE (obj)->posStart),
 					    html_text_get_index (HTML_TEXT (HTML_TEXT_SLAVE (obj)->owner),
diff --git a/gtkhtml/htmlanchor.c b/gtkhtml/htmlanchor.c
index e7d797b..8a7f130 100644
--- a/gtkhtml/htmlanchor.c
+++ b/gtkhtml/htmlanchor.c
@@ -54,7 +54,7 @@ copy (HTMLObject *self,
 }
 
 static HTMLAnchor *
-find_anchor (HTMLObject *o, const char *name, gint *x, gint *y)
+find_anchor (HTMLObject *o, const gchar *name, gint *x, gint *y)
 {
 	if (strcmp (name, HTML_ANCHOR(o)->name->str) == 0) {
 		*x += o->x;
diff --git a/gtkhtml/htmlclue.c b/gtkhtml/htmlclue.c
index 7324989..4f4e1f7 100644
--- a/gtkhtml/htmlclue.c
+++ b/gtkhtml/htmlclue.c
@@ -370,7 +370,7 @@ calc_min_width (HTMLObject *o,
 }
 
 static HTMLAnchor *
-find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+find_anchor (HTMLObject *self, const gchar *name, gint *x, gint *y)
 {
 	HTMLClue *clue;
 	HTMLObject *obj;
diff --git a/gtkhtml/htmlclueflow.c b/gtkhtml/htmlclueflow.c
index 08542a7..536559e 100644
--- a/gtkhtml/htmlclueflow.c
+++ b/gtkhtml/htmlclueflow.c
@@ -58,13 +58,13 @@ static HTMLClueClass *parent_class = NULL;
 static gchar *        get_item_marker_str                   (HTMLClueFlow *flow, gboolean ascii_only);
 static guint          get_post_padding                      (HTMLClueFlow *flow,
 							     guint pad);
-static int            get_similar_depth                     (HTMLClueFlow *self,
+static gint            get_similar_depth                     (HTMLClueFlow *self,
 							     HTMLClueFlow *neighbor);
 
 static void
 copy_levels (GByteArray *dst, GByteArray *src)
 {
-	int i;
+	gint i;
 
 	g_byte_array_set_size (dst, src->len);
 
@@ -440,7 +440,7 @@ is_header (HTMLClueFlow *flow)
 static gboolean
 need_blockquote_padding  (HTMLClueFlow *flow, HTMLClueFlow *prev)
 {
-	int i = get_similar_depth (flow, prev);
+	gint i = get_similar_depth (flow, prev);
 
 	/*
 	 * If the levels don't match up the the current flow
@@ -687,9 +687,9 @@ calc_min_width (HTMLObject *o,
 }
 
 static gint
-pref_left_margin (HTMLPainter *p, HTMLObject *o, int indent)
+pref_left_margin (HTMLPainter *p, HTMLObject *o, gint indent)
 {
-	int margin = html_object_get_left_margin (o->parent, p, o->y, TRUE);
+	gint margin = html_object_get_left_margin (o->parent, p, o->y, TRUE);
 
 	if (html_object_get_direction (o) == HTML_DIRECTION_RTL) {
 		if (HTML_CLUEFLOW (o)->style != HTML_CLUEFLOW_STYLE_PRE && HTML_IS_PLAIN_PAINTER(p))
@@ -704,7 +704,7 @@ pref_left_margin (HTMLPainter *p, HTMLObject *o, int indent)
 }
 
 static gint
-pref_right_margin (HTMLPainter *p, HTMLObject *o, int indent)
+pref_right_margin (HTMLPainter *p, HTMLObject *o, gint indent)
 {
 	gint margin = html_object_get_right_margin (o->parent, p, o->y, TRUE);
 
@@ -1172,7 +1172,7 @@ get_item_marker_str (HTMLClueFlow *flow, gboolean ascii_only)
 	HTMLListType type = flow->item_type;
 
 	if (type == HTML_LIST_TYPE_BLOCKQUOTE && flow->levels->len > 0) {
-		int i;
+		gint i;
 
 		for (i = flow->levels->len - 1; i >= 0; i --) {
 			if (flow->levels->data [i] != HTML_LIST_TYPE_BLOCKQUOTE) {
@@ -1204,7 +1204,7 @@ get_item_marker_str (HTMLClueFlow *flow, gboolean ascii_only)
 }
 
 static void
-draw_cite_line (HTMLObject *cur, HTMLPainter *p, const char *cite_str, gint offset, gint x, gint y)
+draw_cite_line (HTMLObject *cur, HTMLPainter *p, const gchar *cite_str, gint offset, gint x, gint y)
 {
 	gint cy, w, a, d;
 
@@ -1234,9 +1234,9 @@ draw_quotes (HTMLObject *self, HTMLPainter *painter,
 {
 	HTMLClueFlow *flow;
 	GdkRectangle paint, area, clip;
-	int i;
-	int indent = 0;
-	int last_indent = 0;
+	gint i;
+	gint indent = 0;
+	gint last_indent = 0;
 	gint pixel_size = html_painter_get_pixel_size (painter);
 	gboolean is_plain = HTML_IS_PLAIN_PAINTER (painter);
 	HTMLDirection dir = html_object_get_direction (self);
@@ -1277,8 +1277,8 @@ draw_quotes (HTMLObject *self, HTMLPainter *painter,
 							paint.width, paint.height);
 			} else {
 				HTMLObject *cur = HTML_CLUE (self)->head;
-				int x_pos, baseline = 0;
-				const char *cite_str = dir == HTML_DIRECTION_RTL ? HTML_BLOCK_CITE_RTL : HTML_BLOCK_CITE_LTR;
+				gint x_pos, baseline = 0;
+				const gchar *cite_str = dir == HTML_DIRECTION_RTL ? HTML_BLOCK_CITE_RTL : HTML_BLOCK_CITE_LTR;
 
 				while (cur) {
 					if (cur->y != 0) {
@@ -1549,7 +1549,7 @@ get_start_tag (HTMLClueFlow *self)
 	}
 }
 
-static const char *
+static const gchar *
 get_start_indent_item (HTMLListType type)
 {
 	switch (type) {
@@ -1578,7 +1578,7 @@ get_start_indent_item (HTMLListType type)
 	return "";
 }
 
-static const char *
+static const gchar *
 get_end_indent_item (HTMLListType type)
 {
 	switch (type) {
@@ -1601,8 +1601,8 @@ get_end_indent_item (HTMLListType type)
 static int
 get_similar_depth (HTMLClueFlow *self, HTMLClueFlow *neighbor)
 {
-	int i;
-	int max_depth;
+	gint i;
+	gint max_depth;
 
 	if (neighbor == NULL)
 		return 0;
@@ -1618,7 +1618,7 @@ get_similar_depth (HTMLClueFlow *self, HTMLClueFlow *neighbor)
 }
 
 static gboolean
-save_indent_string (HTMLClueFlow *self, HTMLEngineSaveState *state, const char *format, ...)
+save_indent_string (HTMLClueFlow *self, HTMLEngineSaveState *state, const gchar *format, ...)
 {
 	va_list args;
 	gboolean retval;
@@ -1634,10 +1634,10 @@ save_indent_string (HTMLClueFlow *self, HTMLEngineSaveState *state, const char *
 	return retval;
 }
 
-static const char *
+static const gchar *
 get_p_str (HTMLClueFlow *self, HTMLEngineSaveState *state)
 {
-	const char *p_str = NULL;
+	const gchar *p_str = NULL;
 
 	if (self->dir != html_object_get_direction (state->engine->clue)) {
 		switch (self->dir) {
@@ -1662,7 +1662,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 	HTMLClueFlow *next = NULL;
 	HTMLClueFlow *prev = NULL;
 	HTMLHAlignType halign;
-	const char *br_str = "<BR>\n";
+	const gchar *br_str = "<BR>\n";
 
 	if (HTML_IS_CLUEFLOW (HTML_OBJECT (self)->next))
 		next = HTML_CLUEFLOW (HTML_OBJECT (self)->next);
@@ -1685,7 +1685,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 	}
 
 	if (!prev) {
-		const char *p_str = get_p_str (self, state);
+		const gchar *p_str = get_p_str (self, state);
 
 		if (p_str) {
 			if (! html_engine_save_output_string (state, "%s", p_str))
@@ -1694,7 +1694,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 	}
 
 	if (is_item (self)) {
-		char *li = get_list_start_tag (self);
+		gchar *li = get_list_start_tag (self);
 
 		if (li && !save_indent_string (self, state, "<%s>", li)) {
 			g_free (li);
@@ -1704,7 +1704,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 		if (!save_indent_string (self, state, ""))
 			return FALSE;
 	} else {
-		const char *start = get_start_tag (self);
+		const gchar *start = get_start_tag (self);
 
 		if (start) {
 			if (!save_indent_string (self, state, "<%s>\n", start))
@@ -1752,7 +1752,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 				return FALSE;
 		}
 	} else {
-		const char *end = get_start_tag (self);
+		const gchar *end = get_start_tag (self);
 
 		if (self->style != HTML_CLUEFLOW_STYLE_PRE) {
 			if ((!html_clueflow_contains_table (self) && !end && next && self->style == next->style) || html_clueflow_is_empty (self)) {
@@ -1778,7 +1778,7 @@ write_flow_tag (HTMLClueFlow *self, HTMLEngineSaveState *state)
 			HTMLObject *head = HTML_CLUE (HTML_OBJECT (self)->parent)->head;
 
 			if (head && HTML_IS_CLUEFLOW (head)) {
-				const char *head_p_str = get_p_str (HTML_CLUEFLOW (head), state);
+				const gchar *head_p_str = get_p_str (HTML_CLUEFLOW (head), state);
 
 				if (head_p_str) {
 					if (! html_engine_save_output_string (state, "</P>\n"))
@@ -1798,8 +1798,8 @@ save (HTMLObject *s,
 	HTMLClueFlow *self = HTML_CLUEFLOW (s);
 	HTMLClueFlow *next = NULL;
 	HTMLClueFlow *prev = NULL;
-	int d;
-	int i;
+	gint d;
+	gint i;
 
 	if (HTML_IS_CLUEFLOW (HTML_OBJECT (self)->next))
 		next = HTML_CLUEFLOW (HTML_OBJECT (self)->next);
@@ -1809,7 +1809,7 @@ save (HTMLObject *s,
 
 	d = i = get_similar_depth (self, prev);
 	while (i < self->levels->len) {
-		const char *stag = get_start_indent_item (self->levels->data[i]);
+		const gchar *stag = get_start_indent_item (self->levels->data[i]);
 
 		if (!write_indent (state, i)
 		    || !html_engine_save_output_string (state, "<%s>\n", stag))
@@ -1824,7 +1824,7 @@ save (HTMLObject *s,
 	i = self->levels->len - 1;
 	d = get_similar_depth (self, next);
 	while (i >= d) {
-		const char *stag = get_end_indent_item (self->levels->data[i]);
+		const gchar *stag = get_end_indent_item (self->levels->data[i]);
 
 		if (!write_indent (state, i)
 		    || !html_engine_save_output_string (state, "</%s>\n", stag))
@@ -1839,14 +1839,14 @@ save (HTMLObject *s,
 static void
 write_item_marker (GString *pad_string, HTMLClueFlow *flow)
 {
-	char *marker;
+	gchar *marker;
 
 	marker = get_item_marker_str (flow, TRUE);
 
 	if (marker) {
 		gint marker_len = strlen (marker);
 		gint len = pad_string->len - 1;
-		char *str = pad_string->str;
+		gchar *str = pad_string->str;
 
 		while (len > 0) {
 			if ((str[len - 1] != ' ') || (pad_string->len - len >= marker_len))
@@ -1923,7 +1923,7 @@ append_selection_string (HTMLObject *self,
  * zero-width or combined characters.)
  */
 static gint
-utf8_width (const char *str, gint len)
+utf8_width (const gchar *str, gint len)
 {
 	gunichar c;
 	gint width = 0;
@@ -1941,7 +1941,7 @@ utf8_width (const char *str, gint len)
  * not exceeding the given width.
  */
 static gint
-utf8_length_in_width (const char *str, gint len, gint width)
+utf8_length_in_width (const gchar *str, gint len, gint width)
 {
 	gunichar c;
 	gint l = 0;
@@ -1983,7 +1983,7 @@ save_plain (HTMLObject *self,
 							      buffer_state,
 							      max_width)) {
 		guchar *s;
-		int offset;
+		gint offset;
 
 		if (get_pre_padding (flow, calc_padding (state->engine->painter)) > 0) {
 			plain_padding (flow, out, FALSE);
@@ -2014,7 +2014,7 @@ save_plain (HTMLObject *self,
 			offset = 0;
 			for (i = 0; i < n_items; i ++) {
 				PangoItem tmp_item;
-				int start_offset;
+				gint start_offset;
 
 				start_offset = offset;
 				offset += items [i]->num_chars;
@@ -2287,7 +2287,7 @@ search_text (HTMLObject **beg, HTMLSearch *info)
 
 		/* make shorter text instead */
 		if (!info->forward && index + info->text_bytes < text_bytes) {
-			guchar* tmp = (guchar *)(par + index + info->text_bytes);
+			guchar * tmp = (guchar *)(par + index + info->text_bytes);
 			*tmp = '\0';
 		}
 
@@ -2830,7 +2830,7 @@ html_clueflow_set_indentation (HTMLClueFlow *flow,
 			       guint8 *indentation_levels)
 {
 	HTMLObject *next_relative;
-	int i;
+	gint i;
 	g_return_if_fail (flow != NULL);
 	g_return_if_fail (engine != NULL);
 	g_return_if_fail (HTML_IS_ENGINE (engine));
diff --git a/gtkhtml/htmlcluev.c b/gtkhtml/htmlcluev.c
index df3c179..e13b8eb 100644
--- a/gtkhtml/htmlcluev.c
+++ b/gtkhtml/htmlcluev.c
@@ -457,7 +457,7 @@ check_point (HTMLObject *self,
 	HTMLObject *p;
 	HTMLObject *obj;
 	HTMLClueAligned *clue;
-	int padding = HTML_CLUEV (self)->padding;
+	gint padding = HTML_CLUEV (self)->padding;
 
 	if (x < self->x || x >= self->x + self->width
 	    || y < self->y - self->ascent || y >= self->y + self->descent)
diff --git a/gtkhtml/htmlcluev.h b/gtkhtml/htmlcluev.h
index 7f0ff6f..3818ff7 100644
--- a/gtkhtml/htmlcluev.h
+++ b/gtkhtml/htmlcluev.h
@@ -37,7 +37,7 @@ struct _HTMLClueV {
 	gushort padding;
 
 	/* border */
-	int border_width;
+	gint border_width;
 	HTMLBorderStyle border_style;
 	HTMLColor *border_color;
 
diff --git a/gtkhtml/htmlcolorset.c b/gtkhtml/htmlcolorset.c
index 49a575b..6ca12e2 100644
--- a/gtkhtml/htmlcolorset.c
+++ b/gtkhtml/htmlcolorset.c
@@ -58,7 +58,7 @@ html_colorset_new (GtkWidget *w)
 void
 html_colorset_destroy (HTMLColorSet *set)
 {
-	int i;
+	gint i;
 
 	g_return_if_fail (set != NULL);
 
@@ -137,8 +137,8 @@ html_colorset_set_unchanged (HTMLColorSet *s, HTMLColorSet *o)
 
 static GdkColor *
 get_prop_color (GtkWidget *w,
-                const char *name,
-                const char *dv,
+                const gchar *name,
+                const gchar *dv,
                 GdkColor *gdk_color)
 {
 	GdkColor c;
diff --git a/gtkhtml/htmlcursor.c b/gtkhtml/htmlcursor.c
index bbc3d94..df26625 100644
--- a/gtkhtml/htmlcursor.c
+++ b/gtkhtml/htmlcursor.c
@@ -44,7 +44,7 @@ static gboolean move_left (HTMLCursor *cursor, HTMLEngine *e);
 #define _HTML_CURSOR_DEBUG
 
 #ifdef _HTML_CURSOR_DEBUG
-static int gtk_html_cursor_debug_flag = -1;
+static gint gtk_html_cursor_debug_flag = -1;
 
 static void
 debug_location (const HTMLCursor *cursor)
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index 8696ea3..5dfd48a 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -203,7 +203,7 @@ accepts_cursor (HTMLObject *o)
 }
 
 static gchar *
-encode (HTMLEmbedded *e, const gchar* codepage)
+encode (HTMLEmbedded *e, const gchar * codepage)
 {
 	return g_strdup ("");
 }
@@ -215,7 +215,7 @@ html_embedded_reset (HTMLEmbedded *e)
 }
 
 gchar *
-html_embedded_encode (HTMLEmbedded *e, const gchar* codepage)
+html_embedded_encode (HTMLEmbedded *e, const gchar * codepage)
 {
 	return HTML_EMBEDDED_CLASS (HTML_OBJECT (e)->klass)->encode (e, codepage);
 }
@@ -235,7 +235,7 @@ html_embedded_set_form (HTMLEmbedded *e, HTMLForm *form)
 gchar *
 html_embedded_encode_string (const gchar *before, const gchar *codepage)
 {
-	    const gchar* str = before;
+	    const gchar * str = before;
 	    static const gchar *safe = "$-._!*(),"; /* RFC 1738 */
         unsigned pos = 0;
         GString *encoded = g_string_new ("");
diff --git a/gtkhtml/htmlembedded.h b/gtkhtml/htmlembedded.h
index 724603b..9a2f0d5 100644
--- a/gtkhtml/htmlembedded.h
+++ b/gtkhtml/htmlembedded.h
@@ -45,7 +45,7 @@ struct _HTMLEmbeddedClass {
 
 
 	void   (*reset)    (HTMLEmbedded *element);
-	gchar *(*encode)   (HTMLEmbedded *element, const gchar* codepage);
+	gchar *(*encode)   (HTMLEmbedded *element, const gchar * codepage);
 	void   (*reparent) (HTMLEmbedded *element, GtkWidget *new_parent);
 };
 
diff --git a/gtkhtml/htmlengine-edit-cut-and-paste.c b/gtkhtml/htmlengine-edit-cut-and-paste.c
index a95fd74..317d86b 100644
--- a/gtkhtml/htmlengine-edit-cut-and-paste.c
+++ b/gtkhtml/htmlengine-edit-cut-and-paste.c
@@ -817,7 +817,7 @@ html_engine_cut (HTMLEngine *e)
 		gint start_position = start->position;
 		gint end_position = end->position;
 		if (end_position - start_position > 0) {
-			int len = end_position - start_position;
+			gint len = end_position - start_position;
 			g_signal_emit_by_name (e->widget, "object_delete", start_position, len);
 		}
 		html_cursor_destroy (start);
@@ -1266,7 +1266,7 @@ html_engine_insert_empty_paragraph (HTMLEngine *e)
 	html_engine_thaw (e);
 }
 
-static const char *picto_chars =
+static const gchar *picto_chars =
 	/*  0 */ "DO)(|/PQ*!"
 	/* 10 */ "S\0:-\0:\0:-\0"
 	/* 20 */ ":\0:;=-\"\0:;"
@@ -1475,9 +1475,9 @@ html_engine_paste_text (HTMLEngine *e, const gchar *text, guint len)
 }
 
 void
-html_engine_paste_link (HTMLEngine *e, const char *text, int len, const char *complete_url)
+html_engine_paste_link (HTMLEngine *e, const gchar *text, gint len, const gchar *complete_url)
 {
-	char *url, *target;
+	gchar *url, *target;
 
 	if (len == -1)
 		len = g_utf8_strlen (text, -1);
@@ -1542,7 +1542,7 @@ html_engine_delete_n (HTMLEngine *e, guint len, gboolean forward)
 			}
 		}
 		if (forward) {
-			int i;
+			gint i;
 
 			for (i = len; i > 0; i--)
 				html_cursor_forward (e->cursor, e);
@@ -1865,7 +1865,7 @@ html_engine_delete (HTMLEngine *e)
 		gint end_position = end->position;
 
 		if (end_position - start_position > 0) {
-			int len = end_position - start_position;
+			gint len = end_position - start_position;
 			g_signal_emit_by_name (e->widget, "object_delete", start_position, len);
 		}
 
diff --git a/gtkhtml/htmlengine-edit-cut-and-paste.h b/gtkhtml/htmlengine-edit-cut-and-paste.h
index 787d724..1a9e794 100644
--- a/gtkhtml/htmlengine-edit-cut-and-paste.h
+++ b/gtkhtml/htmlengine-edit-cut-and-paste.h
@@ -45,9 +45,9 @@ void  html_engine_paste_text_with_extra_attributes   (HTMLEngine     *e,
 						      guint           len,
 						      PangoAttrList  *attrs);
 void  html_engine_paste_link                         (HTMLEngine     *e,
-						      const char     *text,
-						      int             len,
-						      const char     *complete_url);
+						      const gchar     *text,
+						      gint             len,
+						      const gchar     *complete_url);
 void  html_engine_insert_text                        (HTMLEngine     *e,
 						      const gchar    *text,
 						      gint            len);
diff --git a/gtkhtml/htmlengine-edit-text.c b/gtkhtml/htmlengine-edit-text.c
index 09df671..bcff0eb 100644
--- a/gtkhtml/htmlengine-edit-text.c
+++ b/gtkhtml/htmlengine-edit-text.c
@@ -103,11 +103,11 @@ html_engine_upcase_downcase_word (HTMLEngine *e, gboolean up)
 static void
 set_link (HTMLObject *obj, HTMLEngine *e, gpointer data)
 {
-	const char *complete_url = data;
+	const gchar *complete_url = data;
 
 	if (html_object_is_text (obj) || HTML_IS_IMAGE (obj)) {
-		char *url = NULL;
-		char *target = NULL;
+		gchar *url = NULL;
+		gchar *target = NULL;
 
 		if (complete_url) {
 			url = g_strdup (complete_url);
@@ -140,7 +140,7 @@ set_link (HTMLObject *obj, HTMLEngine *e, gpointer data)
 }
 
 void
-html_engine_set_link (HTMLEngine *e, const char *complete_url)
+html_engine_set_link (HTMLEngine *e, const gchar *complete_url)
 {
 	html_engine_cut_and_paste (e,
 				   complete_url ? "Set link" : "Remove link",
diff --git a/gtkhtml/htmlengine-edit-text.h b/gtkhtml/htmlengine-edit-text.h
index ee6b558..c401710 100644
--- a/gtkhtml/htmlengine-edit-text.h
+++ b/gtkhtml/htmlengine-edit-text.h
@@ -28,5 +28,5 @@ void               html_engine_capitalize_word                   (HTMLEngine
 void               html_engine_upcase_downcase_word              (HTMLEngine       *e,
 								  gboolean          up);
 void               html_engine_set_link                          (HTMLEngine       *e,
-								  const char       *complete_url);
+								  const gchar       *complete_url);
 #endif
diff --git a/gtkhtml/htmlengine-edit.c b/gtkhtml/htmlengine-edit.c
index 81f3566..3c4e60d 100644
--- a/gtkhtml/htmlengine-edit.c
+++ b/gtkhtml/htmlengine-edit.c
@@ -771,10 +771,10 @@ void html_engine_edit_set_direction (HTMLEngine *e,
 	}
 }
 
-int
+gint
 html_engine_get_insert_level_for_object (HTMLEngine *e, HTMLObject *o)
 {
-	int cursor_level = 3, level = html_object_get_insert_level (o);
+	gint cursor_level = 3, level = html_object_get_insert_level (o);
 
 	if (level > 3) {
 		if (e && e->cursor->object && e->cursor->object->parent && e->cursor->object->parent->parent && html_object_is_clue (e->cursor->object->parent->parent)) {
diff --git a/gtkhtml/htmlengine-edit.h b/gtkhtml/htmlengine-edit.h
index 4239b6a..8d6505c 100644
--- a/gtkhtml/htmlengine-edit.h
+++ b/gtkhtml/htmlengine-edit.h
@@ -84,7 +84,7 @@ gboolean                   html_engine_next_cell                   (HTMLEngine
 gboolean                   html_engine_prev_cell                   (HTMLEngine                *e);
 void                       html_engine_set_title                   (HTMLEngine                *e,
 								    const gchar               *title);
-int                        html_engine_get_insert_level_for_object (HTMLEngine                *e,
+gint                        html_engine_get_insert_level_for_object (HTMLEngine                *e,
 								    HTMLObject                *o);
 void html_engine_edit_set_direction (HTMLEngine *e,
 				     HTMLDirection dir);
diff --git a/gtkhtml/htmlengine-save.c b/gtkhtml/htmlengine-save.c
index 895dc48..0ae6f6d 100644
--- a/gtkhtml/htmlengine-save.c
+++ b/gtkhtml/htmlengine-save.c
@@ -106,7 +106,7 @@ html_encode_entities (const gchar *input, guint len, guint *encoded_len_return)
 			/* Default case, just copy. */
 			*out++ = uc;
 		} else {
-			char buf[10], *ptr;
+			gchar buf[10], *ptr;
 
 			g_snprintf(buf, 9, "&#%d;", uc);
 
@@ -164,10 +164,10 @@ html_engine_save_encode_string (HTMLEngineSaveState *state,
 
 gboolean
 html_engine_save_output_stringv (HTMLEngineSaveState *state,
-				 const char *format,
+				 const gchar *format,
 				 va_list ap)
 {
-	char *string;
+	gchar *string;
 	gboolean retval;
 
 	string = g_strdup_vprintf (format, ap);
@@ -196,7 +196,7 @@ html_engine_save_output_string (HTMLEngineSaveState *state,
 }
 
 gboolean
-html_engine_save_output_buffer (HTMLEngineSaveState *state, const gchar *buffer, int bytes)
+html_engine_save_output_buffer (HTMLEngineSaveState *state, const gchar *buffer, gint bytes)
 {
 	if (bytes == -1)
 		bytes = strlen (buffer);
@@ -409,11 +409,11 @@ html_engine_save_buffer_receiver (const HTMLEngine *engine,
 	return TRUE;
 }
 
-char *
+gchar *
 html_engine_save_buffer_free (HTMLEngineSaveState *state, gboolean free_string)
 {
 	GString *string;
-	char *rv = NULL;
+	gchar *rv = NULL;
 
 	g_return_val_if_fail (state != NULL, NULL);
 	string = (GString *)state->user_data;
@@ -438,7 +438,7 @@ html_engine_save_buffer_peek_text (HTMLEngineSaveState *state)
 	return (guchar *) string->str;
 }
 
-int
+gint
 html_engine_save_buffer_peek_text_bytes (HTMLEngineSaveState *state)
 {
 	GString *string;
diff --git a/gtkhtml/htmlengine-save.h b/gtkhtml/htmlengine-save.h
index 12c5860..69b998d 100644
--- a/gtkhtml/htmlengine-save.h
+++ b/gtkhtml/htmlengine-save.h
@@ -62,7 +62,7 @@ gboolean             html_engine_save_output_string             (HTMLEngineSaveS
 								 ...) G_GNUC_PRINTF (2, 3);
 gboolean             html_engine_save_output_buffer             (HTMLEngineSaveState       *state,
 								 const gchar               *buffer,
-								 int                        len);
+								 gint                        len);
 
 /* Takes a string sequence of the form (delim, (val, delim)*, NULL)
    and outputs the delimiters verbatim and the values entity-encoded.
@@ -81,10 +81,10 @@ gboolean             html_engine_save                           (HTMLEngine
 gboolean             html_engine_save_plain                     (HTMLEngine                *engine,
 								 HTMLEngineSaveReceiverFn   receiver,
 								 gpointer                   user_data);
-char                *html_engine_save_buffer_free               (HTMLEngineSaveState       *state,
+gchar                *html_engine_save_buffer_free               (HTMLEngineSaveState       *state,
 								 gboolean                   free_string);
 guchar              *html_engine_save_buffer_peek_text          (HTMLEngineSaveState       *state);
-int                  html_engine_save_buffer_peek_text_bytes    (HTMLEngineSaveState       *state);
+gint                  html_engine_save_buffer_peek_text_bytes    (HTMLEngineSaveState       *state);
 void                 html_engine_save_buffer_clear_line_breaks  (HTMLEngineSaveState       *state,
 								 PangoLogAttr              *attrs);
 HTMLEngineSaveState *html_engine_save_buffer_new                (HTMLEngine                *engine,
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index d719461..57205ef 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -110,7 +110,7 @@ static void      html_engine_init             (HTMLEngine          *engine);
 static gboolean  html_engine_timer_event      (HTMLEngine          *e);
 static gboolean  html_engine_update_event     (HTMLEngine          *e);
 static void      html_engine_queue_redraw_all (HTMLEngine *e);
-static char **   html_engine_stream_types     (GtkHTMLStream       *stream,
+static gchar **   html_engine_stream_types     (GtkHTMLStream       *stream,
 					       gpointer            data);
 static void      html_engine_stream_write     (GtkHTMLStream       *stream,
 					       const gchar         *buffer,
@@ -136,7 +136,7 @@ static void      update_embedded           (GtkWidget *widget,
 
 static void      html_engine_map_table_clear (HTMLEngine *e);
 static void      html_engine_id_table_clear (HTMLEngine *e);
-static void      html_engine_add_map (HTMLEngine *e, const char *);
+static void      html_engine_add_map (HTMLEngine *e, const gchar *);
 static void      clear_pending_expose (HTMLEngine *e);
 static void      push_clue (HTMLEngine *e, HTMLObject *clue);
 static void      pop_clue (HTMLEngine *e);
@@ -234,10 +234,10 @@ struct _HTMLElement {
 	BlockFunc exitFunc;
 };
 
-static char *
-parse_element_name (const char *str)
+static gchar *
+parse_element_name (const gchar *str)
 {
-	const char *ep = str;
+	const gchar *ep = str;
 
 	ep = str;
 	if (*ep == '/')
@@ -255,7 +255,7 @@ parse_element_name (const char *str)
 }
 
 static HTMLElement *
-html_element_new (HTMLEngine *e, const char *name)
+html_element_new (HTMLEngine *e, const gchar *name)
 {
 	HTMLElement *element;
 
@@ -267,9 +267,9 @@ html_element_new (HTMLEngine *e, const char *name)
 }
 
 static HTMLElement *
-html_element_new_parse (HTMLEngine *e, const char *str) {
+html_element_new_parse (HTMLEngine *e, const gchar *str) {
 	HTMLElement *element;
-	char *name;
+	gchar *name;
 
 	name = parse_element_name (str);
 
@@ -290,7 +290,7 @@ html_element_new_parse (HTMLEngine *e, const char *str) {
 		attr = g_strsplit (token, "=", 2);
 
 		if (attr[0]) {
-			char *lower = g_ascii_strdown (attr[0], -1);
+			gchar *lower = g_ascii_strdown (attr[0], -1);
 
 			if (!g_hash_table_lookup (element->attributes, lower)) {
 				DE (g_print ("attrs (%s, %s)", attr[0], attr[1]));
@@ -320,9 +320,9 @@ html_element_new_parse (HTMLEngine *e, const char *str) {
 #define html_element_has_attr(node, key) g_hash_table_lookup_extended (node->attributes, key, NULL, NULL)
 #else
 gboolean
-html_element_get_attr (HTMLElement *node, char *name, char **value)
+html_element_get_attr (HTMLElement *node, gchar *name, gchar **value)
 {
-	char *orig_key;
+	gchar *orig_key;
 
 	g_return_if_fail (node->attributes != NULL);
 
@@ -334,7 +334,7 @@ html_element_get_attr (HTMLElement *node, char *name, char **value)
 static void
 html_element_parse_i18n (HTMLElement *node)
 {
-	char *value;
+	gchar *value;
 	/*
 	  <!ENTITY % i18n
 	  "lang        %LanguageCode; #IMPLIED  -- language code --
@@ -355,7 +355,7 @@ html_element_parse_i18n (HTMLElement *node)
 static void
 html_element_parse_coreattrs (HTMLElement *node)
 {
-	char *value;
+	gchar *value;
 
 	/*
 	  <!ENTITY % coreattrs
@@ -373,7 +373,7 @@ html_element_parse_coreattrs (HTMLElement *node)
 static void
 html_element_set_coreattr_to_object (HTMLElement *element, HTMLObject *o, HTMLEngine *engine)
 {
-	char *value;
+	gchar *value;
 
 	if (html_element_get_attr (element, "id", &value)) {
 		html_object_set_id (o, value);
@@ -413,7 +413,7 @@ html_element_free (HTMLElement *element)
 }
 
 static void
-push_element (HTMLEngine *e, const char *name, const char *class, HTMLStyle *style)
+push_element (HTMLEngine *e, const gchar *name, const gchar *class, HTMLStyle *style)
 {
 	HTMLElement *element;
 
@@ -490,7 +490,7 @@ current_row_bg_color (HTMLEngine *e)
 	return NULL;
 }
 
-static char *
+static gchar *
 current_row_bg_image (HTMLEngine *e)
 {
 	HTMLElement *span;
@@ -658,7 +658,7 @@ current_alignment (HTMLEngine *e)
 }
 
 static GtkPolicyType
-parse_scroll (const char *token)
+parse_scroll (const gchar *token)
 {
 	GtkPolicyType scroll;
 
@@ -673,7 +673,7 @@ parse_scroll (const char *token)
 }
 
 static HTMLHAlignType
-parse_halign (const char *token, HTMLHAlignType default_val)
+parse_halign (const gchar *token, HTMLHAlignType default_val)
 {
 	if (g_ascii_strcasecmp (token, "right") == 0)
 		return HTML_HALIGN_RIGHT;
@@ -726,7 +726,7 @@ pop_clueflow_style (HTMLEngine *e)
 static void new_flow (HTMLEngine *e, HTMLObject *clue, HTMLObject *first_object, HTMLClearType clear, HTMLDirection dir);
 static void close_flow (HTMLEngine *e, HTMLObject *clue);
 static void finish_flow (HTMLEngine *e, HTMLObject *clue);
-static void pop_element (HTMLEngine *e, const char *name);
+static void pop_element (HTMLEngine *e, const gchar *name);
 
 static HTMLObject *
 text_new (HTMLEngine *e, const gchar *text, GtkHTMLFontStyle style, HTMLColor *color)
@@ -1024,7 +1024,7 @@ html_element_push (HTMLElement *node, HTMLEngine *e, HTMLObject *clue)
 
 static void
 push_block_element (HTMLEngine *e,
-		    const char *name,
+		    const gchar *name,
 		    HTMLStyle *style,
 		    HTMLDisplayType level,
 		    BlockFunc exitFunc,
@@ -1048,7 +1048,7 @@ push_block_element (HTMLEngine *e,
 
 static void
 push_block (HTMLEngine *e,
-	    const char *name,
+	    const gchar *name,
 	    gint level,
 	    BlockFunc exitFunc,
 	    gint miscData1,
@@ -1165,7 +1165,7 @@ pop_element_by_type (HTMLEngine *e, HTMLDisplayType display)
 
 
 static void
-pop_element (HTMLEngine *e, const char *name)
+pop_element (HTMLEngine *e, const gchar *name)
 {
 	HTMLElement *elem = NULL;
 	GList *l;
@@ -1364,7 +1364,7 @@ element_parse_title (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-parse_text (HTMLEngine *e, HTMLObject *clue, char *str)
+parse_text (HTMLEngine *e, HTMLObject *clue, gchar *str)
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1423,7 +1423,7 @@ new_parse_body (HTMLEngine *e, const gchar *end[])
 				if (e->inPre)
 					add_line_break (e, clue, HTML_CLEAR_NONE, HTML_DIRECTION_DERIVED);
 				else {
-					char *str_copy = g_strdup (str);
+					gchar *str_copy = g_strdup (str);
 					*str_copy = ' ';
 					parse_text (e, clue, str_copy);
 					g_free (str_copy);
@@ -1500,7 +1500,7 @@ element_parse_param (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	GtkHTMLEmbedded *eb;
 	HTMLElement *element;
-	char *name = NULL, *value = NULL;
+	gchar *name = NULL, *value = NULL;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1569,12 +1569,12 @@ block_end_object (HTMLEngine *e, HTMLObject *clue, HTMLElement *elem)
 static void
 element_parse_object (HTMLEngine *e, HTMLObject *clue, const gchar *attr)
 {
-	char *classid = NULL;
-	char *name    = NULL;
-	char *type    = NULL;
-	char *data    = NULL;
-	char *value   = NULL;
-	int width=-1,height=-1;
+	gchar *classid = NULL;
+	gchar *name    = NULL;
+	gchar *type    = NULL;
+	gchar *data    = NULL;
+	gchar *value   = NULL;
+	gint width=-1,height=-1;
 	static const gchar *end[] = { "</object", 0};
 	GtkHTMLEmbedded *eb;
 	HTMLEmbedded *el;
@@ -1661,7 +1661,7 @@ element_parse_object (HTMLEngine *e, HTMLObject *clue, const gchar *attr)
 static void
 element_parse_noframe (HTMLEngine *e, HTMLObject *clue, const gchar *str )
 {
-	static const char *end[] = {"</noframe", NULL};
+	static const gchar *end[] = {"</noframe", NULL};
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1683,9 +1683,9 @@ element_parse_frameset (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
 	HTMLObject *set;
-	char *value = NULL;
-	char *rows  = NULL;
-	char *cols  = NULL;
+	gchar *value = NULL;
+	gchar *rows  = NULL;
+	gchar *cols  = NULL;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1724,11 +1724,11 @@ element_parse_frameset (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-element_parse_iframe (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_iframe (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value = NULL;
-	char *src   = NULL;
+	gchar *value = NULL;
+	gchar *src   = NULL;
 	HTMLObject *iframe;
 	static const gchar *end[] = { "</iframe", 0};
 	gint width           = -1;
@@ -1817,10 +1817,10 @@ static void
 element_parse_area (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLShape *shape;
-	char *type = NULL;
-	char *href = NULL;
-	char *coords = NULL;
-	char *target = NULL;
+	gchar *type = NULL;
+	gchar *href = NULL;
+	gchar *coords = NULL;
+	gchar *target = NULL;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1876,10 +1876,10 @@ element_parse_a (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 	HTMLElement *element;
 	gchar *url = NULL;
 	gchar *id = NULL;
-	char *type = NULL;
-	char *coords = NULL;
-	char *target = NULL;
-	char *value;
+	gchar *type = NULL;
+	gchar *coords = NULL;
+	gchar *target = NULL;
+	gchar *value;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -1942,7 +1942,7 @@ block_end_clueflow_style (HTMLEngine *e,
 }
 
 static void
-element_parse_address (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_address (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLStyle *style = NULL;
 
@@ -2000,10 +2000,10 @@ element_parse_center (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-element_parse_html (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_html (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value;
+	gchar *value;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -2022,10 +2022,10 @@ element_parse_html (HTMLEngine *e, HTMLObject *clue, const char *str)
 }
 
 static void
-element_parse_div (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_div (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value;
+	gchar *value;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -2213,13 +2213,13 @@ element_parse_body (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-element_parse_base (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_base (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
 	html_string_tokenizer_tokenize( e->st, str + 5, " >" );
 	while ( html_string_tokenizer_has_more_tokens (e->st) ) {
-		const char* token = html_string_tokenizer_next_token(e->st);
+		const gchar * token = html_string_tokenizer_next_token(e->st);
 		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 ) {
@@ -2230,7 +2230,7 @@ element_parse_base (HTMLEngine *e, HTMLObject *clue, const char *str)
 
 
 static void
-element_parse_data (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_data (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	gchar *key = NULL;
 	gchar *class_name = NULL;
@@ -2299,16 +2299,16 @@ element_parse_input (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 	enum InputType { CheckBox, Hidden, Radio, Reset, Submit, Text, Image,
 			 Button, Password, Undefined };
 	HTMLObject *element = NULL;
-	const char *p;
+	const gchar *p;
 	enum InputType type = Text;
 	gchar *name = NULL;
 	gchar *value = NULL;
 	gchar *imgSrc = NULL;
 	gboolean checked = FALSE;
-	int size = 20;
-	int maxLen = -1;
-	int imgHSpace = 0;
-	int imgVSpace = 0;
+	gint size = 20;
+	gint maxLen = -1;
+	gint imgHSpace = 0;
+	gint imgVSpace = 0;
 	gboolean fix_form = FALSE;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
@@ -2460,8 +2460,8 @@ static void
 element_parse_frame (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value = NULL;
-	char *src = NULL;
+	gchar *value = NULL;
+	gchar *src = NULL;
 	HTMLObject *frame = NULL;
 	gint margin_height = -1;
 	gint margin_width = -1;
@@ -2528,7 +2528,7 @@ element_parse_hr (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 	gint percent = 100;
 	HTMLHAlignType align = HTML_HALIGN_CENTER;
 	gboolean shade = TRUE;
-	char *value;
+	gchar *value;
 	HTMLLength *len;
 
 
@@ -2647,7 +2647,7 @@ element_parse_heading (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 
 	/* FIXME this is temporary until the paring can be moved.*/
 	{
-		char *name = parse_element_name (str);
+		gchar *name = parse_element_name (str);
 		push_block_element (e, name, style, DISPLAY_BLOCK, block_end_heading, 0, 0);
 		g_free (name);
 	}
@@ -2797,7 +2797,7 @@ html_engine_get_engine_type( HTMLEngine *e)
 }
 
 void
-html_engine_set_content_type(HTMLEngine *e, const gchar* content_type)
+html_engine_set_content_type(HTMLEngine *e, const gchar * content_type)
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 	html_tokenizer_change_content_type(e->ht, content_type);
@@ -2813,16 +2813,16 @@ html_engine_get_content_type(HTMLEngine *e)
 static void
 element_parse_meta (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
-	int refresh = 0;
-	int contenttype = 0;
-	int refresh_delay = 0;
+	gint refresh = 0;
+	gint contenttype = 0;
+	gint refresh_delay = 0;
 	gchar *refresh_url = NULL;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
 	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);
+		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 )
 				refresh = 1;
@@ -2866,9 +2866,9 @@ element_parse_map (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 
 	html_string_tokenizer_tokenize (e->st, str + 3, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
-		const char* token = html_string_tokenizer_next_token (e->st);
+		const gchar * token = html_string_tokenizer_next_token (e->st);
 		if (g_ascii_strncasecmp (token, "name=", 5) == 0) {
-			const char *name = token + 5;
+			const gchar *name = token + 5;
 
 			html_engine_add_map (e, name);
 		}
@@ -2977,7 +2977,7 @@ element_parse_ol (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 	html_string_tokenizer_tokenize( e->st, str + 3, " >" );
 
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
-		const char* token;
+		const gchar * token;
 
 		token = html_string_tokenizer_next_token (e->st);
 		if (g_ascii_strncasecmp( token, "type=", 5 ) == 0)
@@ -3017,7 +3017,7 @@ element_parse_blockquote (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 
 	html_string_tokenizer_tokenize (e->st, str + 11, " >");
 	while (html_string_tokenizer_has_more_tokens (e->st)) {
-		const char *token = html_string_tokenizer_next_token (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 + 5, "cite", 5) == 0) {
 				type = HTML_LIST_TYPE_BLOCKQUOTE_CITE;
@@ -3078,7 +3078,7 @@ element_parse_dl (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-element_parse_dir (HTMLEngine *e, HTMLObject *clue, const char *str)
+element_parse_dir (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
@@ -3126,9 +3126,9 @@ static void
 element_parse_select (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value;
-	char *name = NULL;
-	int size = 0;
+	gchar *value;
+	gchar *name = NULL;
+	gint size = 0;
 	gboolean multi = FALSE;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
@@ -3266,7 +3266,7 @@ element_parse_table (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
 	HTMLTable *table;
-	char *value;
+	gchar *value;
 	HTMLLength *len;
 
 	gint padding = 1;
@@ -3422,7 +3422,7 @@ static void
 element_parse_tr (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element;
-	char *value;
+	gchar *value;
 
 	element = html_element_new_parse (e, str);
 
@@ -3486,7 +3486,7 @@ element_parse_caption (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 
 	html_string_tokenizer_tokenize( e->st, str + 7, " >" );
 	while ( html_string_tokenizer_has_more_tokens (e->st) ) {
-		const char* token = html_string_tokenizer_next_token(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)
 				capAlign = HTML_VALIGN_TOP;
@@ -3514,11 +3514,11 @@ element_parse_cell (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 	gint rowSpan = 1;
 	gint colSpan = 1;
 	HTMLTableCell *cell = NULL;
-	char *image_url = NULL;
+	gchar *image_url = NULL;
 	gboolean heading;
 	gboolean no_wrap = FALSE;
 	HTMLElement *element;
-	char *value;
+	gchar *value;
 	HTMLLength *len;
 	HTMLDirection dir = HTML_DIRECTION_DERIVED;
 
@@ -3762,7 +3762,7 @@ element_parse_u (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 }
 
 static void
-element_parse_inline_fixed (HTMLEngine *e, HTMLObject *clue, const char *str )
+element_parse_inline_fixed (HTMLEngine *e, HTMLObject *clue, const gchar *str )
 {
 	HTMLElement *element = html_element_new_parse (e, str);
 
@@ -3812,7 +3812,7 @@ static void
 element_parse_font (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	HTMLElement *element = html_element_new_parse (e, str);
-	char *value;
+	gchar *value;
 
 	if (html_element_get_attr (element, "size", &value)) {
 		gint size = atoi (value);
@@ -3852,7 +3852,7 @@ element_parse_font (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 /* Parsing dispatch table.  */
 typedef void (*HTMLParseFunc)(HTMLEngine *p, HTMLObject *clue, const gchar *str);
 typedef struct _HTMLDispatchEntry {
-	const char *name;
+	const gchar *name;
 	HTMLParseFunc func;
 } HTMLDispatchEntry;
 
@@ -3959,7 +3959,7 @@ static void
 parse_one_token (HTMLEngine *e, HTMLObject *clue, const gchar *str)
 {
 	static GHashTable *basic = NULL;
-	char *name = NULL;
+	gchar *name = NULL;
 	HTMLDispatchEntry *entry;
 
 	if (basic == NULL)
@@ -4645,7 +4645,7 @@ html_engine_class_data_clear (HTMLEngine *e)
 #define LOG_INPUT 1
 
 GtkHTMLStream *
-html_engine_begin (HTMLEngine *e, const char *content_type)
+html_engine_begin (HTMLEngine *e, const gchar *content_type)
 {
 	GtkHTMLStream *new_stream;
 
@@ -4707,9 +4707,9 @@ html_engine_stop (HTMLEngine *e)
 	html_object_forall (e->clue, e, html_engine_stop_forall, NULL);
 }
 
-static char *engine_content_types[]= { (char *) "text/html", NULL};
+static gchar *engine_content_types[]= { (gchar *) "text/html", NULL};
 
-static char **
+static gchar **
 html_engine_stream_types (GtkHTMLStream *handle,
 			  gpointer data)
 {
@@ -6767,7 +6767,7 @@ html_engine_saved (HTMLEngine *e)
 }
 
 static void
-html_engine_add_map (HTMLEngine *e, const char *name)
+html_engine_add_map (HTMLEngine *e, const gchar *name)
 {
 	gpointer old_key = NULL, old_val;
 
@@ -6940,7 +6940,7 @@ html_engine_opened_streams_decrement (HTMLEngine *e)
 }
 
 void
-html_engine_opened_streams_set (HTMLEngine *e, int value)
+html_engine_opened_streams_set (HTMLEngine *e, gint value)
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
diff --git a/gtkhtml/htmlengine.h b/gtkhtml/htmlengine.h
index abf666f..02a90bb 100644
--- a/gtkhtml/htmlengine.h
+++ b/gtkhtml/htmlengine.h
@@ -277,9 +277,9 @@ struct _HTMLEngineClass {
 	void (* set_base) (HTMLEngine *engine, const gchar *base);
 	void (* set_base_target) (HTMLEngine *engine, const gchar *base_target);
 	void (* load_done) (HTMLEngine *engine);
-        void (* url_requested) (HTMLEngine *engine, const char *url, GtkHTMLStream *handle);
+        void (* url_requested) (HTMLEngine *engine, const gchar *url, GtkHTMLStream *handle);
 	void (* draw_pending) (HTMLEngine *engine);
-        void (* redirect) (HTMLEngine *engine, const char *url, int delay);
+        void (* redirect) (HTMLEngine *engine, const gchar *url, gint delay);
         void (* submit) (HTMLEngine *engine, const gchar *method, const gchar *action, const gchar *encoding);
 	gboolean (* object_requested) (HTMLEngine *engine, GtkHTMLEmbedded *);
 };
@@ -310,7 +310,7 @@ void html_engine_set_tokenizer (HTMLEngine *engine,
 
 /* Parsing control.  */
 GtkHTMLStream *html_engine_begin            (HTMLEngine  *p,
-					     const char  *content_type);
+					     const gchar  *content_type);
 void           html_engine_parse            (HTMLEngine  *p);
 void           html_engine_stop_parser      (HTMLEngine  *e);
 void           html_engine_stop             (HTMLEngine  *e);
@@ -319,7 +319,7 @@ void           html_engine_set_engine_type   (HTMLEngine *e,
 					 gboolean engine_type);
 gboolean       html_engine_get_engine_type   (HTMLEngine *e);
 void		   html_engine_set_content_type(HTMLEngine *e,
-					const gchar* content_type);
+					const gchar * content_type);
 const gchar *  html_engine_get_content_type(HTMLEngine *e);
 
 /* Rendering control.  */
@@ -387,7 +387,7 @@ void  html_engine_form_submitted  (HTMLEngine  *engine,
 
 /* Misc.  (FIXME: Should die?) */
 gchar *html_engine_canonicalize_url  (HTMLEngine *e,
-				      const char *in_url);
+				      const gchar *in_url);
 
 /* Cursor */
 HTMLCursor *html_engine_get_cursor        (HTMLEngine *e);
@@ -494,7 +494,7 @@ gint  html_engine_get_bottom_border  (HTMLEngine *e);
 HTMLImageFactory *html_engine_get_image_factory (HTMLEngine *e);
 void html_engine_opened_streams_increment (HTMLEngine *e);
 void html_engine_opened_streams_decrement (HTMLEngine *e);
-void html_engine_opened_streams_set (HTMLEngine *e, int value);
+void html_engine_opened_streams_set (HTMLEngine *e, gint value);
 
 void html_engine_refresh_fonts (HTMLEngine *e);
 
diff --git a/gtkhtml/htmlentity.c b/gtkhtml/htmlentity.c
index e3a01d0..fd0c543 100644
--- a/gtkhtml/htmlentity.c
+++ b/gtkhtml/htmlentity.c
@@ -84,7 +84,7 @@ inline
 #endif
 #endif
 static unsigned int
-hash (register const char *str, register unsigned int len)
+hash (register const gchar *str, register guint len)
 {
   static unsigned short asso_values[] =
     {
@@ -115,7 +115,7 @@ hash (register const char *str, register unsigned int len)
       739, 739, 739, 739, 739, 739, 739, 739, 739, 739,
       739, 739, 739, 739, 739, 739, 739
     };
-  register int hval = len;
+  register gint hval = len;
 
   switch (hval)
     {
@@ -143,9 +143,9 @@ __attribute__ ((__gnu_inline__))
 #endif
 #endif
 static struct _EntityEntry *
-html_entity_hash (register const char *str, register unsigned int len)
+html_entity_hash (register const gchar *str, register guint len)
 {
-  static unsigned char lengthtable[] =
+  static guchar lengthtable[] =
     {
        0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  3,
        0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  4,  0,  0,  0,
@@ -850,12 +850,12 @@ html_entity_hash (register const char *str, register unsigned int len)
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      register int key = hash (str, len);
+      register gint key = hash (str, len);
 
       if (key <= MAX_HASH_VALUE && key >= 0)
         if (len == lengthtable[key])
           {
-            register const char *s = wordlist[key].name;
+            register const gchar *s = wordlist[key].name;
 
             if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
               return &wordlist[key];
diff --git a/gtkhtml/htmlentity.h b/gtkhtml/htmlentity.h
index 9b8741e..bc5a19c 100644
--- a/gtkhtml/htmlentity.h
+++ b/gtkhtml/htmlentity.h
@@ -28,7 +28,7 @@
 #include <glib.h>
 
 /* We name it with correct unicode name, but OK, later... Lauris */
-/* char used for &nbsp; - must correspond to table below */
+/* gchar used for &nbsp; - must correspond to table below */
 #define ENTITY_NBSP 160
 #define INVALID_ENTITY_CHARACTER_MARKER '?'
 #define IS_UTF8_NBSP(s) (*s == (guchar)0xc2 && *(s + 1) == (guchar)0xa0)
diff --git a/gtkhtml/htmlform.c b/gtkhtml/htmlform.c
index 19b02dd..fcb9671 100644
--- a/gtkhtml/htmlform.c
+++ b/gtkhtml/htmlform.c
@@ -60,11 +60,11 @@ html_form_add_hidden (HTMLForm *form, HTMLHidden *hidden)
 }
 
 void
-html_form_add_radio (HTMLForm *form, const char *name, GtkRadioButton *button)
+html_form_add_radio (HTMLForm *form, const gchar *name, GtkRadioButton *button)
 {
 	GtkWidget *master;
 	GSList *group;
-	const char *key = name;
+	const gchar *key = name;
 
 	/*
 	 * FIXME a null name makes them all share the same "" group.  I doubt this
@@ -91,7 +91,7 @@ destroy_hidden (gpointer o, gpointer data)
 }
 
 static void
-destroy_radio (char *key, gpointer *master)
+destroy_radio (gchar *key, gpointer *master)
 {
 	g_free (key);
 	g_object_unref (master);
diff --git a/gtkhtml/htmlform.h b/gtkhtml/htmlform.h
index 771fc73..5a03c55 100644
--- a/gtkhtml/htmlform.h
+++ b/gtkhtml/htmlform.h
@@ -48,7 +48,7 @@ void html_form_remove_element (HTMLForm *form, HTMLEmbedded *e);
 void html_form_submit (HTMLForm *form);
 void html_form_reset (HTMLForm *form);
 void html_form_destroy (HTMLForm *form);
-void html_form_add_radio (HTMLForm *form, const char *name, GtkRadioButton *button);
+void html_form_add_radio (HTMLForm *form, const gchar *name, GtkRadioButton *button);
 void html_form_set_engine (HTMLForm *form, HTMLEngine *engine);
 
 #endif /* _HTMLFORM_H_ */
diff --git a/gtkhtml/htmlframe.c b/gtkhtml/htmlframe.c
index 88fdc1f..dfe0431 100644
--- a/gtkhtml/htmlframe.c
+++ b/gtkhtml/htmlframe.c
@@ -40,7 +40,7 @@ HTMLFrameClass html_frame_class;
 static HTMLEmbeddedClass *parent_class = NULL;
 
 static void
-frame_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer data)
+frame_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
 {
 	HTMLFrame *frame = HTML_FRAME (data);
 	GtkHTML *parent = GTK_HTML (HTML_EMBEDDED(frame)->parent);
@@ -52,7 +52,7 @@ frame_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpoi
 static void
 frame_set_base (GtkHTML *html, const gchar *url, gpointer data)
 {
-	char *new_url = NULL;
+	gchar *new_url = NULL;
 
 	new_url = gtk_html_get_url_base_relative (html, url);
 	gtk_html_set_base (html, new_url);
@@ -107,7 +107,7 @@ frame_set_gdk_painter (HTMLFrame *frame, HTMLPainter *painter)
 
 HTMLObject *
 html_frame_new (GtkWidget *parent,
-		 char *src,
+		 gchar *src,
 		 gint width,
 		 gint height,
 		 gboolean border)
@@ -138,7 +138,7 @@ static gint
 calc_min_width (HTMLObject *o,
 		HTMLPainter *painter)
 {
-  int min_width;
+  gint min_width;
 
   if (HTML_FRAME (o)->width < 0)
 	  min_width =  html_engine_calc_min_width (GTK_HTML (HTML_FRAME (o)->html)->engine);
@@ -378,7 +378,7 @@ destroy (HTMLObject *o)
 }
 
 static HTMLAnchor *
-find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+find_anchor (HTMLObject *self, const gchar *name, gint *x, gint *y)
 {
 	HTMLFrame *frame;
 	HTMLAnchor *anchor;
@@ -448,7 +448,7 @@ void
 html_frame_init (HTMLFrame *frame,
 		  HTMLFrameClass *klass,
 		  GtkWidget *parent,
-		  char *src,
+		  gchar *src,
 		  gint width,
 		  gint height,
 		  gboolean border)
diff --git a/gtkhtml/htmlframe.h b/gtkhtml/htmlframe.h
index c524872..df55e4a 100644
--- a/gtkhtml/htmlframe.h
+++ b/gtkhtml/htmlframe.h
@@ -31,7 +31,7 @@
 struct _HTMLFrame {
 	HTMLEmbedded embedded;
 
-	char *url;
+	gchar *url;
 	GtkWidget *scroll;
 	GtkWidget *html;
 	HTMLPainter *gdk_painter;
@@ -65,13 +65,13 @@ void           html_frame_set_scrolling         (HTMLFrame *frame,
 void           html_frame_init                  (HTMLFrame        *frame,
 						 HTMLFrameClass   *klass,
 						 GtkWidget         *parent,
-						 char              *url,
+						 gchar              *url,
 						 gint               width,
 						 gint               height,
 						 gboolean           border);
 
 HTMLObject *   html_frame_new                   (GtkWidget *parent,
-						 char *src,
+						 gchar *src,
 						 gint width,
 						 gint height,
 						 gboolean border);
diff --git a/gtkhtml/htmlframeset.c b/gtkhtml/htmlframeset.c
index cd55bcc..2917a53 100644
--- a/gtkhtml/htmlframeset.c
+++ b/gtkhtml/htmlframeset.c
@@ -90,10 +90,10 @@ static void
 calc_dimension (GPtrArray *dim, gint *span, gint total)
 {
 	HTMLLength *len;
-	int i;
-	int adj;
-	int remain;
-	int num_frac = 0;
+	gint i;
+	gint adj;
+	gint remain;
+	gint num_frac = 0;
 	gboolean changed;
 
 	g_return_if_fail (dim != NULL && span != NULL);
@@ -249,7 +249,7 @@ draw (HTMLObject *o,
       gint tx, gint ty)
 {
 	HTMLFrameset *set;
-	int i;
+	gint i;
 	set = HTML_FRAMESET (o);
 
 	tx += o->x;
@@ -313,7 +313,7 @@ check_point (HTMLObject *self,
 {
 	HTMLFrameset *set = HTML_FRAMESET (self);
 	HTMLObject   *obj;
-	int i;
+	gint i;
 
 
 	x -= self->x;
diff --git a/gtkhtml/htmlframeset.h b/gtkhtml/htmlframeset.h
index ca7fac1..b36f063 100644
--- a/gtkhtml/htmlframeset.h
+++ b/gtkhtml/htmlframeset.h
@@ -43,8 +43,8 @@ struct _HTMLFramesetClass {
 
 
 
-HTMLObject   *html_frameset_new        (GtkHTML *parent, char *rows, char *cols);
-void          html_frameset_init       (HTMLFrameset *set, GtkHTML *parent, const char *rows, const char *cols);
+HTMLObject   *html_frameset_new        (GtkHTML *parent, gchar *rows, gchar *cols);
+void          html_frameset_init       (HTMLFrameset *set, GtkHTML *parent, const gchar *rows, const gchar *cols);
 void          html_frameset_class_init (HTMLFramesetClass *klass, HTMLType type, guint object_size);
 gboolean      html_frameset_append     (HTMLFrameset *set, HTMLObject *o);
 void          html_frameset_type_init  (void);
diff --git a/gtkhtml/htmlgdkpainter.c b/gtkhtml/htmlgdkpainter.c
index 7716cab..f776c4e 100644
--- a/gtkhtml/htmlgdkpainter.c
+++ b/gtkhtml/htmlgdkpainter.c
@@ -88,7 +88,7 @@ free_color (HTMLPainter *painter,
 
 
 static void
-begin (HTMLPainter *painter, int x1, int y1, int x2, int y2)
+begin (HTMLPainter *painter, gint x1, gint y1, gint x2, gint y2)
 {
 	HTMLGdkPainter *gdk_painter;
 
@@ -100,8 +100,8 @@ begin (HTMLPainter *painter, int x1, int y1, int x2, int y2)
 	set_clip_rectangle (painter, 0, 0, 0, 0);
 
 	if (gdk_painter->double_buffer){
-		const int width = x2 - x1 + 1;
-		const int height = y2 - y1 + 1;
+		const gint width = x2 - x1 + 1;
+		const gint height = y2 - y1 + 1;
 
 
 		/* FIXME: Ideally it should be NULL before coming here. */
@@ -472,8 +472,8 @@ draw_background (HTMLPainter *painter,
 			g_object_unref (pixmap);
 			g_object_unref (gc);
 		} else {
-			int incr_x = 0;
-			int incr_y = 0;
+			gint incr_x = 0;
+			gint incr_y = 0;
 
 			cy = paint.y;
 			ch = paint.height;
@@ -666,7 +666,7 @@ fill_rect (HTMLPainter *painter,
 }
 
 static gint
-draw_spell_error (HTMLPainter *painter, int x, int y, int width)
+draw_spell_error (HTMLPainter *painter, gint x, gint y, gint width)
 {
 	HTMLGdkPainter *gdk_painter;
 	GdkGCValues values;
diff --git a/gtkhtml/htmliframe.c b/gtkhtml/htmliframe.c
index af40b9a..ab79a2e 100644
--- a/gtkhtml/htmliframe.c
+++ b/gtkhtml/htmliframe.c
@@ -43,16 +43,16 @@ HTMLIFrameClass html_iframe_class;
 static HTMLEmbeddedClass *parent_class = NULL;
 
 static void
-iframe_set_base (GtkHTML *html, const char *url, gpointer data)
+iframe_set_base (GtkHTML *html, const gchar *url, gpointer data)
 {
-	char *new_url = gtk_html_get_url_base_relative (html, url);
+	gchar *new_url = gtk_html_get_url_base_relative (html, url);
 
 	gtk_html_set_base (html, new_url);
 	g_free (new_url);
 }
 
 static void
-iframe_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer data)
+iframe_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
 {
 	HTMLIFrame *iframe = HTML_IFRAME (data);
 	GtkHTML *parent = GTK_HTML (HTML_EMBEDDED(iframe)->parent);
@@ -96,7 +96,7 @@ iframe_set_gdk_painter (HTMLIFrame *iframe, HTMLPainter *painter)
 
 HTMLObject *
 html_iframe_new (GtkWidget *parent,
-		 char *src,
+		 gchar *src,
 		 gint width,
 		 gint height,
 		 gboolean border)
@@ -216,7 +216,7 @@ static gint
 check_page_split (HTMLObject *self, HTMLPainter *p, gint y)
 {
 	HTMLEngine *e = GTK_HTML (HTML_IFRAME (self)->html)->engine;
-	int y1, y2, pixel_size = html_painter_get_pixel_size (p);
+	gint y1, y2, pixel_size = html_painter_get_pixel_size (p);
 
 	y1 = self->y - self->ascent + pixel_size*html_engine_get_top_border (e);
 	y2 = self->y + self->descent + pixel_size*html_engine_get_bottom_border (e);
@@ -274,7 +274,7 @@ op_copy (HTMLObject *self, HTMLObject *parent, HTMLEngine *e, GList *from, GList
 }
 
 static HTMLAnchor *
-find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+find_anchor (HTMLObject *self, const gchar *name, gint *x, gint *y)
 {
 	HTMLIFrame *iframe;
 	HTMLAnchor *anchor;
@@ -569,7 +569,7 @@ void
 html_iframe_init (HTMLIFrame *iframe,
 		  HTMLIFrameClass *klass,
 		  GtkWidget *parent,
-		  char *src,
+		  gchar *src,
 		  gint width,
 		  gint height,
 		  gboolean border)
diff --git a/gtkhtml/htmliframe.h b/gtkhtml/htmliframe.h
index 428d4c2..43b9f30 100644
--- a/gtkhtml/htmliframe.h
+++ b/gtkhtml/htmliframe.h
@@ -31,7 +31,7 @@
 struct _HTMLIFrame {
 	HTMLEmbedded embedded;
 
-	char *url;
+	gchar *url;
 	GtkWidget *scroll;
 	GtkWidget *html;
 	HTMLPainter *gdk_painter;
@@ -53,13 +53,13 @@ void           html_iframe_class_init            (HTMLIFrameClass *klass,
 void           html_iframe_init                  (HTMLIFrame        *iframe,
 						  HTMLIFrameClass   *klass,
 						  GtkWidget         *parent,
-						  char              *url,
+						  gchar              *url,
 						  gint               width,
 						  gint               height,
 						  gboolean           border);
 
 HTMLObject *   html_iframe_new                   (GtkWidget *parent,
-						  char *src,
+						  gchar *src,
 						  gint width,
 						  gint height,
 						  gboolean border);
diff --git a/gtkhtml/htmlimage.c b/gtkhtml/htmlimage.c
index b5ce303..0e9f7cf 100644
--- a/gtkhtml/htmlimage.c
+++ b/gtkhtml/htmlimage.c
@@ -63,7 +63,7 @@ struct _HTMLImageFactory {
 static HTMLImageClass html_image_class;
 static HTMLObjectClass *parent_class = NULL;
 
-static HTMLImagePointer   *html_image_pointer_new               (const char *filename, HTMLImageFactory *factory);
+static HTMLImagePointer   *html_image_pointer_new               (const gchar *filename, HTMLImageFactory *factory);
 static void                html_image_pointer_ref               (HTMLImagePointer *ip);
 static void                html_image_pointer_unref             (HTMLImagePointer *ip);
 static gboolean            html_image_pointer_timeout           (HTMLImagePointer *ip);
@@ -213,7 +213,7 @@ image_update_url (HTMLImage *image, gint x, gint y)
 {
 	HTMLMap *map;
 	HTMLObject *o = HTML_OBJECT (image);
-	char *url = NULL;
+	gchar *url = NULL;
 
 	/*
 	 * FIXME this is a huge hack waiting until we implement events for now we write
@@ -965,7 +965,7 @@ html_image_set_alt (HTMLImage *image, const gchar *alt)
 void
 html_image_set_map (HTMLImage *image, gchar *usemap, gboolean ismap)
 {
-	char *url = NULL;
+	gchar *url = NULL;
 
 	g_free (image->usemap);
 
@@ -1009,13 +1009,13 @@ html_image_set_size (HTMLImage *image, gint w, gint h, gboolean pw, gboolean ph)
 	}
 }
 
-static char *fallback_image_content_types[] = { (char *) "image/*", NULL};
+static gchar *fallback_image_content_types[] = { (gchar *) "image/*", NULL};
 
-static char **
+static gchar **
 html_image_factory_types (GtkHTMLStream *stream,
 			  gpointer user_data)
 {
-	static char**image_content_types = NULL;
+	static gchar **image_content_types = NULL;
 
 #if 0
 	/* this code should work in gtk+-2.2 but it is untested */
@@ -1029,7 +1029,7 @@ html_image_factory_types (GtkHTMLStream *stream,
 
 		for (cur = formats; cur; cur = cur->next) {
 			GdkPixbufFormat *format = cur->data;
-			char **mime;
+			gchar **mime;
 
 			mime = gdk_pixbuf_formats_get_mime_types ();
 			for (i = 0; mime && mime[i]; i++)
@@ -1039,7 +1039,7 @@ html_image_factory_types (GtkHTMLStream *stream,
 		g_slist_free (formats);
 
 		if (types) {
-			image_content_types = g_new0 (char *, g_slist_length (types) + 1);
+			image_content_types = g_new0 (gchar *, g_slist_length (types) + 1);
 
 			for (cur = types, i = 0; cur; cur = cur->next, i++) {
 				image_content_types[i] = cur->data;
@@ -1303,7 +1303,7 @@ html_image_factory_free (HTMLImageFactory *factory)
 #define STALL_INTERVAL 1000
 
 static HTMLImagePointer *
-html_image_pointer_new (const char *filename, HTMLImageFactory *factory)
+html_image_pointer_new (const gchar *filename, HTMLImageFactory *factory)
 {
 	HTMLImagePointer *retval;
 
@@ -1422,7 +1422,7 @@ html_image_pointer_load (HTMLImagePointer *ip)
 }
 
 HTMLImagePointer *
-html_image_factory_register (HTMLImageFactory *factory, HTMLImage *i, const char *url, gboolean reload)
+html_image_factory_register (HTMLImageFactory *factory, HTMLImage *i, const gchar *url, gboolean reload)
 {
 	HTMLImagePointer *ip;
 	GtkHTMLStream *stream = NULL;
diff --git a/gtkhtml/htmlimage.h b/gtkhtml/htmlimage.h
index 7a28678..4163e6d 100644
--- a/gtkhtml/htmlimage.h
+++ b/gtkhtml/htmlimage.h
@@ -153,7 +153,7 @@ gboolean          html_image_factory_get_animate            (HTMLImageFactory *f
 void              html_image_factory_deactivate_animations  (HTMLImageFactory *factory);
 HTMLImagePointer *html_image_factory_register               (HTMLImageFactory *factory,
 							     HTMLImage        *i,
-							     const char       *filename,
+							     const gchar       *filename,
 							     gboolean          reload);
 void              html_image_factory_unregister             (HTMLImageFactory *factory,
 							     HTMLImagePointer *pointer,
diff --git a/gtkhtml/htmlinterval.c b/gtkhtml/htmlinterval.c
index 0aba85f..41e5148 100644
--- a/gtkhtml/htmlinterval.c
+++ b/gtkhtml/htmlinterval.c
@@ -397,7 +397,7 @@ html_interval_intersection (HTMLInterval *a, HTMLInterval *b)
 		html_interval_new_from_points (from, to) : NULL;
 }
 
-void *
+gpointer
 html_interval_substract (HTMLInterval *a, HTMLInterval *b, HTMLInterval **s1, HTMLInterval **s2)
 {
 	return NULL;
diff --git a/gtkhtml/htmlmap.c b/gtkhtml/htmlmap.c
index 1680121..e05b8e4 100644
--- a/gtkhtml/htmlmap.c
+++ b/gtkhtml/htmlmap.c
@@ -49,10 +49,10 @@ html_map_add_shape (HTMLMap *map, HTMLShape *shape)
 	g_ptr_array_add (map->shapes, shape);
 }
 
-char *
+gchar *
 html_map_calc_point (HTMLMap *map, gint x, gint y)
 {
-	int i;
+	gint i;
 
 	for (i = 0; i < map->shapes->len; i++) {
 		HTMLShape *shape;
diff --git a/gtkhtml/htmlmap.h b/gtkhtml/htmlmap.h
index 2e2aadc..6da8553 100644
--- a/gtkhtml/htmlmap.h
+++ b/gtkhtml/htmlmap.h
@@ -28,13 +28,13 @@
 #define HTML_MAP(x) ((HTMLMap *) x)
 
 struct _HTMLMap {
-	char *name;
+	gchar *name;
         GPtrArray *shapes;
 };
 
 HTMLMap     *html_map_new         (const gchar     *name);
 void         html_map_destroy     (HTMLMap         *map);
-char *       html_map_calc_point  (HTMLMap         *map,
+gchar *       html_map_calc_point  (HTMLMap         *map,
 				   gint             x,
 				   gint             y);
 void         html_map_add_shape  (HTMLMap          *map,
diff --git a/gtkhtml/htmlmarshal.c b/gtkhtml/htmlmarshal.c
index 3021bfc..33e8d42 100644
--- a/gtkhtml/htmlmarshal.c
+++ b/gtkhtml/htmlmarshal.c
@@ -17,7 +17,7 @@
 #define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
 #define g_marshal_value_peek_float(v)    g_value_get_float (v)
 #define g_marshal_value_peek_double(v)   g_value_get_double (v)
-#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
+#define g_marshal_value_peek_string(v)   (gchar *) g_value_get_string (v)
 #define g_marshal_value_peek_param(v)    g_value_get_param (v)
 #define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
 #define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
diff --git a/gtkhtml/htmlobject.c b/gtkhtml/htmlobject.c
index f0085c1..b7eae3c 100644
--- a/gtkhtml/htmlobject.c
+++ b/gtkhtml/htmlobject.c
@@ -355,7 +355,7 @@ relayout (HTMLObject *self,
 	  HTMLEngine *engine,
 	  HTMLObject *child)
 {
-	/* FIXME int types of this stuff might change in `htmlobject.h',
+	/* FIXME gint types of this stuff might change in `htmlobject.h',
            remember to sync.  */
 	guint prev_width;
 	guint prev_ascent, prev_descent;
@@ -737,13 +737,13 @@ html_object_real_backspace (HTMLObject *self, HTMLCursor *cursor, HTMLEngine *en
 }
 
 static int
-html_object_real_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+html_object_real_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	return html_object_get_length (o);
 }
 
 static int
-html_object_real_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+html_object_real_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	return 0;
 }
@@ -982,7 +982,7 @@ html_object_calc_abs_position (HTMLObject *o,
 }
 
 void
-html_object_calc_abs_position_in_frame (HTMLObject *o, int *x_return, int *y_return)
+html_object_calc_abs_position_in_frame (HTMLObject *o, gint *x_return, gint *y_return)
 {
 	HTMLObject *p;
 
@@ -1151,7 +1151,7 @@ html_object_calc_preferred_width (HTMLObject *o,
 
 #if 0
 gint
-html_object_get_uris (HTMLObject *o, char **link, char **target, char **src)
+html_object_get_uris (HTMLObject *o, gchar **link, gchar **target, gchar **src)
 {
 	return TRUE;
 }
@@ -1798,7 +1798,7 @@ html_object_set_data_nocp (HTMLObject *object, const gchar *key, const gchar *va
 }
 
 void
-html_object_set_data_full_nocp (HTMLObject *object, const gchar *key, const gpointer value, GDestroyNotify func)
+html_object_set_data_full_nocp (HTMLObject *object, const gchar *key, gconstpointer value, GDestroyNotify func)
 {
 	g_datalist_set_data_full (&object->object_data_nocp, key, value, func);
 }
@@ -1816,7 +1816,7 @@ html_object_set_data (HTMLObject *object, const gchar *key, const gchar *value)
 }
 
 void
-html_object_set_data_full (HTMLObject *object, const gchar *key, const gpointer value, GDestroyNotify func)
+html_object_set_data_full (HTMLObject *object, const gchar *key, gconstpointer value, GDestroyNotify func)
 {
 	g_datalist_set_data_full (&object->object_data, key, value, func);
 }
@@ -1856,7 +1856,7 @@ object_save_data (GQuark key_id, gpointer data, gpointer user_data)
 		html_engine_save_delims_and_vals (state,
 				"<!--+GtkHTML:<DATA class=\"", state->save_data_class_name,
 				"\" key=\"", g_quark_to_string (key_id),
-				"\" value=\"", (char *) data,
+				"\" value=\"", (gchar *) data,
 				"\">-->", NULL);
 		html_engine_set_class_data (state->engine, state->save_data_class_name, g_quark_to_string (key_id), data);
 	}
@@ -1874,14 +1874,14 @@ handle_object_data (gpointer key, gpointer value, gpointer data)
 		/* printf ("clear\n"); */
 		html_engine_save_delims_and_vals (state,
 				"<!--+GtkHTML:<DATA class=\"", state->save_data_class_name,
-				"\" clear=\"", (char *) key,
+				"\" clear=\"", (gchar *) key,
 				"\">-->", NULL);
 		state->data_to_remove = g_slist_prepend (state->data_to_remove, key);
 	} else if (strcmp (value, str)) {
 		/* printf ("change\n"); */
 		html_engine_save_delims_and_vals (state,
 				"<!--+GtkHTML:<DATA class=\"", state->save_data_class_name,
-				"\" key=\"", (char *) key,
+				"\" key=\"", (gchar *) key,
 				"\" value=\"", str,
 				"\">-->", NULL);
 		html_engine_set_class_data (state->engine, state->save_data_class_name, key, value);
@@ -2131,7 +2131,7 @@ html_object_get_insert_level (HTMLObject *o)
 	switch (HTML_OBJECT_TYPE (o)) {
 	case HTML_TYPE_TABLECELL:
 	case HTML_TYPE_CLUEV: {
-		int level = 3;
+		gint level = 3;
 
 		while (o && (HTML_IS_CLUEV (o) || HTML_IS_TABLE_CELL (o))
 		       && HTML_CLUE (o)->head && (HTML_IS_CLUEV (HTML_CLUE (o)->head) || HTML_IS_TABLE_CELL (HTML_CLUE (o)->head))) {
@@ -2282,14 +2282,14 @@ html_object_get_direction (HTMLObject *o)
 	return (* HO_CLASS (o)->get_direction) (o);
 }
 
-const char *
+const gchar *
 html_object_get_id (HTMLObject *o)
 {
 	return o->id;
 }
 
 void
-html_object_set_id (HTMLObject *o, const char *id)
+html_object_set_id (HTMLObject *o, const gchar *id)
 {
 	g_free (o->id);
 	o->id = g_strdup (id);
@@ -2304,14 +2304,14 @@ html_object_get_flow (HTMLObject *o)
 	return HTML_CLUEFLOW (o);
 }
 
-int
-html_object_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+gint
+html_object_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	return (* HO_CLASS (o)->get_right_edge_offset) (o, painter, offset);
 }
 
-int
-html_object_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+gint
+html_object_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	return (* HO_CLASS (o)->get_left_edge_offset) (o, painter, offset);
 }
diff --git a/gtkhtml/htmlobject.h b/gtkhtml/htmlobject.h
index 8ba0ab0..78ca9cd 100644
--- a/gtkhtml/htmlobject.h
+++ b/gtkhtml/htmlobject.h
@@ -71,7 +71,7 @@ struct _HTMLObject {
 	GData *object_data;
 	GData *object_data_nocp;
 
-	char *id;
+	gchar *id;
 };
 
 struct _HTMLObjectClearRectangle {
@@ -267,8 +267,8 @@ struct _HTMLObjectClass {
 	gboolean (*cursor_right)         (HTMLObject *self, HTMLPainter *painter, HTMLCursor *cursor);
 	gboolean (*cursor_left)          (HTMLObject *self, HTMLPainter *painter, HTMLCursor *cursor);
 
-	int (*get_right_edge_offset) (HTMLObject *o, HTMLPainter *painter, int offset);
-	int (*get_left_edge_offset) (HTMLObject *o, HTMLPainter *painter, int offset);
+	gint (*get_right_edge_offset) (HTMLObject *o, HTMLPainter *painter, gint offset);
+	gint (*get_left_edge_offset) (HTMLObject *o, HTMLPainter *painter, gint offset);
 
 	gboolean (*backspace)       (HTMLObject *self, HTMLCursor *cursor, HTMLEngine *engine);
 };
@@ -399,8 +399,8 @@ void            html_object_calc_abs_position     (HTMLObject            *o,
 						   gint                  *x_return,
 						   gint                  *y_return);
 void            html_object_calc_abs_position_in_frame (HTMLObject       *o,
-							int              *x_return,
-							int              *y_return);
+							gint              *x_return,
+							gint              *y_return);
 gboolean        html_object_intersect             (HTMLObject            *o,
 						   GdkRectangle          *intersection,
 						   gint                   x,
@@ -549,7 +549,7 @@ void      html_object_set_data               (HTMLObject          *object,
 					      const gchar         *value);
 void      html_object_set_data_full          (HTMLObject          *object,
 					      const gchar         *key,
-					      const gpointer       value,
+					      gconstpointer       value,
 					      GDestroyNotify       func);
 gpointer  html_object_get_data               (HTMLObject          *object,
 					      const gchar         *key);
@@ -564,7 +564,7 @@ void      html_object_set_data_nocp          (HTMLObject          *object,
 					      const gchar         *value);
 void      html_object_set_data_full_nocp     (HTMLObject          *object,
 					      const gchar         *key,
-					      const gpointer       value,
+					      gconstpointer       value,
 					      GDestroyNotify       func);
 gpointer  html_object_get_data_nocp          (HTMLObject          *object,
 					      const gchar         *key);
@@ -627,16 +627,16 @@ HTMLObject *html_object_next_cursor_leaf    (HTMLObject *o,
 HTMLObject *html_object_prev_cursor_leaf    (HTMLObject *o,
 					     HTMLEngine *e);
 
-int  html_object_get_right_edge_offset  (HTMLObject *o,
+gint  html_object_get_right_edge_offset  (HTMLObject *o,
 					 HTMLPainter *painter,
-					 int offset);
-int  html_object_get_left_edge_offset   (HTMLObject *o,
+					 gint offset);
+gint  html_object_get_left_edge_offset   (HTMLObject *o,
 					 HTMLPainter *painter,
-					 int offset);
+					 gint offset);
 
-const char *html_object_get_id  (HTMLObject *o);
+const gchar *html_object_get_id  (HTMLObject *o);
 void        html_object_set_id  (HTMLObject *o,
-				 const char *id);
+				 const gchar *id);
 
 HTMLDirection html_object_get_direction (HTMLObject *o);
 HTMLClueFlow * html_object_get_flow (HTMLObject *o);
diff --git a/gtkhtml/htmlpainter.c b/gtkhtml/htmlpainter.c
index 5bd211d..b522c39 100644
--- a/gtkhtml/htmlpainter.c
+++ b/gtkhtml/htmlpainter.c
@@ -139,7 +139,7 @@ text_width (HTMLPainter *painter, PangoFontDescription *desc, const gchar *text,
 
 	if (pi && glyphs) {
 		GList *list;
-		int i;
+		gint i;
 		for (list = glyphs, i = 0; list; list = list->next->next, i++) {
 			PangoGlyphString *str = (PangoGlyphString *) list->data;
 			for (i=0; i < str->num_glyphs; i ++)
@@ -285,7 +285,7 @@ html_painter_get_type (void)
 
 void
 html_painter_begin (HTMLPainter *painter,
-		    int x1, int y1, int x2, int y2)
+		    gint x1, gint y1, gint x2, gint y2)
 {
 	g_return_if_fail (painter != NULL);
 	g_return_if_fail (HTML_IS_PAINTER (painter));
@@ -571,8 +571,8 @@ html_painter_draw_entries (HTMLPainter *painter, gint x, gint y,
 	const gchar *tab, *c_text;
 	gint bytes;
 	GList *gl;
-	int first_item_offset = -1;
-	int space_width = -1;
+	gint first_item_offset = -1;
+	gint space_width = -1;
 
 	g_return_if_fail (painter != NULL);
 	g_return_if_fail (HTML_IS_PAINTER (painter));
@@ -631,8 +631,8 @@ html_painter_draw_entries (HTMLPainter *painter, gint x, gint y,
 	}
 }
 
-int
-html_painter_draw_glyphs (HTMLPainter *painter, int x, int y, PangoItem *item, PangoGlyphString *glyphs, GdkColor *fg, GdkColor *bg)
+gint
+html_painter_draw_glyphs (HTMLPainter *painter, gint x, gint y, PangoItem *item, PangoGlyphString *glyphs, GdkColor *fg, GdkColor *bg)
 {
 	return (* HP_CLASS (painter)->draw_glyphs) (painter, x, y, item, glyphs, fg, bg);
 }
@@ -820,7 +820,7 @@ html_painter_get_pixel_size (HTMLPainter *painter)
 }
 
 gint
-html_painter_draw_spell_error (HTMLPainter *painter, int x, int y, int width)
+html_painter_draw_spell_error (HTMLPainter *painter, gint x, gint y, gint width)
 {
 	return (* HP_CLASS (painter)->draw_spell_error) (painter, x, y, width);
 }
diff --git a/gtkhtml/htmlpainter.h b/gtkhtml/htmlpainter.h
index 1c6dea0..d5b25e3 100644
--- a/gtkhtml/htmlpainter.h
+++ b/gtkhtml/htmlpainter.h
@@ -57,7 +57,7 @@ struct _HTMLPainterClass {
 	GObjectClass   base;
 
 	void (* set_widget)       (HTMLPainter *painter, GtkWidget *widget);
-	void (* begin)            (HTMLPainter *painter, int x1, int y1, int x2, int y2);
+	void (* begin)            (HTMLPainter *painter, gint x1, gint y1, gint x2, gint y2);
 	void (* end)              (HTMLPainter *painter);
 
         HTMLFont * (* alloc_font) (HTMLPainter *p, gchar *face_name, gdouble size, gboolean points, GtkHTMLFontStyle  style);
@@ -72,7 +72,7 @@ struct _HTMLPainterClass {
 	void (* draw_line)        (HTMLPainter *painter, gint x1, gint y1, gint x2, gint y2);
 	void (* draw_rect)        (HTMLPainter *painter, gint x, gint y, gint width, gint height);
 	gint (* draw_glyphs)      (HTMLPainter *painter, gint x, gint y, PangoItem *item, PangoGlyphString *glyphs, GdkColor *fg, GdkColor *bg);
-	gint (* draw_spell_error) (HTMLPainter *painter, int x, int y, int width);
+	gint (* draw_spell_error) (HTMLPainter *painter, gint x, gint y, gint width);
 	void (* fill_rect)        (HTMLPainter *painter, gint x, gint y, gint width, gint height);
 	void (* draw_pixmap)      (HTMLPainter *painter, GdkPixbuf *pixbuf,
 				   gint x, gint y,
@@ -113,10 +113,10 @@ void              html_painter_set_widget                              (HTMLPain
 
 /* Functions to drive the painting process.  */
 void              html_painter_begin                                   (HTMLPainter       *painter,
-									int                x1,
-									int                y1,
-									int                x2,
-									int                y2);
+									gint                x1,
+									gint                y1,
+									gint                x2,
+									gint                y2);
 void              html_painter_end                                     (HTMLPainter       *painter);
 
 /* Color control.  */
@@ -178,9 +178,9 @@ void              html_painter_draw_text                               (HTMLPain
 									gint               y,
 									const gchar       *text,
 									gint               len);
-int               html_painter_draw_glyphs                             (HTMLPainter       *painter,
-									int                x,
-									int                y,
+gint               html_painter_draw_glyphs                             (HTMLPainter       *painter,
+									gint                x,
+									gint                y,
 									PangoItem         *item,
 									PangoGlyphString  *glyphs,
 									GdkColor          *fg,
@@ -250,9 +250,9 @@ void              html_painter_draw_background                         (HTMLPain
 									gint               tile_y);
 guint             html_painter_get_pixel_size                          (HTMLPainter       *painter);
 gint              html_painter_draw_spell_error                        (HTMLPainter       *painter,
-									int                x,
-									int                y,
-									int                width);
+									gint                x,
+									gint                y,
+									gint                width);
 HTMLFont         *html_painter_alloc_font                              (HTMLPainter       *painter,
 									gchar             *face_name,
 									gdouble            size,
diff --git a/gtkhtml/htmlprinter.c b/gtkhtml/htmlprinter.c
index b40b1b0..d510f39 100644
--- a/gtkhtml/htmlprinter.c
+++ b/gtkhtml/htmlprinter.c
@@ -85,8 +85,8 @@ finalize (GObject *object)
 
 static void
 begin (HTMLPainter *painter,
-       int x1, int y1,
-       int x2, int y2)
+       gint x1, gint y1,
+       gint x2, gint y2)
 {
 	HTMLPrinter *printer;
 	GtkPrintContext *pc;
diff --git a/gtkhtml/htmlrule.c b/gtkhtml/htmlrule.c
index cc73709..b1d6b6c 100644
--- a/gtkhtml/htmlrule.c
+++ b/gtkhtml/htmlrule.c
@@ -232,7 +232,7 @@ save_plain (HTMLObject *self,
 	    HTMLEngineSaveState *state,
 	    gint requested_width)
 {
-	int i;
+	gint i;
 
 	if (!html_engine_save_output_string (state, "\n"))
 		return FALSE;
diff --git a/gtkhtml/htmlsearch.c b/gtkhtml/htmlsearch.c
index c5bd347..9b902b4 100644
--- a/gtkhtml/htmlsearch.c
+++ b/gtkhtml/htmlsearch.c
@@ -88,13 +88,13 @@ html_search_new (HTMLEngine *e, const gchar *text, gboolean case_sensitive, gboo
 			g_warning (rv);
 		}
 #else
-		int rv_int;
+		gint rv_int;
 
 		ns->reb = g_new0 (regex_t, 1);
 
 		rv_int = regcomp (ns->reb, ns->text, (case_sensitive) ? 0 : REG_ICASE);
 		if (rv_int) {
-			char buf[1024];
+			gchar buf[1024];
 			if (regerror(rv_int, ns->reb, buf, sizeof(buf))) {
 				g_warning ("%s", buf);
 			} else {
diff --git a/gtkhtml/htmlselect.c b/gtkhtml/htmlselect.c
index 1872b1f..09ed5d7 100644
--- a/gtkhtml/htmlselect.c
+++ b/gtkhtml/htmlselect.c
@@ -103,7 +103,7 @@ add_selected (GtkTreeModel *model,
               GtkTreePath *path,
               GtkTreeIter *iter,
               struct EmbeddedSelectionInfo *info,
-              const gchar* codepage)
+              const gchar * codepage)
 {
 	gchar *value, *encoded;
 
diff --git a/gtkhtml/htmlsettings.c b/gtkhtml/htmlsettings.c
index 9ffeb0f..dd1b642 100644
--- a/gtkhtml/htmlsettings.c
+++ b/gtkhtml/htmlsettings.c
@@ -26,7 +26,7 @@
 #include "htmlsettings.h"
 
 
-static const int defaultFontSizes[HTML_NUM_FONT_SIZES] = { 8, 10, 12, 14, 18, 24, 32 };
+static const gint defaultFontSizes[HTML_NUM_FONT_SIZES] = { 8, 10, 12, 14, 18, 24, 32 };
 
 
 
diff --git a/gtkhtml/htmlshape.c b/gtkhtml/htmlshape.c
index ab33dfd..cae9db8 100644
--- a/gtkhtml/htmlshape.c
+++ b/gtkhtml/htmlshape.c
@@ -35,8 +35,8 @@ struct _HTMLShape {
 };
 
 static HTMLLength *
-parse_length (const char **str) {
-	const char *cur = *str;
+parse_length (const gchar **str) {
+	const gchar *cur = *str;
 	HTMLLength *len = g_new0 (HTMLLength, 1);
 
 	/* g_warning ("begin \"%s\"", *str); */
@@ -78,7 +78,7 @@ parse_length (const char **str) {
 }
 
 void
-html_length_array_parse (GPtrArray *array, const char *str)
+html_length_array_parse (GPtrArray *array, const gchar *str)
 {
 	HTMLLength *length;
 
@@ -93,7 +93,7 @@ html_length_array_parse (GPtrArray *array, const char *str)
 void
 html_length_array_destroy (GPtrArray *array)
 {
-	int i;
+	gint i;
 
 	for (i = 0; i < array->len; i++)
 		g_free (g_ptr_array_index (array, i));
@@ -104,9 +104,9 @@ html_length_array_destroy (GPtrArray *array)
 gboolean
 html_shape_point (HTMLShape *shape, gint x, gint y)
 {
-	int i;
-	int j = 0;
-	int odd = 0;
+	gint i;
+	gint j = 0;
+	gint odd = 0;
 
 	HTMLLength **poly = (HTMLLength **)shape->coords->pdata;
 
@@ -155,7 +155,7 @@ html_shape_point (HTMLShape *shape, gint x, gint y)
 }
 
 static HTMLShapeType
-parse_shape_type (char *token) {
+parse_shape_type (gchar *token) {
 	HTMLShapeType type = HTML_SHAPE_RECT;
 
 	if (!token || g_ascii_strncasecmp (token, "rect", 4) == 0)
@@ -170,14 +170,14 @@ parse_shape_type (char *token) {
 	return type;
 }
 
-char *
+gchar *
 html_shape_get_url (HTMLShape *shape)
 {
 	return shape->url;
 }
 
 HTMLShape *
-html_shape_new (char *type_str, char *coords, char *url, char *target)
+html_shape_new (gchar *type_str, gchar *coords, gchar *url, gchar *target)
 {
 	HTMLShape *shape;
 	HTMLShapeType type = parse_shape_type (type_str);
diff --git a/gtkhtml/htmlshape.h b/gtkhtml/htmlshape.h
index c3ac8ab..8b4bad7 100644
--- a/gtkhtml/htmlshape.h
+++ b/gtkhtml/htmlshape.h
@@ -31,12 +31,12 @@ typedef enum {
 
 typedef struct _HTMLShape HTMLShape;
 
-void         html_length_array_parse   (GPtrArray *array, const char *str);
+void         html_length_array_parse   (GPtrArray *array, const gchar *str);
 void         html_length_array_destroy (GPtrArray *array);
 
-HTMLShape *  html_shape_new      (char *type, char *coords, char *href, char *target);
+HTMLShape *  html_shape_new      (gchar *type, gchar *coords, gchar *href, gchar *target);
 gboolean     html_shape_point    (HTMLShape *shape, gint x, gint y);
-char *       html_shape_get_url  (HTMLShape *shape);
+gchar *       html_shape_get_url  (HTMLShape *shape);
 void         html_shape_destroy  (HTMLShape *shape);
 
 #endif /* HTML_SHAPE_H_ */
diff --git a/gtkhtml/htmlstyle.c b/gtkhtml/htmlstyle.c
index d92274e..98b44f7 100644
--- a/gtkhtml/htmlstyle.c
+++ b/gtkhtml/htmlstyle.c
@@ -51,8 +51,8 @@ html_parse_color (const gchar *text,
 }
 
 static HTMLLength *
-parse_length (char *str) {
-	char *cur = str;
+parse_length (gchar *str) {
+	gchar *cur = str;
 	HTMLLength *len;
 
 	len = g_new0 (HTMLLength, 1);
@@ -274,7 +274,7 @@ html_style_set_clear (HTMLStyle *style, HTMLClearType clear)
 }
 
 HTMLStyle *
-html_style_add_width (HTMLStyle *style, char *len)
+html_style_add_width (HTMLStyle *style, gchar *len)
 {
 	if (!style)
 		style = html_style_new ();
@@ -287,7 +287,7 @@ html_style_add_width (HTMLStyle *style, char *len)
 }
 
 HTMLStyle *
-html_style_add_height (HTMLStyle *style, char *len)
+html_style_add_height (HTMLStyle *style, gchar *len)
 {
 	if (!style)
 		style = html_style_new ();
@@ -300,7 +300,7 @@ html_style_add_height (HTMLStyle *style, char *len)
 }
 
 HTMLStyle *
-html_style_add_background_image (HTMLStyle *style, const char *url)
+html_style_add_background_image (HTMLStyle *style, const gchar *url)
 {
 	if (!style)
 		style = html_style_new ();
@@ -323,7 +323,7 @@ html_style_set_border_style (HTMLStyle *style, HTMLBorderStyle bstyle)
 }
 
 HTMLStyle *
-html_style_set_border_width (HTMLStyle *style, int width)
+html_style_set_border_width (HTMLStyle *style, gint width)
 {
 	if (!style)
 		style = html_style_new ();
@@ -334,7 +334,7 @@ html_style_set_border_width (HTMLStyle *style, int width)
 }
 
 HTMLStyle *
-html_style_set_padding (HTMLStyle *style, int padding)
+html_style_set_padding (HTMLStyle *style, gint padding)
 {
 	if (!style)
 		style = html_style_new ();
@@ -366,7 +366,7 @@ html_style_set_border_color (HTMLStyle *style, HTMLColor *color)
 }
 
 static HTMLStyle *
-parse_border_style (HTMLStyle *style, char *value)
+parse_border_style (HTMLStyle *style, gchar *value)
 {
 	while (isspace (*value))
 		value ++;
@@ -380,7 +380,7 @@ parse_border_style (HTMLStyle *style, char *value)
 }
 
 static HTMLStyle *
-parse_border_color (HTMLStyle *style, char *value)
+parse_border_color (HTMLStyle *style, gchar *value)
 {
 	GdkColor color;
 
@@ -394,7 +394,7 @@ parse_border_color (HTMLStyle *style, char *value)
 }
 
 static HTMLStyle *
-parse_border_width (HTMLStyle *style, char *value)
+parse_border_width (HTMLStyle *style, gchar *value)
 {
 	while (isspace (*value))
 		value ++;
@@ -412,12 +412,12 @@ parse_border_width (HTMLStyle *style, char *value)
 }
 
 static HTMLStyle *
-parse_border (HTMLStyle *style, char *value)
+parse_border (HTMLStyle *style, gchar *value)
 {
 	while (value && *value) {
-		char *next;
-		int modified;
-		char orig = 0;
+		gchar *next;
+		gint modified;
+		gchar orig = 0;
 
 		while (isspace (*value))
 			value ++;
@@ -448,7 +448,7 @@ parse_border (HTMLStyle *style, char *value)
 }
 
 HTMLStyle *
-html_style_add_attribute (HTMLStyle *style, const char *attr)
+html_style_add_attribute (HTMLStyle *style, const gchar *attr)
 {
 	gchar **prop;
 
@@ -456,7 +456,7 @@ html_style_add_attribute (HTMLStyle *style, const char *attr)
 	if (prop) {
 		gint i;
 		for (i = 0; prop[i]; i++) {
-			char *text;
+			gchar *text;
 
 			text = g_strstrip (prop[i]);
 			if (!g_ascii_strncasecmp ("color: ", text, 7)) {
@@ -496,7 +496,7 @@ html_style_add_attribute (HTMLStyle *style, const char *attr)
 			} else if (!g_ascii_strncasecmp ("border-width: ", text, 14)) {
 				style = parse_border_width (style, text + 14);
 			} else if (!g_ascii_strncasecmp ("padding: ", text, 9)) {
-				char *value = text + 9;
+				gchar *value = text + 9;
 
 				style = html_style_set_padding (style, atoi (value));
 			} else if (!g_ascii_strncasecmp ("white-space: ", text, 13)) {
@@ -519,7 +519,7 @@ html_style_add_attribute (HTMLStyle *style, const char *attr)
 			} else if (!g_ascii_strncasecmp ("text-decoration: none", text, 21)) {
 				style = html_style_unset_decoration (style, ~GTK_HTML_FONT_STYLE_SIZE_MASK);
 			} else if (!g_ascii_strncasecmp ("display: ", text, 9)) {
-				char *value = text + 9;
+				gchar *value = text + 9;
 				if (!g_ascii_strcasecmp ("block", value)) {
 					style = html_style_set_display (style, DISPLAY_BLOCK);
 				} else if (!g_ascii_strcasecmp ("inline", value)) {
@@ -536,7 +536,7 @@ html_style_add_attribute (HTMLStyle *style, const char *attr)
 			} else if (!g_ascii_strncasecmp ("height: ", text, 8)) {
 				style = html_style_add_height (style, text + 8);
 			} else if (!g_ascii_strncasecmp ("clear: ", text, 7)) {
-				char *value = text + 7;
+				gchar *value = text + 7;
 
 				if (!g_ascii_strcasecmp ("left", value)) {
 					style = html_style_set_clear (style, HTML_CLEAR_LEFT);
diff --git a/gtkhtml/htmlstyle.h b/gtkhtml/htmlstyle.h
index 2e88ec9..e8047ca 100644
--- a/gtkhtml/htmlstyle.h
+++ b/gtkhtml/htmlstyle.h
@@ -48,15 +48,15 @@ struct _HTMLStyle {
 	HTMLLength     *width;
 	HTMLLength     *height;
 
-	char           *bg_image;
+	gchar           *bg_image;
 	HTMLColor      *bg_color;
 	HTMLDisplayType display;
 
 	/* border */
-	int border_width;
+	gint border_width;
 	HTMLBorderStyle border_style;
 	HTMLColor *border_color;
-	int padding;
+	gint padding;
 };
 
 HTMLStyle *html_style_new                  (void);
@@ -67,18 +67,18 @@ HTMLStyle *html_style_set_size             (HTMLStyle *style, GtkHTMLFontStyle s
 HTMLStyle *html_style_set_display          (HTMLStyle *style, HTMLDisplayType display);
 HTMLStyle *html_style_set_clear            (HTMLStyle *style, HTMLClearType clear);
 HTMLStyle *html_style_set_border_style     (HTMLStyle *style, HTMLBorderStyle bstyle);
-HTMLStyle *html_style_set_border_width     (HTMLStyle *style, int width);
+HTMLStyle *html_style_set_border_width     (HTMLStyle *style, gint width);
 HTMLStyle *html_style_set_border_color     (HTMLStyle *style, HTMLColor *color);
-HTMLStyle *html_style_set_padding          (HTMLStyle *style, int padding);
+HTMLStyle *html_style_set_padding          (HTMLStyle *style, gint padding);
 HTMLStyle *html_style_add_text_align       (HTMLStyle *style, HTMLHAlignType type);
 HTMLStyle *html_style_add_text_valign      (HTMLStyle *style, HTMLVAlignType type);
 HTMLStyle *html_style_add_font_face        (HTMLStyle *style, const HTMLFontFace *face);
 HTMLStyle *html_style_add_color            (HTMLStyle *style, HTMLColor *face);
-HTMLStyle *html_style_add_attribute        (HTMLStyle *style, const char *attr);
-HTMLStyle *html_style_add_background_image (HTMLStyle *style, const char *url);
+HTMLStyle *html_style_add_attribute        (HTMLStyle *style, const gchar *attr);
+HTMLStyle *html_style_add_background_image (HTMLStyle *style, const gchar *url);
 HTMLStyle *html_style_add_background_color (HTMLStyle *style, HTMLColor *color);
-HTMLStyle *html_style_add_width            (HTMLStyle *style, char *width);
-HTMLStyle *html_style_add_height           (HTMLStyle *style, char *height);
+HTMLStyle *html_style_add_width            (HTMLStyle *style, gchar *width);
+HTMLStyle *html_style_add_height           (HTMLStyle *style, gchar *height);
 void       html_style_free                 (HTMLStyle *style);
 
 gboolean   html_parse_color                (const gchar *text, GdkColor *color);
diff --git a/gtkhtml/htmltable.c b/gtkhtml/htmltable.c
index e29297d..abbfd8f 100644
--- a/gtkhtml/htmltable.c
+++ b/gtkhtml/htmltable.c
@@ -1315,7 +1315,7 @@ calc_preferred_width (HTMLObject *o,
 		      HTMLPainter *painter)
 {
 	HTMLTable *table = HTML_TABLE (o);
-	int min_width;
+	gint min_width;
 
 	/* note that calculating min width prepares columnPref for us */
 	min_width = html_object_calc_min_width (o, painter);
@@ -1782,12 +1782,12 @@ reset (HTMLObject *o)
 }
 
 static HTMLAnchor *
-find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+find_anchor (HTMLObject *self, const gchar *name, gint *x, gint *y)
 {
 	HTMLTable *table;
 	HTMLTableCell *cell;
 	HTMLAnchor *anchor;
-	unsigned int r, c;
+	guint r, c;
 
 	table = HTML_TABLE (self);
 
@@ -2225,7 +2225,7 @@ static gint
 check_page_split (HTMLObject *self, HTMLPainter *painter, gint y)
 {
 	HTMLTable     *table;
-	int r, min_y;
+	gint r, min_y;
 
 	table = HTML_TABLE (self);
 	r     = to_index (bin_search_index (table->rowHeights, 0, table->totalRows, y), 0, table->totalRows - 1);
diff --git a/gtkhtml/htmltablecell.c b/gtkhtml/htmltablecell.c
index 5b1ad13..f5795d4 100644
--- a/gtkhtml/htmltablecell.c
+++ b/gtkhtml/htmltablecell.c
@@ -51,7 +51,7 @@ draw_background_helper (HTMLTableCell *cell,
 	HTMLClueV *cluev;
 	GdkPixbuf  *pixbuf = NULL;
 	GdkColor   *color = NULL;
-	int pixel_size = html_painter_get_pixel_size (p);
+	gint pixel_size = html_painter_get_pixel_size (p);
 
 	o = HTML_OBJECT (cell);
 	cluev = HTML_CLUEV (cell);
diff --git a/gtkhtml/htmltext.c b/gtkhtml/htmltext.c
index 58b67f6..4c4e885 100644
--- a/gtkhtml/htmltext.c
+++ b/gtkhtml/htmltext.c
@@ -276,7 +276,7 @@ cut_attr_list (HTMLText *text, gint begin_index, gint end_index)
 }
 
 static void
-cut_links_full (HTMLText *text, int start_offset, int end_offset, int start_index, int end_index, int shift_offset, int shift_index)
+cut_links_full (HTMLText *text, gint start_offset, gint end_offset, gint start_index, gint end_index, gint shift_offset, gint shift_index)
 {
 	GSList *l, *next;
 	Link *link;
@@ -329,7 +329,7 @@ cut_links_full (HTMLText *text, int start_offset, int end_offset, int start_inde
 }
 
 static void
-cut_links (HTMLText *text, int start_offset, int end_offset, int start_index, int end_index)
+cut_links (HTMLText *text, gint start_offset, gint end_offset, gint start_index, gint end_index)
 {
 	cut_links_full (text, start_offset, end_offset, start_index, end_index, end_offset - start_offset, end_index - start_index);
 }
@@ -844,11 +844,11 @@ html_text_get_line_offset (HTMLText *text, HTMLPainter *painter, gint offset)
 	return line_offset;
 }
 
-int
-html_text_get_item_index (HTMLText *text, HTMLPainter *painter, int offset, int *item_offset)
+gint
+html_text_get_item_index (HTMLText *text, HTMLPainter *painter, gint offset, gint *item_offset)
 {
 	HTMLTextPangoInfo *pi = html_text_get_pango_info (text, painter);
-	int idx = 0;
+	gint idx = 0;
 
 	if (pi->n > 0) {
 		while (idx < pi->n - 1 && offset >= pi->entries [idx].glyph_item.item->num_chars) {
@@ -931,14 +931,14 @@ html_text_calc_text_size (HTMLText *t, HTMLPainter *painter,
 			  guint len, HTMLTextPangoInfo *pi, GList *glyphs, gint *line_offset,
 			  gint *width, gint *asc, gint *dsc)
 {
-		char *text = t->text + start_byte_offset;
+		gchar *text = t->text + start_byte_offset;
 
 		html_painter_calc_entries_size (painter, text, len, pi, glyphs,
 						line_offset, width, asc, dsc);
 }
 
 gint
-html_text_calc_part_width (HTMLText *text, HTMLPainter *painter, char *start, gint offset, gint len, gint *asc, gint *dsc)
+html_text_calc_part_width (HTMLText *text, HTMLPainter *painter, gchar *start, gint offset, gint len, gint *asc, gint *dsc)
 {
 	gint idx, width = 0, line_offset;
 	gint ascent = 0, descent = 0; /* Quiet GCC */
@@ -978,7 +978,7 @@ html_text_calc_part_width (HTMLText *text, HTMLPainter *painter, char *start, gi
 		language = pi->entries [idx].glyph_item.item->analysis.language;
 	}
 	while (len > 0) {
-		int old_idx;
+		gint old_idx;
 
 		if (*s == '\t') {
 			gint skip = 8 - (line_offset % 8);
@@ -1160,9 +1160,9 @@ html_text_add_cite_color (PangoAttrList *attrs, HTMLText *text, HTMLClueFlow *fl
 }
 
 void
-html_text_remove_unwanted_line_breaks (char *s, int len, PangoLogAttr *attrs)
+html_text_remove_unwanted_line_breaks (gchar *s, gint len, PangoLogAttr *attrs)
 {
-	int i;
+	gint i;
 	gunichar last_uc = 0;
 
 	for (i = 0; i < len; i ++) {
@@ -1311,29 +1311,29 @@ get_pango_base_direction (HTMLText *text)
 
 void
 html_tmp_fix_pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
-						    const char       *text,
-						    int               length,
-						    int               embedding_level,
-						    int              *logical_widths)
+						    const gchar       *text,
+						    gint               length,
+						    gint               embedding_level,
+						    gint              *logical_widths)
 {
-  int i, j;
-  int last_cluster = 0;
-  int width = 0;
-  int last_cluster_width = 0;
-  const char *p = text;		/* Points to start of current cluster */
+  gint i, j;
+  gint last_cluster = 0;
+  gint width = 0;
+  gint last_cluster_width = 0;
+  const gchar *p = text;		/* Points to start of current cluster */
 
   /* printf ("html_tmp_fix_pango_glyph_string_get_logical_widths"); */
 
   for (i=0; i<=glyphs->num_glyphs; i++)
     {
-      int glyph_index = (embedding_level % 2 == 0) ? i : glyphs->num_glyphs - i - 1;
+      gint glyph_index = (embedding_level % 2 == 0) ? i : glyphs->num_glyphs - i - 1;
 
       /* If this glyph belongs to a new cluster, or we're at the end, find
        * the start of the next cluster, and assign the widths for this cluster.
        */
       if (i == glyphs->num_glyphs || p != text + glyphs->log_clusters[glyph_index])
 	{
-	  int next_cluster = last_cluster;
+	  gint next_cluster = last_cluster;
 
 	  if (i < glyphs->num_glyphs)
 	    {
@@ -1396,7 +1396,7 @@ html_text_get_pango_info (HTMLText *text, HTMLPainter *painter)
 	if (!text->pi) {
 		GList *items, *cur;
 		PangoAttrList *attrs;
-		int i, offset;
+		gint i, offset;
 
 		attrs = html_text_prepare_attrs (text, painter);
 		items = pango_itemize_with_base_dir (painter->pango_context, get_pango_base_direction (text), text->text, 0, text->text_bytes, attrs, NULL);
@@ -1414,7 +1414,7 @@ html_text_get_pango_info (HTMLText *text, HTMLPainter *painter)
 		for (cur = items; cur; cur = cur->next) {
 			PangoItem tmp_item;
 			PangoItem *item;
-			int start_offset;
+			gint start_offset;
 
 			start_offset = offset;
 			item = (PangoItem *) cur->data;
@@ -1464,7 +1464,7 @@ html_text_get_pango_info (HTMLText *text, HTMLPainter *painter)
 }
 
 gboolean
-html_text_pi_backward (HTMLTextPangoInfo *pi, int *ii, int *io)
+html_text_pi_backward (HTMLTextPangoInfo *pi, gint *ii, gint *io)
 {
 	if (*io <= 0) {
 		if (*ii <= 0)
@@ -1478,7 +1478,7 @@ html_text_pi_backward (HTMLTextPangoInfo *pi, int *ii, int *io)
 }
 
 gboolean
-html_text_pi_forward (HTMLTextPangoInfo *pi, int *ii, int *io)
+html_text_pi_forward (HTMLTextPangoInfo *pi, gint *ii, gint *io)
 {
 	if (*io >= pi->entries [*ii].glyph_item.item->num_chars - 1) {
 		if (*ii >= pi->n -1)
@@ -1506,12 +1506,12 @@ html_text_pi_forward (HTMLTextPangoInfo *pi, int *ii, int *io)
  *
  * Return value: width of found trailing white space, in Pango units
  **/
-int
-html_text_tail_white_space (HTMLText *text, HTMLPainter *painter, int offset, int ii, int io, int *white_len, int line_offset, char *s)
+gint
+html_text_tail_white_space (HTMLText *text, HTMLPainter *painter, gint offset, gint ii, gint io, gint *white_len, gint line_offset, gchar *s)
 {
 	HTMLTextPangoInfo *pi = html_text_get_pango_info (text, painter);
-	int wl = 0;
-	int ww = 0;
+	gint wl = 0;
+	gint ww = 0;
 
 	if (html_text_pi_backward (pi, &ii, &io)) {
 		s = g_utf8_prev_char (s);
@@ -1858,8 +1858,8 @@ get_length (HTMLObject *self)
 
 struct TmpDeltaRecord
 {
-	int index;		/* Byte index within original string  */
-	int delta;		/* New delta (character at index was modified,
+	gint index;		/* Byte index within original string  */
+	gint delta;		/* New delta (character at index was modified,
 				 * new delta applies to characters afterwards)
 				 */
 };
@@ -1889,7 +1889,7 @@ check_prev_white (gint white_space, gunichar last_white, gint *delta_out)
 }
 
 static GSList *
-add_change (GSList *list, int index, int delta)
+add_change (GSList *list, gint index, gint delta)
 {
 	struct TmpDeltaRecord *rec = g_new (struct TmpDeltaRecord, 1);
 
@@ -2020,7 +2020,7 @@ update_index_interval (guint *start_index,
 		       GSList *changes)
 {
 	GSList *c;
-	int index, delta;
+	gint index, delta;
 
 	index = delta = 0;
 
@@ -2527,7 +2527,7 @@ get_target (HTMLObject *object, gint offset)
 }
 
 HTMLTextSlave *
-html_text_get_slave_at_offset (HTMLText *text, HTMLTextSlave *start, int offset)
+html_text_get_slave_at_offset (HTMLText *text, HTMLTextSlave *start, gint offset)
 {
 	HTMLObject *obj = start ? HTML_OBJECT (start) : HTML_OBJECT (text)->next;
 
@@ -2543,7 +2543,7 @@ html_text_get_slave_at_offset (HTMLText *text, HTMLTextSlave *start, int offset)
 static gboolean
 html_text_cursor_prev_slave (HTMLObject *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
-	int offset = cursor->offset;
+	gint offset = cursor->offset;
 
 	while (slave->prev && HTML_IS_TEXT_SLAVE (slave->prev)) {
 		if (HTML_TEXT_SLAVE (slave->prev)->posLen) {
@@ -2562,7 +2562,7 @@ html_text_cursor_prev_slave (HTMLObject *slave, HTMLPainter *painter, HTMLCursor
 static gboolean
 html_text_cursor_next_slave (HTMLObject *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
-	int offset = cursor->offset;
+	gint offset = cursor->offset;
 
 	while (slave->next && HTML_IS_TEXT_SLAVE (slave->next)) {
 		if (HTML_TEXT_SLAVE (slave->next)->posLen) {
@@ -2794,7 +2794,7 @@ html_text_backspace (HTMLObject *self, HTMLCursor *cursor, HTMLEngine *engine)
 }
 
 static int
-html_text_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+html_text_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	HTMLTextSlave *slave = html_text_get_slave_at_offset (HTML_TEXT (o), NULL, offset);
 
@@ -2808,7 +2808,7 @@ html_text_get_right_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset
 }
 
 static int
-html_text_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, int offset)
+html_text_get_left_edge_offset (HTMLObject *o, HTMLPainter *painter, gint offset)
 {
 	HTMLTextSlave *slave = html_text_get_slave_at_offset (HTML_TEXT (o), NULL, offset);
 
@@ -3199,7 +3199,7 @@ html_text_magic_link (HTMLText *text, HTMLEngine *engine, guint offset)
 	gboolean rv = FALSE, exec = TRUE;
 	gint saved_position;
 	gunichar uc;
-	char *str, *cur;
+	gchar *str, *cur;
 
 	if (!offset)
 		return FALSE;
diff --git a/gtkhtml/htmltext.h b/gtkhtml/htmltext.h
index ac44381..69616a5 100644
--- a/gtkhtml/htmltext.h
+++ b/gtkhtml/htmltext.h
@@ -174,30 +174,30 @@ gint              html_text_text_line_length             (const gchar        *te
 							  gint               *tabs);
 gint              html_text_calc_part_width              (HTMLText           *text,
 							  HTMLPainter        *painter,
-							  char               *start,
+							  gchar               *start,
 							  gint                offset,
 							  gint                len,
 							  gint               *asc,
 							  gint               *dsc);
 gint              html_text_get_item_index               (HTMLText           *text,
 							  HTMLPainter        *painter,
-							  int                 offset,
-							  int                *item_offset);
+							  gint                 offset,
+							  gint                *item_offset);
 gboolean          html_text_pi_backward                  (HTMLTextPangoInfo  *pi,
-							  int                *ii,
-							  int                *io);
+							  gint                *ii,
+							  gint                *io);
 gboolean          html_text_pi_forward                   (HTMLTextPangoInfo  *pi,
-							  int                *ii,
-							  int                *io);
+							  gint                *ii,
+							  gint                *io);
 void              html_text_free_attrs                   (GSList             *attrs);
 gint              html_text_tail_white_space             (HTMLText           *text,
 							  HTMLPainter        *painter,
-							  int                 offset,
-							  int                 ii,
-							  int                 io,
-							  int                *white_len,
-							  int                 line_offset,
-							  char               *s);
+							  gint                 offset,
+							  gint                 ii,
+							  gint                 io,
+							  gint                *white_len,
+							  gint                 line_offset,
+							  gchar               *s);
 void              html_text_append_link                  (HTMLText           *text,
 							  gchar              *url,
 							  gchar              *target,
@@ -240,7 +240,7 @@ Link             *html_text_get_link_at_offset           (HTMLText           *te
 							  gint                offset);
 HTMLTextSlave    *html_text_get_slave_at_offset          (HTMLText           *text,
 							  HTMLTextSlave      *start,
-							  int                 offset);
+							  gint                 offset);
 Link             *html_text_get_link_slaves_at_offset    (HTMLText           *text,
 							  gint                offset,
 							  HTMLTextSlave     **start,
@@ -340,8 +340,8 @@ PangoDirection     html_text_get_pango_direction      (HTMLText              *te
 HTMLDirection      html_text_direction_pango_to_html  (PangoDirection         pdir);
 
 gboolean  html_text_is_line_break                (PangoLogAttr  attr);
-void      html_text_remove_unwanted_line_breaks  (char         *s,
-						  int           len,
+void      html_text_remove_unwanted_line_breaks  (gchar         *s,
+						  gint           len,
 						  PangoLogAttr *attrs);
 
 typedef HTMLObject * (* HTMLTextHelperFunc)       (HTMLText *, gint begin, gint end);
@@ -358,10 +358,10 @@ HTMLObject *html_text_op_cut_helper     (HTMLText           *text,
 					 guint              *len);
 void
 html_tmp_fix_pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
-						    const char       *text,
-						    int               length,
-						    int               embedding_level,
-						    int              *logical_widths);
+						    const gchar       *text,
+						    gint               length,
+						    gint               embedding_level,
+						    gint              *logical_widths);
 
 PangoAttrList *html_text_prepare_attrs (HTMLText *text,
 					HTMLPainter *painter);
diff --git a/gtkhtml/htmltextinput.c b/gtkhtml/htmltextinput.c
index ae95645..4347075 100644
--- a/gtkhtml/htmltextinput.c
+++ b/gtkhtml/htmltextinput.c
@@ -108,7 +108,7 @@ html_text_input_key_pressed (GtkWidget *w, GdkEventKey *ev, gpointer p)
 /* HTMLEmbedded methods.  */
 
 static gchar *
-encode (HTMLEmbedded *e, const gchar* codepage)
+encode (HTMLEmbedded *e, const gchar * codepage)
 {
 	GString *encoding = g_string_new ("");
 	gchar *ptr;
diff --git a/gtkhtml/htmltextslave.c b/gtkhtml/htmltextslave.c
index 175f16b..7e91bc6 100644
--- a/gtkhtml/htmltextslave.c
+++ b/gtkhtml/htmltextslave.c
@@ -47,7 +47,7 @@ static HTMLObjectClass *parent_class = NULL;
 
 static void    clear_glyph_items (HTMLTextSlave *slave);
 
-char *
+gchar *
 html_text_slave_get_text (HTMLTextSlave *slave)
 {
 	if (!slave->charStart)
@@ -58,7 +58,7 @@ html_text_slave_get_text (HTMLTextSlave *slave)
 
 /* Split this TextSlave at the specified offset.  */
 static void
-split (HTMLTextSlave *slave, guint offset, int skip, char *start_pointer)
+split (HTMLTextSlave *slave, guint offset, gint skip, gchar *start_pointer)
 {
 	HTMLObject *obj;
 	HTMLObject *new;
@@ -129,7 +129,7 @@ hts_calc_width (HTMLTextSlave *slave, HTMLPainter *painter, gint *asc, gint *dsc
 	GSList *cur, *gilist = html_text_slave_get_glyph_items (slave, painter);
 	PangoLanguage *language = NULL;
 	PangoFont *font = NULL;
-	int width = 0;
+	gint width = 0;
 
 	if (asc)
 		*asc = html_painter_engine_to_pango (painter,
@@ -335,7 +335,7 @@ html_text_slave_get_nb_width (HTMLTextSlave *slave, HTMLPainter *painter, gboole
 }
 
 /*
- * offset: current position - char offset
+ * offset: current position - gchar offset
  * s: current position - string pointer
  * ii: current position - index of item
  * io: current position - offset within item
@@ -404,7 +404,7 @@ hts_fit_line (HTMLObject *o, HTMLPainter *painter,
 
 		if (io == 0 && slave->owner->text [pi->entries [ii].glyph_item.item->offset]  == '\t') {
 			GtkHTMLFontStyle font_style;
-			char *face;
+			gchar *face;
 			gint skip = 8 - (line_offset % 8);
 
 			if (HTML_IS_PLAIN_PAINTER (painter)) {
@@ -513,11 +513,11 @@ html_get_glyphs_non_tab (GList *glyphs, PangoItem *item, gint ii, const gchar *t
  */
 
 static GSList *
-reorder_glyph_items (GSList *glyph_items, int n_items)
+reorder_glyph_items (GSList *glyph_items, gint n_items)
 {
 	GSList *tmp_list, *level_start_node;
-	int i, level_start_i;
-	int min_level = G_MAXINT;
+	gint i, level_start_i;
+	gint min_level = G_MAXINT;
 	GSList *result = NULL;
 
 	if (n_items == 0)
@@ -568,10 +568,10 @@ reorder_glyph_items (GSList *glyph_items, int n_items)
 }
 
 static GSList *
-get_glyph_items_in_range (HTMLTextSlave *slave, HTMLPainter *painter, int start_offset, int len)
+get_glyph_items_in_range (HTMLTextSlave *slave, HTMLPainter *painter, gint start_offset, gint len)
 {
 	HTMLTextPangoInfo *pi = html_text_get_pango_info (slave->owner, painter);
-	int i, offset, end_offset, n_items = 0;
+	gint i, offset, end_offset, n_items = 0;
 	GSList *glyph_items = NULL;
 
 	start_offset += slave->posStart;
@@ -592,7 +592,7 @@ get_glyph_items_in_range (HTMLTextSlave *slave, HTMLPainter *painter, int start_
 			if (start_offset > offset) {
 				/* need to cut the beginning of current glyph item */
 				PangoGlyphItem *tmp_gi;
-				int split_index;
+				gint split_index;
 
 				glyph_item->type = HTML_TEXT_SLAVE_GLYPH_ITEM_CREATED;
 				glyph_item->widths = NULL;
@@ -611,7 +611,7 @@ get_glyph_items_in_range (HTMLTextSlave *slave, HTMLPainter *painter, int start_
 			if (offset + item->num_chars > end_offset) {
 				/* need to cut the ending of current glyph item */
 				PangoGlyphItem tmp_gi1, *tmp_gi2;
-				int split_index;
+				gint split_index;
 
 				if (glyph_item->type == HTML_TEXT_SLAVE_GLYPH_ITEM_PARENTAL) {
 					tmp_gi1.item = pango_item_copy (glyph_item->glyph_item.item);
@@ -670,9 +670,9 @@ html_text_slave_get_glyph_items (HTMLTextSlave *slave, HTMLPainter *painter)
 }
 
 static gboolean
-calc_glyph_range_size (HTMLText *text, PangoGlyphItem *glyph_item, int start_index, int end_index, int *x_offset, int *width, int *asc, int *height)
+calc_glyph_range_size (HTMLText *text, PangoGlyphItem *glyph_item, gint start_index, gint end_index, gint *x_offset, gint *width, gint *asc, gint *height)
 {
-	int isect_start, isect_end;
+	gint isect_start, isect_end;
 
 	isect_start = MAX (glyph_item->item->offset, start_index);
 	isect_end = MIN (glyph_item->item->offset + glyph_item->item->length, end_index);
@@ -684,7 +684,7 @@ calc_glyph_range_size (HTMLText *text, PangoGlyphItem *glyph_item, int start_ind
 
 	if (isect_start <= isect_end) {
 		PangoRectangle log_rect;
-		int start_x, end_x;
+		gint start_x, end_x;
 
 		pango_glyph_string_index_to_x (glyph_item->glyphs,
 					       text->text + glyph_item->item->offset,
@@ -739,10 +739,10 @@ draw_text (HTMLTextSlave *self,
 	HTMLObject *obj;
 	HTMLText *text = self->owner;
 	GSList *cur;
-	int run_width;
-	int selection_start_index = 0;
-	int selection_end_index = 0;
-	int isect_start, isect_end;
+	gint run_width;
+	gint selection_start_index = 0;
+	gint selection_end_index = 0;
+	gint isect_start, isect_end;
 	gboolean selection;
 	GdkColor selection_fg, selection_bg;
 	HTMLEngine *e = NULL;
@@ -782,7 +782,7 @@ draw_text (HTMLTextSlave *self,
 	for (cur = html_text_slave_get_glyph_items (self, p); cur; cur = cur->next) {
 		HTMLTextSlaveGlyphItem *gi = (HTMLTextSlaveGlyphItem *) cur->data;
 		GList *cur_se;
-		int cur_width;
+		gint cur_width;
 
 		if (e)
 			html_painter_set_pen (p, &html_colorset_get_color_allocated (e->settings->color_set,
@@ -791,8 +791,8 @@ draw_text (HTMLTextSlave *self,
 						      obj->y + ty + get_ys (text, p), gi->glyph_item.item, gi->glyph_item.glyphs, NULL, NULL);
 
 		if (selection) {
-			int start_x, width, asc, height;
-			int cx, cy, cw, ch;
+			gint start_x, width, asc, height;
+			gint cx, cy, cw, ch;
 
 			if (calc_glyph_range_size (text, &gi->glyph_item, selection_start_index, selection_end_index, &start_x, &width, &asc, &height) && width > 0) {
 				html_painter_get_clip_rectangle (p, &cx, &cy, &cw, &ch);
@@ -821,11 +821,11 @@ draw_text (HTMLTextSlave *self,
 			mi = MIN (se->off + se->len, self->posStart + self->posLen);
 
 			if (ma < mi) {
-				int width, height, asc, start_x;
+				gint width, height, asc, start_x;
 
 				gchar *end;
 				gchar *start;
-				int se_start_index, se_end_index;
+				gint se_start_index, se_end_index;
 
 				start = html_text_get_text (text, ma);
 				end = g_utf8_offset_to_pointer (start, mi - ma);
@@ -955,11 +955,11 @@ static gint
 calc_offset (HTMLTextSlave *slave, HTMLPainter *painter, gint x)
 {
 	GSList *cur, *glyphs = html_text_slave_get_glyph_items (slave, painter);
-	int width = 0, offset = html_object_get_direction (HTML_OBJECT (slave->owner)) == HTML_DIRECTION_RTL ? slave->posLen : 0;
+	gint width = 0, offset = html_object_get_direction (HTML_OBJECT (slave->owner)) == HTML_DIRECTION_RTL ? slave->posLen : 0;
 	PangoItem *item = NULL;
 
 	if (glyphs) {
-		int i = 0;
+		gint i = 0;
 
 		for (cur = glyphs; cur; cur = cur->next) {
 			HTMLTextSlaveGlyphItem *gi = (HTMLTextSlaveGlyphItem *) cur->data;
@@ -1139,7 +1139,7 @@ html_text_slave_new (HTMLText *owner, guint posStart, guint posLen)
 }
 
 static gboolean
-html_text_slave_is_index_in_glyph (HTMLTextSlave *slave, HTMLTextSlave *next_slave, GSList *cur, int index, PangoItem *item)
+html_text_slave_is_index_in_glyph (HTMLTextSlave *slave, HTMLTextSlave *next_slave, GSList *cur, gint index, PangoItem *item)
 {
 	if (item->analysis.level % 2 == 0) {
 		/* LTR */
@@ -1161,13 +1161,13 @@ html_text_slave_is_index_in_glyph (HTMLTextSlave *slave, HTMLTextSlave *next_sla
 }
 
 static HTMLTextSlaveGlyphItem *
-html_text_slave_get_glyph_item_at_offset (HTMLTextSlave *slave, HTMLPainter *painter, int offset, HTMLTextSlaveGlyphItem **prev, HTMLTextSlaveGlyphItem **next, int *start_width, int *index_out)
+html_text_slave_get_glyph_item_at_offset (HTMLTextSlave *slave, HTMLPainter *painter, gint offset, HTMLTextSlaveGlyphItem **prev, HTMLTextSlaveGlyphItem **next, gint *start_width, gint *index_out)
 {
 	HTMLTextSlaveGlyphItem *rv = NULL;
 	HTMLTextSlaveGlyphItem *prev_gi, *next_gi;
 	HTMLTextSlave *next_slave = HTML_OBJECT (slave)->next && HTML_IS_TEXT_SLAVE (HTML_OBJECT (slave)->next) ? HTML_TEXT_SLAVE (HTML_OBJECT (slave)->next) : NULL;
 	GSList *cur;
-	int index;
+	gint index;
 
 	prev_gi = next_gi = NULL;
 
@@ -1213,7 +1213,7 @@ html_text_slave_get_glyph_item_at_offset (HTMLTextSlave *slave, HTMLPainter *pai
 static gboolean
 html_text_slave_gi_left_edge (HTMLTextSlave *slave, HTMLCursor *cursor, HTMLTextSlaveGlyphItem *gi)
 {
-	int old_offset = cursor->offset;
+	gint old_offset = cursor->offset;
 
 	if (gi->glyph_item.item->analysis.level % 2 == 0) {
 		/* LTR */
@@ -1233,7 +1233,7 @@ html_text_slave_gi_left_edge (HTMLTextSlave *slave, HTMLCursor *cursor, HTMLText
 static gboolean
 html_text_slave_gi_right_edge (HTMLTextSlave *slave, HTMLCursor *cursor, HTMLTextSlaveGlyphItem *gi)
 {
-	int old_offset = cursor->offset;
+	gint old_offset = cursor->offset;
 
 	if (gi->glyph_item.item->analysis.level % 2 == 0) {
 		/* LTR */
@@ -1254,7 +1254,7 @@ static gboolean
 html_text_slave_cursor_right_one (HTMLTextSlave *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
 	HTMLTextSlaveGlyphItem *prev, *next;
-	int index;
+	gint index;
 	HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, painter, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
 
 	if (!gi)
@@ -1314,7 +1314,7 @@ static gboolean
 html_text_slave_cursor_left_one (HTMLTextSlave *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
 	HTMLTextSlaveGlyphItem *prev, *next;
-	int index;
+	gint index;
 	HTMLObject *prev_obj = HTML_OBJECT (slave->owner)->prev;
 	HTMLTextSlaveGlyphItem *gi = html_text_slave_get_glyph_item_at_offset (slave, painter, cursor->offset - slave->posStart, &prev, &next, NULL, &index);
 
@@ -1379,8 +1379,8 @@ static gboolean
 html_text_slave_get_left_edge (HTMLTextSlave *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
 	HTMLTextPangoInfo *pi = html_text_get_pango_info (slave->owner, painter);
-	int old_offset = cursor->offset;
-	int old_position = cursor->position;
+	gint old_offset = cursor->offset;
+	gint old_position = cursor->position;
 
 	cursor->offset = html_text_slave_get_left_edge_offset (slave, painter);
 
@@ -1400,8 +1400,8 @@ static gboolean
 html_text_slave_get_right_edge (HTMLTextSlave *slave, HTMLPainter *painter, HTMLCursor *cursor)
 {
 	HTMLTextPangoInfo *pi = html_text_get_pango_info (slave->owner, painter);
-	int old_offset = cursor->offset;
-	int old_position = cursor->position;
+	gint old_offset = cursor->offset;
+	gint old_position = cursor->position;
 
 	cursor->offset = html_text_slave_get_right_edge_offset (slave, painter);
 
@@ -1457,7 +1457,7 @@ void
 html_text_slave_get_cursor_base (HTMLTextSlave *slave, HTMLPainter *painter, guint offset, gint *x, gint *y)
 {
 	HTMLTextSlaveGlyphItem *gi;
-	int index, start_width;
+	gint index, start_width;
 
 	html_object_calc_abs_position (HTML_OBJECT (slave), x, y);
 
@@ -1468,7 +1468,7 @@ html_text_slave_get_cursor_base (HTMLTextSlave *slave, HTMLPainter *painter, gui
 /*		gi ? gi->glyph_item.item->offset + gi->glyph_item.item->length : -1); */
 
 	if (gi) {
-		int start_x;
+		gint start_x;
 
 		if (calc_glyph_range_size (slave->owner, &gi->glyph_item, index, index, &start_x, NULL, NULL, NULL) && x) {
 /*			printf ("start_width: %d start_x: %d\n", start_width, start_x); */
@@ -1477,7 +1477,7 @@ html_text_slave_get_cursor_base (HTMLTextSlave *slave, HTMLPainter *painter, gui
 	}
 }
 
-int
+gint
 html_text_slave_get_left_edge_offset (HTMLTextSlave *slave, HTMLPainter *painter)
 {
 	GSList *gis = html_text_slave_get_glyph_items (slave, painter);
@@ -1502,7 +1502,7 @@ html_text_slave_get_left_edge_offset (HTMLTextSlave *slave, HTMLPainter *painter
 	}
 }
 
-int
+gint
 html_text_slave_get_right_edge_offset (HTMLTextSlave *slave, HTMLPainter *painter)
 {
 	GSList *gis = html_text_slave_get_glyph_items (slave, painter);
diff --git a/gtkhtml/htmltextslave.h b/gtkhtml/htmltextslave.h
index 72031f9..267f5bf 100644
--- a/gtkhtml/htmltextslave.h
+++ b/gtkhtml/htmltextslave.h
@@ -67,7 +67,7 @@ HTMLObject *html_text_slave_new                   (HTMLText           *owner,
 gint        html_text_slave_get_line_offset       (HTMLTextSlave      *slave,
 						   gint                offset,
 						   HTMLPainter        *p);
-char       *html_text_slave_get_text              (HTMLTextSlave      *slave);
+gchar       *html_text_slave_get_text              (HTMLTextSlave      *slave);
 gint        html_text_slave_nb_width              (HTMLTextSlave      *slave,
 						   HTMLPainter        *painter,
 						   gint                words);
@@ -102,8 +102,8 @@ void        html_text_slave_get_cursor_base       (HTMLTextSlave      *slave,
 						   guint               offset,
 						   gint               *x,
 						   gint               *y);
-int         html_text_slave_get_left_edge_offset  (HTMLTextSlave      *slave,
+gint         html_text_slave_get_left_edge_offset  (HTMLTextSlave      *slave,
 						   HTMLPainter        *painter);
-int         html_text_slave_get_right_edge_offset (HTMLTextSlave      *slave,
+gint         html_text_slave_get_right_edge_offset (HTMLTextSlave      *slave,
 						   HTMLPainter        *painter);
 #endif /* _HTMLTEXTSLAVE_H_ */
diff --git a/gtkhtml/htmltokenizer.c b/gtkhtml/htmltokenizer.c
index b2fa479..d759b24 100644
--- a/gtkhtml/htmltokenizer.c
+++ b/gtkhtml/htmltokenizer.c
@@ -162,7 +162,7 @@ static gboolean
 static gchar   *html_tokenizer_real_peek_token      (HTMLTokenizer *);
 static gchar   *html_tokenizer_real_next_token      (HTMLTokenizer *);
 static gboolean html_tokenizer_real_has_more_tokens (HTMLTokenizer *);
-static gchar   *html_tokenizer_converted_token (HTMLTokenizer *t,const gchar* token);
+static gchar   *html_tokenizer_converted_token (HTMLTokenizer *t,const gchar * token);
 
 
 static HTMLTokenizer *html_tokenizer_real_clone     (HTMLTokenizer *);
@@ -176,9 +176,9 @@ static void               html_tokenizer_tokenize_one_char   (HTMLTokenizer  *t,
 							      const gchar  **src);
 static void				  add_char(HTMLTokenizer *t, gchar c);
 
-gboolean				  is_need_convert(const gchar* token);
+gboolean				  is_need_convert(const gchar * token);
 
-gchar*					  html_tokenizer_convert_entity(gchar * token);
+gchar *					  html_tokenizer_convert_entity(gchar * token);
 
 static GObjectClass *parent_class = NULL;
 
@@ -432,9 +432,9 @@ is_valid_g_iconv (const GIConv iconv_cd)
 
 /*Convert only chars when code >127*/
 gboolean
-is_need_convert (const gchar* token)
+is_need_convert (const gchar * token)
 {
-	int i=strlen (token);
+	gint i=strlen (token);
 	for (;i>=0;i--)
 		if (token[i]&128)
 			return TRUE;
@@ -551,7 +551,7 @@ convert_text_encoding (const GIConv iconv_cd,
 
 static gchar *
 html_tokenizer_converted_token (HTMLTokenizer *t,
-                                const gchar* token)
+                                const gchar * token)
 {
 	if (token != NULL) {
 		struct _HTMLTokenizerPrivate *p = t->priv;
@@ -679,7 +679,7 @@ is_text (const gchar *content_type)
 	return content_type && strstr (content_type, "text/") != NULL;
 }
 
-static const gchar*
+static const gchar *
 get_encoding_from_content_type(const gchar * content_type)
 {
 	gchar * charset;
diff --git a/gtkhtml/htmltokenizer.h b/gtkhtml/htmltokenizer.h
index 6b84b36..6fb2ff4 100644
--- a/gtkhtml/htmltokenizer.h
+++ b/gtkhtml/htmltokenizer.h
@@ -96,7 +96,7 @@ GIConv     generate_iconv_from (const gchar * content_type);
 /*for convert resulted query to needed encoding <--utf*/
 GIConv     generate_iconv_to (const gchar * content_type);
 /*convert test to needed encoding*/
-gchar*     convert_text_encoding (const GIConv iconv_cd, const gchar * token);
+gchar *     convert_text_encoding (const GIConv iconv_cd, const gchar * token);
 /*validate result g_iconv_open*/
 gboolean   is_valid_g_iconv (const GIConv iconv_cd);
 #endif /* _HTMLTOKENIZER_H_ */
diff --git a/gtkhtml/htmlurl.c b/gtkhtml/htmlurl.c
index 9224bca..f575992 100644
--- a/gtkhtml/htmlurl.c
+++ b/gtkhtml/htmlurl.c
@@ -469,8 +469,8 @@ html_url_to_string (const HTMLURL *url)
 #define PATH_SEP '/'
 #define PATH_SEP_STR "/"
 
-static char *
-concat_dir_and_file (const char *dir, const char *file)
+static gchar *
+concat_dir_and_file (const gchar *dir, const gchar *file)
 {
         /* If the directory name doesn't have a / on the end, we need
 	   to add one so we get a proper path to the file */
@@ -486,7 +486,7 @@ html_url_append_path (const HTMLURL *url,
 {
 	HTMLURL *new;
 	gchar *new_path, *tmppath, *ptr;
-	int i;
+	gint i;
 
 	new = html_url_dup (url, HTML_URL_DUP_NOPATH);
 
diff --git a/gtkhtml/test-stress.c b/gtkhtml/test-stress.c
index 99836bd..0816b3a 100644
--- a/gtkhtml/test-stress.c
+++ b/gtkhtml/test-stress.c
@@ -21,11 +21,11 @@
 #include "htmltext.h"
 
 typedef struct {
-	const char *name;
-	int (*test_function) (GtkHTML *html);
+	const gchar *name;
+	gint (*test_function) (GtkHTML *html);
 } Test;
 
-static int test_level_1 (GtkHTML *html);
+static gint test_level_1 (GtkHTML *html);
 
 static Test tests[] = {
 	{ "cursor movement", NULL },
@@ -78,17 +78,17 @@ set_format (GtkHTML *html, gboolean format_html)
 
 }
 
-static int test_level_1 (GtkHTML *html)
+static gint test_level_1 (GtkHTML *html)
 {
-	int i, total_len = 0;
+	gint i, total_len = 0;
 
 	set_format (html, FALSE);
 
 	srand (2);
 
 	for (i = 0; i < 200; i ++) {
-		int j, len = 1 + (int) (10.0*rand()/(RAND_MAX+1.0));
-		char word [12];
+		gint j, len = 1 + (int) (10.0*rand()/(RAND_MAX+1.0));
+		gchar word [12];
 
 		for (j = 0; j < len; j ++)
 			word [j] = 'a' + (int) (26.0*rand()/(RAND_MAX+1.0));
@@ -106,7 +106,7 @@ static int test_level_1 (GtkHTML *html)
 		return FALSE;
 
 	for (i = 0; i < 1000; i ++) {
-		int j, new_pos, pos, len;
+		gint j, new_pos, pos, len;
 
 		len = 1 + (int) (120.0*rand()/(RAND_MAX+1.0));
 		pos = MAX (0, (int) (((double) (total_len - len))*rand()/(RAND_MAX+1.0)));
@@ -132,11 +132,11 @@ static int test_level_1 (GtkHTML *html)
 			printf ("insert text\n");
 			html_cursor_jump_to_position (html->engine->cursor, html->engine, pos);
 			for (j = 0; j < len; j ++) {
-				int et = (int) (10.0*rand()/(RAND_MAX+1.0));
+				gint et = (int) (10.0*rand()/(RAND_MAX+1.0));
 				if (et == 0)
 					gtk_html_command (html, "insert-tab");
 				else {
-					char ch [2];
+					gchar ch [2];
 
 					if (et == 1)
 						ch [0] = ' ';
@@ -227,11 +227,11 @@ static int test_level_1 (GtkHTML *html)
 	return TRUE;
 }
 
-int main (int argc, char *argv[])
+gint main (gint argc, gchar *argv[])
 {
 	GtkWidget *win, *html_widget, *sw;
 	GtkHTML *html;
-	int i = 0, n_all, n_successful;
+	gint i = 0, n_all, n_successful;
 
 	if (argc > 1)
 		return 0;
@@ -256,7 +256,7 @@ int main (int argc, char *argv[])
 	fprintf (stderr, "\nGtkHTML test suite\n");
 	fprintf (stderr, "--------------------------------------------------------------------------------\n");
 	for (i = 0; tests [i].name; i ++) {
-		int j, result;
+		gint j, result;
 
 		if (tests [i].test_function) {
 			fprintf (stderr, "  %s ", tests [i].name);
diff --git a/gtkhtml/test-suite.c b/gtkhtml/test-suite.c
index 48482c8..d1334fc 100644
--- a/gtkhtml/test-suite.c
+++ b/gtkhtml/test-suite.c
@@ -18,29 +18,29 @@
 #include "htmltext.h"
 
 typedef struct {
-	const char *name;
-	int (*test_function) (GtkHTML *html);
+	const gchar *name;
+	gint (*test_function) (GtkHTML *html);
 } Test;
 
-static int test_cursor_beol (GtkHTML *html);
-static int test_cursor_beol_rtl (GtkHTML *html);
-static int test_cursor_left_right_on_items_boundaries (GtkHTML *html);
-static int test_cursor_left_right_on_lines_boundaries (GtkHTML *html);
-static int test_cursor_left_right_on_lines_boundaries_rtl (GtkHTML *html);
-static int test_cursor_left_right_on_lines_boundaries_wo_white (GtkHTML *html);
-static int test_cursor_around_containers (GtkHTML *html);
-static int test_cursor_around_image (GtkHTML *html);
-static int test_cursor_around_anchors (GtkHTML *html);
-
-static int test_quotes_in_div_block (GtkHTML *html);
-static int test_quotes_in_table (GtkHTML *html);
-static int test_capitalize_upcase_lowcase_word (GtkHTML *html);
-static int test_delete_nested_cluevs_and_undo (GtkHTML *html);
-static int test_insert_nested_cluevs (GtkHTML *html);
-static int test_indentation_plain_text (GtkHTML *html);
-static int test_indentation_plain_text_rtl (GtkHTML *html);
-static int test_table_cell_parsing (GtkHTML *html);
-static int test_delete_around_table (GtkHTML *html);
+static gint test_cursor_beol (GtkHTML *html);
+static gint test_cursor_beol_rtl (GtkHTML *html);
+static gint test_cursor_left_right_on_items_boundaries (GtkHTML *html);
+static gint test_cursor_left_right_on_lines_boundaries (GtkHTML *html);
+static gint test_cursor_left_right_on_lines_boundaries_rtl (GtkHTML *html);
+static gint test_cursor_left_right_on_lines_boundaries_wo_white (GtkHTML *html);
+static gint test_cursor_around_containers (GtkHTML *html);
+static gint test_cursor_around_image (GtkHTML *html);
+static gint test_cursor_around_anchors (GtkHTML *html);
+
+static gint test_quotes_in_div_block (GtkHTML *html);
+static gint test_quotes_in_table (GtkHTML *html);
+static gint test_capitalize_upcase_lowcase_word (GtkHTML *html);
+static gint test_delete_nested_cluevs_and_undo (GtkHTML *html);
+static gint test_insert_nested_cluevs (GtkHTML *html);
+static gint test_indentation_plain_text (GtkHTML *html);
+static gint test_indentation_plain_text_rtl (GtkHTML *html);
+static gint test_table_cell_parsing (GtkHTML *html);
+static gint test_delete_around_table (GtkHTML *html);
 
 static Test tests[] = {
 	{ "cursor movement", NULL },
@@ -66,7 +66,7 @@ static Test tests[] = {
 	{ NULL, NULL }
 };
 
-static void load_editable (GtkHTML *html, const char *s)
+static void load_editable (GtkHTML *html, const gchar *s)
 {
 	gtk_html_set_editable (html, FALSE);
 	gtk_html_load_from_string (html, s, -1);
@@ -75,7 +75,7 @@ static void load_editable (GtkHTML *html, const char *s)
 }
 
 static gboolean
-plain_save_receiver (gpointer engine, const char *data, size_t len, gpointer user_data)
+plain_save_receiver (gpointer engine, const gchar *data, size_t len, gpointer user_data)
 {
 	GString *str = (GString *) user_data;
 
@@ -84,11 +84,11 @@ plain_save_receiver (gpointer engine, const char *data, size_t len, gpointer use
 	return TRUE;
 }
 
-static char *
+static gchar *
 get_plain (GtkHTML *html)
 {
 	GString *str = g_string_new (NULL);
-	char *rv;
+	gchar *rv;
 
 	html_engine_save_plain (html->engine, plain_save_receiver, str);
 
@@ -98,7 +98,7 @@ get_plain (GtkHTML *html)
 	return rv;
 }
 
-static int test_delete_nested_cluevs_and_undo (GtkHTML *html)
+static gint test_delete_nested_cluevs_and_undo (GtkHTML *html)
 {
 	load_editable (html, "<div>abc</div><div>efg</div>");
 
@@ -130,7 +130,7 @@ static int test_delete_nested_cluevs_and_undo (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_insert_nested_cluevs (GtkHTML *html)
+static gint test_insert_nested_cluevs (GtkHTML *html)
 {
 	load_editable (html, "text");
 
@@ -139,9 +139,9 @@ static int test_insert_nested_cluevs (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_indentation_plain_text (GtkHTML *html)
+static gint test_indentation_plain_text (GtkHTML *html)
 {
-	char *str;
+	gchar *str;
 
 	load_editable (html, "abc<div align=right>abc</div>");
 
@@ -154,9 +154,9 @@ static int test_indentation_plain_text (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_indentation_plain_text_rtl (GtkHTML *html)
+static gint test_indentation_plain_text_rtl (GtkHTML *html)
 {
-	char *str;
+	gchar *str;
 
 	load_editable (html, "שנ×?×?ק×?×¢×?<div align=left>שנ×?×?ק×?×¢×?</div>");
 
@@ -169,7 +169,7 @@ static int test_indentation_plain_text_rtl (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_around_containers (GtkHTML *html)
+static gint test_cursor_around_containers (GtkHTML *html)
 {
 	load_editable (html, "abc<table><tr><td>abc</td></tr></table>");
 
@@ -208,7 +208,7 @@ static int test_cursor_around_containers (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_around_image (GtkHTML *html)
+static gint test_cursor_around_image (GtkHTML *html)
 {
 	load_editable (html, "<pre>abc <img src=none> abc");
 
@@ -239,7 +239,7 @@ static int test_cursor_around_image (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_around_anchors (GtkHTML *html)
+static gint test_cursor_around_anchors (GtkHTML *html)
 {
 	load_editable (html, "<pre>a<a name=anchor>b");
 
@@ -306,7 +306,7 @@ static int test_cursor_around_anchors (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_left_right_on_items_boundaries (GtkHTML *html)
+static gint test_cursor_left_right_on_items_boundaries (GtkHTML *html)
 {
 	load_editable (html, "ab<b>cde</b>ef");
 
@@ -360,7 +360,7 @@ static int test_cursor_left_right_on_items_boundaries (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_left_right_on_lines_boundaries (GtkHTML *html)
+static gint test_cursor_left_right_on_lines_boundaries (GtkHTML *html)
 {
 	load_editable (html, "<pre>first line\nsecond line\nthird line");
 
@@ -391,7 +391,7 @@ static int test_cursor_left_right_on_lines_boundaries (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_left_right_on_lines_boundaries_rtl (GtkHTML *html)
+static gint test_cursor_left_right_on_lines_boundaries_rtl (GtkHTML *html)
 {
 	load_editable (html, "<pre>Ø£Ù?رÙ?با, برÙ?جÙ?ات اÙ?حاسÙ?ب + اÙ?ترÙ?Ù?ت :\nتصبح عاÙ?Ù?Ù?ا Ù?ع Ù?Ù?Ù?Ù?Ù?Ù?د\nØ£Ù?رÙ?با, برÙ?جÙ?ات اÙ?حاسÙ?ب + اÙ?ترÙ?Ù?ت :");
 
@@ -422,7 +422,7 @@ static int test_cursor_left_right_on_lines_boundaries_rtl (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_left_right_on_lines_boundaries_wo_white (GtkHTML *html)
+static gint test_cursor_left_right_on_lines_boundaries_wo_white (GtkHTML *html)
 {
 	load_editable (html, "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo%next line");
 
@@ -443,7 +443,7 @@ static int test_cursor_left_right_on_lines_boundaries_wo_white (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_beol (GtkHTML *html)
+static gint test_cursor_beol (GtkHTML *html)
 {
 	load_editable (html, "<pre>simple line\nsecond line\n");
 
@@ -482,7 +482,7 @@ static int test_cursor_beol (GtkHTML *html)
 	return TRUE;
 }
 
-static int test_cursor_beol_rtl (GtkHTML *html)
+static gint test_cursor_beol_rtl (GtkHTML *html)
 {
 	load_editable (html, "<pre>Ø£Ù?رÙ?با, برÙ?جÙ?ات اÙ?حاسÙ?ب + اÙ?ترÙ?Ù?ت :\nتصبح عاÙ?Ù?Ù?ا Ù?ع Ù?Ù?Ù?Ù?Ù?Ù?د\n");
 
@@ -724,11 +724,11 @@ test_table_cell_parsing (GtkHTML *html)
 	return TRUE;
 }
 
-int main (int argc, char *argv[])
+gint main (gint argc, gchar *argv[])
 {
 	GtkWidget *win, *sw, *html_widget;
 	GtkHTML *html;
-	int i = 0, n_all, n_successful;
+	gint i = 0, n_all, n_successful;
 
 	gtk_init (&argc, &argv);
 
@@ -750,7 +750,7 @@ int main (int argc, char *argv[])
 	fprintf (stderr, "\nGtkHTML test suite\n");
 	fprintf (stderr, "--------------------------------------------------------------------------------\n");
 	for (i = 0; tests [i].name; i ++) {
-		int j, result;
+		gint j, result;
 
 		if (tests [i].test_function) {
 			fprintf (stderr, "  %s ", tests [i].name);
diff --git a/gtkhtml/test.c b/gtkhtml/test.c
index eb24449..2598b37 100644
--- a/gtkhtml/test.c
+++ b/gtkhtml/test.c
@@ -42,8 +42,8 @@
 typedef struct _Example Example;
 
 struct _Example {
-	const char *filename;
-	const char *title;
+	const gchar *filename;
+	const gchar *title;
 };
 
 static GPtrArray *examples;
@@ -60,9 +60,9 @@ static const gchar *welcome =
 "Japanese <span lang=\"ja\">å??æ°?	é??ç?º<BR></FONT>";
 
 static void
-url_requested (GtkHTML *unused, const char *url, GtkHTMLStream *stream, gpointer data)
+url_requested (GtkHTML *unused, const gchar *url, GtkHTMLStream *stream, gpointer data)
 {
-	int fd;
+	gint fd;
 	gchar *filename;
 
 	filename = g_strconcat ("tests/", url, NULL);
@@ -113,7 +113,7 @@ encode_html (const gchar *txt)
 static void
 example_changed_cb (GtkComboBox *combo_box, gpointer data)
 {
-	int i = gtk_combo_box_get_active (combo_box);
+	gint i = gtk_combo_box_get_active (combo_box);
 	Example *example = examples->pdata[i];
 
 	if (example->filename) {
@@ -180,14 +180,14 @@ print_cb (GtkWidget *widget, gpointer data)
  * overengineered
  */
 static int
-compare_examples (const void *a,
-		  const void *b)
+compare_examples (gconstpointer a,
+		  gconstpointer b)
 {
 	const Example *example_a = *(const Example *const *)a;
 	const Example *example_b = *(const Example *const *)b;
-	char *a_fold, *b_fold;
+	gchar *a_fold, *b_fold;
 	const guchar *p, *q;
-	int result = 0;
+	gint result = 0;
 
 	/* Special case "Welcome" to sort first */
 	if (!example_a->filename)
@@ -214,8 +214,8 @@ compare_examples (const void *a,
 		}
 
 		if (p_digit) {
-			int num_a = atoi ((const gchar *) p);
-			int num_b = atoi ((const gchar *) q);
+			gint num_a = atoi ((const gchar *) p);
+			gint num_b = atoi ((const gchar *) q);
 
 			if (num_a < num_b) {
 				result = -1;
@@ -232,8 +232,8 @@ compare_examples (const void *a,
 				q++;
 
 		} else {
-			int p_len = 1, q_len = 1;
-			char *p_str, *q_str;
+			gint p_len = 1, q_len = 1;
+			gchar *p_str, *q_str;
 
 			while (*(p + p_len) && !g_ascii_isdigit (*(p + p_len)))
 				p_len++;
@@ -305,14 +305,14 @@ find_examples (void)
 		example->title = g_strndup (name, strlen (name) - 5);
 
 		g_ptr_array_add (examples, example);
-		qsort (examples->pdata, examples->len, sizeof (void *), compare_examples);
+		qsort (examples->pdata, examples->len, sizeof (gpointer), compare_examples);
 	}
 
 	g_dir_close (dir);
 }
 
-int
-main (int argc, char **argv)
+gint
+main (gint argc, gchar **argv)
 {
 	GtkWidget *window;
 	GtkWidget *vbox;
@@ -320,7 +320,7 @@ main (int argc, char **argv)
 	GtkWidget *combo_box;
 	GtkWidget *swindow;
 	GtkWidget *action_button;
-	int i = 0;
+	gint i = 0;
 
 	gnome_program_init ("libgtkhtml test", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);
 
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index 9bc077e..5d42430 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -84,9 +84,9 @@ static void redraw_cb (GtkWidget *widget, gpointer data);
 static void resize_cb (GtkWidget *widget, gpointer data);
 static void select_all_cb (GtkWidget *widget, gpointer data);
 static void title_changed_cb (GtkHTML *html, const gchar *title, gpointer data);
-static void url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer data);
+static void url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data);
 static void entry_goto_url(GtkWidget *widget, gpointer data);
-static void goto_url(const char *url, int back_or_forward);
+static void goto_url(const gchar *url, gint back_or_forward);
 static void on_set_base (GtkHTML *html, const gchar *url, gpointer data);
 
 static gchar *parse_href (const gchar *s);
@@ -102,7 +102,7 @@ static GtkWidget *toolbar_back, *toolbar_forward;
 static HTMLURL *baseURL = NULL;
 
 static GList *go_list;
-static int go_position;
+static gint go_position;
 
 static gboolean slow_loading = FALSE;
 
@@ -567,7 +567,7 @@ redirect_timer_event (gpointer data) {
 }
 
 static void
-on_redirect (GtkHTML *html, const gchar *url, int delay, gpointer data) {
+on_redirect (GtkHTML *html, const gchar *url, gint delay, gpointer data) {
 	g_print("Redirecting to '%s' in %d seconds\n", url, delay);
 
 	if(redirect_timerId == 0) {
@@ -635,7 +635,7 @@ object_timeout(GtkHTMLEmbedded *eb)
 }
 
 static gboolean
-object_requested_cmd (GtkHTML *html, GtkHTMLEmbedded *eb, void *data)
+object_requested_cmd (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
 {
 	/* printf("object requested, wiaint a bit before creating it ...\n"); */
 
@@ -674,7 +674,7 @@ got_data (SoupSession *session, SoupMessage *msg, gpointer user_data)
 }
 
 static void
-url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer data)
+url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data)
 {
 	gchar *full_url = NULL;
 
@@ -685,10 +685,10 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer d
 		msg = soup_message_new (SOUP_METHOD_GET, full_url);
 		soup_session_queue_message (session, msg, got_data, handle);
 	} else if (full_url && !strncmp (full_url, "file:", 5)) {
-		char *filename = gtk_html_filename_from_uri (full_url);
+		gchar *filename = gtk_html_filename_from_uri (full_url);
 		struct stat st;
-		char *buf;
-		int fd, nread, total;
+		gchar *buf;
+		gint fd, nread, total;
 
 		fd = g_open (filename, O_RDONLY|O_BINARY, 0);
 		g_free (filename);
@@ -782,7 +782,7 @@ static void
 go_list_cb (GtkWidget *widget, gpointer data)
 {
 	go_item *item;
-	int num;
+	gint num;
 	/* Only if the item was selected, not deselected */
 	if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget))) {
 
@@ -825,9 +825,9 @@ static void remove_go_list(gpointer data, gpointer user_data) {
 }
 
 static void
-goto_url(const char *url, int back_or_forward)
+goto_url(const gchar *url, gint back_or_forward)
 {
-	int tmp, i;
+	gint tmp, i;
 	go_item *item;
 	GSList *group = NULL;
 	gchar *full_url;
@@ -987,7 +987,7 @@ exit_cb (GtkWidget *widget, gpointer data)
 static gboolean
 motion_notify_event (GtkHTML *html, GdkEventMotion *event, gpointer data)
 {
-	const char *id;
+	const gchar *id;
 	GnomeApp *app;
 
 	app = GNOME_APP (data);
@@ -1009,7 +1009,7 @@ main (gint argc, gchar *argv[])
 	GtkWidget *scrolled_window;
 
 #ifdef MEMDEBUG
-	void *p = malloc (1024);	/* to make linker happy with ccmalloc */
+	gpointer p = malloc (1024);	/* to make linker happy with ccmalloc */
 #endif
 	/* gnome_init_with_popt_table (PACKAGE, VERSION,
 	   argc, argv, options, 0, &ctx); */



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