summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-03-02 23:16:39 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-03-02 23:16:39 +0000
commit395ccd366abb57002d770fd905cb22dee14abc1e (patch)
treeed26427e9d56afa03ee417209a0e21ce6166f23b /glib
parent336228180258d0deb4804f33f0a2a281fe20a3d2 (diff)
downloadgdk-pixbuf-395ccd366abb57002d770fd905cb22dee14abc1e.tar.gz
Miscellaneous minor fixes to remove ANSI C incompatibilities
Mon Mar 2 17:48:38 1998 Owen Taylor <owt1@cornell.edu> Miscellaneous minor fixes to remove ANSI C incompatibilities * gdk/gdkregion.c gtk/gtkclist.c: fix // comments * gdk/gdkdnd.c gdk/gdkinputcommon.h: change types of some arguments to ANSI functions * gtk/gtkcombo.c gtk/gtktree.c: fix casts of function pointers to void * * gtk/gtkmain.c: An actual bug! (in deprecated gtk_input_add_interp) * gtk/gtknotebook.h: Bitfields must be gint or guint. (and should be guint) * gtk/gtkstatusbar.c: trailing ';' * gtk/testgtk.c: GList where there should have been GSList * glib.h gutils.c : changed g_strcasecmp to take gchar* not guchar* * testglib.c: Remove trailing ; after functions
Diffstat (limited to 'glib')
-rw-r--r--glib/ChangeLog7
-rw-r--r--glib/glib.h2
-rw-r--r--glib/gutils.c6
3 files changed, 11 insertions, 4 deletions
diff --git a/glib/ChangeLog b/glib/ChangeLog
index ee714bc9c..03a804298 100644
--- a/glib/ChangeLog
+++ b/glib/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 2 17:51:18 1998 Owen Taylor <owt1@cornell.edu>
+
+ * glib.h gutils.c : changed g_strcasecmp
+ to take gchar* not guchar*
+
+ * testglib.c: Remove trailing ; after functions
+
Sun Mar 1 19:04:40 1998 Owen Taylor <owt1@cornell.edu>
* glib.h gstring.c: Added g_string_insert[_c]()
diff --git a/glib/glib.h b/glib/glib.h
index c3728cf2b..6db8b58cd 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -660,7 +660,7 @@ gchar* g_strconcat (const gchar *string1, ...); /* NULL terminated */
gdouble g_strtod (const gchar *nptr, gchar **endptr);
gchar* g_strerror (gint errnum);
gchar* g_strsignal (gint signum);
-gint g_strcasecmp (const guchar *s1, const guchar *s2);
+gint g_strcasecmp (const gchar *s1, const gchar *s2);
gint g_snprintf (gchar *str, gulong n, gchar const *fmt, ...);
diff --git a/glib/gutils.c b/glib/gutils.c
index 9e665ba6b..2db0c13b8 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -845,7 +845,7 @@ g_snprintf (gchar *str,
}
gint
-g_strcasecmp (const guchar *s1, const guchar *s2)
+g_strcasecmp (const gchar *s1, const gchar *s2)
{
#ifdef HAVE_STRCASECMP
return strcasecmp(s1, s2);
@@ -854,12 +854,12 @@ g_strcasecmp (const guchar *s1, const guchar *s2)
while (*s1 && *s2)
{
- c1 = tolower(*s1++); c2 = tolower(*s2++);
+ c1 = tolower((guchar)(*s1++)); c2 = tolower((guchar)(*s2++));
if (c1 != c2)
return (c1 - c2);
}
- return ((gint) *s1 - (gint) *s2);
+ return (((gint)(guchar) *s1) - ((gint)(guchar) *s2));
#endif
}