Diff for /rpl/src/bibliotheques_externes.c between versions 1.7 and 1.12

version 1.7, 2010/04/17 18:57:35 version 1.12, 2010/06/18 13:43:54
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.14    RPL/2 (R) version 4.0.16
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2010 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 41  void * Line 41  void *
 chargement_bibliotheque(struct_processus *s_etat_processus,  chargement_bibliotheque(struct_processus *s_etat_processus,
         unsigned char *bibliotheque)          unsigned char *bibliotheque)
 {  {
     char                    **(*fonction)(unsigned long *);      char                    **(*fonction)(unsigned long *, const char *);
     char                    *message;      char                    *message;
   
       long                    i;
       long                    nombre_symboles;
   
     struct_rpl_arguments    rpl_arguments;      struct_rpl_arguments    rpl_arguments;
   
     struct_liste_chainee    *l_element_courant;      struct_liste_chainee    *l_element_courant;
Line 52  chargement_bibliotheque(struct_processus Line 55  chargement_bibliotheque(struct_processus
     unsigned char           **tableau;      unsigned char           **tableau;
     unsigned char           *tampon;      unsigned char           *tampon;
   
     unsigned long           nombre_symboles;  
     unsigned long           i;  
   
     void                    *descripteur_bibliotheque;      void                    *descripteur_bibliotheque;
     void                    (*onloading)(struct_rpl_arguments *);      void                    (*onloading)(struct_rpl_arguments *);
   
Line 334  chargement_bibliotheque(struct_processus Line 334  chargement_bibliotheque(struct_processus
         }          }
     }      }
     
       dlerror();
   
     if (pthread_mutex_unlock(&mutex) != 0)      if (pthread_mutex_unlock(&mutex) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
Line 344  chargement_bibliotheque(struct_processus Line 346  chargement_bibliotheque(struct_processus
      * Ajout des symboles externes       * Ajout des symboles externes
      */       */
   
     if ((tableau = (unsigned char **) (*fonction)(&nombre_symboles)) == NULL)      if ((tableau = (unsigned char **) (*fonction)((&nombre_symboles),
               d_version_rpl)) == NULL)
     {      {
           /*
            * Nombre symboles :
            * 0    : aucun symbole exporté
            * >0   : nombre de symboles exportés
            * -1   : version de bibliothèque incompatible
            */
   
         if (nombre_symboles == 0)          if (nombre_symboles == 0)
         {          {
             (*s_etat_processus).erreur_execution = d_ex_aucun_symbole;              (*s_etat_processus).erreur_execution = d_ex_aucun_symbole;
         }          }
           else if (nombre_symboles == -1)
           {
               (*s_etat_processus).erreur_execution = d_ex_version_bibliotheque;
           }
         else          else
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
Line 399  chargement_bibliotheque(struct_processus Line 413  chargement_bibliotheque(struct_processus
         strcpy((*s_etat_processus).s_instructions_externes[(*s_etat_processus)          strcpy((*s_etat_processus).s_instructions_externes[(*s_etat_processus)
                 .nombre_instructions_externes].nom_bibliotheque, tableau[i]);                  .nombre_instructions_externes].nom_bibliotheque, tableau[i]);
         (*s_etat_processus).nombre_instructions_externes++;          (*s_etat_processus).nombre_instructions_externes++;
   
         free(tableau[i]);          free(tableau[i]);
     }      }
   
Line 1105  execution_fonction_de_bibliotheque(struc Line 1120  execution_fonction_de_bibliotheque(struc
         }          }
     }      }
   
       dlerror();
   
     if (pthread_mutex_unlock(&mutex) != 0)      if (pthread_mutex_unlock(&mutex) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;

Removed from v.1.7  
changed lines
  Added in v.1.12


CVSweb interface <joel.bertrand@systella.fr>