--- rpl/src/rplexternals.h 2017/07/10 07:26:12 1.82 +++ rpl/src/rplexternals.h 2018/05/30 16:56:07 1.91 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.27 - Copyright (C) 1989-2017 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.29 + Copyright (C) 1989-2018 Dr. BERTRAND Joël This file is part of RPL/2. @@ -105,7 +105,8 @@ #define initializeObject(a, b) do { \ (*a).descripteur_bibliotheque = (*b).descripteur_bibliotheque; \ (*a).extension_type = (*b).extension_type; } while(0) -#define objectContainer(a) (*a).objet +#define objectContainer(type, a) ((type *) ((*a).objet)) +#define objectOf(a) ((*a).objet) #define ifIsExternal(a, b) if (((*a).type == EXT) && ((*a).extension_type == b)) #define elseIfIsExternal(a, b) } else if (((*a).type == EXT) && \ ((*a).extension_type == b)) @@ -149,6 +150,10 @@ ({ __CATCH_SYSTEM_ERROR__; typeof(daisyChain) __daisyChain = daisyChain; \ if (__daisyChain == NULL) executionError("End of daisy chain"); \ (__daisyChain == NULL) ? NULL : (*__daisyChain).suivant; }) + +#define next suivant +#define data donnee +#define daisyChain struct_liste_chainee #define null NULL #define nullify(ptr) __CATCH_SYSTEM_ERROR__; do { ptr = NULL; } while(0) @@ -223,6 +228,8 @@ unsigned char __taille_bloc; \ unsigned char __type; \ t_8_bits __masque; \ + void *s_etat_processus = (*rpl_arguments).s_etat_processus; \ + DISABLE_SET_BUT_NOT_USED_WARNING(s_etat_processus); \ { \ (*rpl_arguments).instruction_valide = 'Y'; \ (*rpl_arguments).erreur = 0; \ @@ -364,8 +371,7 @@ #define endSubroutine END } #define notice(s, ...) __CATCH_SYSTEM_ERROR__; \ - do { if (affichage_rplso == d_vrai) \ - { ufprintf(s, __VA_ARGS__); fflush(s); } } while(0) + do { ufprintf(s, __VA_ARGS__); fflush(s); } while(0) #define logger(...) __CATCH_SYSTEM_ERROR__; \ do { syslog(LOG_NOTICE, __VA_ARGS__); } while(0) @@ -1099,6 +1105,22 @@ ifIsString(rpl_object) string = (char *) (*rpl_object).objet; \ else executionError("Type mismatch error"); } while(0) +#define unEscString(s) ({ \ + unsigned char *__a; integer8 __l; \ + __a = formateur_flux((*rpl_arguments).s_etat_processus, \ + (unsigned char *) s, &__l); \ + if (nullified(__a)) systemError("Memory allocation error"); \ + (string) __a; \ + }) + +#define escString(rpl_object) ({ \ + unsigned char *__a; integer8 __l; \ + __a = analyse_flux((*rpl_arguments).s_etat_processus, \ + (unsigned char *) s, strlen(s)); \ + if (nullified(__a)) systemError("Memory allocation error"); \ + (string) __a; \ + }) + #define createStringObject(rpl_object) do { \ struct_processus *s_etat_processus; \ s_etat_processus = (*rpl_arguments).s_etat_processus; \