--- rpl/src/instructions_r3.c 2011/04/21 16:00:58 1.25 +++ rpl/src/instructions_r3.c 2011/06/10 11:35:13 1.26 @@ -741,10 +741,6 @@ instruction_rnrm(struct_processus *s_eta void instruction_rceq(struct_processus *s_etat_processus) { - logical1 presence_variable; - - long i; - struct_objet *s_objet_variable; (*s_etat_processus).erreur_execution = d_ex; @@ -787,48 +783,20 @@ instruction_rceq(struct_processus *s_eta } } - if (recherche_variable(s_etat_processus, "EQ") == d_vrai) + if (recherche_variable_globale(s_etat_processus, "EQ") == d_faux) { - i = (*s_etat_processus).position_variable_courante; - presence_variable = d_faux; - - while(i >= 0) - { - if ((strcmp((*s_etat_processus).s_liste_variables[i].nom, "EQ") - == 0) && ((*s_etat_processus).s_liste_variables[i] - .niveau == 1)) - { - presence_variable = d_vrai; - break; - } - - i--; - } - - (*s_etat_processus).position_variable_courante = i; + (*s_etat_processus).erreur_systeme = d_es; - if (presence_variable == d_faux) + if ((*s_etat_processus).erreur_execution == d_ex) { (*s_etat_processus).erreur_execution = d_ex_variable_non_definie; - return; } - if ((*s_etat_processus).s_liste_variables[i].objet == NULL) - { - (*s_etat_processus).erreur_execution = d_ex_variable_partagee; - return; - } - } - else - { - (*s_etat_processus).erreur_systeme = d_es; - (*s_etat_processus).erreur_execution = d_ex_variable_non_definie; return; } if ((s_objet_variable = copie_objet(s_etat_processus, - ((*s_etat_processus).s_liste_variables) - [(*s_etat_processus).position_variable_courante].objet, 'P')) + (*(*s_etat_processus).pointeur_variable_courante).objet, 'P')) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -1698,10 +1666,6 @@ instruction_rcws(struct_processus *s_eta void instruction_rcls(struct_processus *s_etat_processus) { - logical1 presence_variable; - - long i; - struct_objet *s_objet_variable; (*s_etat_processus).erreur_execution = d_ex; @@ -1742,48 +1706,20 @@ instruction_rcls(struct_processus *s_eta } } - if (recherche_variable(s_etat_processus, ds_sdat) == d_vrai) + if (recherche_variable_globale(s_etat_processus, ds_sdat) == d_faux) { - i = (*s_etat_processus).position_variable_courante; - presence_variable = d_faux; - - while(i >= 0) - { - if ((strcmp((*s_etat_processus).s_liste_variables[i].nom, ds_sdat) - == 0) && ((*s_etat_processus).s_liste_variables[i] - .niveau == 1)) - { - presence_variable = d_vrai; - break; - } - - i--; - } - - (*s_etat_processus).position_variable_courante = i; + (*s_etat_processus).erreur_systeme = d_es; - if (presence_variable == d_faux) + if ((*s_etat_processus).erreur_execution == d_ex) { (*s_etat_processus).erreur_execution = d_ex_variable_non_definie; - return; } - if ((*s_etat_processus).s_liste_variables[i].objet == NULL) - { - (*s_etat_processus).erreur_execution = d_ex_variable_partagee; - return; - } - } - else - { - (*s_etat_processus).erreur_systeme = d_es; - (*s_etat_processus).erreur_execution = d_ex_variable_non_definie; return; } if ((s_objet_variable = copie_objet(s_etat_processus, - ((*s_etat_processus).s_liste_variables) - [(*s_etat_processus).position_variable_courante].objet, 'O')) + (*(*s_etat_processus).pointeur_variable_courante).objet, 'O')) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;