|
|
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 - metrics - downloadIndex: T X
Length: 935 (0x3a7)
Types: TextFile
Names: »XGetColor.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z«
└─⟦2109abc41⟧
└─⟦this⟧ »./X.V10R4/Xlib/XGetColor.c«
#include <X/mit-copyright.h>
/* $Header: XGetColor.c,v 10.5 86/04/22 15:17:03 jg Rel $ */
/* Copyright Massachusetts Institute of Technology 1985 */
#include "XlibInternal.h"
Status XGetColor (name, hard_def, exact_def)
char *name;
register Color *exact_def, *hard_def;
{
register Display *dpy;
register XReq *req;
XRep rep;
int namelen = strlen (name);
GetReq (X_LookupColor, 0);
req->params0 = namelen;
Data (dpy, name, namelen);
if (!_XReply (dpy, &rep))
return (0);
exact_def->red = rep.paramu0;
exact_def->green = rep.paramu1;
exact_def->blue = rep.paramu2;
GetReq (X_GetColor, 0);
hard_def->red = req->params0 = rep.paramu3;
hard_def->green = req->params1 = rep.paramu4;
hard_def->blue = req->params2 = rep.paramu5;
if (!_XReply (dpy, &rep))
return (0);
hard_def->pixel = exact_def->pixel = rep.paramu0;
return (1);
}