--- rpl/src/formateur_flux.c 2013/02/27 17:11:40 1.32 +++ rpl/src/formateur_flux.c 2013/03/01 09:29:30 1.33 @@ -165,14 +165,16 @@ formateur_flux(struct_processus *s_etat_ { printf("+++Information : " "Séquence d'échappement " - "inconnue [%d]\n", + "inconnue (\\x%c%c) [%d]\n", + *ptr_lecture, *(ptr_lecture + 1), (int) getpid()); } else { printf("+++Warning : Unknown " - "escape code " - "[%d]\n", (int) getpid()); + "escape code (\\x%c%c) [%d]\n", + *ptr_lecture, *(ptr_lecture + 1), + (int) getpid()); } } } @@ -182,11 +184,11 @@ formateur_flux(struct_processus *s_etat_ { printf("+++Information : " "Séquence d'échappement " - "inconnue [%d]\n", (int) getpid()); + "tronquée [%d]\n", (int) getpid()); } else { - printf("+++Warning : Unknown escape code " + printf("+++Warning : Truncated escape code " "[%d]\n", (int) getpid()); } } @@ -212,15 +214,35 @@ formateur_flux(struct_processus *s_etat_ } else { - if ((*s_etat_processus).langue == 'F') + if ((*(ptr_lecture + 1)) == d_code_fin_chaine) { - printf("+++Information : Séquence d'échappement " - "inconnue [%d]\n", (int) getpid()); + if ((*s_etat_processus).langue == 'F') + { + printf("+++Information : " + "Séquence d'échappement " + "tronquée [%d]\n", (int) getpid()); + } + else + { + printf("+++Warning : Truncated escape code " + "[%d]\n", (int) getpid()); + } } else - { - printf("+++Warning : Unknown escape code " - "[%d]\n", (int) getpid()); + { + if ((*s_etat_processus).langue == 'F') + { + printf("+++Information : Séquence d'échappement " + "inconnue (%c%c) [%d]\n", + *ptr_lecture, *(ptr_lecture + 1), + (int) getpid()); + } + else + { + printf("+++Warning : Unknown escape code (%c%c) " + "[%d]\n", *ptr_lecture, *(ptr_lecture + 1), + (int) getpid()); + } } } } @@ -286,6 +308,7 @@ analyse_flux(struct_processus *s_etat_pr case '\b': case '\n': case '\t': + case '\\': { offset = ptr_ecriture - chaine; @@ -325,6 +348,12 @@ analyse_flux(struct_processus *s_etat_pr *ptr_ecriture++ = 't'; break; } + + case '\\': + { + *ptr_ecriture++ = '\\'; + break; + } } break;