int line, pixelsize = bpp/8;
unsigned int line; int pixelsize = bpp/8;
void copy_raw_fb(XImage *dest, int x, int y, unsigned int w, unsigned int h) {	char *src, *dst;	int line, pixelsize = bpp/8;	int bpl = wdpy_x * pixelsize;	if (clipshift) {		x += coff_x;		y += coff_y;	}	if (! raw_fb_seek) {		src = raw_fb_addr + raw_fb_offset + bpl*y + pixelsize*x;		dst = dest->data;		for (line = 0; line < h; line++) {			memcpy(dst, src, w * pixelsize);			src += bpl;			dst += dest->bytes_per_line;		}	} else{		int n, len, del, sz = w * pixelsize;		off_t off = (off_t) (raw_fb_offset + bpl*y + pixelsize*x);		lseek(raw_fb_fd, off, SEEK_SET);		dst = dest->data;		for (line = 0; line < h; line++) {			len = sz;			del = 0;			while (len > 0) {				n = read(raw_fb_fd, dst + del, len);				if (n > 0) {					del += n;					len -= n;				} else if (n == 0) {					break;				} else {					/* overkill... */					if (errno != EINTR && errno != EAGAIN) {						break;					}				}			}			if (bpl > sz) {				off = (off_t) (bpl - sz);				lseek(raw_fb_fd, off, SEEK_CUR);			}			dst += dest->bytes_per_line;		}	}}