--- rpl/src/instructions_e2.c 2013/09/06 10:30:53 1.52 +++ rpl/src/instructions_e2.c 2024/01/09 07:33:51 1.82 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.16 - Copyright (C) 1989-2013 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.35 + Copyright (C) 1989-2024 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; @@ -1287,7 +1305,7 @@ instruction_exit(struct_processus *s_eta 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,7 +1323,7 @@ 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); if (instruction_majuscule == NULL) @@ -1433,7 +1451,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 +1482,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 +1758,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) {