version 1.8, 2010/04/07 13:45:00
|
version 1.55, 2011/09/20 08:56:23
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.14 |
RPL/2 (R) version 4.1.3 |
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 35
|
Line 35
|
================================================================================ |
================================================================================ |
*/ |
*/ |
|
|
|
|
static void |
static void |
creation_instruction(struct_processus *s_etat_processus, |
creation_instruction(struct_processus *s_etat_processus, |
unsigned char *instruction, void (*routine)()) |
unsigned char *instruction, void (*routine)()) |
Line 46 creation_instruction(struct_processus *s
|
Line 45 creation_instruction(struct_processus *s
|
|
|
unsigned char *ptr; |
unsigned char *ptr; |
|
|
|
BUG(strlen(instruction) >= d_longueur_maximale_instruction, |
|
printf("%s -> %d >= %d\n", instruction, (int) strlen(instruction), |
|
d_longueur_maximale_instruction)); |
|
|
if ((*s_etat_processus).arbre_instructions == NULL) |
if ((*s_etat_processus).arbre_instructions == NULL) |
{ |
{ |
if (((*s_etat_processus).arbre_instructions = |
if (((*s_etat_processus).arbre_instructions = |
Line 57 creation_instruction(struct_processus *s
|
Line 60 creation_instruction(struct_processus *s
|
|
|
(*(*s_etat_processus).arbre_instructions).feuille = NULL; |
(*(*s_etat_processus).arbre_instructions).feuille = NULL; |
|
|
if (((*(*s_etat_processus).arbre_instructions).noeud = |
if (((*(*s_etat_processus).arbre_instructions).noeuds = |
malloc((*s_etat_processus).nombre_caracteres |
malloc((*s_etat_processus).nombre_caracteres |
* sizeof(struct_instruction))) == NULL) |
* sizeof(struct_instruction))) == NULL) |
{ |
{ |
Line 67 creation_instruction(struct_processus *s
|
Line 70 creation_instruction(struct_processus *s
|
|
|
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
{ |
{ |
(*(*s_etat_processus).arbre_instructions).noeud[i] = NULL; |
(*(*s_etat_processus).arbre_instructions).noeuds[i] = NULL; |
} |
} |
} |
} |
|
|
Line 80 creation_instruction(struct_processus *s
|
Line 83 creation_instruction(struct_processus *s
|
printf("Instruction=\"%s\", (*ptr)='%c'\n", |
printf("Instruction=\"%s\", (*ptr)='%c'\n", |
instruction, *ptr)); |
instruction, *ptr)); |
|
|
if ((*l_instruction_courante).noeud[(*s_etat_processus) |
if ((*l_instruction_courante).noeuds[(*s_etat_processus) |
.pointeurs_caracteres[*ptr]] == NULL) |
.pointeurs_caracteres[*ptr]] == NULL) |
{ |
{ |
// Le noeud suivant n'existe pas, on le crée. |
// Le noeud suivant n'existe pas, on le crée. |
|
|
if (((*l_instruction_courante).noeud[(*s_etat_processus) |
if (((*l_instruction_courante).noeuds[(*s_etat_processus) |
.pointeurs_caracteres[*ptr]] = |
.pointeurs_caracteres[*ptr]] = |
malloc(sizeof(struct_instruction))) == NULL) |
malloc(sizeof(struct_instruction))) == NULL) |
{ |
{ |
Line 93 creation_instruction(struct_processus *s
|
Line 96 creation_instruction(struct_processus *s
|
return; |
return; |
} |
} |
|
|
(*(*l_instruction_courante).noeud[(*s_etat_processus) |
(*(*l_instruction_courante).noeuds[(*s_etat_processus) |
.pointeurs_caracteres[*ptr]]).feuille = NULL; |
.pointeurs_caracteres[*ptr]]).feuille = NULL; |
|
|
if (((*(*l_instruction_courante).noeud[(*s_etat_processus) |
if (((*(*l_instruction_courante).noeuds[(*s_etat_processus) |
.pointeurs_caracteres[*ptr]]).noeud = |
.pointeurs_caracteres[*ptr]]).noeuds = |
malloc((*s_etat_processus).nombre_caracteres |
malloc((*s_etat_processus).nombre_caracteres |
* sizeof(struct_instruction))) == NULL) |
* sizeof(struct_instruction))) == NULL) |
{ |
{ |
Line 107 creation_instruction(struct_processus *s
|
Line 110 creation_instruction(struct_processus *s
|
|
|
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
{ |
{ |
(*(*l_instruction_courante).noeud[(*s_etat_processus) |
(*(*l_instruction_courante).noeuds[(*s_etat_processus) |
.pointeurs_caracteres[*ptr]]).noeud[i] = NULL; |
.pointeurs_caracteres[*ptr]]).noeuds[i] = NULL; |
} |
} |
} |
} |
|
|
l_instruction_courante = (*l_instruction_courante).noeud |
l_instruction_courante = (*l_instruction_courante).noeuds |
[(*s_etat_processus).pointeurs_caracteres[*ptr]]; |
[(*s_etat_processus).pointeurs_caracteres[*ptr]]; |
ptr++; |
ptr++; |
} |
} |
Line 134 liberation_arbre_instructions(struct_pro
|
Line 137 liberation_arbre_instructions(struct_pro
|
|
|
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
for(i = 0; i < (*s_etat_processus).nombre_caracteres; i++) |
{ |
{ |
if ((*arbre).noeud[i] != NULL) |
if ((*arbre).noeuds[i] != NULL) |
{ |
{ |
liberation_arbre_instructions(s_etat_processus, (*arbre).noeud[i]); |
liberation_arbre_instructions(s_etat_processus, (*arbre).noeuds[i]); |
} |
} |
} |
} |
|
|
free((*arbre).noeud); |
free((*arbre).noeuds); |
free(arbre); |
free(arbre); |
|
|
return; |
return; |
Line 455 initialisation_instructions(struct_proce
|
Line 458 initialisation_instructions(struct_proce
|
INSTRUCTION("INCR", instruction_incr); |
INSTRUCTION("INCR", instruction_incr); |
//INSTRUCTION("ISOL"); |
//INSTRUCTION("ISOL"); |
INSTRUCTION("ISWI", instruction_iswi); |
INSTRUCTION("ISWI", instruction_iswi); |
|
# ifndef OS2 |
INSTRUCTION("KILL", instruction_kill); |
INSTRUCTION("KILL", instruction_kill); |
|
# endif |
INSTRUCTION("KIND", instruction_kind); |
INSTRUCTION("KIND", instruction_kind); |
INSTRUCTION("LAST", instruction_last); |
INSTRUCTION("LAST", instruction_last); |
INSTRUCTION("LEGV", instruction_legv); |
INSTRUCTION("LEGV", instruction_legv); |
INSTRUCTION("LINE", instruction_line); |
INSTRUCTION("LINE", instruction_line); |
INSTRUCTION("LNP1", instruction_lnp1); |
INSTRUCTION("LNP1", instruction_lnp1); |
INSTRUCTION("LOCK", instruction_lock); |
INSTRUCTION("LOCK", instruction_lock); |
|
INSTRUCTION("L->T", instruction_l_vers_t); |
INSTRUCTION("MANT", instruction_mant); |
INSTRUCTION("MANT", instruction_mant); |
INSTRUCTION("MARK", instruction_mark); |
INSTRUCTION("MARK", instruction_mark); |
//INSTRUCTION("MAXR") |
//INSTRUCTION("MAXR") |
Line 482 initialisation_instructions(struct_proce
|
Line 488 initialisation_instructions(struct_proce
|
INSTRUCTION("PLOT", instruction_plot); |
INSTRUCTION("PLOT", instruction_plot); |
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMIN", instruction_pmin); |
INSTRUCTION("PMIN", instruction_pmin); |
|
# ifndef OS2 |
INSTRUCTION("POKE", instruction_poke); |
INSTRUCTION("POKE", instruction_poke); |
|
# endif |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRST", instruction_prst); |
INSTRUCTION("PRST", instruction_prst); |
Line 536 initialisation_instructions(struct_proce
|
Line 544 initialisation_instructions(struct_proce
|
INSTRUCTION("SPAR", instruction_spar); |
INSTRUCTION("SPAR", instruction_spar); |
INSTRUCTION("SQRT", instruction_sqrt); |
INSTRUCTION("SQRT", instruction_sqrt); |
//INSTRUCTION("SRAD"); |
//INSTRUCTION("SRAD"); |
|
INSTRUCTION("SREV", instruction_srev); |
//INSTRUCTION("SRNM") |
//INSTRUCTION("SRNM") |
//Instruction HP48 (renvoie la norme spectrale d'un tableau. Pour une |
//Instruction HP48 (renvoie la norme spectrale d'un tableau. Pour une |
//matrice, |
//matrice, |
Line 548 initialisation_instructions(struct_proce
|
Line 557 initialisation_instructions(struct_proce
|
INSTRUCTION("STO-", instruction_sto_moins); |
INSTRUCTION("STO-", instruction_sto_moins); |
INSTRUCTION("STO/", instruction_sto_division); |
INSTRUCTION("STO/", instruction_sto_division); |
INSTRUCTION("STOF", instruction_stof); |
INSTRUCTION("STOF", instruction_stof); |
|
# ifndef OS2 |
INSTRUCTION("STOP", instruction_stop); |
INSTRUCTION("STOP", instruction_stop); |
|
# endif |
INSTRUCTION("STOS", instruction_stos); |
INSTRUCTION("STOS", instruction_stos); |
INSTRUCTION("STWS", instruction_stws); |
INSTRUCTION("STWS", instruction_stws); |
INSTRUCTION("SWAP", instruction_swap); |
INSTRUCTION("SWAP", instruction_swap); |
Line 561 initialisation_instructions(struct_proce
|
Line 572 initialisation_instructions(struct_proce
|
INSTRUCTION("TRNC", instruction_trnc); |
INSTRUCTION("TRNC", instruction_trnc); |
INSTRUCTION("TRUE", instruction_true); |
INSTRUCTION("TRUE", instruction_true); |
INSTRUCTION("TYPE", instruction_type); |
INSTRUCTION("TYPE", instruction_type); |
|
INSTRUCTION("T->L", instruction_t_vers_l); |
INSTRUCTION("UTPC", instruction_utpc); |
INSTRUCTION("UTPC", instruction_utpc); |
INSTRUCTION("UTPF", instruction_utpf); |
INSTRUCTION("UTPF", instruction_utpf); |
INSTRUCTION("UTPN", instruction_utpn); |
INSTRUCTION("UTPN", instruction_utpn); |
Line 641 initialisation_instructions(struct_proce
|
Line 653 initialisation_instructions(struct_proce
|
INSTRUCTION("LCASE", instruction_lcase); |
INSTRUCTION("LCASE", instruction_lcase); |
INSTRUCTION("LCHOL", instruction_lchol); |
INSTRUCTION("LCHOL", instruction_lchol); |
INSTRUCTION("LCD->", instruction_lcd_fleche); |
INSTRUCTION("LCD->", instruction_lcd_fleche); |
|
INSTRUCTION("LIMIT", instruction_limit); |
//INSTRUCTION("NDIST") |
//INSTRUCTION("NDIST") |
//Instruction HP48 (distribution normale, prend la moyenne au niveau 3, |
//Instruction HP48 (distribution normale, prend la moyenne au niveau 3, |
//la variance au niveau 2, un réel x au niveau 1 et renvoie la probabilité |
//la variance au niveau 2, un réel x au niveau 1 et renvoie la probabilité |
Line 681 initialisation_instructions(struct_proce
|
Line 694 initialisation_instructions(struct_proce
|
INSTRUCTION("SLICE", instruction_slice); |
INSTRUCTION("SLICE", instruction_slice); |
//INSTRUCTION("SLIST") |
//INSTRUCTION("SLIST") |
//Instruction HP48 (somme des termes d'une liste) |
//Instruction HP48 (somme des termes d'une liste) |
|
# ifndef OS2 |
INSTRUCTION("SPAWN", instruction_spawn); |
INSTRUCTION("SPAWN", instruction_spawn); |
|
# endif |
INSTRUCTION("START", instruction_start); |
INSTRUCTION("START", instruction_start); |
INSTRUCTION("STORE", instruction_store); |
INSTRUCTION("STORE", instruction_store); |
INSTRUCTION("STR->", instruction_str_fleche); |
INSTRUCTION("STR->", instruction_str_fleche); |
Line 710 initialisation_instructions(struct_proce
|
Line 725 initialisation_instructions(struct_proce
|
|
|
INSTRUCTION("APPEND", instruction_append); |
INSTRUCTION("APPEND", instruction_append); |
INSTRUCTION("ARRY->", instruction_array_fleche); |
INSTRUCTION("ARRY->", instruction_array_fleche); |
|
INSTRUCTION("ATEXIT", instruction_atexit); |
|
INSTRUCTION("ATPOKE", instruction_atpoke); |
INSTRUCTION("BESSEL", instruction_bessel); |
INSTRUCTION("BESSEL", instruction_bessel); |
INSTRUCTION("CLRERR", instruction_clrerr); |
INSTRUCTION("CLRERR", instruction_clrerr); |
INSTRUCTION("CLRMTX", instruction_clrmtx); |
INSTRUCTION("CLRMTX", instruction_clrmtx); |
INSTRUCTION("CLRSWI", instruction_clrswi); |
INSTRUCTION("CLRSWI", instruction_clrswi); |
INSTRUCTION("CREATE", instruction_create); |
INSTRUCTION("CREATE", instruction_create); |
INSTRUCTION("DELETE", instruction_delete); |
INSTRUCTION("DELETE", instruction_delete); |
|
# ifndef OS2 |
INSTRUCTION("DETACH", instruction_detach); |
INSTRUCTION("DETACH", instruction_detach); |
|
# endif |
INSTRUCTION("DIAG->", instruction_diag_fleche); |
INSTRUCTION("DIAG->", instruction_diag_fleche); |
//INSTRUCTION("DOLIST") |
//INSTRUCTION("DOLIST") |
//Instruction HP48 (application d'une fonction à une liste) |
//Instruction HP48 (application d'une fonction à une liste) |
Line 736 initialisation_instructions(struct_proce
|
Line 755 initialisation_instructions(struct_proce
|
INSTRUCTION("LOGGER", instruction_logger); |
INSTRUCTION("LOGGER", instruction_logger); |
INSTRUCTION("MCLRIN", instruction_mclrin); |
INSTRUCTION("MCLRIN", instruction_mclrin); |
INSTRUCTION("NRPROC", instruction_nrproc); |
INSTRUCTION("NRPROC", instruction_nrproc); |
|
INSTRUCTION("PROCID", instruction_procid); |
INSTRUCTION("PROMPT", instruction_prompt); |
INSTRUCTION("PROMPT", instruction_prompt); |
INSTRUCTION("RCLSWI", instruction_rclswi); |
INSTRUCTION("RCLSWI", instruction_rclswi); |
INSTRUCTION("RECALL", instruction_recall); |
INSTRUCTION("RECALL", instruction_recall); |
Line 788 initialisation_instructions(struct_proce
|
Line 808 initialisation_instructions(struct_proce
|
//f(x,y)=fnct complexe évaluée sur la grille (x,y) et affichée comme une |
//f(x,y)=fnct complexe évaluée sur la grille (x,y) et affichée comme une |
//fonction paramétrique. |
//fonction paramétrique. |
INSTRUCTION("INQUIRE", instruction_inquire); |
INSTRUCTION("INQUIRE", instruction_inquire); |
|
INSTRUCTION("MEMLOCK", instruction_memlock); |
INSTRUCTION("MTXLOCK", instruction_mtxlock); |
INSTRUCTION("MTXLOCK", instruction_mtxlock); |
INSTRUCTION("PERSIST", instruction_persist); |
INSTRUCTION("PERSIST", instruction_persist); |
INSTRUCTION("PLOTTER", instruction_plotter); |
INSTRUCTION("PLOTTER", instruction_plotter); |
Line 808 initialisation_instructions(struct_proce
|
Line 829 initialisation_instructions(struct_proce
|
|
|
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
|
# ifndef OS2 |
INSTRUCTION("CONTINUE", instruction_continue); |
INSTRUCTION("CONTINUE", instruction_continue); |
|
# endif |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
|
INSTRUCTION("INFINITY", instruction_sensible_infinity); |
INSTRUCTION("KEYLABEL", instruction_keylabel); |
INSTRUCTION("KEYLABEL", instruction_keylabel); |
INSTRUCTION("KEYTITLE", instruction_keytitle); |
INSTRUCTION("KEYTITLE", instruction_keytitle); |
INSTRUCTION("LOGSCALE", instruction_logscale); |
INSTRUCTION("LOGSCALE", instruction_logscale); |
Line 827 initialisation_instructions(struct_proce
|
Line 851 initialisation_instructions(struct_proce
|
|
|
INSTRUCTION("AUTOSCALE", instruction_autoscale); |
INSTRUCTION("AUTOSCALE", instruction_autoscale); |
INSTRUCTION("BACKSPACE", instruction_backspace); |
INSTRUCTION("BACKSPACE", instruction_backspace); |
|
INSTRUCTION("BACKTRACE", instruction_backtrace); |
|
INSTRUCTION("CLRATEXIT", instruction_clratexit); |
|
INSTRUCTION("CLRATPOKE", instruction_clratpoke); |
INSTRUCTION("COPYRIGHT", instruction_copyright); |
INSTRUCTION("COPYRIGHT", instruction_copyright); |
//INSTRUCTION("CYLINDRIC"); |
//INSTRUCTION("CYLINDRIC"); |
INSTRUCTION("DAEMONIZE", instruction_daemonize); |
INSTRUCTION("DAEMONIZE", instruction_daemonize); |
INSTRUCTION("DROPCNTXT", instruction_dropcntxt); |
INSTRUCTION("DROPCNTXT", instruction_dropcntxt); |
INSTRUCTION("EXTERNALS", instruction_externals); |
INSTRUCTION("EXTERNALS", instruction_externals); |
INSTRUCTION("HISTOGRAM", instruction_histogram); |
INSTRUCTION("HISTOGRAM", instruction_histogram); |
|
INSTRUCTION("MEMUNLOCK", instruction_memunlock); |
INSTRUCTION("MTXSTATUS", instruction_mtxstatus); |
INSTRUCTION("MTXSTATUS", instruction_mtxstatus); |
INSTRUCTION("MTXUNLOCK", instruction_mtxunlock); |
INSTRUCTION("MTXUNLOCK", instruction_mtxunlock); |
INSTRUCTION("PARAMETER", instruction_parameter); |
INSTRUCTION("PARAMETER", instruction_parameter); |
Line 872 initialisation_instructions(struct_proce
|
Line 900 initialisation_instructions(struct_proce
|
} |
} |
|
|
|
|
inline void * |
void * |
analyse_instruction(struct_processus *s_etat_processus, unsigned char *ptr) |
analyse_instruction(struct_processus *s_etat_processus, unsigned char *ptr) |
{ |
{ |
int pointeur; |
int pointeur; |
Line 892 analyse_instruction(struct_processus *s_
|
Line 920 analyse_instruction(struct_processus *s_
|
return(NULL); |
return(NULL); |
} |
} |
|
|
if ((*l_instruction_courante).noeud[pointeur] == NULL) |
if ((*l_instruction_courante).noeuds[pointeur] == NULL) |
{ |
{ |
// Le chemin de l'instruction candidate n'existe pas. |
// Le chemin de l'instruction candidate n'existe pas. |
|
|
return(NULL); |
return(NULL); |
} |
} |
|
|
l_instruction_courante = (*l_instruction_courante).noeud[pointeur]; |
l_instruction_courante = (*l_instruction_courante).noeuds[pointeur]; |
ptr++; |
ptr++; |
|
|
if ((l_instruction_courante == NULL) && ((*ptr) != d_code_fin_chaine)) |
if ((l_instruction_courante == NULL) && ((*ptr) != d_code_fin_chaine)) |
Line 939 analyse(struct_processus *s_etat_process
|
Line 967 analyse(struct_processus *s_etat_process
|
|
|
unsigned char *position; |
unsigned char *position; |
unsigned char *bibliotheque_candidate; |
unsigned char *bibliotheque_candidate; |
unsigned char *instruction_majuscule; |
unsigned char instruction_majuscule |
|
[d_longueur_maximale_instruction]; |
unsigned char registre_instruction_valide; |
unsigned char registre_instruction_valide; |
|
|
void (*instruction)(); |
void (*instruction)(); |
Line 962 analyse(struct_processus *s_etat_process
|
Line 991 analyse(struct_processus *s_etat_process
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
if (sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
{ |
{ |
if (errno != EINTR) |
(*s_etat_processus).erreur_systeme = d_es_processus; |
{ |
return; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
if (fonction == NULL) |
if (fonction == NULL) |
{ |
{ |
if ((instruction_majuscule = conversion_majuscule( |
conversion_majuscule_limitee((*s_etat_processus).instruction_courante, |
(*s_etat_processus).instruction_courante)) == NULL) |
instruction_majuscule, d_longueur_maximale_instruction); |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
instruction = analyse_instruction(s_etat_processus, |
instruction = analyse_instruction(s_etat_processus, |
instruction_majuscule); |
instruction_majuscule); |
|
|
Line 1010 analyse(struct_processus *s_etat_process
|
Line 1031 analyse(struct_processus *s_etat_process
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
} |
} |
|
|
free(instruction_majuscule); |
|
} |
} |
else |
else |
{ |
{ |
Line 1121 analyse(struct_processus *s_etat_process
|
Line 1140 analyse(struct_processus *s_etat_process
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
|
# ifndef OS2 |
if ((*s_etat_processus).pourcentage_maximal_cpu < 100) |
if ((*s_etat_processus).pourcentage_maximal_cpu < 100) |
{ |
{ |
getrusage(RUSAGE_SELF, &usage_final); |
getrusage(RUSAGE_SELF, &usage_final); |
Line 1176 analyse(struct_processus *s_etat_process
|
Line 1196 analyse(struct_processus *s_etat_process
|
usage_initial = usage_final; |
usage_initial = usage_final; |
} |
} |
} |
} |
|
# endif |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Line 1212 analyse(struct_processus *s_etat_process
|
Line 1233 analyse(struct_processus *s_etat_process
|
((*s_etat_processus).erreur_systeme != d_es) || |
((*s_etat_processus).erreur_systeme != d_es) || |
((*s_etat_processus).exception != d_ep)) |
((*s_etat_processus).exception != d_ep)) |
{ |
{ |
if ((*s_etat_processus).instruction_derniere_erreur != NULL) |
|
{ |
|
free((*s_etat_processus).instruction_derniere_erreur); |
|
(*s_etat_processus).instruction_derniere_erreur = NULL; |
|
} |
|
|
|
(*s_etat_processus).niveau_derniere_erreur = |
(*s_etat_processus).niveau_derniere_erreur = |
(*s_etat_processus).niveau_courant; |
(*s_etat_processus).niveau_courant; |
|
|
if ((*s_etat_processus).mode_execution_programme == 'Y') |
if ((*s_etat_processus).mode_execution_programme == 'Y') |
{ |
{ |
|
if ((*s_etat_processus).instruction_derniere_erreur != NULL) |
|
{ |
|
free((*s_etat_processus).instruction_derniere_erreur); |
|
(*s_etat_processus).instruction_derniere_erreur = NULL; |
|
} |
|
|
if ((*s_etat_processus).instruction_courante == NULL) |
if ((*s_etat_processus).instruction_courante == NULL) |
{ |
{ |
if (((*s_etat_processus).instruction_derniere_erreur = |
if (((*s_etat_processus).instruction_derniere_erreur = |
Line 1254 analyse(struct_processus *s_etat_process
|
Line 1275 analyse(struct_processus *s_etat_process
|
} |
} |
else |
else |
{ |
{ |
if (((*s_etat_processus).instruction_derniere_erreur = |
if ((*s_etat_processus).objet_courant != NULL) |
formateur(s_etat_processus, 0, |
|
(*s_etat_processus).objet_courant)) == NULL) |
|
{ |
{ |
return; |
if ((*s_etat_processus).instruction_derniere_erreur != NULL) |
|
{ |
|
free((*s_etat_processus).instruction_derniere_erreur); |
|
(*s_etat_processus).instruction_derniere_erreur = NULL; |
|
} |
|
|
|
if (((*s_etat_processus).instruction_derniere_erreur = |
|
formateur(s_etat_processus, 0, |
|
(*s_etat_processus).objet_courant)) == NULL) |
|
{ |
|
return; |
|
} |
|
|
|
(*s_etat_processus).objet_courant = NULL; |
} |
} |
} |
} |
} |
} |