Example #1
0
int callfunc(struct rule *r,struct function *f,void *dp,int type){
	int i=0;
	int fid=f->fid;	
	for(i=0;i<10;i++){
		if(!fid)
			break;
		switch (fid)
		{
		case 1:
			_addself(r,f->pt);
			break;
		case 2:
			_delself(r,f->pt);
			break;
		case 3:
			_greater(r,f->pt);
			break;
		case 4:
			_less(r,f->pt);
			break;
		case 5:
			_equal(r,f->pt);
			break;
		case 6:
			_unequal(r,f->pt);
			break;
		case FUNC_LOG:
			_log(r,f->pt);
		case FUNC_ALERT:
			_alert(r,f->pt);
		
		}
	}
}
inline bool _string<init_size, inc_bit>::operator>(const _Self & s) const
{
	size_t cmp_sz = (this->__len > s.length()) ? this->__len : s.length();

	for(size_t i = 0; i < cmp_sz; ++i)
		if(!_greater(this->__p_string[i], s[i]))
			return false;
	return true;
}//operator>(base_string)