--- ray/src/rt/x11.c 1990/03/09 09:17:30 1.13 +++ ray/src/rt/x11.c 1990/07/10 08:47:07 1.15 @@ -67,9 +67,9 @@ static GC ourgc = 0; /* our graphics context for dr static Colormap ourmap = 0; /* our color map */ -extern char *malloc(); +extern char *malloc(), *getcombuf(); -int x11_close(), x11_clear(), x11_paintr(), x11_errout(), +static int x11_close(), x11_clear(), x11_paintr(), x11_errout(), x11_getcur(), x11_comout(), x11_comin(), x11_flush(); static struct driver x11_driver = { @@ -100,12 +100,15 @@ char *name, *id; } else if (nplanes <= 12) { if (!XMatchVisualInfo(ourdisplay,ourscreen, nplanes,PseudoColor,&ourvinfo)) { - stderr_v("PseudoColor not supported\n"); + stderr_v("PseudoColor server required\n"); return(NULL); } } else if (!XMatchVisualInfo(ourdisplay,ourscreen, - nplanes,TrueColor,&ourvinfo)) { - stderr_v("TrueColor not supported\n"); + nplanes,TrueColor,&ourvinfo) && + /* kludge for DirectColor */ + !XMatchVisualInfo(ourdisplay,ourscreen, + nplanes,DirectColor,&ourvinfo)) { + stderr_v("TrueColor server required\n"); return(NULL); } ourvisual = ourvinfo.visual; @@ -225,7 +228,7 @@ int xmin, ymin, xmax, ymax; if (ncolors > 0) pixel = pixval[get_pixel(col, xnewcolr)]; - else if (ourvisual->class == TrueColor) + else if (ourvisual->class != PseudoColor) pixel = true_pixel(col); else return; @@ -248,7 +251,7 @@ static x11_comin(inp, prompt) /* read in a command line */ char *inp, *prompt; { - int x11_getc(), x11_comout(); + extern int x11_getc(); if (prompt != NULL) if (fromcombuf(inp, &x11_driver))