Diff for /rpl/src/interface_gnuplot.c between versions 1.4 and 1.12

version 1.4, 2010/02/28 14:47:14 version 1.12, 2010/07/14 14:19:39
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.11    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 266  appel_gnuplot(struct_processus *s_etat_p Line 266  appel_gnuplot(struct_processus *s_etat_p
         if ((*s_etat_processus).entree_standard == NULL)          if ((*s_etat_processus).entree_standard == NULL)
         {          {
 #ifdef FORCE_GNUPLOT_PATH  #ifdef FORCE_GNUPLOT_PATH
             if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +              if ((*s_etat_processus).rpl_home == NULL)
                     strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))  
                     == NULL)  
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +
                 return;                          strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                           == NULL)
                   {
                       (*s_etat_processus).erreur_systeme =
                               d_es_allocation_memoire;
                       return;
                   }
   
                   sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,
                           ds_gnuplot_commande);
             }              }
               else
               {
                   if ((commande_gnuplot = malloc((strlen(
                           (*s_etat_processus).rpl_home) + 6 +
                           strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                           == NULL)
                   {
                       (*s_etat_processus).erreur_systeme =
                               d_es_allocation_memoire;
                       return;
                   }
   
             sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,                  sprintf(commande_gnuplot, "%s/bin/%s",
                     ds_gnuplot_commande);                          (*s_etat_processus).rpl_home, ds_gnuplot_commande);
               }
 #else  #else
             if ((commande_gnuplot = malloc((1 +              if ((commande_gnuplot = malloc((1 +
                     strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))                      strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
Line 320  appel_gnuplot(struct_processus *s_etat_p Line 339  appel_gnuplot(struct_processus *s_etat_p
         entree_standard = (*s_etat_processus).entree_standard;          entree_standard = (*s_etat_processus).entree_standard;
   
 #if FORCE_GNUPLOT_PATH  #if FORCE_GNUPLOT_PATH
         if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +          if ((*s_etat_processus).rpl_home == NULL)
                 strlen(ds_gnuplot_commande_persistante)) *  
                 sizeof(unsigned char))) == NULL)  
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +
             return;                      strlen(ds_gnuplot_commande_persistante)) *
                       sizeof(unsigned char))) == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,
                       ds_gnuplot_commande_persistante);
         }          }
           else
           {
               if ((commande_gnuplot = malloc((strlen(
                       (*s_etat_processus).rpl_home) + 6 +
                       strlen(ds_gnuplot_commande_persistante)) *
                       sizeof(unsigned char))) == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
         sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,              sprintf(commande_gnuplot, "%s/bin/%s", (*s_etat_processus).rpl_home,
                 ds_gnuplot_commande_persistante);                      ds_gnuplot_commande_persistante);
           }
 #else  #else
         if ((commande_gnuplot = malloc((1 +          if ((commande_gnuplot = malloc((1 +
                 strlen(ds_gnuplot_commande_persistante)) *                  strlen(ds_gnuplot_commande_persistante)) *
Line 373  appel_gnuplot(struct_processus *s_etat_p Line 409  appel_gnuplot(struct_processus *s_etat_p
         entree_standard = (*s_etat_processus).entree_standard;          entree_standard = (*s_etat_processus).entree_standard;
   
 #ifdef FORCE_GNUPLOT_PATH  #ifdef FORCE_GNUPLOT_PATH
         if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +          if ((*s_etat_processus).rpl_home == NULL)
                 strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))  
                 == NULL)  
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +
             return;                      strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                       == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,
                       ds_gnuplot_commande);
         }          }
           else
           {
               if ((commande_gnuplot = malloc((strlen((*s_etat_processus).rpl_home)
                       + 6 + strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                       == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
         sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,              sprintf(commande_gnuplot, "%s/bin/%s", (*s_etat_processus).rpl_home,
                 ds_gnuplot_commande);                      ds_gnuplot_commande);
           }
 #else  #else
         if ((commande_gnuplot = malloc((1 +          if ((commande_gnuplot = malloc((1 +
                 strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))                  strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
Line 437  appel_gnuplot(struct_processus *s_etat_p Line 489  appel_gnuplot(struct_processus *s_etat_p
         entree_standard = (*s_etat_processus).entree_standard;          entree_standard = (*s_etat_processus).entree_standard;
   
 #ifdef FORCE_GNUPLOT_PATH  #ifdef FORCE_GNUPLOT_PATH
         if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +          if ((*s_etat_processus).rpl_home == NULL)
                 strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))  
                 == NULL)  
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              if ((commande_gnuplot = malloc((strlen(d_exec_path) + 6 +
             return;                      strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                       == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,
                       ds_gnuplot_commande);
         }          }
           else
           {
               if ((commande_gnuplot = malloc((strlen((*s_etat_processus).rpl_home)
                       + 6 + strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))
                       == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
         sprintf(commande_gnuplot, "%s/bin/%s", d_exec_path,              sprintf(commande_gnuplot, "%s/bin/%s", (*s_etat_processus).rpl_home,
                 ds_gnuplot_commande);                      ds_gnuplot_commande);
           }
 #else  #else
         if ((commande_gnuplot = malloc((1 +          if ((commande_gnuplot = malloc((1 +
                 strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))                  strlen(ds_gnuplot_commande)) * sizeof(unsigned char)))

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


CVSweb interface <joel.bertrand@systella.fr>