version 1.63, 2013/02/27 17:11:44
|
version 1.115, 2020/01/10 11:15:48
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.13 |
RPL/2 (R) version 4.1.32 |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
Copyright (C) 1989-2020 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
|
#define DEBUG_ERREURS |
#include "rpl-conv.h" |
#include "rpl-conv.h" |
|
|
|
|
Line 59 instruction_swap(struct_processus *s_eta
|
Line 60 instruction_swap(struct_processus *s_eta
|
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s\n", |
" %s, %s\n", |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_SLB, d_PRC, d_MTX, d_SQL); |
d_SLB, d_PRC, d_MTX, d_SQL, d_REC); |
printf(" 1: %s, %s, %s, %s, %s, %s,\n" |
printf(" 1: %s, %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s\n", |
" %s, %s\n", |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_SLB, d_PRC, d_MTX, d_SQL); |
d_SLB, d_PRC, d_MTX, d_SQL, d_REC); |
printf("-> 2: %s, %s, %s, %s, %s, %s,\n" |
printf("-> 2: %s, %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s\n", |
" %s, %s\n", |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_SLB, d_PRC, d_MTX, d_SQL); |
d_SLB, d_PRC, d_MTX, d_SQL, d_REC); |
printf(" 1: %s, %s, %s, %s, %s, %s,\n" |
printf(" 1: %s, %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s\n", |
" %s, %s\n", |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_SLB, d_PRC, d_MTX, d_SQL); |
d_SLB, d_PRC, d_MTX, d_SQL, d_REC); |
|
|
return; |
return; |
} |
} |
Line 147 instruction_sq(struct_processus *s_etat_
|
Line 148 instruction_sq(struct_processus *s_etat_
|
struct_objet *s_objet_argument; |
struct_objet *s_objet_argument; |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
unsigned long k; |
integer8 k; |
|
|
void *accumulateur; |
void *accumulateur; |
|
|
Line 310 instruction_sq(struct_processus *s_etat_
|
Line 311 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_colonnes; |
.objet))).nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_lignes * sizeof(integer8 *))) == NULL) |
.objet))).nombre_lignes) * sizeof(integer8 *))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 323 instruction_sq(struct_processus *s_etat_
|
Line 324 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_lignes; i++) |
.objet))).nombre_lignes; i++) |
{ |
{ |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_colonnes * sizeof(integer8))) == NULL) |
.objet))).nombre_colonnes) * sizeof(integer8))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 366 instruction_sq(struct_processus *s_etat_
|
Line 367 instruction_sq(struct_processus *s_etat_
|
(*s_objet_resultat).type = MRL; |
(*s_objet_resultat).type = MRL; |
(*((struct_matrice *) (*s_objet_resultat).objet)).type = 'R'; |
(*((struct_matrice *) (*s_objet_resultat).objet)).type = 'R'; |
|
|
if ((accumulateur = malloc((*(((struct_matrice *) |
if ((accumulateur = malloc(((size_t) (*(((struct_matrice *) |
(*s_objet_argument).objet))).nombre_colonnes * |
(*s_objet_argument).objet))).nombre_colonnes) * |
sizeof(real8))) == NULL) |
sizeof(real8))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 381 instruction_sq(struct_processus *s_etat_
|
Line 382 instruction_sq(struct_processus *s_etat_
|
(*s_objet_resultat).objet)).tableau)[i]); |
(*s_objet_resultat).objet)).tableau)[i]); |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)) |
if (((*((struct_matrice *) (*s_objet_resultat).objet)) |
.tableau[i] = malloc((*(((struct_matrice *) |
.tableau[i] = malloc(((size_t) (*(((struct_matrice *) |
(*s_objet_resultat).objet))).nombre_colonnes * |
(*s_objet_resultat).objet))).nombre_colonnes) * |
sizeof(real8))) == NULL) |
sizeof(real8))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 457 instruction_sq(struct_processus *s_etat_
|
Line 458 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_colonnes; |
.objet))).nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_lignes * sizeof(real8 *))) == NULL) |
.objet))).nombre_lignes) * sizeof(real8 *))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
} |
} |
|
|
if ((accumulateur = malloc((*(((struct_matrice *) |
if ((accumulateur = malloc(((size_t) (*(((struct_matrice *) |
(*s_objet_argument).objet))).nombre_colonnes * sizeof(real8))) |
(*s_objet_argument).objet))).nombre_colonnes) * sizeof(real8))) |
== NULL) |
== NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 476 instruction_sq(struct_processus *s_etat_
|
Line 477 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_lignes; i++) |
.objet))).nombre_lignes; i++) |
{ |
{ |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_colonnes * sizeof(real8))) == NULL) |
.objet))).nombre_colonnes) * sizeof(real8))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 549 instruction_sq(struct_processus *s_etat_
|
Line 550 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_colonnes; |
.objet))).nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_lignes * sizeof(struct_complexe16 *))) == NULL) |
.objet))).nombre_lignes) * sizeof(struct_complexe16 *))) |
|
== NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
} |
} |
|
|
if ((accumulateur = malloc((*(((struct_matrice *) |
if ((accumulateur = malloc(((size_t) (*(((struct_matrice *) |
(*s_objet_argument).objet))).nombre_colonnes * |
(*s_objet_argument).objet))).nombre_colonnes) * |
sizeof(complex16))) == NULL) |
sizeof(complex16))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 568 instruction_sq(struct_processus *s_etat_
|
Line 570 instruction_sq(struct_processus *s_etat_
|
.objet))).nombre_lignes; i++) |
.objet))).nombre_lignes; i++) |
{ |
{ |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau[i] = |
malloc((*(((struct_matrice *) (*s_objet_resultat) |
malloc(((size_t) (*(((struct_matrice *) (*s_objet_resultat) |
.objet))).nombre_colonnes * sizeof(struct_complexe16))) |
.objet))).nombre_colonnes) * sizeof(struct_complexe16))) |
== NULL) |
== NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 1216 instruction_same(struct_processus *s_eta
|
Line 1218 instruction_same(struct_processus *s_eta
|
|
|
logical1 difference; |
logical1 difference; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
unsigned long nombre_elements; |
integer8 nombre_elements; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 3088 instruction_stof(struct_processus *s_eta
|
Line 3090 instruction_stof(struct_processus *s_eta
|
|
|
for(i = 1; i <= 64; i++) |
for(i = 1; i <= 64; i++) |
{ |
{ |
indice_drapeau = i - 1; |
indice_drapeau = (unsigned char) (i - 1); |
indice_bloc = indice_drapeau / taille_bloc; |
indice_bloc = indice_drapeau / taille_bloc; |
indice_bit = indice_drapeau % taille_bloc; |
indice_bit = indice_drapeau % taille_bloc; |
masque = ((t_8_bits) 1) << (taille_bloc - indice_bit - 1); |
masque = (t_8_bits) (((t_8_bits) 1) << |
|
(taille_bloc - indice_bit - 1)); |
|
|
if (((*((logical8 *) (*s_objet).objet)) & |
if (((*((logical8 *) (*s_objet).objet)) & |
((logical8) 1) << indice_drapeau) != 0) |
((logical8) 1) << indice_drapeau) != 0) |
Line 3153 instruction_sto(struct_processus *s_etat
|
Line 3156 instruction_sto(struct_processus *s_etat
|
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s, %s, %s, %s, %s,\n" |
" %s\n", |
" %s, %s\n", |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK, |
d_SLB, d_PRC, d_MTX, d_SQL); |
d_SLB, d_PRC, d_MTX, d_SQL, d_REC); |
printf(" 1: %s\n", d_NOM); |
printf(" 1: %s\n", d_NOM); |
|
|
return; |
return; |
Line 3370 instruction_sto(struct_processus *s_etat
|
Line 3373 instruction_sto(struct_processus *s_etat
|
================================================================================ |
================================================================================ |
*/ |
*/ |
|
|
|
static struct |
|
{ |
|
struct_processus *s_etat_processus; |
|
struct_liste_chainee *fd_stdin; |
|
int pipe_entree; |
|
volatile int erreur; |
|
} arguments_stdin; |
|
|
|
static void * |
|
thread_stdin(void *argument) |
|
{ |
|
integer8 longueur_ecriture; |
|
|
|
typeof(arguments_stdin) *ptr; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
|
|
struct_processus *s_etat_processus; |
|
|
|
unsigned char *ligne; |
|
|
|
ptr = argument; |
|
|
|
l_element_courant = (*ptr).fd_stdin; |
|
s_etat_processus = (*ptr).s_etat_processus; |
|
(*ptr).erreur = d_es; |
|
|
|
while(l_element_courant != NULL) |
|
{ |
|
if ((ligne = formateur_flux(s_etat_processus, |
|
(unsigned char *) (*(*l_element_courant).donnee).objet, |
|
&longueur_ecriture)) == NULL) |
|
{ |
|
(*ptr).erreur = d_es_allocation_memoire; |
|
close((*ptr).pipe_entree); |
|
pthread_exit(NULL); |
|
} |
|
|
|
while(write_atomic(s_etat_processus, (*ptr).pipe_entree, ligne, |
|
(size_t) longueur_ecriture) != longueur_ecriture) |
|
{ |
|
if (longueur_ecriture == -1) |
|
{ |
|
(*ptr).erreur = d_es_processus; |
|
close((*ptr).pipe_entree); |
|
pthread_exit(NULL); |
|
} |
|
} |
|
|
|
free(ligne); |
|
|
|
while(write_atomic(s_etat_processus, (*ptr).pipe_entree, "\n", 1) |
|
!= 1) |
|
{ |
|
if (longueur_ecriture == -1) |
|
{ |
|
(*ptr).erreur = d_es_processus; |
|
close((*ptr).pipe_entree); |
|
pthread_exit(NULL); |
|
} |
|
} |
|
|
|
l_element_courant = (*l_element_courant).suivant; |
|
} |
|
|
|
if (close((*ptr).pipe_entree) != 0) |
|
{ |
|
(*ptr).erreur = d_es_processus; |
|
} |
|
else |
|
{ |
|
(*ptr).erreur = d_es; |
|
} |
|
|
|
pthread_exit(NULL); |
|
} |
|
|
void |
void |
instruction_syseval(struct_processus *s_etat_processus) |
instruction_syseval(struct_processus *s_etat_processus) |
{ |
{ |
Line 3381 instruction_syseval(struct_processus *s_
|
Line 3461 instruction_syseval(struct_processus *s_
|
int pipes_sortie[2]; |
int pipes_sortie[2]; |
int status; |
int status; |
|
|
|
file *fpipe; |
|
|
logical1 drapeau_fin; |
logical1 drapeau_fin; |
logical1 presence_stdin; |
logical1 presence_stdin; |
|
logical1 processus_tue; |
|
|
long i; |
long i; |
long longueur_ecriture; |
|
long longueur_traitee; |
|
long nombre_arguments; |
long nombre_arguments; |
|
|
pid_t pid; |
pid_t pid; |
|
|
|
pthread_attr_t attributs; |
|
|
|
pthread_t thread_stdin_tid; |
|
|
struct_liste_chainee *l_element_courant; |
struct_liste_chainee *l_element_courant; |
struct_liste_chainee *l_element_precedent; |
struct_liste_chainee *l_element_precedent; |
struct_liste_chainee *l_element_stdin; |
struct_liste_chainee *l_element_stdin; |
Line 3400 instruction_syseval(struct_processus *s_
|
Line 3485 instruction_syseval(struct_processus *s_
|
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_temporaire; |
struct_objet *s_objet_temporaire; |
|
|
|
struct pollfd fds; |
|
|
struct sigaction action_courante; |
struct sigaction action_courante; |
struct sigaction action_passee; |
struct sigaction action_passee; |
|
|
unsigned char *ligne; |
struct timespec attente; |
|
|
|
struct timeval horodatage_final; |
|
struct timeval horodatage_initial; |
|
|
unsigned char *ptr; |
unsigned char *ptr; |
unsigned char *ptr2; |
unsigned char *ptr2; |
unsigned char registre_autorisation_empilement_programme; |
unsigned char registre_autorisation_empilement_programme; |
Line 3411 instruction_syseval(struct_processus *s_
|
Line 3502 instruction_syseval(struct_processus *s_
|
unsigned char *registre_programme; |
unsigned char *registre_programme; |
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned long longueur_lecture; |
integer8 longueur_lecture; |
unsigned long longueur_tampon; |
integer8 longueur_lue; |
unsigned long nombre_iterations; |
integer8 longueur_tampon; |
unsigned long nombre_lignes; |
integer8 longueur_traitee; |
unsigned long pointeur; |
integer8 nombre_lignes; |
unsigned long registre_position_courante; |
integer8 pointeur; |
|
integer8 registre_position_courante; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 3632 instruction_syseval(struct_processus *s_
|
Line 3724 instruction_syseval(struct_processus *s_
|
(*s_etat_processus).definitions_chainees = registre_programme; |
(*s_etat_processus).definitions_chainees = registre_programme; |
(*s_etat_processus).position_courante = registre_position_courante; |
(*s_etat_processus).position_courante = registre_position_courante; |
|
|
if ((arguments = malloc(nombre_arguments * sizeof(char *))) == NULL) |
if ((arguments = malloc(((size_t) nombre_arguments) * sizeof(char *))) |
|
== NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 3647 instruction_syseval(struct_processus *s_
|
Line 3740 instruction_syseval(struct_processus *s_
|
l_element_courant = (*l_element_courant).suivant; |
l_element_courant = (*l_element_courant).suivant; |
} |
} |
|
|
action_courante.sa_handler = SIG_IGN; |
|
action_courante.sa_flags = SA_NODEFER | SA_ONSTACK; |
|
|
|
if (sigaction(SIGINT, &action_courante, &action_passee) != 0) |
|
{ |
|
for(i = 0; i < nombre_arguments; i++) |
|
{ |
|
depilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
|
&s_objet_temporaire); |
|
liberation(s_etat_processus, s_objet_temporaire); |
|
} |
|
|
|
free(arguments); |
|
(*s_etat_processus).erreur_systeme = d_es_signal; |
|
return; |
|
} |
|
|
|
if (pipe(pipes_entree) != 0) |
if (pipe(pipes_entree) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
Line 3684 instruction_syseval(struct_processus *s_
|
Line 3760 instruction_syseval(struct_processus *s_
|
|
|
fflush(NULL); |
fflush(NULL); |
|
|
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
|
while(pthread_mutex_trylock(&mutex_sigaction) != 0) |
|
{ |
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
nanosleep(&attente, NULL); |
|
INCR_GRANULARITE(attente.tv_nsec); |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
action_courante.sa_handler = SIG_IGN; |
|
action_courante.sa_flags = 0; |
|
|
|
if (sigaction(SIGINT, &action_courante, &action_passee) != 0) |
|
{ |
|
for(i = 0; i < nombre_arguments; i++) |
|
{ |
|
depilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
|
&s_objet_temporaire); |
|
liberation(s_etat_processus, s_objet_temporaire); |
|
} |
|
|
|
free(arguments); |
|
(*s_etat_processus).erreur_systeme = d_es_signal; |
|
return; |
|
} |
|
|
verrouillage_threads_concurrents(s_etat_processus); |
verrouillage_threads_concurrents(s_etat_processus); |
|
|
pid = fork(); |
pid = fork(); |
deverrouillage_threads_concurrents(s_etat_processus); |
|
|
|
if (pid < 0) |
if (pid < 0) |
{ |
{ |
Line 3731 instruction_syseval(struct_processus *s_
|
Line 3853 instruction_syseval(struct_processus *s_
|
} |
} |
else if (pid == 0) |
else if (pid == 0) |
{ |
{ |
|
(*s_etat_processus).erreur_systeme = d_es; |
|
|
if (close(pipes_entree[1]) != 0) |
if (close(pipes_entree[1]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
|
|
if (close(pipes_sortie[0]) != 0) |
if (close(pipes_sortie[0]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
|
|
if (close(pipes_erreur[0]) != 0) |
if (close(pipes_erreur[0]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
|
|
if (pipes_entree[0] != STDIN_FILENO) |
if (pipes_entree[0] != STDIN_FILENO) |
Line 3754 instruction_syseval(struct_processus *s_
|
Line 3878 instruction_syseval(struct_processus *s_
|
if (dup2(pipes_entree[0], STDIN_FILENO) == -1) |
if (dup2(pipes_entree[0], STDIN_FILENO) == -1) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
} |
} |
|
|
Line 3763 instruction_syseval(struct_processus *s_
|
Line 3887 instruction_syseval(struct_processus *s_
|
if (dup2(pipes_sortie[1], STDOUT_FILENO) == -1) |
if (dup2(pipes_sortie[1], STDOUT_FILENO) == -1) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
} |
} |
|
|
Line 3772 instruction_syseval(struct_processus *s_
|
Line 3896 instruction_syseval(struct_processus *s_
|
if (dup2(pipes_sortie[1], STDERR_FILENO) == -1) |
if (dup2(pipes_sortie[1], STDERR_FILENO) == -1) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
printf("%d\n",__LINE__); |
} |
} |
} |
} |
|
|
if (nombre_arguments != 0) |
if ((nombre_arguments != 0) && ((*s_etat_processus).erreur_systeme |
|
== d_es)) |
{ |
{ |
execvp(arguments[0], arguments); |
execvp(arguments[0], arguments); |
} |
} |
else |
|
{ |
|
exit(EXIT_SUCCESS); |
|
} |
|
|
|
/* |
/* |
* L'appel système execvp() a généré une erreur et n'a pu exécuter |
* L'appel système execvp() a généré une erreur et n'a pu exécuter |
Line 3812 instruction_syseval(struct_processus *s_
|
Line 3933 instruction_syseval(struct_processus *s_
|
write_atomic(s_etat_processus, pipes_erreur[1], " ", 1); |
write_atomic(s_etat_processus, pipes_erreur[1], " ", 1); |
close(pipes_erreur[1]); |
close(pipes_erreur[1]); |
|
|
|
if ((*s_etat_processus).langue == 'F') |
|
{ |
|
printf("+++Système : erreur interne dans SYSEVAL [%d]\n", |
|
(int) getpid()); |
|
} |
|
else |
|
{ |
|
printf("+++System : SYSEVAL internal error [%d]\n", |
|
(int) getpid()); |
|
} |
|
|
exit(EXIT_SUCCESS); |
exit(EXIT_SUCCESS); |
} |
} |
else |
else |
{ |
{ |
if (close(pipes_entree[0]) != 0) |
if (sigaction(SIGINT, &action_passee, NULL) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
for(i = 0; i < nombre_arguments; i++) |
|
{ |
|
depilement(s_etat_processus, |
|
&((*s_etat_processus).l_base_pile), |
|
&s_objet_temporaire); |
|
liberation(s_etat_processus, s_objet_temporaire); |
|
} |
|
|
|
free(arguments); |
|
(*s_etat_processus).erreur_systeme = d_es_signal; |
return; |
return; |
} |
} |
|
|
if (close(pipes_sortie[1]) != 0) |
if (pthread_mutex_unlock(&mutex_sigaction) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
if (close(pipes_erreur[1]) != 0) |
deverrouillage_threads_concurrents(s_etat_processus); |
|
|
|
if (close(pipes_entree[0]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
if (presence_stdin == d_vrai) |
if (close(pipes_sortie[1]) != 0) |
{ |
{ |
l_element_courant = l_element_stdin; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
while(l_element_courant != NULL) |
|
{ |
|
if ((ligne = formateur_flux(s_etat_processus, |
|
(unsigned char *) (*(*l_element_courant).donnee) |
|
.objet, &longueur_ecriture)) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
while(write_atomic(s_etat_processus, |
|
pipes_entree[1], ligne, |
|
longueur_ecriture) != longueur_ecriture) |
|
{ |
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
if (longueur_ecriture == -1) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
free(ligne); |
|
|
|
while(write_atomic(s_etat_processus, |
|
pipes_entree[1], "\n", 1) != 1) |
|
{ |
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
if (longueur_ecriture == -1) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
l_element_courant = (*l_element_courant).suivant; |
|
} |
|
} |
} |
|
|
if (close(pipes_entree[1]) != 0) |
if (close(pipes_erreur[1]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
do |
if (presence_stdin == d_vrai) |
{ |
{ |
if (kill(pid, 0) != 0) |
// L'écriture sur stdin est dans un thread séparé pour |
|
// ne pas bloquer. |
|
|
|
if (pthread_attr_init(&attributs) != 0) |
{ |
{ |
break; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
} |
} |
|
|
/* |
if (pthread_attr_setdetachstate(&attributs, |
* Récupération de la valeur de retour du processus détaché |
PTHREAD_CREATE_JOINABLE) != 0) |
*/ |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
if (waitpid(pid, &status, 0) == -1) |
arguments_stdin.s_etat_processus = s_etat_processus; |
{ |
arguments_stdin.fd_stdin = l_element_stdin; |
# ifndef SEMAPHORES_NOMMES |
arguments_stdin.pipe_entree = pipes_entree[1]; |
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
|
if (pthread_create(&thread_stdin_tid, &attributs, thread_stdin, |
|
&arguments_stdin) != 0) |
|
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
# ifndef SEMAPHORES_NOMMES |
if (pthread_attr_destroy(&attributs) != 0) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
{ |
if (errno != EINTR) |
(*s_etat_processus).erreur_systeme = d_es_processus; |
{ |
return; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
} while((!WIFEXITED(status)) && (!WIFSIGNALED(status))); |
} |
|
|
longueur_lecture = 256; |
longueur_lecture = 65536; |
|
longueur_lue = 0; |
pointeur = 0; |
pointeur = 0; |
nombre_iterations = 1; |
|
|
|
if ((tampon = malloc((longueur_lecture + 1) * |
if ((tampon = malloc(((size_t) (longueur_lecture + 1)) * |
sizeof(unsigned char))) == NULL) |
sizeof(unsigned char))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 4035 instruction_syseval(struct_processus *s_
|
Line 4048 instruction_syseval(struct_processus *s_
|
return; |
return; |
} |
} |
|
|
while((ios = read_atomic(s_etat_processus, |
processus_tue = d_faux; |
|
|
|
while((ios = (int) read_atomic_signal(s_etat_processus, |
pipes_sortie[0], &(tampon[pointeur]), |
pipes_sortie[0], &(tampon[pointeur]), |
longueur_lecture)) > 0) |
(size_t) longueur_lecture)) >= 0) |
{ |
{ |
|
if ((ios == 0) && ((*s_etat_processus) |
|
.var_volatile_requete_arret == 0)) |
|
{ |
|
// Correspond à un buffer vide en l'absence |
|
// d'interruption. On ne boucle pas, il n'y a rien à |
|
// lire. |
|
|
|
break; |
|
} |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# else |
# else |
Line 4049 instruction_syseval(struct_processus *s_
|
Line 4074 instruction_syseval(struct_processus *s_
|
return; |
return; |
} |
} |
|
|
|
longueur_lue += ios; |
tampon[pointeur + ios] = d_code_fin_chaine; |
tampon[pointeur + ios] = d_code_fin_chaine; |
pointeur += longueur_lecture; |
pointeur += ios; |
nombre_iterations++; |
|
|
|
if ((tampon = realloc(tampon, |
if ((tampon = realloc(tampon, |
((nombre_iterations * longueur_lecture) + 1) * |
((size_t) ((longueur_lue + longueur_lecture) + 1)) |
sizeof(unsigned char))) == NULL) |
* sizeof(unsigned char))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
d_es_allocation_memoire; |
d_es_allocation_memoire; |
Line 4071 instruction_syseval(struct_processus *s_
|
Line 4096 instruction_syseval(struct_processus *s_
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
if ((*s_etat_processus).var_volatile_requete_arret == -1) |
|
{ |
|
gettimeofday(&horodatage_initial, NULL); |
|
kill(pid, SIGTERM); |
|
|
|
if ((fpipe = fdopen(pipes_sortie[0], "r")) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_erreur_fichier; |
|
return; |
|
} |
|
|
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
|
if (kill(pid, 0) == 0) |
|
{ |
|
while(feof(fpipe) == 0) |
|
{ |
|
fds.fd = pipes_sortie[0]; |
|
fds.events = POLLIN; |
|
|
|
if (poll(&fds, 1, 0) > 0) |
|
{ |
|
getc(fpipe); |
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
} |
|
else |
|
{ |
|
nanosleep(&attente, NULL); |
|
INCR_GRANULARITE(attente.tv_nsec); |
|
} |
|
|
|
gettimeofday(&horodatage_final, NULL); |
|
|
|
// Si au bout de 10 secondes après le premier |
|
// signal, il reste des données à lire, le processus |
|
// est sans doute encore actif. On envoie donc |
|
// un signal 9. |
|
|
|
if ((horodatage_final.tv_sec - |
|
horodatage_initial.tv_sec) > 10) |
|
{ |
|
kill(pid, SIGKILL); |
|
gettimeofday(&horodatage_initial, NULL); |
|
processus_tue = d_vrai; |
|
} |
|
} |
|
} |
|
} |
|
|
|
if (processus_tue == d_vrai) |
|
{ |
|
break; |
|
} |
} |
} |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
Line 4086 instruction_syseval(struct_processus *s_
|
Line 4168 instruction_syseval(struct_processus *s_
|
} |
} |
} |
} |
|
|
|
if (presence_stdin == d_vrai) |
|
{ |
|
if (pthread_join(thread_stdin_tid, NULL) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (arguments_stdin.erreur != d_es) |
|
{ |
|
(*s_etat_processus).erreur_systeme = arguments_stdin.erreur; |
|
return; |
|
} |
|
} |
|
else |
|
{ |
|
if (close(pipes_entree[1]) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
do |
|
{ |
|
if (kill(pid, 0) != 0) |
|
{ |
|
// Le processus n'existe plus. |
|
break; |
|
} |
|
|
|
/* |
|
* Récupération de la valeur de retour du processus détaché |
|
*/ |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
while(waitpid(pid, &status, 0) == -1) |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
} while((!WIFEXITED(status)) && (!WIFSIGNALED(status))); |
|
|
if (ios == -1) |
if (ios == -1) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
Line 4102 instruction_syseval(struct_processus *s_
|
Line 4252 instruction_syseval(struct_processus *s_
|
* Transformation de la chaîne en liste |
* Transformation de la chaîne en liste |
*/ |
*/ |
|
|
longueur_tampon = strlen(tampon); |
longueur_tampon = (integer8) strlen(tampon); |
|
|
for(i = 0, ptr = tampon, nombre_lignes = 0; |
for(i = 0, ptr = tampon, nombre_lignes = 0; |
i < (long) longueur_tampon; i++, ptr++) |
i < longueur_tampon; i++, ptr++) |
{ |
{ |
if ((*ptr) == d_code_retour_chariot) |
if ((*ptr) == d_code_retour_chariot) |
{ |
{ |
Line 4139 instruction_syseval(struct_processus *s_
|
Line 4289 instruction_syseval(struct_processus *s_
|
l_element_courant = (struct_liste_chainee *) |
l_element_courant = (struct_liste_chainee *) |
(*s_objet_resultat).objet; |
(*s_objet_resultat).objet; |
|
|
for(i = 0, ptr = tampon; i < (long) nombre_lignes; i++) |
for(i = 0, ptr = tampon; i < nombre_lignes; i++) |
{ |
{ |
if (((*l_element_courant).donnee = |
if (((*l_element_courant).donnee = |
allocation(s_etat_processus, CHN)) == NULL) |
allocation(s_etat_processus, CHN)) == NULL) |
Line 4151 instruction_syseval(struct_processus *s_
|
Line 4301 instruction_syseval(struct_processus *s_
|
|
|
if (((*(*l_element_courant).donnee).objet = |
if (((*(*l_element_courant).donnee).objet = |
analyse_flux(s_etat_processus, ptr, |
analyse_flux(s_etat_processus, ptr, |
strlen(ptr))) == NULL) |
(integer8) strlen(ptr))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
d_es_allocation_memoire; |
d_es_allocation_memoire; |
Line 4188 instruction_syseval(struct_processus *s_
|
Line 4338 instruction_syseval(struct_processus *s_
|
free(tampon); |
free(tampon); |
} |
} |
|
|
if (sigaction(SIGINT, &action_passee, NULL) != 0) |
|
{ |
|
for(i = 0; i < nombre_arguments; i++) |
|
{ |
|
depilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
|
&s_objet_temporaire); |
|
liberation(s_etat_processus, s_objet_temporaire); |
|
} |
|
|
|
free(arguments); |
|
(*s_etat_processus).erreur_systeme = d_es_signal; |
|
return; |
|
} |
|
|
|
for(i = 0; i < nombre_arguments; i++) |
for(i = 0; i < nombre_arguments; i++) |
{ |
{ |
depilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
depilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
Line 4209 instruction_syseval(struct_processus *s_
|
Line 4345 instruction_syseval(struct_processus *s_
|
liberation(s_etat_processus, s_objet_temporaire); |
liberation(s_etat_processus, s_objet_temporaire); |
} |
} |
|
|
|
free(arguments); |
|
|
if ((tampon = malloc(sizeof(unsigned char))) == NULL) |
if ((tampon = malloc(sizeof(unsigned char))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 4278 instruction_syseval(struct_processus *s_
|
Line 4416 instruction_syseval(struct_processus *s_
|
return; |
return; |
} |
} |
|
|
free(arguments); |
|
free(tampon); |
free(tampon); |
} |
} |
else |
else |
Line 4875 instruction_sci(struct_processus *s_etat
|
Line 5012 instruction_sci(struct_processus *s_etat
|
return; |
return; |
} |
} |
|
|
(*((logical8 *) (*s_objet).objet)) = |
(*((logical8 *) (*s_objet).objet)) = (logical8) |
(*((integer8 *) (*s_objet_argument).objet)); |
(*((integer8 *) (*s_objet_argument).objet)); |
|
|
i43 = test_cfsf(s_etat_processus, 43); |
i43 = test_cfsf(s_etat_processus, 43); |
Line 4913 instruction_sci(struct_processus *s_etat
|
Line 5050 instruction_sci(struct_processus *s_etat
|
{ |
{ |
if (valeur_binaire[i] == '0') |
if (valeur_binaire[i] == '0') |
{ |
{ |
cf(s_etat_processus, j++); |
cf(s_etat_processus, (unsigned char) j++); |
} |
} |
else |
else |
{ |
{ |
sf(s_etat_processus, j++); |
sf(s_etat_processus, (unsigned char) j++); |
} |
} |
} |
} |
|
|
for(; j <= 56; cf(s_etat_processus, j++)); |
for(; j <= 56; cf(s_etat_processus, (unsigned char) j++)); |
|
|
cf(s_etat_processus, 49); |
cf(s_etat_processus, 49); |
sf(s_etat_processus, 50); |
sf(s_etat_processus, 50); |