printf ("Visual 0x%x, type = %s, depth = %d, %ld:%ld:%ld%s; score=%x\n",
PRINTF ("Visual 0x%x, type = %s, depth = %d, %ld:%ld:%ld%s; score=%x\n",
xlib_rgb_score_visual (XVisualInfo *visual){  uint32 quality, speed, pseudo, sys;  static const char* visual_names[] =  {    "static gray",    "grayscale",    "static color",    "pseudo color",    "true color",    "direct color",  };      quality = 0;  speed = 1;  sys = 0;  if (visual->class == TrueColor ||      visual->class == DirectColor)    {      if (visual->depth == 24)	{	  quality = 9;	  /* Should test for MSB visual here, and set speed if so. */	}      else if (visual->depth == 16)	quality = 8;      else if (visual->depth == 15)	quality = 7;      else if (visual->depth == 8)	quality = 4;    }  else if (visual->class == PseudoColor ||	   visual->class == StaticColor)    {      if (visual->depth == 8)	quality = 4;      else if (visual->depth == 4)	quality = 2;      else if (visual->depth == 1)	quality = 1;    }  else if (visual->class == StaticGray#ifdef ENABLE_GRAYSCALE	   || visual->class == GrayScale#endif	   )    {      if (visual->depth == 8)	quality = 4;      else if (visual->depth == 4)	quality = 2;      else if (visual->depth == 1)	quality = 1;    }  if (quality == 0)    return 0;  sys = (visual->visualid == image_info->default_visualid->visualid);    pseudo = (visual->class == PseudoColor || visual->class == TrueColor);  if (xlib_rgb_verbose)    printf ("Visual 0x%x, type = %s, depth = %d, %ld:%ld:%ld%s; score=%x\n",	    (int)visual->visualid,	    visual_names[visual->class],	    visual->depth,	    visual->red_mask,	    visual->green_mask,	    visual->blue_mask,	    sys ? " (system)" : "",	    (quality << 12) | (speed << 8) | (sys << 4) | pseudo);    return (quality << 12) | (speed << 8) | (sys << 4) | pseudo;}