Path: utzoo!attcan!uunet!oddjob!ncar!ames!amdahl!pyramid!voder!blia!blipyramid!mao From: mao@blipyramid.BLI.COM (Mike Olson) Newsgroups: comp.windows.x Subject: Re: Mandelbrot? Summary: fix Message-ID: <68@blipyramid.BLI.COM> Date: 11 May 88 17:46:43 GMT References: <16823@cornell.UUCP> <1132@daisy.UUCP> Distribution: comp Organization: Britton Lee, Inc. Lines: 32 turner's mandelbrot set plotter for color workstations is nice. i fixed one bug in the set_colors() routine. the code had assumed that you were on screen 0 of your display. in the case of color sun workstations, this isn't true. both the monochrome and color screens are available, and are numbered, respectively, 0 and 1. context diff follows. 'man2.c' is the version i pulled off the net. 'man3.c' is the fixed version. mike olson britton lee, inc. ...!ucbvax!mtxinu!blia!mao olson@ucbvax.berkeley.edu *** man2.c Wed May 11 09:53:04 1988 --- man3.c Wed May 11 10:40:16 1988 *************** *** 128,134 int planes; int i; ! cmap = DefaultColormap(display, 0); for (ncolors = 6; ncolors >= 0; ncolors--) if (XAllocColorCells (display, cmap, 0, &planes, 0, colors, ncolors+1)) --- 128,134 ----- int planes; int i; ! cmap = DefaultColormap(display, DefaultScreen(display)); for (ncolors = 6; ncolors >= 0; ncolors--) if (XAllocColorCells (display, cmap, 0, &planes, 0, colors, ncolors+1))