Diff for /rpl/src/instructions_p4.c between versions 1.21 and 1.22

version 1.21, 2011/06/21 07:45:26 version 1.22, 2011/06/21 08:01:03
Line 482  instruction_prvar(struct_processus *s_et Line 482  instruction_prvar(struct_processus *s_et
 void  void
 instruction_prusr(struct_processus *s_etat_processus)  instruction_prusr(struct_processus *s_etat_processus)
 {  {
       int                         i;
       int                         nb_variables;
   
     struct_objet                s_objet;      struct_objet                s_objet;
   
       struct_tableau_variables    *tableau;
   
     (*s_etat_processus).erreur_execution = d_ex;      (*s_etat_processus).erreur_execution = d_ex;
   
     if ((*s_etat_processus).affichage_arguments == 'Y')      if ((*s_etat_processus).affichage_arguments == 'Y')
Line 517  instruction_prusr(struct_processus *s_et Line 522  instruction_prusr(struct_processus *s_et
         }          }
     }      }
   
       nb_variables = nombre_variables(s_etat_processus,
               (*s_etat_processus).s_arbre_variables);
   
       if ((tableau = malloc(nb_variables * sizeof(struct_tableau_variables)))
               == NULL)
       {
           (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
           return;
       }
   
       liste_variables(s_etat_processus, tableau, 0,
               (*s_etat_processus).s_arbre_variables);
   
     s_objet.type = CHN;      s_objet.type = CHN;
   
     /*      for(i = 0; i < nb_variables; i++)
     for(i = 0; i < (*s_etat_processus).nombre_variables; i++)  
     {      {
         if ((s_objet.objet = malloc((strlen((*s_etat_processus)          if ((s_objet.objet = malloc((strlen(tableau[i].nom) + 64)
                 .s_liste_variables[i].nom) + 64) * sizeof(unsigned char)))                  * sizeof(unsigned char))) == NULL)
                 == NULL)  
         {          {
               free(tableau);
   
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
             return;              return;
         }          }
   
         sprintf((unsigned char *) s_objet.objet, "\\noindent %s [%lu]\n",          sprintf((unsigned char *) s_objet.objet, "\\\\noindent %s [%lu]\n",
                 (*s_etat_processus).s_liste_variables[i].nom,                  tableau[i].nom, tableau[i].niveau);
                 (*s_etat_processus).s_liste_variables[i].niveau);  
   
         formateur_tex(s_etat_processus, &s_objet, 'N');          formateur_tex(s_etat_processus, &s_objet, 'N');
         free(s_objet.objet);          free(s_objet.objet);
     }      }
     */  
   
       free(tableau);
     return;      return;
 }  }
   

Removed from v.1.21  
changed lines
  Added in v.1.22


CVSweb interface <joel.bertrand@systella.fr>