I question the utility of having an exhaustive enum for all of the possible keypresses; I think it makes more sense to just redefine the grEvent struct to use an unsigned short instead of the enum:
Index: ft2demos-2.4.2/graph/grevents.h
===================================================================
--- ft2demos-2.4.2.orig/graph/grevents.h
+++ ft2demos-2.4.2/graph/grevents.h
@@ -106,7 +106,7 @@
typedef struct grEvent_
{
int type;
- grKey key;
+ unsigned short key;
int x, y;
} grEvent;
Tested with gcc 4.5, and this appears to work. Do you have an opinion on this?
I question the utility of having an exhaustive enum for all of the possible keypresses; I think it makes more sense to just redefine the grEvent struct to use an unsigned short instead of the enum:
Index: ft2demos- 2.4.2/graph/ grevents. h ======= ======= ======= ======= ======= ======= ======= ======= ==== 2.4.2.orig/ graph/grevents. h 2.4.2/graph/ grevents. h
=======
--- ft2demos-
+++ ft2demos-
@@ -106,7 +106,7 @@
typedef struct grEvent_
{
int type;
- grKey key;
+ unsigned short key;
int x, y;
} grEvent;
Tested with gcc 4.5, and this appears to work. Do you have an opinion on this?