summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-03-17 12:05:16 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-03-17 12:05:16 +0000
commit691bea134f2fb75451eeb02cf268fc505f88d739 (patch)
tree32f1101fc63f8544a8d0d6284f7bb7b33d15da09
parent6ffbc07492dce06c7c9824297780acadac3bba79 (diff)
downloadgtk+-691bea134f2fb75451eeb02cf268fc505f88d739.tar.gz
gdk_key is a typedef, not a struct tag.
2005-03-17 Tor Lillqvist <tml@novell.com> * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.pre-2-104
-rw-r--r--ChangeLog.pre-2-84
-rw-r--r--gdk/gdkkeynames.c14
4 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index b15eeaf5c7..e792fcdb3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-17 Tor Lillqvist <tml@novell.com>
+
+ * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
+
2005-03-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprogressbar.c (gtk_progress_bar_get_ellipsize):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index b15eeaf5c7..e792fcdb3d 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,7 @@
+2005-03-17 Tor Lillqvist <tml@novell.com>
+
+ * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
+
2005-03-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprogressbar.c (gtk_progress_bar_get_ellipsize):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index b15eeaf5c7..e792fcdb3d 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,7 @@
+2005-03-17 Tor Lillqvist <tml@novell.com>
+
+ * gdk/gdkkeynames.c: gdk_key is a typedef, not a struct tag.
+
2005-03-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprogressbar.c (gtk_progress_bar_get_ellipsize):
diff --git a/gdk/gdkkeynames.c b/gdk/gdkkeynames.c
index 00dd758824..f4c5faf33a 100644
--- a/gdk/gdkkeynames.c
+++ b/gdk/gdkkeynames.c
@@ -37,19 +37,19 @@
#include "keyname-table.h"
-#define GDK_NUM_KEYS (sizeof (gdk_keys_by_keyval) / sizeof (gdk_keys_by_keyval[0]))
+#define GDK_NUM_KEYS G_N_ELEMENTS (gdk_keys_by_keyval)
static int
gdk_keys_keyval_compare (const void *pkey, const void *pbase)
{
- return (*(int *) pkey) - ((struct gdk_key *) pbase)->keyval;
+ return (*(int *) pkey) - ((gdk_key *) pbase)->keyval;
}
gchar*
gdk_keyval_name (guint keyval)
{
static gchar buf[100];
- struct gdk_key *found;
+ gdk_key *found;
/* Check for directly encoded 24-bit UCS characters: */
if ((keyval & 0xff000000) == 0x01000000)
@@ -59,7 +59,7 @@ gdk_keyval_name (guint keyval)
}
found = bsearch (&keyval, gdk_keys_by_keyval,
- GDK_NUM_KEYS, sizeof (struct gdk_key),
+ GDK_NUM_KEYS, sizeof (gdk_key),
gdk_keys_keyval_compare);
if (found != NULL)
@@ -83,18 +83,18 @@ static int
gdk_keys_name_compare (const void *pkey, const void *pbase)
{
return strcmp ((const char *) pkey,
- (const char *) (keynames + ((const struct gdk_key *) pbase)->offset));
+ (const char *) (keynames + ((const gdk_key *) pbase)->offset));
}
guint
gdk_keyval_from_name (const gchar *keyval_name)
{
- struct gdk_key *found;
+ gdk_key *found;
g_return_val_if_fail (keyval_name != NULL, 0);
found = bsearch (keyval_name, gdk_keys_by_name,
- GDK_NUM_KEYS, sizeof (struct gdk_key),
+ GDK_NUM_KEYS, sizeof (gdk_key),
gdk_keys_name_compare);
if (found != NULL)
return found->keyval;