HexEdit/CompareView.cpp
int CCompareView::pos_hex(int pos, int inside) const
{
	int col = pos - addr_width_*phev_->text_width_;
	col -= (col/(phev_->text_width_*(phev_->group_by_*3+1)))*phev_->text_width_;
	col = col/(3*phev_->text_width_);

	// Make sure col is within valid range
	if (col < 0) col = 0;
	else if (inside == 1 && col >= phev_->rowsize_) col = phev_->rowsize_ - 1;
	else if (inside == 0 && col > phev_->rowsize_) col = phev_->rowsize_;

	return col;
}
// These are like the CHexEditView versions (pos_hex and pos_char)
// but are duplicated here as we have our own addr_width_ member.

These are like the CHexEditView versions (pos_hex and pos_char)
but are duplicated here as we have our own addr_width_ member.
These are like the CHexEditView versions ( pos_hex and pos_char ) but are duplicated here as we have our own addr_width_ member .
int CCompareView::pos_hex(int pos, int inside) const
{
	int col = pos - addr_width_*phev_->text_width_;
	col -= (col/(phev_->text_width_*(phev_->group_by_*3+1)))*phev_->text_width_;
	col = col/(3*phev_->text_width_);
	if (col < 0) col = 0;
	else if (inside == 1 && col >= phev_->rowsize_) col = phev_->rowsize_ - 1;
	else if (inside == 0 && col > phev_->rowsize_) col = phev_->rowsize_;
	return col;
}
int CCompareView :: pos_hex ( int pos , int inside ) const { int col = pos - addr_width_ * phev_ -> text_width_ ; col -= ( col / ( phev_ -> text_width_ * ( phev_ -> group_by_ * 3 + 1 ) ) ) * phev_ -> text_width_ ; col = col / ( 3 * phev_ -> text_width_ ) ; if ( col < 0 ) col = 0 ; else if ( inside == 1 && col >= phev_ -> rowsize_ ) col = phev_ -> rowsize_ - 1 ; else if ( inside == 0 && col > phev_ -> rowsize_ ) col = phev_ -> rowsize_ ; return col ; }
These are like the CHexEditView versions (pos_hex and pos_char)
but are duplicated here as we have our own addr_width_ member.
These are like the CHexEditView versions ( pos_hex and pos_char ) but are duplicated here as we have our own addr_width_ member .
// Make sure col is within valid range
