version 1.27, 2011/06/27 09:04:57
|
version 1.39, 2012/04/13 14:12:55
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.0 |
RPL/2 (R) version 4.1.8 |
Copyright (C) 1989-2011 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 782 instruction_input(struct_processus *s_et
|
Line 782 instruction_input(struct_processus *s_et
|
{ |
{ |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
|
|
|
unsigned char *ptr_e; |
|
unsigned char *ptr_l; |
unsigned char *tampon; |
unsigned char *tampon; |
|
unsigned char *tampon2; |
|
|
|
unsigned long i; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 848 instruction_input(struct_processus *s_et
|
Line 853 instruction_input(struct_processus *s_et
|
} |
} |
|
|
free((unsigned char *) (*s_objet_resultat).objet); |
free((unsigned char *) (*s_objet_resultat).objet); |
(*s_objet_resultat).objet = tampon; |
|
|
ptr_l = tampon; |
|
i = 0; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
if ((*ptr_l) == '\"') |
|
{ |
|
i++; |
|
} |
|
|
|
ptr_l++; |
|
} |
|
|
|
if ((tampon2 = malloc((strlen(tampon) + 1 + i) * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
ptr_l = tampon; |
|
ptr_e = tampon2; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
if ((*ptr_l) == '\"') |
|
{ |
|
(*ptr_e) = '\\'; |
|
ptr_e++; |
|
} |
|
|
|
(*ptr_e) = (*ptr_l); |
|
ptr_e++; |
|
ptr_l++; |
|
} |
|
|
|
free(tampon); |
|
(*s_objet_resultat).objet = tampon2; |
|
|
add_history((unsigned char *) (*s_objet_resultat).objet); |
add_history((unsigned char *) (*s_objet_resultat).objet); |
stifle_history(ds_longueur_historique); |
stifle_history(ds_longueur_historique); |
Line 1049 instruction_int(struct_processus *s_etat
|
Line 1092 instruction_int(struct_processus *s_etat
|
|
|
printf(" 2: %s, %s, %s, %s\n", d_INT, d_REL, d_NOM, d_ALG); |
printf(" 2: %s, %s, %s, %s\n", d_INT, d_REL, d_NOM, d_ALG); |
printf(" 1: %s\n", d_NOM); |
printf(" 1: %s\n", d_NOM); |
printf("-> 1: %s, %s\n", d_INT, d_ALG); |
printf("-> 1: %s, %s, %s, %s\n", d_INT, d_REL, d_NOM, d_ALG); |
return; |
return; |
} |
} |
else if ((*s_etat_processus).test_instruction == 'Y') |
else if ((*s_etat_processus).test_instruction == 'Y') |
Line 1070 instruction_int(struct_processus *s_etat
|
Line 1113 instruction_int(struct_processus *s_etat
|
|
|
if (test_cfsf(s_etat_processus, 31) == d_vrai) |
if (test_cfsf(s_etat_processus, 31) == d_vrai) |
{ |
{ |
if (empilement_pile_last(s_etat_processus, 3) == d_erreur) |
if (empilement_pile_last(s_etat_processus, 2) == d_erreur) |
{ |
{ |
return; |
return; |
} |
} |
Line 1160 instruction_int(struct_processus *s_etat
|
Line 1203 instruction_int(struct_processus *s_etat
|
return; |
return; |
} |
} |
|
|
if (((*s_objet_argument_3).type == NOM) || |
if (((*s_objet_argument_3).type != NOM) && |
((*s_objet_argument_3).type == ALG) || |
((*s_objet_argument_3).type != ALG) && |
((*s_objet_argument_3).type == RPN) || |
((*s_objet_argument_3).type != RPN) && |
((*s_objet_argument_3).type == REL) || |
((*s_objet_argument_3).type != REL) && |
((*s_objet_argument_3).type == INT)) |
((*s_objet_argument_3).type != INT)) |
{ |
{ |
liberation(s_etat_processus, s_objet_argument_1); |
liberation(s_etat_processus, s_objet_argument_1); |
liberation(s_etat_processus, s_objet_argument_2); |
liberation(s_etat_processus, s_objet_argument_2); |