--- rpl/src/rplexternals.h 2010/05/24 10:58:37 1.9 +++ rpl/src/rplexternals.h 2012/01/17 14:44:13 1.34 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.16 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.6 + Copyright (C) 1989-2012 Dr. BERTRAND Joël This file is part of RPL/2. @@ -124,6 +124,8 @@ -------------------------------------------------------------------------------- */ +#define DISABLE_SET_BUT_NOT_USED_WARNING(a) if (&a != ((&a) + 1)); + #define HEADER \ int __constante; \ logical1 __evaluation; \ @@ -139,7 +141,13 @@ (*rpl_arguments).instruction_valide = 'Y'; \ (*rpl_arguments).erreur = 0; \ __constante = 0; \ - __evaluation = d_faux; + __evaluation = d_faux; \ + DISABLE_SET_BUT_NOT_USED_WARNING(__evaluation); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__type); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__indice_bit); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__indice_bloc); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__taille_bloc); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__masque); #define FUNCTION \ if (__validation_instruction == d_vrai) return; \ @@ -194,12 +202,19 @@ #define logger(...) do { syslog(LOG_NOTICE, __VA_ARGS__); } while(0) #define exportExternalFunctions(...) \ - char **__external_symbols(unsigned long *nb_symbols) { \ + char **__external_symbols(unsigned long *nb_symbols, \ + const char *version) { \ char arguments[] = #__VA_ARGS__; \ char **tableau; \ char *ptr1, *ptr2; \ int drapeau; \ unsigned long i; \ + if (strcmp(version, _d_version_rpl) != 0) \ + { \ + notice(stdout, "Versions mismatch : library %s, expected %s\n", \ + _d_version_rpl, version); \ + (*nb_symbols) = -1; return(NULL); \ + } \ (*nb_symbols) = 0; ptr1 = arguments; drapeau = 0; \ while((*ptr1) != 0) \ { \ @@ -1030,6 +1045,15 @@ /* -------------------------------------------------------------------------------- + Récupération des interruptions et des signaux +-------------------------------------------------------------------------------- +*/ + +#define pollSignalsAndInterrupts() \ + { scrutation_injection((*rpl_arguments).s_etat_processus); } while(0) + +/* +-------------------------------------------------------------------------------- Exécution d'une fonction intrinsèque -------------------------------------------------------------------------------- */