Annotation of researchv9/X11/src/X.V11R1/lib/X/XPutBEvent.c, revision 1.1

1.1     ! root        1: #include "copyright.h"
        !             2: 
        !             3: /* Copyright   Massachusetts Institute of Technology  1986 */
        !             4: /* $Header: XPutBEvent.c,v 11.8 87/09/11 08:05:41 toddb Exp $ */
        !             5: /* XPutBackEvent puts an event back at the head of the queue. */
        !             6: #define NEED_EVENTS
        !             7: #include "Xlibint.h"
        !             8: 
        !             9: extern _XQEvent *_qfree;
        !            10: 
        !            11: XPutBackEvent (dpy, event)
        !            12:        register Display *dpy;
        !            13:        register XEvent *event;
        !            14:        {
        !            15:        register _XQEvent *qelt;
        !            16: 
        !            17:        LockDisplay(dpy);
        !            18:        if (!_qfree) {
        !            19:            _qfree = (_XQEvent *) Xmalloc (sizeof (_XQEvent));
        !            20:            _qfree->next = NULL;
        !            21:            }
        !            22:        qelt = _qfree;
        !            23:        _qfree = qelt->next;
        !            24:        qelt->next = dpy->head;
        !            25:        qelt->event = *event;
        !            26:        dpy->head = qelt;
        !            27:        if (dpy->tail == NULL)
        !            28:            dpy->tail = qelt;
        !            29:        dpy->qlen++;
        !            30:        UnlockDisplay(dpy);
        !            31:        }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.