Diff for /rpl/src/gestion_variables.c between versions 1.23 and 1.24

version 1.23, 2011/04/14 10:32:59 version 1.24, 2011/04/14 13:18:54
Line 714  retrait_variable_par_niveau(struct_proce Line 714  retrait_variable_par_niveau(struct_proce
   
 /*  /*
 ================================================================================  ================================================================================
     Procédure de retrait des toutes les variables locales et globales
   ================================================================================
     Entrée : drapeau indiquant s'il faut retirer les définitions (variables
              de niveau 0)
   --------------------------------------------------------------------------------
     Sortie :
   --------------------------------------------------------------------------------
     Effets de bord : néant
   ================================================================================
   */
   
   void
   liberation_arbre_variables(struct_processus *s_etat_processus,
           struct_arbre_variables *arbre, logical1 retrait_definitions)
   {
       int                     i;
   
       struct_liste_chainee    *l_element_courant;
       struct_liste_chainee    *l_element_suivant;
   
       for(i = 0; i < (*s_etat_processus).nombre_caracteres_variables; i++)
       {
           if ((*arbre).noeud[i] != NULL)
           {
               l_element_courant = (*arbre).l_variables;
   
               while(l_element_courant != NULL)
               {
                   l_element_suivant = (*l_element_courant).suivant;
   
                   if (retrait_definitions == d_vrai)
                   {
                       liberation(s_etat_processus, (*((struct_variable *)
                               (*l_element_courant).donnee)).objet);
                       free((*((struct_variable *) (*l_element_courant)
                               .donnee)).nom);
                       free((struct_variable *) (*l_element_courant).donnee);
                   }
                   else
                   {
                       if ((*((struct_variable *) (*l_element_courant).donnee))
                               .niveau >= 1)
                       {
                           liberation(s_etat_processus, (*((struct_variable *)
                                   (*l_element_courant).donnee)).objet);
                           free((*((struct_variable *) (*l_element_courant)
                                   .donnee)).nom);
                           free((struct_variable *) (*l_element_courant).donnee);
                       }
                   }
   
                   free(l_element_courant);
                   l_element_courant = l_element_suivant;
               }
   
               liberation_arbre_variables(s_etat_processus, (*arbre).noeud[i]);
           }
       }
   
       free((*arbre).noeud);
       free(arbre);
   
       return;
   }
   
   /*
   ================================================================================
   Procédure de copie de l'arbre des variables    Procédure de copie de l'arbre des variables
 ================================================================================  ================================================================================
   Entrée :    Entrée :

Removed from v.1.23  
changed lines
  Added in v.1.24


CVSweb interface <joel.bertrand@systella.fr>