linkNode *list_search(linkList *list, void *searchParam, listMatcher cmpr) { linkNode *currentNode = list->topNode; while (currentNode != NULL) { if (cmpr(searchParam, currentNode->data)) { return currentNode; } currentNode = currentNode->next; } return NULL; }
void CPhysicsShellHolder::net_Destroy() { //remove calls CPHSriptReqGObjComparer cmpr(this); Level().ph_commander_scripts().remove_calls(&cmpr); //удалить партиклы из ParticlePlayer CParticlesPlayer::net_DestroyParticles (); inherited::net_Destroy (); b_sheduled = false; deactivate_physics_shell (); xr_delete (m_pPhysicsShell); }
void CScriptGameObject::set_fastcall(const luabind::functor<bool> &functor, const luabind::object &object) { CPHScriptGameObjectCondition* c=xr_new<CPHScriptGameObjectCondition>(object,functor,m_game_object); CPHDummiAction* a=xr_new<CPHDummiAction>(); CPHSriptReqGObjComparer cmpr(m_game_object); Level().ph_commander_scripts().remove_calls(&cmpr); Level().ph_commander_scripts().add_call(c,a); }
void main() { int i; char **a,**b; a = malloc(50*sizeof(char *)); b = malloc(50*sizeof(char *)); for(i=0;i<50;i++) { *(a+i) = malloc(8*sizeof(char)); *(b+i) = malloc(8*sizeof(char)); } read(a); read(b); if(len(a) == len(b)) { int i,j; for(i=0;i<len(a);i++) printf("%d",cmpr(*(a+i),*(b+i))); } else printf("input length dosent match"); }