version 1.18, 2010/07/14 14:19:34
|
version 1.38, 2011/09/26 15:57:11
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.18 |
RPL/2 (R) version 4.1.4 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
#include "rpl.conv.h" |
#include "rpl-conv.h" |
|
|
|
|
/* |
/* |
Line 307 trace(struct_processus *s_etat_processus
|
Line 307 trace(struct_processus *s_etat_processus
|
|
|
long delta; |
long delta; |
|
|
|
struct_liste_chainee *l_variable; |
|
struct_liste_chainee *l_candidat; |
|
|
struct_liste_pile_systeme *l_element_courant; |
struct_liste_pile_systeme *l_element_courant; |
|
|
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned long p; |
|
unsigned long v; |
|
|
|
l_element_courant = (*s_etat_processus).l_base_pile_systeme; |
l_element_courant = (*s_etat_processus).l_base_pile_systeme; |
i = 0; |
i = 0; |
|
|
Line 353 trace(struct_processus *s_etat_processus
|
Line 353 trace(struct_processus *s_etat_processus
|
|
|
if ((*l_element_courant).retour_definition == 'Y') |
if ((*l_element_courant).retour_definition == 'Y') |
{ |
{ |
fprintf(flux, "RTRN "); |
fprintf(flux, "RTN "); |
|
|
if ((*l_element_courant).origine_routine_evaluation == 'Y') |
if ((*l_element_courant).origine_routine_evaluation == 'Y') |
{ |
{ |
Line 370 trace(struct_processus *s_etat_processus
|
Line 370 trace(struct_processus *s_etat_processus
|
|
|
// Calcul de la routine de départ |
// Calcul de la routine de départ |
|
|
|
l_variable = (struct_liste_chainee *) |
|
(*(*(*s_etat_processus) |
|
.l_liste_variables_par_niveau).precedent).liste; |
candidat = (*s_etat_processus) |
candidat = (*s_etat_processus) |
.longueur_definitions_chainees; |
.longueur_definitions_chainees; |
p = 0; |
l_candidat = NULL; |
|
|
|
// l_variable balaie les variables de niveau 0. |
|
|
for(v = 0; v < (*s_etat_processus).nombre_variables; v++) |
while(l_variable != NULL) |
{ |
{ |
if ((*s_etat_processus).s_liste_variables[v].niveau |
if ((*(*((struct_variable *) (*l_variable).donnee)) |
== 0) |
.objet).type == ADR) |
{ |
{ |
delta = (*l_element_courant).adresse_retour |
delta = (*l_element_courant).adresse_retour |
- (*((unsigned long *) |
- (*((unsigned long *) |
((*(*s_etat_processus) |
(*(*((struct_variable *) (*l_variable) |
.s_liste_variables[v].objet).objet))); |
.donnee)).objet).objet)); |
|
|
if ((delta > 0) && (delta < candidat)) |
if ((delta > 0) && (delta < candidat)) |
{ |
{ |
candidat = delta; |
candidat = delta; |
p = v + 1; |
l_candidat = l_variable; |
} |
} |
} |
} |
|
|
|
l_variable = (*l_variable).suivant; |
} |
} |
|
|
if (p > 0) |
if (l_candidat != NULL) |
{ |
{ |
fprintf(flux, "\n Call from %s", (*s_etat_processus) |
fprintf(flux, "\n Call from %s", |
.s_liste_variables[p - 1].nom); |
(*((struct_variable *) (*l_candidat).donnee)) |
|
.nom); |
} |
} |
else |
else |
{ |
{ |
Line 427 trace(struct_processus *s_etat_processus
|
Line 435 trace(struct_processus *s_etat_processus
|
|
|
// Calcul de la routine de départ |
// Calcul de la routine de départ |
|
|
p = 0; |
l_variable = (struct_liste_chainee *) |
|
(*(*(*s_etat_processus) |
|
.l_liste_variables_par_niveau).precedent).liste; |
|
candidat = (*s_etat_processus) |
|
.longueur_definitions_chainees; |
|
l_candidat = NULL; |
|
|
|
// l_variable balaie les variables de niveau 0. |
|
|
for(v = 0; v < (*s_etat_processus).nombre_variables; v++) |
while(l_variable != NULL) |
{ |
{ |
if ((*s_etat_processus).s_liste_variables[v].niveau |
if ( (*(*l_variable).donnee).objet == |
== 0) |
(*l_element_courant).pointeur_adresse_retour) |
{ |
{ |
if ((*s_etat_processus).s_liste_variables[v].objet |
l_candidat = l_variable; |
== (*l_element_courant) |
break; |
.pointeur_adresse_retour) |
|
{ |
|
p = v + 1; |
|
break; |
|
} |
|
} |
} |
|
|
|
l_variable = (*l_variable).suivant; |
} |
} |
|
|
if (p > 0) |
if (l_candidat != NULL) |
{ |
{ |
fprintf(flux, "\n Branch to %s", (*s_etat_processus) |
fprintf(flux, "\n Branch to %s", |
.s_liste_variables[p - 1].nom); |
(*((struct_variable *) (*l_candidat).donnee)) |
|
.nom); |
} |
} |
else |
else |
{ |
{ |