/*位运算,存储*/
int tl_bintree(int t){
int x = 0,a=t;
while(a!=1){
a=a/2; x++;
}
return x;
}
int ex_getState( struct EX* e,int t){
return (e->_st & t)>>tl_bintree(t);
}
void ex_enable(struct EX* e,int t){
e->_st = e->_st | t;
}
void ex_disable( struct EX* e,int t ){
e->_st = (~t)&e->_st;
}