--- rpl/src/interface_tex.c 2010/03/04 10:17:54 1.6 +++ rpl/src/interface_tex.c 2010/03/04 17:42:47 1.7 @@ -2329,15 +2329,33 @@ impression_tex(struct_processus *s_etat_ return; } - if (alsprintf(&commande, ds_tex_commande, - d_exec_path, d_exec_path, d_exec_path, - (*s_etat_processus).nom_fichier_impression, - (*s_etat_processus).nom_fichier_impression, nom_fichier_tex, - (*s_etat_processus).chemin_fichiers_temporaires, - nom_fichier_tex, nom_fichier_dvi, nom_fichier_ps) < 0) + if ((*s_etat_processus).rpl_home == NULL) { - (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; - return; + if (alsprintf(&commande, ds_tex_commande, + d_exec_path, d_exec_path, d_exec_path, + (*s_etat_processus).nom_fichier_impression, + (*s_etat_processus).nom_fichier_impression, nom_fichier_tex, + (*s_etat_processus).chemin_fichiers_temporaires, + nom_fichier_tex, nom_fichier_dvi, nom_fichier_ps) < 0) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } + } + else + { + if (alsprintf(&commande, ds_tex_commande, + (*s_etat_processus).rpl_home, + (*s_etat_processus).rpl_home, + (*s_etat_processus).rpl_home, + (*s_etat_processus).nom_fichier_impression, + (*s_etat_processus).nom_fichier_impression, nom_fichier_tex, + (*s_etat_processus).chemin_fichiers_temporaires, + nom_fichier_tex, nom_fichier_dvi, nom_fichier_ps) < 0) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } } if (system(commande) != 0)