Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: Xlib questions Message-ID: <19880826014751.5.RWS@KILLINGTON.LCS.MIT.EDU> Date: 26 Aug 88 01:47:00 GMT References: <8808241725.AA04947@penzance.cs.ucla.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 39 Date: 24 Aug 88 17:25:52 GMT From: CS.UCLA.EDU!tek@bloom-beacon.mit.edu (Ted Kim (ATW)) Which half of the timestamps are in the future? Conversly, which timestamps are in the past? Here's the relevant code from the MIT server: #define HALFMONTH ((unsigned long) 1<<31) TimeStamp ClientTimeToServerTime(c) CARD32 c; { TimeStamp ts; if (c == CurrentTime) return currentTime; ts.months = currentTime.months; ts.milliseconds = c; if (c > currentTime.milliseconds) { if (((unsigned long) c - currentTime.milliseconds) > HALFMONTH) ts.months -= 1; } else if (c < currentTime.milliseconds) { if (((unsigned long)currentTime.milliseconds - c) > HALFMONTH) ts.months += 1; } return ts; } To make things concrete, suppose I called XAllocColorCells and got 2 planes (1,2) and 2 pixels (24,28). Now suppose, I want to free all of these colors. What arguments should I use with XFreeColors to do this? The "planes" value should be the OR of the (2) planes you got from XAllocColorCells, and "pixels" should be the list of pixels.