visual_depth = defdepth;
vdepth = defdepth;
void set_visual(char *vstring) {	int vis, defdepth = DefaultDepth(dpy, scr);	XVisualInfo vinfo;	char *p;	if (! quiet) {		fprintf(stderr, "set_visual: %s\n", vstring);	}	if ((p = strchr(vstring, ':')) != NULL) {		visual_depth = atoi(p+1);		*p = '\0';	} else {		visual_depth = defdepth;	}	if (strcmp(vstring, "StaticGray") == 0) {		vis = StaticGray;	} else if (strcmp(vstring, "GrayScale") == 0) {		vis = GrayScale;	} else if (strcmp(vstring, "StaticColor") == 0) {		vis = StaticColor;	} else if (strcmp(vstring, "PseudoColor") == 0) {		vis = PseudoColor;	} else if (strcmp(vstring, "TrueColor") == 0) {		vis = TrueColor;	} else if (strcmp(vstring, "DirectColor") == 0) {		vis = DirectColor;	} else {		int v_in;		if (sscanf(vstring, "0x%x", &v_in) != 1) {			if (sscanf(vstring, "%d", &v_in) == 1) {				visual_id = (VisualID) v_in;				return;			}			fprintf(stderr, "bad -visual arg: %s\n", vstring);			exit(1);		}		visual_id = (VisualID) v_in;		return;	}	if (XMatchVisualInfo(dpy, scr, visual_depth, vis, &vinfo)) {		;	} else if (XMatchVisualInfo(dpy, scr, defdepth, vis, &vinfo)) {		;	} else {		fprintf(stderr, "could not find visual: %s\n", vstring);		exit(1);	}	visual_id = vinfo.visualid;}