version 1.1, 2010/01/26 15:22:45
|
version 1.28, 2011/07/22 07:38:40
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.9 |
RPL/2 (R) version 4.1.1 |
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 782 instruction_use(struct_processus *s_etat
|
Line 782 instruction_use(struct_processus *s_etat
|
{ |
{ |
free(tampon); |
free(tampon); |
|
|
if ((tampon = malloc((strlen((unsigned char *) |
if ((*s_etat_processus).rpl_home == NULL) |
(*s_objet_argument).objet) + strlen(d_exec_path) + 7) |
|
* sizeof(unsigned char))) == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = |
if ((tampon = malloc((strlen((unsigned char *) |
d_es_allocation_memoire; |
(*s_objet_argument).objet) + strlen(d_exec_path) |
return; |
+ 7) * sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) |
|
(*s_objet_argument).objet); |
} |
} |
|
else |
|
{ |
|
if ((tampon = malloc((strlen((unsigned char *) |
|
(*s_objet_argument).objet) + |
|
strlen((*s_etat_processus).rpl_home) |
|
+ 7) * sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) |
sprintf(tampon, "/%s/lib/%s", (*s_etat_processus).rpl_home, |
(*s_objet_argument).objet); |
(unsigned char *) (*s_objet_argument).objet); |
|
} |
|
|
caracteristiques_fichier(s_etat_processus, tampon, |
caracteristiques_fichier(s_etat_processus, tampon, |
&existence, &ouverture, &unite); |
&existence, &ouverture, &unite); |
Line 1059 instruction_uchol(struct_processus *s_et
|
Line 1077 instruction_uchol(struct_processus *s_et
|
void |
void |
instruction_unlock(struct_processus *s_etat_processus) |
instruction_unlock(struct_processus *s_etat_processus) |
{ |
{ |
file *descripteur; |
|
|
|
struct flock lock; |
struct flock lock; |
|
|
|
struct_descripteur_fichier *descripteur; |
|
|
struct_objet *s_objet; |
struct_objet *s_objet; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
Line 1119 instruction_unlock(struct_processus *s_e
|
Line 1137 instruction_unlock(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (fcntl(fileno(descripteur), F_SETLK, &lock) == -1) |
if (fcntl(fileno((*descripteur).descripteur_c), F_SETLK, &lock) |
|
== -1) |
{ |
{ |
liberation(s_etat_processus, s_objet); |
liberation(s_etat_processus, s_objet); |
|
|
Line 1210 instruction_unprotect(struct_processus *
|
Line 1229 instruction_unprotect(struct_processus *
|
return; |
return; |
} |
} |
|
|
((*s_etat_processus).s_liste_variables[(*s_etat_processus) |
(*(*s_etat_processus).pointeur_variable_courante) |
.position_variable_courante]).variable_verrouillee = d_faux; |
.variable_verrouillee = d_faux; |
} |
} |
else if ((*s_objet).type == LST) |
else if ((*s_objet).type == LST) |
{ |
{ |
Line 1238 instruction_unprotect(struct_processus *
|
Line 1257 instruction_unprotect(struct_processus *
|
return; |
return; |
} |
} |
|
|
((*s_etat_processus).s_liste_variables[(*s_etat_processus) |
(*(*s_etat_processus).pointeur_variable_courante) |
.position_variable_courante]).variable_verrouillee = d_faux; |
.variable_verrouillee = d_faux; |
|
|
l_element_courant = (*l_element_courant).suivant; |
l_element_courant = (*l_element_courant).suivant; |
} |
} |