Annotation of 43BSDTahoe/new/X/Xlib/XCreateWinBat.c, revision 1.1.1.1

1.1       root        1: #include <X/mit-copyright.h>
                      2: 
                      3: /* $Header: XCreateWinBat.c,v 10.5 86/04/22 15:26:22 jg Rel $ */
                      4: /* Copyright    Massachusetts Institute of Technology    1985  */
                      5: 
                      6: #include "XlibInternal.h"
                      7: 
                      8: int XCreateWindowBatch(defs, ndefs)
                      9:        BatchFrame defs[];
                     10:        int ndefs;
                     11: {
                     12:        register Display *dpy;
                     13:        register int i;
                     14:        register BatchFrame *frame = defs;
                     15:        int nresult = 0;
                     16: 
                     17:        /*
                     18:         * Issue requests.
                     19:         */
                     20:        for (i=0; i < ndefs; i++) {
                     21:            register XReq *req;
                     22:            if (frame->type == IsOpaque) {
                     23:                GetReq(X_CreateWindow, frame->parent);
                     24:                req->params0 = frame->height;
                     25:                req->params1 = frame->width;
                     26:                req->params2 = frame->x;
                     27:                req->params3 = frame->y;
                     28:                req->param.l[2] = frame->border;
                     29:                req->param.l[3] = frame->background;
                     30:                req->func = (frame++)->bdrwidth;
                     31:            }
                     32:            else {
                     33:                GetReq(X_CreateTransparency, frame->parent);
                     34:                req->params0 = frame->height;
                     35:                req->params1 = frame->width;
                     36:                req->params2 = frame->x;
                     37:                req->params3 = (frame++)->y;
                     38:            }
                     39:        }
                     40:        
                     41:        /*
                     42:         * Reset request number to its old value, so that
                     43:         * error packets are processed correctly.
                     44:         */
                     45:        dpy->request -= ndefs;
                     46: 
                     47:        /*
                     48:         * Retrieve replies.
                     49:         */
                     50:        frame = defs;
                     51:        for (i=0;i<ndefs;i++) {
                     52:            XRep rep;
                     53:            /*
                     54:             * Increment request number so error packets
                     55:             * are processed correctly.
                     56:             */
                     57:            dpy->request++;
                     58:            if (!_XReply(dpy, &rep)) (frame++)->self = NULL;
                     59:            else {
                     60:                (frame++)->self = rep.param.l[0];
                     61:                nresult++;
                     62:            }
                     63:        }
                     64:        return (nresult);
                     65: }
                     66: 

unix.superglobalmegacorp.com

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