--- rpl/src/sequenceur.c 2015/06/08 14:11:45 1.89 +++ rpl/src/sequenceur.c 2015/07/18 12:31:17 1.90 @@ -585,42 +585,42 @@ sequenceur(struct_processus *s_etat_proc -------------------------------------------------------------------------------- */ - if ((*s_etat_processus).debug == d_vrai) - if (((*s_etat_processus).type_debug & - d_debug_variables) != 0) + if (recherche_variable_partagee(s_etat_processus, + (*(*s_etat_processus) + .pointeur_variable_courante).nom, + (*(*s_etat_processus) + .pointeur_variable_courante).variable_partagee, + 'P') != NULL) { - if ((*s_etat_processus).langue == 'F') + // La variable existe. + + if ((*s_etat_processus).debug == d_vrai) + if (((*s_etat_processus).type_debug & + d_debug_variables) != 0) { - printf("[%d] Évaluation de la variable " + if ((*s_etat_processus).langue == 'F') + { + printf("[%d] Évaluation de la variable " "partagée %s de type %d\n", (int) getpid(), (*s_etat_processus) .instruction_courante, (*(*(*s_etat_processus) - .pointeur_variable_courante).objet) - .type); - } - else - { - printf("[%d] Pushing %s as %d type shared " + .pointeur_variable_partagee_courante) + .objet).type); + } + else + { + printf("[%d] Pushing %s as %d type shared " "variable\n", (int) getpid(), (*s_etat_processus) .instruction_courante, (*(*(*s_etat_processus) - .pointeur_variable_courante).objet) - .type); - } + .pointeur_variable_partagee_courante) + .objet).type); + } - fflush(stdout); - } - - if (recherche_variable_partagee(s_etat_processus, - (*(*s_etat_processus) - .pointeur_variable_courante).nom, - (*(*s_etat_processus) - .pointeur_variable_courante).variable_partagee, - 'P') != NULL) - { - // La variable existe. + fflush(stdout); + } if ((s_objet = copie_objet(s_etat_processus, (*(*s_etat_processus) @@ -653,6 +653,28 @@ sequenceur(struct_processus *s_etat_proc else { // La variable n'existe plus. + if ((*s_etat_processus).debug == d_vrai) + if (((*s_etat_processus).type_debug & + d_debug_variables) != 0) + { + if ((*s_etat_processus).langue == 'F') + { + printf("[%d] Tentative d'accès à la " + "variable partagée non définie %s\n", + (int) getpid(), (*s_etat_processus) + .instruction_courante); + } + else + { + printf("[%d] Trying to access to undefined " + "shared variable %s\n", + (int) getpid(), + (*s_etat_processus) + .instruction_courante); + } + + fflush(stdout); + } } }