--- rpl/src/instructions_p3.c 2010/01/27 22:22:15 1.2 +++ rpl/src/instructions_p3.c 2010/02/10 08:09:29 1.3 @@ -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)))