int x, y, off_x, off_y;
source += srcy*sline_pixels + srcx; dest += srcy*factor*dline_pixels + srcx*factor;
void Scale_point(         unsigned char *source,          // ->source pixels.         int srcx, int srcy,             // Start of rectangle within src.         int srcw, int srch,             // Dims. of rectangle.         int sline_pixels,               // Pixels (words)/line for source.         int sheight,                    // Source height.         unsigned char *dest,            // ->dest pixels.         int dline_pixels,               // Pixels (words)/line for dest.         int factor                      // Scale factor){	int x, y, off_x, off_y;	char data;	unsigned char *dest2, *source2;	srch+=srcy;	srcw+=srcx;	if (srch>sheight) srch = sheight;	if (srcw>sline_pixels) srcw = sline_pixels;	if (factor == 2) {		source += srcy*sline_pixels + srcx;		dest += (srcy*2)*dline_pixels + srcx*2;		for (y = srcy; y < srch; ++y)		{			dest2 = dest;			source2 = source;			for (x = srcx; x < srcw; ++x)			{				data = *source2++;				*dest2++ = data;				*dest2++ = data;			}			dest += dline_pixels;			dest2 = dest;			source2 = source;			for (x = srcx; x < srcw; ++x)			{				data = *source2++;				*dest2++ = data;				*dest2++ = data;			}			dest += dline_pixels;			source += sline_pixels;		}	} else {		source += srcy*sline_pixels + srcx;		dest += (srcy*factor)*dline_pixels + srcx*factor;		for (y = srcy; y < srch; ++y)		{			for (off_y = 0; off_y < factor; ++off_y)			{				dest2 = dest;				source2 = source;				for (x = srcx; x < srcw; ++x)				{					data = *source2++;					for (off_x = 0; off_x < factor; ++off_x)						*dest2++ = data;				}				dest += dline_pixels;			}			source += sline_pixels;		}	}}