version 1.5, 2010/02/28 14:47:14
|
version 1.28, 2011/06/24 20:31:41
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.11 |
RPL/2 (R) version 4.1.0.prerelease.4 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 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" |
#include "tex.conv.h" |
#include "tex-conv.h" |
|
|
|
|
/* |
/* |
Line 2244 impression_tex(struct_processus *s_etat_
|
Line 2244 impression_tex(struct_processus *s_etat_
|
file *fichier_impression; |
file *fichier_impression; |
|
|
unsigned char *commande; |
unsigned char *commande; |
|
unsigned char *executable_candidat; |
unsigned char *nom_fichier_aux; |
unsigned char *nom_fichier_aux; |
unsigned char *nom_fichier_dvi; |
unsigned char *nom_fichier_dvi; |
unsigned char *nom_fichier_log; |
unsigned char *nom_fichier_log; |
Line 2329 impression_tex(struct_processus *s_etat_
|
Line 2330 impression_tex(struct_processus *s_etat_
|
return; |
return; |
} |
} |
|
|
if (alsprintf(&commande, ds_tex_commande, |
if ((*s_etat_processus).rpl_home == NULL) |
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; |
if (alsprintf(&commande, ds_tex_commande, |
return; |
d_exec_path, d_exec_path, d_exec_path, |
|
(*s_etat_processus).nom_fichier_impression, |
|
d_exec_path, d_exec_path, |
|
(*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 (alsprintf(&executable_candidat, "%s/bin/rpliconv", |
|
d_exec_path) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rpliconv_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rpliconv_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplfile", |
|
d_exec_path) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplfile_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplfile_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
} |
|
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).rpl_home, |
|
(*s_etat_processus).rpl_home, |
|
(*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 (alsprintf(&executable_candidat, "%s/bin/rpliconv", |
|
(*s_etat_processus).rpl_home) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rpliconv_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rpliconv_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
|
|
|
if (alsprintf(&executable_candidat, "%s/bin/rplfile", |
|
(*s_etat_processus).rpl_home) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "md5", |
|
rplfile_md5) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
if (controle(s_etat_processus, executable_candidat, "sha1", |
|
rplfile_sha1) != d_vrai) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_somme_controle; |
|
return; |
|
} |
|
|
|
free(executable_candidat); |
} |
} |
|
|
if (system(commande) != 0) |
if (system(commande) != 0) |