{ rgb = colors[i]; j = ((rgb & 0xf00000) >> 12) | ((rgb & 0xf000) >> 8) | ((rgb & 0xf0) >> 4); #ifdef VERBOSE printf ("%d %x %x %d\n", i, j, colorcube[j]); #endif cmap->lut[i] = colorcube[j]; }
{ rgb = colors[i]; j = ((rgb & 0xf00000) >> 12) | ((rgb & 0xf000) >> 8) | ((rgb & 0xf0) >> 4); PRINTF ("%d %x %x %d\n", i, j, colorcube[j]); cmap->lut[i] = colorcube[j]; }
xlib_rgb_cmap_new (uint32 *colors, int n_colors){  XlibRgbCmap *cmap;  int i, j;  uint32 rgb;  if (n_colors < 0)    return NULL;  if (n_colors > 256)    return NULL;  cmap = malloc(sizeof(XlibRgbCmap));  memcpy (cmap->colors, colors, n_colors * sizeof(uint32));  if (image_info->bpp == 1 &&      (image_info->x_visual_info->class == PseudoColor ||       image_info->x_visual_info->class == GrayScale))    for (i = 0; i < n_colors; i++)      {	rgb = colors[i];	j = ((rgb & 0xf00000) >> 12) |		   ((rgb & 0xf000) >> 8) |		   ((rgb & 0xf0) >> 4);#ifdef VERBOSE	printf ("%d %x %x %d\n", i, j, colorcube[j]);#endif	cmap->lut[i] = colorcube[j];      }  return cmap;}