--- rpl/src/instructions_p3.c 2010/01/26 15:22:44 1.1 +++ rpl/src/instructions_p3.c 2011/01/03 12:08:07 1.16 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.9 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.0.20 + Copyright (C) 1989-2011 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -1640,6 +1640,7 @@ instruction_prompt(struct_processus *s_e struct_objet *s_objet_resultat; unsigned char *tampon; + unsigned char *tampon2; (*s_etat_processus).erreur_execution = d_ex; @@ -1684,6 +1685,23 @@ instruction_prompt(struct_processus *s_e if ((*s_objet_argument).type == CHN) { + if ((tampon = formateur(s_etat_processus, 0, s_objet_argument)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } + + if ((tampon2 = transliteration(s_etat_processus, tampon, + d_locale, (*s_etat_processus).localisation)) == NULL) + { + free(tampon); + + (*s_etat_processus).erreur_execution = d_ex_erreur_transcodage; + return; + } + + free(tampon); + if ((s_objet_resultat = allocation(s_etat_processus, CHN)) == NULL) { (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; @@ -1693,12 +1711,13 @@ instruction_prompt(struct_processus *s_e flockfile(stdin); flockfile(stdout); - (*s_objet_resultat).objet = (void *) readline((unsigned char *) - (*s_objet_argument).objet); + (*s_objet_resultat).objet = (void *) readline(tampon2); funlockfile(stdin); funlockfile(stdout); + free(tampon2); + if ((*s_objet_resultat).objet == NULL) { if (((*s_objet_resultat).objet = malloc(sizeof(unsigned char)))