version 1.14, 2010/08/06 15:26:51
|
version 1.16, 2010/08/10 18:02:43
|
Line 50 transliteration(struct_processus *s_etat
|
Line 50 transliteration(struct_processus *s_etat
|
unsigned char *codage_sortie_transliteral; |
unsigned char *codage_sortie_transliteral; |
unsigned char *tampon; |
unsigned char *tampon; |
|
|
|
# ifdef OS2 |
|
unsigned char *ptr_e;; |
|
unsigned char *ptr_l;; |
|
unsigned char *tampon2; |
|
|
|
unsigned long i; |
|
# endif |
|
|
if ((codage_sortie_transliteral = malloc((strlen(codage_sortie) |
if ((codage_sortie_transliteral = malloc((strlen(codage_sortie) |
+ strlen("//TRANSLIT") + 1) * sizeof(unsigned char))) == NULL) |
+ strlen("//TRANSLIT") + 1) * sizeof(unsigned char))) == NULL) |
{ |
{ |
Line 63 transliteration(struct_processus *s_etat
|
Line 71 transliteration(struct_processus *s_etat
|
codage_entree, codage_sortie_transliteral); |
codage_entree, codage_sortie_transliteral); |
free(codage_sortie_transliteral); |
free(codage_sortie_transliteral); |
|
|
|
# ifdef OS2 |
|
|
|
i = 0; |
|
ptr_l = tampon; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
if ((*ptr_l) == '\n') |
|
{ |
|
i++; |
|
} |
|
|
|
ptr_l++; |
|
} |
|
|
|
if ((tampon2 = malloc((strlen(tampon) + i + 1) * sizeof(unsigned char))) |
|
== NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
|
ptr_e = tampon2; |
|
ptr_l = tampon; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
(*ptr_e) = (*ptr_l); |
|
|
|
if ((*ptr_l) == '\n') |
|
{ |
|
(*(++ptr_e)) = '\r'; |
|
ptr_e++; |
|
ptr_l++; |
|
} |
|
else |
|
{ |
|
ptr_e++; |
|
ptr_l++; |
|
} |
|
} |
|
|
|
free(tampon); |
|
tampon = tampon2; |
|
|
|
# endif |
|
|
return(tampon); |
return(tampon); |
} |
} |
|
|