printf ("index %d, x %d, y %d (%d x %d)\n", idx, *ax, *ay, width, height);
PRINTF ("index %d, x %d, y %d (%d x %d)\n", idx, *ax, *ay, width, height);
xlib_rgb_alloc_scratch (int width, int height, int *ax, int *ay){  XImage *image;  int idx;  if (width >= (IMAGE_WIDTH >> 1))    {      if (height >= (IMAGE_HEIGHT >> 1))	{	  idx = xlib_rgb_alloc_scratch_image ();	  *ax = 0;	  *ay = 0;	}      else	{	  if (height + horiz_y > IMAGE_HEIGHT)	    {	      horiz_idx = xlib_rgb_alloc_scratch_image ();	      horiz_y = 0;	    }	  idx = horiz_idx;	  *ax = 0;	  *ay = horiz_y;	  horiz_y += height;	}    }  else    {      if (height >= (IMAGE_HEIGHT >> 1))	{	  if (width + vert_x > IMAGE_WIDTH)	    {	      vert_idx = xlib_rgb_alloc_scratch_image ();	      vert_x = 0;	    }	  idx = vert_idx;	  *ax = vert_x;	  *ay = 0;	  /* using 3 and -4 would be slightly more efficient on 32-bit machines	     with > 1bpp displays */	  vert_x += (width + 7) & -8;	}      else	{	  if (width + tile_x > IMAGE_WIDTH)	    {	      tile_y1 = tile_y2;	      tile_x = 0;	    }	  if (height + tile_y1 > IMAGE_HEIGHT)	    {	      tile_idx = xlib_rgb_alloc_scratch_image ();	      tile_x = 0;	      tile_y1 = 0;	      tile_y2 = 0;	    }	  if (height + tile_y1 > tile_y2)	    tile_y2 = height + tile_y1;	  idx = tile_idx;	  *ax = tile_x;	  *ay = tile_y1;	  tile_x += (width + 7) & -8;	}    }  image = static_image[idx];#ifdef VERBOSE  printf ("index %d, x %d, y %d (%d x %d)\n", idx, *ax, *ay, width, height);  sincelast++;#endif  return image;}