#include /* $Header: XStoreColors.c,v 10.4 86/02/01 15:40:12 tony Rel $ */ /* Copyright Massachusetts Institute of Technology 1985 */ #include "XlibInternal.h" XStoreColors (ncolors, defs) int ncolors; register Color *defs; { register Display *dpy; register XReq *req; GetReq (X_StoreColors, 0); req->param.s[0] = ncolors; /* Color structure in library uses int for pixel, but protocol's ColorDef wants a short; thus, data must be copied */ { int nbytes = ncolors*sizeof(ColorDef); register int i; register ColorDef *proto_defs = (ColorDef *) malloc (nbytes); for (i=0;i