rem: case DB_BITMAP: return (_vp->val.bitmap_val<_v->val.bitmap_val)?-1: (_vp->val.bitmap_val>_v->val.bitmap_val)?1:0;
add: case DB_BITMAP: return (_vp->val.int_val<_v->val.bitmap_val)?-1: (_vp->val.int_val>_v->val.bitmap_val)?1:0;
context: int dbt_cmp_val(dbt_val_p _vp, db_val_t* _v){	int _l, _n;	if(!_vp && !_v)		return 0;	if(!_v)		return 1;	if(!_vp)		return -1;	if(_vp->nul && _v->nul)		return 0;	if(_v->nul)		return 1;	if(_vp->nul)		return -1;		switch(VAL_TYPE(_v))	{		case DB_INT:			return (_vp->val.int_val<_v->val.int_val)?-1:					(_vp->val.int_val>_v->val.int_val)?1:0;		case DB_DOUBLE:			return (_vp->val.double_val<_v->val.double_val)?-1:					(_vp->val.double_val>_v->val.double_val)?1:0;		case DB_DATETIME:			return (_vp->val.time_val<_v->val.int_val)?-1:					(_vp->val.time_val>_v->val.int_val)?1:0;		case DB_STRING:			_l = strlen(_v->val.string_val);			_l = (_l>_vp->val.str_val.len)?_vp->val.str_val.len:_l;			_n = strncasecmp(_vp->val.str_val.s, _v->val.string_val, _l);			if(_n)				return _n;			if(_vp->val.str_val.len == strlen(_v->val.string_val))				return 0;			if(_l==_vp->val.str_val.len)				return -1;			return 1;		case DB_STR:			_l = _v->val.str_val.len;			_l = (_l>_vp->val.str_val.len)?_vp->val.str_val.len:_l;			_n = strncasecmp(_vp->val.str_val.s, _v->val.str_val.s, _l);			if(_n)				return _n;			if(_vp->val.str_val.len == _v->val.str_val.len)				return 0;			if(_l==_vp->val.str_val.len)				return -1;			return 1;		case DB_BLOB:			_l = _v->val.blob_val.len;			_l = (_l>_vp->val.str_val.len)?_vp->val.str_val.len:_l;			_n = strncasecmp(_vp->val.str_val.s, _v->val.blob_val.s, _l);			if(_n)				return _n;			if(_vp->val.str_val.len == _v->val.blob_val.len)				return 0;			if(_l==_vp->val.str_val.len)				return -1;			return 1;	        case DB_BITMAP:		        return (_vp->val.bitmap_val<_v->val.bitmap_val)?-1:				(_vp->val.bitmap_val>_v->val.bitmap_val)?1:0;			return 1;	}	return -2;}