Diff for /rpl/src/instructions_r3.c between versions 1.17 and 1.18

version 1.17, 2010/08/26 19:07:40 version 1.18, 2010/09/07 13:31:54
Line 978  instruction_recall(struct_processus *s_e Line 978  instruction_recall(struct_processus *s_e
 #   ifndef OS2  #   ifndef OS2
     unsigned char           *instructions = "%s/bin/rpliconv %s "      unsigned char           *instructions = "%s/bin/rpliconv %s "
                                     "`%s/bin/rplfile "                                      "`%s/bin/rplfile "
                                     "-m %s/share/rplfiles -i %s | awk "                                      "-m %s/share/rplfiles -i %s | "
                                     "'{ print $3; }' | awk -F= '{ if "                                      "%s/bin/rplawk "
                                       "'{ print $3; }' | %s/bin/rplawk -F= '{ if "
                                     "($2 != \"\") printf(\"-f %%s\", $2); }'` "                                      "($2 != \"\") printf(\"-f %%s\", $2); }'` "
                                     "-t `locale charmap` | %s/bin/%s -o %s";                                      "-t `locale charmap` | %s/bin/%s -o %s";
 #   else  #   else
     unsigned char           *instructions = "sh -c \"%s/bin/rpliconv %s "      unsigned char           *instructions = "sh -c \"%s/bin/rpliconv %s "
                                     "`%s/bin/rplfile "                                      "`%s/bin/rplfile "
                                     "-m %s/share/rplfiles -i %s | awk "                                      "-m %s/share/rplfiles -i %s | "
                                     "'{ print $3; }' | awk -F= '{ if "                                      "%s/bin/rplawk "
                                       "'{ print $3; }' | %s/bin/rplawk -F= '{ if "
                                     "($2 != \\\"\\\") printf(\\\"-f %%s\\\", "                                      "($2 != \\\"\\\") printf(\\\"-f %%s\\\", "
                                     "$2); }'` -t `" d_locale                                      "$2); }'` -t `" d_locale
                                     "` | %s/bin/%s -o %s\"";                                      "` | %s/bin/%s -o %s\"";
Line 1070  instruction_recall(struct_processus *s_e Line 1072  instruction_recall(struct_processus *s_e
         {          {
             if ((commande = malloc((strlen(ds_preprocesseur) +              if ((commande = malloc((strlen(ds_preprocesseur) +
                     (2 * strlen((unsigned char *) (*s_objet).objet)) +                      (2 * strlen((unsigned char *) (*s_objet).objet)) +
                     (4 * strlen(d_exec_path)) +                       (6 * strlen(d_exec_path)) + 
                     strlen(nom_fichier_temporaire) + strlen(instructions) - 11)                      strlen(nom_fichier_temporaire) + strlen(instructions) - 19)
                     * sizeof(unsigned char))) == NULL)                      * sizeof(unsigned char))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
Line 1082  instruction_recall(struct_processus *s_e Line 1084  instruction_recall(struct_processus *s_e
                     (unsigned char *) (*s_objet).objet,                      (unsigned char *) (*s_objet).objet,
                     d_exec_path, d_exec_path,                      d_exec_path, d_exec_path,
                     (unsigned char *) (*s_objet).objet,                      (unsigned char *) (*s_objet).objet,
                       d_exec_path, d_exec_path,
                     d_exec_path, ds_preprocesseur, nom_fichier_temporaire);                      d_exec_path, ds_preprocesseur, nom_fichier_temporaire);
   
             if (alsprintf(&executable_candidat, "%s/bin/rpliconv",              if (alsprintf(&executable_candidat, "%s/bin/rpliconv",
Line 1152  instruction_recall(struct_processus *s_e Line 1155  instruction_recall(struct_processus *s_e
             }              }
   
             free(executable_candidat);              free(executable_candidat);
   
               if (alsprintf(&executable_candidat, "%s/bin/rplawk",
                       d_exec_path) < 0)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               if (controle(s_etat_processus, executable_candidat, "md5",
                       rplawkpp_md5) != d_vrai)
               {
                   (*s_etat_processus).erreur_systeme = d_es_somme_controle;
                   return;
               }
   
               if (controle(s_etat_processus, executable_candidat, "sha1",
                       rplawk_sha1) != d_vrai)
               {
                   (*s_etat_processus).erreur_systeme = d_es_somme_controle;
                   return;
               }
   
               free(executable_candidat);
         }          }
         else          else
         {          {
             if ((commande = malloc((strlen(ds_preprocesseur) +              if ((commande = malloc((strlen(ds_preprocesseur) +
                     (2 * strlen((unsigned char *) (*s_objet).objet)) +                      (2 * strlen((unsigned char *) (*s_objet).objet)) +
                     (4 * strlen((*s_etat_processus).rpl_home)) +                       (6 * strlen((*s_etat_processus).rpl_home)) + 
                     strlen(nom_fichier_temporaire) + strlen(instructions) - 11)                      strlen(nom_fichier_temporaire) + strlen(instructions) - 19)
                     * sizeof(unsigned char))) == NULL)                      * sizeof(unsigned char))) == NULL)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;                  (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
Line 1169  instruction_recall(struct_processus *s_e Line 1195  instruction_recall(struct_processus *s_e
                     (unsigned char *) (*s_objet).objet,                      (unsigned char *) (*s_objet).objet,
                     (*s_etat_processus).rpl_home, (*s_etat_processus).rpl_home,                      (*s_etat_processus).rpl_home, (*s_etat_processus).rpl_home,
                     (unsigned char *) (*s_objet).objet,                      (unsigned char *) (*s_objet).objet,
                       (*s_etat_processus).rpl_home, (*s_etat_processus).rpl_home,
                     (*s_etat_processus).rpl_home, ds_preprocesseur,                      (*s_etat_processus).rpl_home, ds_preprocesseur,
                     nom_fichier_temporaire);                      nom_fichier_temporaire);
   
Line 1237  instruction_recall(struct_processus *s_e Line 1264  instruction_recall(struct_processus *s_e
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_somme_controle;                  (*s_etat_processus).erreur_systeme = d_es_somme_controle;
                 return;                  return;
               }
   
               free(executable_candidat);
   
               if (alsprintf(&executable_candidat, "%s/bin/rplawk",
                       d_exec_path) < 0)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               if (controle(s_etat_processus, executable_candidat, "md5",
                       rplawkpp_md5) != d_vrai)
               {
                   (*s_etat_processus).erreur_systeme = d_es_somme_controle;
                   return;
               }
   
               if (controle(s_etat_processus, executable_candidat, "sha1",
                       rplawk_sha1) != d_vrai)
               {
                   (*s_etat_processus).erreur_systeme = d_es_somme_controle;
                   return;
             }              }
   
             free(executable_candidat);              free(executable_candidat);

Removed from v.1.17  
changed lines
  Added in v.1.18


CVSweb interface <joel.bertrand@systella.fr>