|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XFreeCols.c,v 11.6 87/09/11 08:03:32 toddb Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5:
6: #include "Xlibint.h"
7:
8: XFreeColors(dpy, cmap, pixels, npixels, planes)
9: register Display *dpy;
10: Colormap cmap;
11: unsigned long *pixels; /* LISTofCARD32 */
12: int npixels;
13: unsigned long planes; /* CARD32 */
14: {
15: register xFreeColorsReq *req;
16: register long nbytes;
17:
18: LockDisplay(dpy);
19: GetReq(FreeColors, req);
20: req->cmap = cmap;
21: req->planeMask = planes;
22:
23: /* on the VAX, each pixel is a 32-bit (unsigned) integer */
24: req->length += npixels;
25:
26: /* divide by 4 once; Data may be a macro and thus do it
27: multiple times if we pass it as a parameter */
28:
29: nbytes = npixels << 2;
30:
31: Data(dpy, (char *) pixels, nbytes);
32: UnlockDisplay(dpy);
33: SyncHandle();
34: }
35:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.