# HG changeset patch # User Richard M. Stallman # Date 766449648 0 # Node ID a3fd3d082bc4068aaec42815e8001cc71cd1e203 # Parent 45751abc406fd2198b9dbb6997f09275fc05607b entered into RCS diff -r 45751abc406f -r a3fd3d082bc4 lwlib/dispatch.c --- a/lwlib/dispatch.c Fri Apr 15 22:39:31 1994 +0000 +++ b/lwlib/dispatch.c Fri Apr 15 22:40:48 1994 +0000 @@ -30,20 +30,15 @@ #include #include "dispatch.h" -#ifdef THIS_IS_X11R4 - -#ifdef THIS_IS_X11R5 -ERROR!! only one of THIS_IS_X11R4 or THIS_IS_X11R5 must be defined. -#endif +#include +#include +#include -#else /* ! THIS_IS_X11R4 */ - -#ifndef THIS_IS_X11R5 -ERROR!! one of THIS_IS_X11R4 or THIS_IS_X11R5 must be defined. +#ifdef XlibSpecificationRelease +#if XlibSpecificationRelease >= 5 +#define HAVE_X11R5 #endif - -#endif /* ! THIS_IS_X11R4 */ - +#endif /* ## All of the code on this page was copied from the X11R5 lib/Xt/Event.c, ## but is compatible with X11R4; the code in Event.c is different, but @@ -114,7 +109,7 @@ NonMaskableMask /* MappingNotify */ }; -#ifdef THIS_IS_X11R4 +#ifndef HAVE_X11R5 static /* in R5, this is not static, so we don't need to define it at all */ EventMask _XtConvertTypeToMask (eventType) @@ -127,7 +122,7 @@ return 0; } -#endif /* R4 */ +#endif /* not HAVE_X11R5 */ /* -- _XtOnGrabList() omitted -- */ @@ -174,7 +169,7 @@ for (p=widget->core.event_table; p != NULL; p = p->next) if ((mask & p->mask) != 0 -#ifdef THIS_IS_X11R4 +#ifndef HAVE_X11R5 || (mask == 0 && p->non_filter) #endif )