version 1.1.1.1, 2010/01/26 15:22:44
|
version 1.62, 2018/05/30 09:27:35
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.9 |
RPL/2 (R) version 4.1.29 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2018 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 46 instruction_lu(struct_processus *s_etat_
|
Line 46 instruction_lu(struct_processus *s_etat_
|
struct_objet *s_objet_resultat_2; |
struct_objet *s_objet_resultat_2; |
struct_objet *s_objet_resultat_3; |
struct_objet *s_objet_resultat_3; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 183 instruction_lu(struct_processus *s_etat_
|
Line 183 instruction_lu(struct_processus *s_etat_
|
.nombre_colonnes; |
.nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat_3).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat_3).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat_3) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat_3) |
.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; |
Line 194 instruction_lu(struct_processus *s_etat_
|
Line 194 instruction_lu(struct_processus *s_etat_
|
.nombre_lignes; i++) |
.nombre_lignes; i++) |
{ |
{ |
if ((((real8 **) (*((struct_matrice *) (*s_objet_resultat_3).objet)) |
if ((((real8 **) (*((struct_matrice *) (*s_objet_resultat_3).objet)) |
.tableau)[i] = malloc((*((struct_matrice *) |
.tableau)[i] = malloc(((size_t) (*((struct_matrice *) |
(*s_objet_resultat_3).objet)).nombre_colonnes * |
(*s_objet_resultat_3).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 240 instruction_lu(struct_processus *s_etat_
|
Line 240 instruction_lu(struct_processus *s_etat_
|
.nombre_colonnes; |
.nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat_2).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat_2).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat_2) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat_2) |
.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; |
Line 251 instruction_lu(struct_processus *s_etat_
|
Line 251 instruction_lu(struct_processus *s_etat_
|
.nombre_lignes; i++) |
.nombre_lignes; i++) |
{ |
{ |
if ((((real8 **) (*((struct_matrice *) (*s_objet_resultat_2).objet)) |
if ((((real8 **) (*((struct_matrice *) (*s_objet_resultat_2).objet)) |
.tableau)[i] = malloc((*((struct_matrice *) |
.tableau)[i] = malloc(((size_t) (*((struct_matrice *) |
(*s_objet_resultat_2).objet)).nombre_colonnes * |
(*s_objet_resultat_2).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 367 instruction_lu(struct_processus *s_etat_
|
Line 367 instruction_lu(struct_processus *s_etat_
|
.nombre_colonnes; |
.nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat_3).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat_3).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat_3) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat_3) |
.objet)).nombre_lignes * sizeof(complex16 *))) == NULL) |
.objet)).nombre_lignes) * sizeof(complex16 *))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 379 instruction_lu(struct_processus *s_etat_
|
Line 379 instruction_lu(struct_processus *s_etat_
|
{ |
{ |
if ((((complex16 **) (*((struct_matrice *) |
if ((((complex16 **) (*((struct_matrice *) |
(*s_objet_resultat_3).objet)) |
(*s_objet_resultat_3).objet)) |
.tableau)[i] = malloc((*((struct_matrice *) |
.tableau)[i] = malloc(((size_t) (*((struct_matrice *) |
(*s_objet_resultat_3).objet)).nombre_colonnes * |
(*s_objet_resultat_3).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 429 instruction_lu(struct_processus *s_etat_
|
Line 429 instruction_lu(struct_processus *s_etat_
|
.nombre_colonnes; |
.nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat_2).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat_2).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat_2) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat_2) |
.objet)).nombre_lignes * sizeof(complex16 *))) == NULL) |
.objet)).nombre_lignes) * sizeof(complex16 *))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 441 instruction_lu(struct_processus *s_etat_
|
Line 441 instruction_lu(struct_processus *s_etat_
|
{ |
{ |
if ((((complex16 **) (*((struct_matrice *) |
if ((((complex16 **) (*((struct_matrice *) |
(*s_objet_resultat_2).objet)) |
(*s_objet_resultat_2).objet)) |
.tableau)[i] = malloc((*((struct_matrice *) |
.tableau)[i] = malloc(((size_t) (*((struct_matrice *) |
(*s_objet_resultat_2).objet)).nombre_colonnes * |
(*s_objet_resultat_2).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 716 instruction_lock(struct_processus *s_eta
|
Line 716 instruction_lock(struct_processus *s_eta
|
|
|
struct flock lock; |
struct flock lock; |
|
|
|
struct_descripteur_fichier *fichier; |
|
|
struct_objet *s_objet_argument_1; |
struct_objet *s_objet_argument_1; |
struct_objet *s_objet_argument_2; |
struct_objet *s_objet_argument_2; |
|
|
Line 779 instruction_lock(struct_processus *s_eta
|
Line 781 instruction_lock(struct_processus *s_eta
|
lock.l_len = 0; |
lock.l_len = 0; |
lock.l_pid = getpid(); |
lock.l_pid = getpid(); |
|
|
if ((chaine = conversion_majuscule((unsigned char *) |
if ((chaine = conversion_majuscule(s_etat_processus, (unsigned char *) |
(*s_objet_argument_1).objet)) == NULL) |
(*s_objet_argument_1).objet)) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 811 instruction_lock(struct_processus *s_eta
|
Line 813 instruction_lock(struct_processus *s_eta
|
|
|
free(chaine); |
free(chaine); |
|
|
if ((descripteur = descripteur_fichier(s_etat_processus, |
if ((fichier = descripteur_fichier(s_etat_processus, |
(struct_fichier *) (*s_objet_argument_2).objet)) == NULL) |
(struct_fichier *) (*s_objet_argument_2).objet)) == NULL) |
{ |
{ |
return; |
return; |
} |
} |
|
|
|
descripteur = (*fichier).descripteur_c; |
|
|
if (fcntl(fileno(descripteur), F_SETLK, &lock) == -1) |
if (fcntl(fileno(descripteur), F_SETLK, &lock) == -1) |
{ |
{ |
liberation(s_etat_processus, s_objet_argument_1); |
liberation(s_etat_processus, s_objet_argument_1); |