version 1.41, 2012/10/04 15:21:26
|
version 1.84, 2025/04/15 10:17:53
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.11 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
Copyright (C) 1989-2025 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 623 instruction_errm(struct_processus *s_eta
|
Line 623 instruction_errm(struct_processus *s_eta
|
{ |
{ |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
|
|
unsigned int registre_erreur_execution; |
int registre_erreur_execution; |
unsigned int registre_erreur_systeme; |
int registre_erreur_systeme; |
unsigned int registre_exception; |
int registre_exception; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 1018 instruction_externals(struct_processus *
|
Line 1018 instruction_externals(struct_processus *
|
{ |
{ |
logical1 ambiguite; |
logical1 ambiguite; |
|
|
unsigned long i; |
integer8 i; |
|
|
struct_liste_chainee *l_element_courant; |
struct_liste_chainee *l_element_courant; |
|
|
Line 1132 instruction_externals(struct_processus *
|
Line 1132 instruction_externals(struct_processus *
|
|
|
strcpy((unsigned char *) (*(*l_element_courant).donnee).objet, |
strcpy((unsigned char *) (*(*l_element_courant).donnee).objet, |
(*s_etat_processus).s_instructions_externes[i].nom); |
(*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 |
else |
{ |
{ |
Line 1148 instruction_externals(struct_processus *
|
Line 1158 instruction_externals(struct_processus *
|
"%s$%s", (*s_etat_processus).s_instructions_externes[i] |
"%s$%s", (*s_etat_processus).s_instructions_externes[i] |
.nom_bibliotheque, (*s_etat_processus) |
.nom_bibliotheque, (*s_etat_processus) |
.s_instructions_externes[i].nom); |
.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); |
|
} |
} |
} |
} |
} |
|
|
Line 1187 instruction_exit(struct_processus *s_eta
|
Line 1205 instruction_exit(struct_processus *s_eta
|
unsigned char *instruction_majuscule; |
unsigned char *instruction_majuscule; |
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned long niveau; |
integer8 niveau; |
|
|
void (*fonction)(); |
void (*fonction)(); |
|
|
Line 1265 instruction_exit(struct_processus *s_eta
|
Line 1283 instruction_exit(struct_processus *s_eta
|
presence_boucle = d_vrai; |
presence_boucle = d_vrai; |
drapeau_boucle_definie = 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')) |
((*l_element_pile_systeme).type_cloture == 'W')) |
{ |
{ |
presence_boucle = d_vrai; |
presence_boucle = d_vrai; |
Line 1287 instruction_exit(struct_processus *s_eta
|
Line 1305 instruction_exit(struct_processus *s_eta
|
tampon = (*s_etat_processus).instruction_courante; |
tampon = (*s_etat_processus).instruction_courante; |
niveau = 1; |
niveau = 1; |
|
|
instruction_majuscule = conversion_majuscule(""); |
instruction_majuscule = conversion_majuscule(s_etat_processus, ""); |
|
|
if (drapeau_boucle_definie == d_vrai) |
if (drapeau_boucle_definie == d_vrai) |
{ |
{ |
Line 1305 instruction_exit(struct_processus *s_eta
|
Line 1323 instruction_exit(struct_processus *s_eta
|
} |
} |
|
|
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
instruction_majuscule = conversion_majuscule( |
instruction_majuscule = conversion_majuscule(s_etat_processus, |
(*s_etat_processus).instruction_courante); |
(*s_etat_processus).instruction_courante); |
|
|
if (instruction_majuscule == NULL) |
if (instruction_majuscule == NULL) |
Line 1323 instruction_exit(struct_processus *s_eta
|
Line 1341 instruction_exit(struct_processus *s_eta
|
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
|
(strcmp(instruction_majuscule, "FORALL") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "SELECT") == 0) |
(strcmp(instruction_majuscule, "SELECT") == 0) |
|| (strcmp(instruction_majuscule, "CRITICAL") == 0) |
|| (strcmp(instruction_majuscule, "CRITICAL") == 0) |
Line 1336 instruction_exit(struct_processus *s_eta
|
Line 1355 instruction_exit(struct_processus *s_eta
|
else |
else |
{ |
{ |
if ((strcmp(instruction_majuscule, "FOR") == 0) || |
if ((strcmp(instruction_majuscule, "FOR") == 0) || |
(strcmp(instruction_majuscule, "START") |
(strcmp(instruction_majuscule, "FORALL") == 0) |
|
|| (strcmp(instruction_majuscule, "START") |
== 0)) |
== 0)) |
{ |
{ |
niveau++; |
niveau++; |
Line 1431 instruction_exit(struct_processus *s_eta
|
Line 1451 instruction_exit(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
instruction_majuscule = conversion_majuscule( |
instruction_majuscule = conversion_majuscule(s_etat_processus, |
(*s_etat_processus).instruction_courante); |
(*s_etat_processus).instruction_courante); |
|
|
if (instruction_majuscule == NULL) |
if (instruction_majuscule == NULL) |
Line 1449 instruction_exit(struct_processus *s_eta
|
Line 1469 instruction_exit(struct_processus *s_eta
|
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
|
(strcmp(instruction_majuscule, "FORALL") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "SELECT") == 0) |
(strcmp(instruction_majuscule, "SELECT") == 0) |
|| (strcmp(instruction_majuscule, "CRITICAL") == 0) |
|| (strcmp(instruction_majuscule, "CRITICAL") == 0) |
Line 1461 instruction_exit(struct_processus *s_eta
|
Line 1482 instruction_exit(struct_processus *s_eta
|
} |
} |
else |
else |
{ |
{ |
if ((strcmp(instruction_majuscule, "DO") == 0) || |
empilement_pile_systeme(s_etat_processus); |
(strcmp(instruction_majuscule, "WHILE") |
|
== 0)) |
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++; |
niveau++; |
} |
} |
|
|
empilement_pile_systeme(s_etat_processus); |
|
|
|
if ((*s_etat_processus).erreur_systeme != d_es) |
if ((*s_etat_processus).erreur_systeme != d_es) |
{ |
{ |
Line 1592 instruction_exit(struct_processus *s_eta
|
Line 1619 instruction_exit(struct_processus *s_eta
|
(fonction == instruction_do) || |
(fonction == instruction_do) || |
(fonction == instruction_while) || |
(fonction == instruction_while) || |
(fonction == instruction_for) || |
(fonction == instruction_for) || |
|
(fonction == instruction_forall) || |
(fonction == instruction_start) || |
(fonction == instruction_start) || |
(fonction == instruction_select) || |
(fonction == instruction_select) || |
(fonction == instruction_case) || |
(fonction == instruction_case) || |
Line 1606 instruction_exit(struct_processus *s_eta
|
Line 1634 instruction_exit(struct_processus *s_eta
|
else |
else |
{ |
{ |
if ((fonction == instruction_for) || |
if ((fonction == instruction_for) || |
|
(fonction == instruction_forall) || |
(fonction == instruction_start)) |
(fonction == instruction_start)) |
{ |
{ |
niveau++; |
niveau++; |
Line 1715 instruction_exit(struct_processus *s_eta
|
Line 1744 instruction_exit(struct_processus *s_eta
|
(fonction == instruction_do) || |
(fonction == instruction_do) || |
(fonction == instruction_while) || |
(fonction == instruction_while) || |
(fonction == instruction_for) || |
(fonction == instruction_for) || |
|
(fonction == instruction_forall) || |
(fonction == instruction_start) || |
(fonction == instruction_start) || |
(fonction == instruction_select) || |
(fonction == instruction_select) || |
(fonction == instruction_critical) || |
(fonction == instruction_critical) || |
Line 1728 instruction_exit(struct_processus *s_eta
|
Line 1758 instruction_exit(struct_processus *s_eta
|
} |
} |
else |
else |
{ |
{ |
if ((fonction == instruction_do) || |
empilement_pile_systeme(s_etat_processus); |
(fonction == instruction_while)) |
|
|
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++; |
niveau++; |
} |
} |
|
|
empilement_pile_systeme(s_etat_processus); |
|
|
|
if ((*s_etat_processus).erreur_systeme != d_es) |
if ((*s_etat_processus).erreur_systeme != d_es) |
{ |
{ |
Line 1823 instruction_exit(struct_processus *s_eta
|
Line 1860 instruction_exit(struct_processus *s_eta
|
if ((drapeau_boucle_definie == d_vrai) && |
if ((drapeau_boucle_definie == d_vrai) && |
(drapeau_presence_fin_boucle == d_vrai)) |
(drapeau_presence_fin_boucle == d_vrai)) |
{ |
{ |
presence_compteur = ((*(*s_etat_processus).l_base_pile_systeme) |
presence_compteur = (((*(*s_etat_processus).l_base_pile_systeme) |
.type_cloture == 'F') ? d_vrai : d_faux; |
.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') |
if (((*(*s_etat_processus).l_base_pile_systeme).type_cloture != 'S') |
&& (presence_compteur == d_faux)) |
&& (presence_compteur == d_faux)) |