--- rpl/src/instructions_e2.c 2013/02/26 19:56:14 1.44 +++ rpl/src/instructions_e2.c 2020/01/10 11:15:45 1.76 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.12 - Copyright (C) 1989-2013 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.32 + Copyright (C) 1989-2020 Dr. BERTRAND Joël This file is part of RPL/2. @@ -623,9 +623,9 @@ instruction_errm(struct_processus *s_eta { struct_objet *s_objet_resultat; - unsigned int registre_erreur_execution; - unsigned int registre_erreur_systeme; - unsigned int registre_exception; + int registre_erreur_execution; + int registre_erreur_systeme; + int registre_exception; (*s_etat_processus).erreur_execution = d_ex; @@ -1018,7 +1018,7 @@ instruction_externals(struct_processus * { logical1 ambiguite; - unsigned long i; + integer8 i; struct_liste_chainee *l_element_courant; @@ -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); + } } } @@ -1187,7 +1205,7 @@ instruction_exit(struct_processus *s_eta unsigned char *instruction_majuscule; unsigned char *tampon; - unsigned long niveau; + integer8 niveau; void (*fonction)(); @@ -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) @@ -1323,6 +1341,7 @@ instruction_exit(struct_processus *s_eta (strcmp(instruction_majuscule, "DO") == 0) || (strcmp(instruction_majuscule, "WHILE") == 0) || (strcmp(instruction_majuscule, "FOR") == 0) || + (strcmp(instruction_majuscule, "FORALL") == 0) || (strcmp(instruction_majuscule, "START") == 0) || (strcmp(instruction_majuscule, "SELECT") == 0) || (strcmp(instruction_majuscule, "CRITICAL") == 0) @@ -1336,7 +1355,8 @@ instruction_exit(struct_processus *s_eta else { if ((strcmp(instruction_majuscule, "FOR") == 0) || - (strcmp(instruction_majuscule, "START") + (strcmp(instruction_majuscule, "FORALL") == 0) + || (strcmp(instruction_majuscule, "START") == 0)) { niveau++; @@ -1431,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) @@ -1449,6 +1469,7 @@ instruction_exit(struct_processus *s_eta (strcmp(instruction_majuscule, "DO") == 0) || (strcmp(instruction_majuscule, "WHILE") == 0) || (strcmp(instruction_majuscule, "FOR") == 0) || + (strcmp(instruction_majuscule, "FORALL") == 0) || (strcmp(instruction_majuscule, "START") == 0) || (strcmp(instruction_majuscule, "SELECT") == 0) || (strcmp(instruction_majuscule, "CRITICAL") == 0) @@ -1592,6 +1613,7 @@ instruction_exit(struct_processus *s_eta (fonction == instruction_do) || (fonction == instruction_while) || (fonction == instruction_for) || + (fonction == instruction_forall) || (fonction == instruction_start) || (fonction == instruction_select) || (fonction == instruction_case) || @@ -1606,6 +1628,7 @@ instruction_exit(struct_processus *s_eta else { if ((fonction == instruction_for) || + (fonction == instruction_forall) || (fonction == instruction_start)) { niveau++; @@ -1715,6 +1738,7 @@ instruction_exit(struct_processus *s_eta (fonction == instruction_do) || (fonction == instruction_while) || (fonction == instruction_for) || + (fonction == instruction_forall) || (fonction == instruction_start) || (fonction == instruction_select) || (fonction == instruction_critical) || @@ -1823,8 +1847,9 @@ instruction_exit(struct_processus *s_eta if ((drapeau_boucle_definie == d_vrai) && (drapeau_presence_fin_boucle == d_vrai)) { - presence_compteur = ((*(*s_etat_processus).l_base_pile_systeme) - .type_cloture == 'F') ? d_vrai : d_faux; + presence_compteur = (((*(*s_etat_processus).l_base_pile_systeme) + .type_cloture == 'F') || ((*(*s_etat_processus) + .l_base_pile_systeme).type_cloture == 'A')) ? d_vrai : d_faux; if (((*(*s_etat_processus).l_base_pile_systeme).type_cloture != 'S') && (presence_compteur == d_faux))