[comp.windows.x] X11 fix #40, lib/X/XParseCol.c, rgb flag bits

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/30/87)

VERSION:
	X11 release 1
SYNOPSIS:
	XParseColor fails to set the flags field of the XColor structure,
	the way XQueryColor[s] does.  This caused anomalies in various
	applications, who shouldn't have to think about this.
	
FIX:
	The setting of the flags field needs to be documented in the Xlib
	manual, in addition to fixing the code.

*** /tmp/,RCSt1008039	Fri Oct 30 11:12:10 1987
--- lib/X/XParseCol.c	Fri Oct 30 11:12:00 1987
***************
*** 1,6 ****
  #include "copyright.h"
  
! /* $Header: XParseCol.c,v 11.13 87/09/11 08:05:21 toddb Exp $ */
  /* Copyright    Massachusetts Institute of Technology    1985	*/
  
  #define NEED_REPLIES
--- 1,6 ----
  #include "copyright.h"
  
! /* $Header: XParseCol.c,v 11.14 87/10/29 17:36:25 newman Exp $ */
  /* Copyright    Massachusetts Institute of Technology    1985	*/
  
  #define NEED_REPLIES
***************
*** 34,39 ****
--- 34,40 ----
  	    def->red = reply.exactRed;
  	    def->green = reply.exactGreen;
  	    def->blue = reply.exactBlue;
+ 	    def->flags = DoRed | DoGreen | DoBlue;
  	    UnlockDisplay(dpy);
  	    SyncHandle();
  	    return (1);
***************
*** 65,69 ****
--- 66,71 ----
  	def->red = r << n;
  	def->green = g << n;
  	def->blue = b << n;
+ 	def->flags = DoRed | DoGreen | DoBlue;
  	return (1);
  }