version 1.15, 2010/08/13 21:01:10
|
version 1.36, 2012/01/05 10:19:00
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.18 |
RPL/2 (R) version 4.1.5 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 660 instruction_chr(struct_processus *s_etat
|
Line 660 instruction_chr(struct_processus *s_etat
|
return; |
return; |
} |
} |
|
|
if (((*s_objet_resultat).objet = malloc(2 * sizeof(unsigned char))) |
if ((*((integer8 *) (*s_objet_argument).objet)) == '\\') |
== NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
if (((*s_objet_resultat).objet = malloc(3 * |
return; |
sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
((unsigned char *) (*s_objet_resultat).objet)[0] = '\\'; |
|
((unsigned char *) (*s_objet_resultat).objet)[1] = '\\'; |
|
((unsigned char *) (*s_objet_resultat).objet)[2] = |
|
d_code_fin_chaine; |
} |
} |
|
else if ((*((integer8 *) (*s_objet_argument).objet)) == '"') |
|
{ |
|
if (((*s_objet_resultat).objet = malloc(3 * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
((unsigned char *) (*s_objet_resultat).objet)[0] = '\\'; |
|
((unsigned char *) (*s_objet_resultat).objet)[1] = '"'; |
|
((unsigned char *) (*s_objet_resultat).objet)[2] = |
|
d_code_fin_chaine; |
|
} |
|
else |
|
{ |
|
if (((*s_objet_resultat).objet = malloc(2 * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
((unsigned char *) (*s_objet_resultat).objet)[0] = (*((integer8 *) |
((unsigned char *) (*s_objet_resultat).objet)[0] = |
(*s_objet_argument).objet)); |
(*((integer8 *) (*s_objet_argument).objet)); |
((unsigned char *) (*s_objet_resultat).objet)[1] = |
((unsigned char *) (*s_objet_resultat).objet)[1] = |
d_code_fin_chaine; |
d_code_fin_chaine; |
|
} |
} |
} |
else |
else |
{ |
{ |
liberation(s_etat_processus, s_objet_argument); |
if ((s_objet_resultat = allocation(s_etat_processus, CHN)) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
(*s_etat_processus).erreur_execution = d_ex_argument_invalide; |
if (((*s_objet_resultat).objet = malloc(5 * sizeof(unsigned char))) |
return; |
== NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
sprintf((unsigned char *) (*s_objet_resultat).objet, "\\x%02X", |
|
(unsigned char) (*((integer8 *) |
|
(*s_objet_argument).objet))); |
} |
} |
} |
} |
|
|