rem: if (!(_varPLUTs = (DWORD *) HMalloc (bytes))) return TRUE; varPLUTsize = bytes;
add: _varPLUTs = (UBYTE *) HMalloc (total_size); varPLUTsize = total_size; } else if (total_size > varPLUTsize) { _varPLUTs = (UBYTE *) HRealloc (_varPLUTs, total_size); varPLUTsize = total_size; } if (!_varPLUTs) { varPLUTsize = 0; return TRUE;
context: SetColorMap (COLORMAPPTR map){	int start, end, bytes;	UBYTE *colors = (UBYTE*)map;	UBYTE *vp;		if (!map)		return TRUE;	start = *colors++;	end = *colors++;	if (start > end)		return TRUE;		bytes = (end - start + 1) * PLUT_BYTE_SIZE;	if (!_varPLUTs)	{		if (!(_varPLUTs = (DWORD *) HMalloc (bytes)))			return TRUE;		varPLUTsize = bytes;	}		vp = (UBYTE*)_varPLUTs + (start * PLUT_BYTE_SIZE);		memcpy (vp, colors, bytes);	//fprintf (stderr, "SetColorMap(): vp %x map %x bytes %d, start %d end %d\n", vp, map, bytes, start, end);	return TRUE;}