コード例 #1
0
ファイル: rules.c プロジェクト: Albermg7/boost
RULE* new_rule_actions( module_t* m, char* rulename, char* command, LIST* bindlist, int flags )
{
    RULE* local = define_rule( m, rulename, m );
    RULE* global = global_rule( local );
    set_rule_actions( local, actions_new( command, bindlist, flags ) );
    set_rule_actions( global, local->actions );
    return local;
}
コード例 #2
0
ファイル: etat.c プロジェクト: thibaultduponchelle/nanoturing
/* Ajouter une action dans un état en spécifiant tous les paramètres */
void ajouter_une_action_dans_un_etat_long(etat_liste* el, char nom_etat, char l, char e, char s, char d) {
	int i = 0;
	int n = el->n; 
	//printf("pointeur el : 0x%x\n", el);
	//printf("pointeur el->etat : 0x%x\n", el->etat);
	//printf("el->n : 0x%x\n", el->etat);
	

	for(i = 0; el->etat[i]; i++) {
		if(el->etat[i]->nom == nom_etat) {
			//printf("etat trouve !!\n");
			//printf("n : %d\n", el->etat[i]->n);
			el->etat[i]->act = (action**) actions_new(el->etat[i]->act, el->etat[i]->n);
			remplir_action(el->etat[i]->act[el->etat[i]->n], l, e, s, d);
			//afficher_action(el->etat[i]->act[el->etat[i]->n]);
			el->etat[i]->n ++;
		}
	}
}
コード例 #3
0
ファイル: etat.c プロジェクト: thibaultduponchelle/nanoturing
/* Ajouter une action dans un état */
void ajouter_une_action_dans_un_etat(etat_liste* el, char nom_etat, action* a) {
	int i = 0;
	int n = el->n; 
	//printf("AJOUTER UNE ACTION DANS UN ETAT EFFECTIF\n");
	//printf("pointeur el : 0x%x\n", el);
	//printf("pointeur el->etat : 0x%x\n", el->etat);
	
	for(i = 0; el->etat[i]; i++) {
		//printf("i : %d\n", i);
		//printf("pointeur el->etat[i] : 0x%x\n", el->etat[i]);
		if(el->etat[i]->nom == nom_etat) {
			//printf("etat trouve !!\n");
			//printf("n : %d\n", el->etat[i]->n);
			el->etat[i]->act = (action**) actions_new(el->etat[i]->act, el->etat[i]->n);
			el->etat[i]->act[el->etat[i]->n] = a;
			//afficher_action(el->etat[i]->act[el->etat[i]->n]);
			el->etat[i]->n ++;
		}
	}
}