Diff for /rpl/src/instructions_u1.c between versions 1.3 and 1.19

version 1.3, 2010/02/10 10:14:25 version 1.19, 2011/04/11 12:10:11
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.11    RPL/2 (R) version 4.1.0.prerelease.0
   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);
   

Removed from v.1.3  
changed lines
  Added in v.1.19


CVSweb interface <joel.bertrand@systella.fr>