version 1.65, 2020/06/04 09:35:35
|
version 1.73, 2025/04/15 10:17:56
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.32 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2020 Dr. BERTRAND Joël |
Copyright (C) 1989-2025 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 55 extern "C"
|
Line 55 extern "C"
|
# include "rpl-conv.h" |
# include "rpl-conv.h" |
} |
} |
|
|
#include <iostream> |
#ifdef RPLCAS |
|
# include <iostream> |
|
#endif |
|
|
using namespace std; |
using namespace std; |
|
|
Line 707 interface_cas(struct_processus *s_etat_p
|
Line 709 interface_cas(struct_processus *s_etat_p
|
|
|
break; |
break; |
} |
} |
|
|
|
case RPLCAS_SIMPLIFICATION: |
|
{ |
|
if (depilement(s_etat_processus, &(s_etat_processus->l_base_pile), |
|
&s_objet_argument_1) == d_erreur) |
|
{ |
|
s_etat_processus->erreur_execution = d_ex_manque_argument; |
|
return; |
|
} |
|
|
|
if ((argument_1 = conversion_rpl_vers_cas(s_etat_processus, |
|
&s_objet_argument_1)) == NULL) |
|
{ |
|
s_etat_processus->erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
liberation(s_etat_processus, s_objet_argument_1); |
|
|
|
try |
|
{ |
|
gen expression( |
|
string(reinterpret_cast<const char *>(argument_1)), |
|
contexte); |
|
|
|
gen resultat = simplify(expression, contexte); |
|
string chaine = "'" + resultat.print() + "'"; |
|
|
|
conversion_cas_vers_rpl(s_etat_processus, |
|
reinterpret_cast<unsigned char *>(const_cast<char *>( |
|
chaine.c_str()))); |
|
} |
|
catch(bad_alloc &exception) |
|
{ |
|
s_etat_processus->erreur_systeme = d_es_allocation_memoire; |
|
} |
|
catch(...) |
|
{ |
|
s_etat_processus->erreur_execution = d_ex_erreur_interne_rplcas; |
|
} |
|
|
|
free(argument_1); |
|
|
|
break; |
|
} |
} |
} |
|
|
return; |
return; |