1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
55 |
|
char *dispname = NULL; /* our display name */ |
56 |
|
|
57 |
|
Window wind = 0; /* our output window */ |
58 |
< |
unsigned long ourblack=1, ourwhite=0; /* black and white for this visual */ |
58 |
> |
unsigned long ourblack=0, ourwhite=1; /* black and white for this visual */ |
59 |
|
Font fontid; /* our font */ |
60 |
|
|
61 |
|
int maxcolors = 0; /* maximum colors */ |
240 |
|
CWBackPixel|CWBorderPixel|CWColormap, &ourwinattr); |
241 |
|
if (wind == 0) |
242 |
|
quiterr("cannot create window"); |
243 |
+ |
XFreeColormap(thedisplay, ourwinattr.colormap); |
244 |
|
width = xmax; |
245 |
|
height = ymax; |
246 |
|
ourgc = XCreateGC(thedisplay, wind, 0, 0); |
428 |
|
} else if (ourvis.class == PseudoColor) { |
429 |
|
ourblack = BlackPixel(thedisplay,ourscreen); |
430 |
|
ourwhite = WhitePixel(thedisplay,ourscreen); |
431 |
+ |
if ((ourblack|ourwhite) & ~255L) { |
432 |
+ |
ourblack = 0; |
433 |
+ |
ourwhite = 1; |
434 |
+ |
} |
435 |
|
} else { |
436 |
|
ourblack = 0; |
437 |
< |
ourwhite = ~0; |
437 |
> |
ourwhite = ourvis.red_mask|ourvis.green_mask|ourvis.blue_mask; |
438 |
|
} |
439 |
|
XFree((char *)xvi); |
440 |
|
} |