|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T X ┃
Length: 1082 (0x43a) Types: TextFile Names: »XChkMaskEvent.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z« └─⟦2109abc41⟧ └─ ⟦this⟧ »./X.V10R4/Xlib/XChkMaskEvent.c«
#include <X/mit-copyright.h> /* $Header: XChkMaskEvent.c,v 10.1 86/03/28 11:28:22 jg Rel $ */ /* Copyright Massachusetts Institute of Technology 1985 */ #include "XlibInternal.h" extern _QEvent *_qfree; /* * Flush output and return the next event in the queue * matching one of the events in the mask if there is one. * Return whether such an event was found. * Events earlier in the queue are not discarded. */ int XCheckMaskEvent (mask, event) int mask; /* Selected event mask. */ register XEvent *event; /* XEvent to be filled in. */ { register Display *dpy; register _QEvent *prev, *qelt; dpy = _XlibCurrentDisplay; _XFlush (dpy); for (prev = NULL, qelt = dpy->head; qelt && !(qelt->event.type & mask); qelt = (prev = qelt)->next) ; if (qelt) { *event = qelt->event; if (prev) { if ((prev->next = qelt->next) == NULL) dpy->tail = prev; } else { if ((dpy->head = qelt->next) == NULL) dpy->tail = NULL; } qelt->next = _qfree; _qfree = qelt; dpy->qlen--; return 1; } else return 0; }