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