--- rpl/src/instructions_e2.c 2013/07/05 08:10:08 1.51 +++ rpl/src/instructions_e2.c 2021/03/13 12:50:43 1.78 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.15 - Copyright (C) 1989-2013 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.33 + Copyright (C) 1989-2021 Dr. BERTRAND Joël This file is part of RPL/2. @@ -1132,6 +1132,16 @@ instruction_externals(struct_processus * strcpy((unsigned char *) (*(*l_element_courant).donnee).objet, (*s_etat_processus).s_instructions_externes[i].nom); + + if ((*s_etat_processus).s_instructions_externes[i].position_fleche + >= 0) + { + memcpy((unsigned char *) (*(*l_element_courant).donnee).objet + + (*s_etat_processus).s_instructions_externes[i] + .position_fleche - (strlen((*s_etat_processus) + .s_instructions_externes[i].nom_bibliotheque) + 1), + "->", 2); + } } else { @@ -1148,6 +1158,14 @@ instruction_externals(struct_processus * "%s$%s", (*s_etat_processus).s_instructions_externes[i] .nom_bibliotheque, (*s_etat_processus) .s_instructions_externes[i].nom); + + if ((*s_etat_processus).s_instructions_externes[i].position_fleche + >= 0) + { + memcpy((unsigned char *) (*(*l_element_courant).donnee).objet + + (*s_etat_processus).s_instructions_externes[i] + .position_fleche, "->", 2); + } } } @@ -1265,7 +1283,7 @@ instruction_exit(struct_processus *s_eta presence_boucle = d_vrai; drapeau_boucle_definie = d_vrai; } - else if (((*l_element_pile_systeme).type_cloture == 'D') || + else if (((*l_element_pile_systeme).type_cloture == 'D') || ((*l_element_pile_systeme).type_cloture == 'W')) { presence_boucle = d_vrai; @@ -1283,11 +1301,12 @@ instruction_exit(struct_processus *s_eta if ((*s_etat_processus).mode_execution_programme == 'Y') { +uprintf("PROG\n"); drapeau_presence_fin_boucle = d_vrai; tampon = (*s_etat_processus).instruction_courante; niveau = 1; - instruction_majuscule = conversion_majuscule(""); + instruction_majuscule = conversion_majuscule(s_etat_processus, ""); if (drapeau_boucle_definie == d_vrai) { @@ -1305,8 +1324,9 @@ instruction_exit(struct_processus *s_eta } (*s_etat_processus).erreur_systeme = d_es; - instruction_majuscule = conversion_majuscule( + instruction_majuscule = conversion_majuscule(s_etat_processus, (*s_etat_processus).instruction_courante); +uprintf("%s\n", instruction_majuscule); if (instruction_majuscule == NULL) { @@ -1433,7 +1453,7 @@ instruction_exit(struct_processus *s_eta return; } - instruction_majuscule = conversion_majuscule( + instruction_majuscule = conversion_majuscule(s_etat_processus, (*s_etat_processus).instruction_courante); if (instruction_majuscule == NULL) @@ -1464,14 +1484,20 @@ instruction_exit(struct_processus *s_eta } else { - if ((strcmp(instruction_majuscule, "DO") == 0) || - (strcmp(instruction_majuscule, "WHILE") - == 0)) + empilement_pile_systeme(s_etat_processus); + + if (strcmp(instruction_majuscule, "DO") == 0) { + (*(*s_etat_processus).l_base_pile_systeme) + .type_cloture = 'D'; + niveau++; + } + else if (strcmp(instruction_majuscule, "WHILE") == 0) + { + (*(*s_etat_processus).l_base_pile_systeme) + .type_cloture = 'W'; niveau++; } - - empilement_pile_systeme(s_etat_processus); if ((*s_etat_processus).erreur_systeme != d_es) { @@ -1734,13 +1760,20 @@ instruction_exit(struct_processus *s_eta } else { - if ((fonction == instruction_do) || - (fonction == instruction_while)) + empilement_pile_systeme(s_etat_processus); + + if (fonction == instruction_while) { + (*(*s_etat_processus).l_base_pile_systeme) + .type_cloture = 'W'; + niveau++; + } + else if (fonction == instruction_do) + { + (*(*s_etat_processus).l_base_pile_systeme) + .type_cloture = 'D'; niveau++; } - - empilement_pile_systeme(s_etat_processus); if ((*s_etat_processus).erreur_systeme != d_es) {