Annotation of 43BSDTahoe/new/X/Xlib/XGetColor.c, revision 1.1

1.1     ! root        1: #include <X/mit-copyright.h>
        !             2: 
        !             3: /* $Header: XGetColor.c,v 10.5 86/04/22 15:17:03 jg Rel $ */
        !             4: /* Copyright    Massachusetts Institute of Technology    1985  */
        !             5: 
        !             6: #include "XlibInternal.h"
        !             7: 
        !             8: Status XGetColor (name, hard_def, exact_def)
        !             9:     char *name;
        !            10:     register Color *exact_def, *hard_def;
        !            11:     {
        !            12:     register Display *dpy;
        !            13:     register XReq *req;
        !            14:     XRep rep;
        !            15:     int namelen = strlen (name);
        !            16: 
        !            17:     GetReq (X_LookupColor, 0);
        !            18:     req->params0 = namelen;
        !            19:     Data (dpy, name, namelen);
        !            20:     if (!_XReply (dpy, &rep))
        !            21:        return (0);
        !            22: 
        !            23:     exact_def->red = rep.paramu0;
        !            24:     exact_def->green = rep.paramu1;
        !            25:     exact_def->blue = rep.paramu2;
        !            26: 
        !            27:     GetReq (X_GetColor, 0);
        !            28:     hard_def->red = req->params0 = rep.paramu3;
        !            29:     hard_def->green = req->params1 = rep.paramu4;
        !            30:     hard_def->blue = req->params2 = rep.paramu5;
        !            31:     if (!_XReply (dpy, &rep))
        !            32:        return (0);
        !            33: 
        !            34:     hard_def->pixel = exact_def->pixel = rep.paramu0;
        !            35:     return (1);
        !            36:     }

unix.superglobalmegacorp.com

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