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

1.1     ! root        1: #include "copyright.h"
        !             2: 
        !             3: /* $Header: XChProp.c,v 11.12 87/09/11 08:01:37 toddb Exp $ */
        !             4: /* Copyright    Massachusetts Institute of Technology    1986  */
        !             5: 
        !             6: #include "Xlibint.h"
        !             7: 
        !             8: XChangeProperty (dpy, w, property, type, format, mode, data, nelements)
        !             9:     register Display *dpy;
        !            10:     Window w;
        !            11:     Atom property, type;
        !            12:     int format;  /* 8, 16, or 32 */
        !            13:     int mode;  /* PropModeReplace, PropModePrepend, PropModeAppend */
        !            14:     unsigned char *data;
        !            15:     int nelements;
        !            16:     {
        !            17:     register xChangePropertyReq *req;
        !            18:     register long nbytes = nelements;
        !            19: 
        !            20:     LockDisplay(dpy);
        !            21:     GetReq (ChangeProperty, req);
        !            22:     req->window = w;
        !            23:     req->property = property;
        !            24:     req->type = type;
        !            25:     req->format = format;
        !            26:     req->mode = mode;
        !            27:     req->nUnits = nelements;
        !            28:     
        !            29:     switch (format) {
        !            30:       case 8:
        !            31:        req->length += (nelements + 3)>>2;
        !            32:        Data (dpy, (char *)data, nbytes);
        !            33:         break;
        !            34:  
        !            35:       case 16:
        !            36:        req->length += (nelements + 1)>>1;
        !            37:        nbytes <<= 1;
        !            38:        PackData (dpy, (char *) data, nbytes);
        !            39:        break;
        !            40: 
        !            41:       case 32:
        !            42:        req->length += nelements;
        !            43:        nbytes <<= 2;
        !            44:        Data (dpy, (char *) data, nbytes);
        !            45:        break;
        !            46: 
        !            47:       default:
        !            48:         /* XXX this is an error! */ ;
        !            49:       }
        !            50: 
        !            51:     UnlockDisplay(dpy);
        !            52:     SyncHandle();
        !            53:     }
        !            54: 
        !            55: 
        !            56: 
        !            57: 
        !            58: 

unix.superglobalmegacorp.com

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