Diff for /rpl/src/formateur_fichiers.c between versions 1.1.1.1 and 1.15

version 1.1.1.1, 2010/01/26 15:22:44 version 1.15, 2010/08/06 15:32:58
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.9    RPL/2 (R) version 4.0.18
   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 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
   
 /*  /*
Line 1176  formateur_fichier(struct_processus *s_et Line 1176  formateur_fichier(struct_processus *s_et
                 return(NULL);                  return(NULL);
             }              }
   
             chaine = (unsigned char *) malloc((strlen((unsigned char *)              if ((longueur_champ == -1) || (strlen((unsigned char *)
                     ((*s_objet).objet)) + 1) * sizeof(unsigned char));                      (*s_objet).objet) < longueur_champ))
   
             if (chaine == NULL)  
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  chaine = (unsigned char *) malloc((strlen((unsigned char *)
                 return(NULL);                          ((*s_objet).objet)) + 1) * sizeof(unsigned char));
   
                   if (chaine == NULL)
                   {
                       (*s_etat_processus).erreur_systeme =
                               d_es_allocation_memoire;
                       return(NULL);
                   }
   
                   strcpy(chaine, (unsigned char *) ((*s_objet).objet));
             }              }
               else
               {
                   chaine = (unsigned char *) malloc((longueur_champ + 1)
                           * sizeof(unsigned char));
   
             strcpy(chaine, (unsigned char *) ((*s_objet).objet));                  if (chaine == NULL)
                   {
                       (*s_etat_processus).erreur_systeme =
                               d_es_allocation_memoire;
                       return(NULL);
                   }
   
                   strncpy(chaine, (unsigned char *) ((*s_objet).objet),
                           longueur_champ);
                   chaine[longueur_champ] = d_code_fin_chaine;
               }
         }          }
         else if ((*s_objet).type == CPL)          else if ((*s_objet).type == CPL)
         {          {
Line 1565  formateur_fichier(struct_processus *s_et Line 1586  formateur_fichier(struct_processus *s_et
                             longueur, longueur_champ, format_sortie, type,                              longueur, longueur_champ, format_sortie, type,
                             longueur_effective, recursivite)) == NULL)                              longueur_effective, recursivite)) == NULL)
                     {                      {
                           free(chaine);
                         return(NULL);                          return(NULL);
                     }                      }
   
Line 5633  formateur_fichier_nombre(struct_processu Line 5655  formateur_fichier_nombre(struct_processu
             strcat(construction_chaine, tampon);              strcat(construction_chaine, tampon);
             free(tampon);              free(tampon);
   
             if (test_cfsf(s_etat_processus, 48) == d_faux)              strcat(construction_chaine, ",");
             {  
                 strcat(construction_chaine, ",");  
             }  
             else  
             {  
                 strcat(construction_chaine, ".");  
             }  
   
             tampon = formateur_fichier_reel(s_etat_processus,              tampon = formateur_fichier_reel(s_etat_processus,
                     (void *) &((*((struct_complexe16 *)                      (void *) &((*((struct_complexe16 *)

Removed from v.1.1.1.1  
changed lines
  Added in v.1.15


CVSweb interface <joel.bertrand@systella.fr>