version 1.250, 2014/08/04 06:58:48
|
version 1.355, 2024/10/30 13:15:21
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.19 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
Copyright (C) 1989-2024 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 38
|
Line 38
|
# ifdef OpenBSD |
# ifdef OpenBSD |
# define _BSD_SOURCE |
# define _BSD_SOURCE |
# endif |
# endif |
|
|
|
# ifdef FreeBSD |
|
# define __BSD_VISIBLE 1 |
|
# endif |
#endif |
#endif |
|
|
#ifdef OS2 |
#ifdef OS2 |
Line 60
|
Line 64
|
# define SA_ONSTACK 0 |
# define SA_ONSTACK 0 |
#endif |
#endif |
|
|
|
#ifdef BROKEN_SIGSEGV |
|
# undef HAVE_STACK_OVERFLOW_RECOVERY |
|
# undef HAVE_SIGSEGV_RECOVERY |
|
#endif |
|
|
|
#define DEBUG_TRACE uprintf("[%d/%X] %s(%d)\n", \ |
|
getpid(), pthread_self(), __FILE__, __LINE__); |
|
#define TEST_ABSENCE_FICHIER(nom) \ |
|
{ int ios; struct stat *buf; ios = stat(nom, buf); \ |
|
if (ios == 0) BUG(1, uprintf("File %s found!\n", nom)); } |
|
|
/* |
/* |
================================================================================ |
================================================================================ |
Line 78
|
Line 92
|
#include <stdarg.h> |
#include <stdarg.h> |
#include <poll.h> |
#include <poll.h> |
#include <signal.h> |
#include <signal.h> |
|
#include <sys/time.h> |
|
#include <pthread.h> |
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# include <sys/mman.h> |
# include <sys/mman.h> |
# include <sys/time.h> |
|
# include <sys/resource.h> |
# include <sys/resource.h> |
# include <sys/select.h> |
# include <sys/select.h> |
# include <sys/socket.h> |
# include <sys/socket.h> |
# include <sys/stat.h> |
# include <sys/stat.h> |
# include <sys/timeb.h> |
|
# include <sys/types.h> |
# include <sys/types.h> |
# include <sys/un.h> |
# include <sys/un.h> |
# include <sys/wait.h> |
# include <sys/wait.h> |
Line 97
|
Line 111
|
|
|
# include <dlfcn.h> |
# include <dlfcn.h> |
# include <fcntl.h> |
# include <fcntl.h> |
# include <pthread.h> |
|
# include <regex.h> |
# include <regex.h> |
|
|
# ifdef OS2 |
# ifdef OS2 |
Line 171
|
Line 184
|
# include "zlib.h" |
# include "zlib.h" |
|
|
# include "openssl/evp.h" |
# include "openssl/evp.h" |
# ifndef OPENSSL_NO_MD2 |
# ifndef RPLCXX |
# include "openssl/md2.h" |
# ifndef OPENSSL_NO_MD2 |
# endif |
# include "openssl/md2.h" |
# ifndef OPENSSL_NO_MD4 |
# endif |
# include "openssl/md4.h" |
# ifndef OPENSSL_NO_MD4 |
# endif |
# include "openssl/md4.h" |
# ifndef OPENSSL_NO_MD5 |
# endif |
# include "openssl/md5.h" |
# ifndef OPENSSL_NO_MD5 |
# endif |
# include "openssl/md5.h" |
# ifndef OPENSSL_NO_MDC2 |
# endif |
# include "openssl/mdc2.h" |
# ifndef OPENSSL_NO_MDC2 |
# endif |
# include "openssl/mdc2.h" |
# ifndef OPENSSL_NO_RIPEMD |
# endif |
# include "openssl/ripemd.h" |
# ifndef OPENSSL_NO_RIPEMD |
# endif |
# include "openssl/ripemd.h" |
# ifndef OPENSSL_NO_SHA |
# endif |
# include "openssl/sha.h" |
# ifndef OPENSSL_NO_SHA |
# endif |
# include "openssl/sha.h" |
# ifndef OPENSSL_NO_WHIRLPOOL |
# endif |
# include "openssl/whrlpool.h" |
# ifndef OPENSSL_NO_WHIRLPOOL |
# endif |
# include "openssl/whrlpool.h" |
# ifndef OPENSSL_NO_AES |
# endif |
# include "openssl/aes.h" |
# ifndef OPENSSL_NO_AES |
# endif |
# include "openssl/aes.h" |
# ifndef OPENSSL_NO_CAMELLIA |
# endif |
# include "openssl/camellia.h" |
# ifndef OPENSSL_NO_CAMELLIA |
# endif |
# include "openssl/camellia.h" |
# ifndef OPENSSL_NO_RC2 |
# endif |
# include "openssl/rc2.h" |
# ifndef OPENSSL_NO_RC2 |
# endif |
# include "openssl/rc2.h" |
# ifndef OPENSSL_NO_IDEA |
# endif |
# include "openssl/idea.h" |
# ifndef OPENSSL_NO_IDEA |
|
# include "openssl/idea.h" |
|
# endif |
# endif |
# endif |
|
|
# include "sqlite3.h" |
# include "sqlite3.h" |
# include "sigsegv.h" |
|
|
# ifndef BROKEN_SIGSEGV |
|
# include "sigsegv.h" |
|
# endif |
|
|
# ifdef OS2 |
# ifdef OS2 |
// Bug de libsigsegv |
// Bug de libsigsegv |
# undef HAVE_STACK_OVERFLOW_RECOVERY |
# undef HAVE_STACK_OVERFLOW_RECOVERY |
# endif |
# endif |
|
|
# define HAVE_INLINE |
|
# define GSL_RANGE_CHECK_OFF |
# define GSL_RANGE_CHECK_OFF |
# include "gsl/gsl_cdf.h" |
# include "gsl/gsl_cdf.h" |
# include "gsl/gsl_cblas.h" |
# include "gsl/gsl_cblas.h" |
Line 251
|
Line 269
|
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# ifndef UNIX_PATH_MAX |
# ifndef UNIX_PATH_MAX |
struct sockaddr_un sizecheck; |
# pragma GCC diagnostic push |
|
# pragma GCC diagnostic ignored "-Wunused-variable" |
|
static struct sockaddr_un sizecheck; |
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
|
# pragma GCC diagnostic pop |
# endif |
# endif |
#endif |
#endif |
|
|
Line 264
|
Line 285
|
# define __STATIC_MUTEX_INITIALIZATION__ |
# define __STATIC_MUTEX_INITIALIZATION__ |
#endif |
#endif |
|
|
|
|
/* |
/* |
================================================================================ |
================================================================================ |
Bugs spécifiques |
Bugs spécifiques |
Line 306 enum signaux_rpl
|
Line 328 enum signaux_rpl
|
rpl_sighup, |
rpl_sighup, |
rpl_sigtstp, |
rpl_sigtstp, |
rpl_sigexcept, |
rpl_sigexcept, |
rpl_sigmax |
rpl_sigmax, |
|
rpl_siguser // Base des signaux à la discrétion de l'utilisateur |
}; |
}; |
|
|
#define LONGUEUR_QUEUE_SIGNAUX 1024 |
#define LONGUEUR_QUEUE_SIGNAUX 1024 |
Line 323 typedef struct queue_signaux
|
Line 346 typedef struct queue_signaux
|
volatile logical1 requete_arret; |
volatile logical1 requete_arret; |
|
|
pthread_t thread_signaux; |
pthread_t thread_signaux; |
|
pid_t controle; |
|
|
volatile struct |
volatile struct |
{ |
{ |
Line 347 __EXTERN__ int f_queue_signaux;
|
Line 371 __EXTERN__ int f_queue_signaux;
|
# endif |
# endif |
#endif |
#endif |
|
|
#ifdef OS2 |
|
# define readline(s) readline_wrapper(s) |
|
unsigned char *readline_wrapper(unsigned char *s); |
|
#endif |
|
|
|
#if ! defined(UNION_SEMUN) && defined(IPCS_SYSV) |
#if ! defined(UNION_SEMUN) && defined(IPCS_SYSV) |
union semun |
union semun |
{ |
{ |
Line 370 union semun
|
Line 389 union semun
|
# define SIGSTKSZ 65536 |
# define SIGSTKSZ 65536 |
#endif |
#endif |
|
|
|
|
/* |
/* |
================================================================================ |
================================================================================ |
SÉMAPHORES |
SÉMAPHORES |
Line 378 union semun
|
Line 398 union semun
|
|
|
#ifdef IPCS_SYSV |
#ifdef IPCS_SYSV |
# ifdef DEBUG_SEMAPHORES |
# ifdef DEBUG_SEMAPHORES |
|
# define sem_init(a, b, c) ({ \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"initialization at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
|
sem_init_SysV(a, b, c); }) |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"waiting at %s() " \ |
"waiting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) i\ |
"line #%d <%d>\n", (int) getpid(), (unsigned long long) i\ |
pthread_self(), \ |
pthread_self(), \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); \ |
|
sem_wait_SysV(a); }) |
sem_wait_SysV(a); }) |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"trywaiting at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) i\ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
|
sem_trywait_SysV(a); }) |
|
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"posting at %s() " \ |
"posting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
pthread_self(), \ |
pthread_self(), \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); \ |
|
sem_post_SysV(a); }) |
sem_post_SysV(a); }) |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"destroying at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
sem_destroy_SysV(a); }) |
sem_destroy_SysV(a); }) |
# else |
# else |
Line 412 union semun
|
Line 449 union semun
|
# define sem_unlink(a) sem_unlink_SysV(a) |
# define sem_unlink(a) sem_unlink_SysV(a) |
#else |
#else |
# ifdef DEBUG_SEMAPHORES |
# ifdef DEBUG_SEMAPHORES |
|
# define sem_init(a, b, c) ({ \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"initialization at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, c), fflush(stdout); \ |
|
sem_init(a, b, c); }) |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"waiting at %s() " \ |
"waiting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
pthread_self(), \ |
pthread_self(), \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); sem_wait(a); }) |
sem_wait(a); }) |
|
# define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"trywaiting at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
|
sem_trywait(a); }) |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"posting at %s() " \ |
"posting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
pthread_self(), \ |
pthread_self(), \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); sem_post(a); }) |
sem_post(a); }) |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
|
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
|
"destroying at %s() " \ |
|
"line #%d <%d>\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), \ |
|
#a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
sem_destroy(a); }) |
sem_destroy(a); }) |
# endif |
# endif |
Line 515 union semun
|
Line 571 union semun
|
|
|
__EXTERN__ pid_t pid_processus_pere; |
__EXTERN__ pid_t pid_processus_pere; |
|
|
__EXTERN__ pthread_mutex_t mutex_liste_threads |
__EXTERN__ pthread_mutex_t mutex_sigaction; |
__STATIC_MUTEX_INITIALIZATION__; |
__EXTERN__ pthread_mutex_t mutex_liste_threads; |
|
__EXTERN__ pthread_mutex_t mutex_liste_threads_surveillance; |
__EXTERN__ pthread_mutex_t mutex_creation_variable_partagee |
__EXTERN__ pthread_mutex_t mutex_creation_variable_partagee |
__STATIC_MUTEX_INITIALIZATION__; |
__STATIC_MUTEX_INITIALIZATION__; |
__EXTERN__ pthread_mutex_t mutex_sections_critiques; |
__EXTERN__ pthread_mutex_t mutex_sections_critiques; |
Line 524 union semun
|
Line 581 union semun
|
__EXTERN__ pthread_mutex_t mutex_sem __STATIC_MUTEX_INITIALIZATION__; |
__EXTERN__ pthread_mutex_t mutex_sem __STATIC_MUTEX_INITIALIZATION__; |
|
|
__EXTERN__ volatile int routine_recursive; |
__EXTERN__ volatile int routine_recursive; |
|
__EXTERN__ volatile int nombre_threads_surveillance_processus; |
|
|
# define SEM_FORK 0 |
# define SEM_FORK 0 |
# define SEM_QUEUE 1 |
# define SEM_QUEUE 1 |
# define SEM_SIGNALISATION 2 |
# define SEM_SIGNALISATION 2 |
# define SEM_ARRET_SIGNALISATION 3 |
# define SEM_ARRET_SIGNALISATION 3 |
Line 568 union semun
|
Line 626 union semun
|
stderr, __VA_ARGS__) |
stderr, __VA_ARGS__) |
#define fprintf(flux, ...) transliterated_fprintf(s_etat_processus, \ |
#define fprintf(flux, ...) transliterated_fprintf(s_etat_processus, \ |
flux, __VA_ARGS__) |
flux, __VA_ARGS__) |
#define uprintf(...) transliterated_fprintf(NULL, \ |
#define uprintf(...) std_fprintf(stderr, __VA_ARGS__) |
stderr, __VA_ARGS__) |
#define ufprintf(flux, ...) std_fprintf(flux, __VA_ARGS__) |
#define ufprintf(flux, ...) transliterated_fprintf(NULL, \ |
|
flux, __VA_ARGS__) |
|
|
|
#ifdef SunOS |
#ifdef SunOS |
# define fopen(...) ({ FILE *desc; \ |
# define fopen(...) ({ FILE *desc; \ |
Line 593 union semun
|
Line 649 union semun
|
# define fflush(flux) fflush((flux == stdout) ? stderr : flux) |
# define fflush(flux) fflush((flux == stdout) ? stderr : flux) |
#endif |
#endif |
|
|
// Ajout d'un timeout sur les fonctions pipe() pour éviter une erreur |
|
// système dans le cas où l'on a atteint le nombre maximale de fichiers |
|
// ouverts. |
|
|
|
#define pipe(descripteurs) \ |
|
({ \ |
|
struct timespec temporisation; \ |
|
int erreur, nombre_echecs; \ |
|
nombre_echecs = 0; \ |
|
do \ |
|
{ \ |
|
if ((erreur = pipe(descripteurs)) == 0) break; \ |
|
nombre_echecs++; \ |
|
temporisation.tv_sec = 0; \ |
|
temporisation.tv_nsec = ((long) 1000000000) * rand(); \ |
|
nanosleep(&temporisation, NULL); \ |
|
} while(nombre_echecs < 100); \ |
|
erreur; \ |
|
}) |
|
|
|
// Redéfinition de abs pour un fonctionnement en entier de type long long int |
// Redéfinition de abs pour un fonctionnement en entier de type long long int |
|
|
#ifdef __GNUC__ |
#ifdef __GNUC__ |
Line 635 union semun
|
Line 671 union semun
|
} while(0) |
} while(0) |
|
|
#ifdef __GLIBC__ |
#ifdef __GLIBC__ |
#include <execinfo.h> |
# include <execinfo.h> |
#define __BACKTRACE |
# define __BACKTRACE |
#define BACKTRACE(n) \ |
# define BACKTRACE(n) \ |
do \ |
do \ |
{ \ |
{ \ |
void *buffer[n]; \ |
void *buffer[n]; \ |
Line 653 union semun
|
Line 689 union semun
|
{ \ |
{ \ |
for(i = 0; i < nb; i++) \ |
for(i = 0; i < nb; i++) \ |
uprintf(" %s\n", appels[i]); \ |
uprintf(" %s\n", appels[i]); \ |
free(appels); \ |
sys_free(appels); \ |
} \ |
} \ |
else \ |
else \ |
uprintf("Nullified backtrace\n"); \ |
uprintf("Nullified backtrace\n"); \ |
Line 662 union semun
|
Line 698 union semun
|
pthread_mutex_unlock(&mutex); \ |
pthread_mutex_unlock(&mutex); \ |
} while(0) |
} while(0) |
#else |
#else |
#define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") |
# define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") |
#endif |
#endif |
|
|
#ifdef __BACKTRACE |
#ifdef __BACKTRACE |
Line 698 void *debug_memoire_modification(void *p
|
Line 734 void *debug_memoire_modification(void *p
|
void debug_memoire_retrait(void *ptr); |
void debug_memoire_retrait(void *ptr); |
void debug_memoire_verification(); |
void debug_memoire_verification(); |
|
|
pid_t debug_fork(); |
|
|
|
#define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s) |
|
#define free(s) debug_memoire_retrait(s) |
#define free(s) debug_memoire_retrait(s) |
#define realloc(s, t) debug_memoire_modification(s, t, \ |
#ifdef RPLCXX |
__FUNCTION__, __LINE__, #t) |
# define malloc(s) debug_memoire_ajout(s, \ |
#define fork() debug_fork() |
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(__FUNCTION__))), __LINE__, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(#s)))) |
|
# define realloc(s, t) debug_memoire_modification(s, t, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(__FUNCTION__))), __LINE__, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(#t)))) |
|
#else |
|
# define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, \ |
|
(const unsigned char *) #s) |
|
# define realloc(s, t) debug_memoire_modification(s, t, \ |
|
__FUNCTION__, __LINE__, (const unsigned char *) #t) |
|
#endif |
|
#define fork() debug_fork(s_etat_processus) |
#endif |
#endif |
|
|
#ifdef DEBUG_RETURN |
#ifdef DEBUG_RETURN |
#define return uprintf("[%d] Return from <%s()> at line #%d " \ |
# define return uprintf("[%d] Return from <%s()> at line #%d " \ |
"(%s [%d])\n", (int) getpid(), __FUNCTION__, \ |
"(%s [%d])\n", (int) getpid(), __FUNCTION__, \ |
__LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return |
__LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return |
#endif |
#endif |
|
|
#ifdef DEBUG_MUTEX |
#ifdef DEBUG_MUTEX |
#define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
# define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
"locking at %s() " \ |
"locking at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
#mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \ |
#mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \ |
pthread_mutex_lock(mutex) |
pthread_mutex_lock(mutex) |
#define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
# define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
"unlocking at " \ |
"unlocking at " \ |
"%s() line #%d\n", (int) getpid(), (unsigned long long) \ |
"%s() line #%d\n", (int) getpid(), (unsigned long long) \ |
pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ |
pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ |
fflush(stdout), \ |
fflush(stdout), \ |
pthread_mutex_unlock(mutex) |
pthread_mutex_unlock(mutex) |
|
# define pthread_mutex_trylock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
|
"trylocking at " \ |
|
"%s() line #%d\n", (int) getpid(), (unsigned long long) \ |
|
pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ |
|
fflush(stdout), \ |
|
pthread_mutex_trylock(mutex) |
#endif |
#endif |
|
|
|
|
Line 775 pid_t debug_fork();
|
Line 833 pid_t debug_fork();
|
#define d_SPH "Semaphore $n 'name'" |
#define d_SPH "Semaphore $n 'name'" |
#define d_TAB "<[ table ]>" |
#define d_TAB "<[ table ]>" |
#define d_MTX "Mutex $n" |
#define d_MTX "Mutex $n" |
|
#define d_REC "|[ record ]|" |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Line 812 pid_t debug_fork();
|
Line 871 pid_t debug_fork();
|
# else |
# else |
# define __erreur_(i) i |
# define __erreur_(i) i |
# endif |
# endif |
# define __erreur(i) ({ if (strstr(__FUNCTION__, "recherche_variable") \ |
# define __erreur(i) ({ int ios; ios = errno; \ |
== NULL) ufprintf(stderr, \ |
if (strstr(__FUNCTION__, "recherche_variable") \ |
"ERROR %d AT %s() FROM %s LINE %d\n", \ |
== NULL) { if(ios != 0) \ |
i, __FUNCTION__, __FILE__, __LINE__); i; }) |
ufprintf(stderr, "LAST ERROR: %s\n", strerror(ios)); \ |
|
ufprintf(stderr, "ERROR %d AT %s() FROM %s LINE %d\n", \ |
|
i, __FUNCTION__, __FILE__, __LINE__); BACKTRACE(16); } i; }) |
# endif |
# endif |
#else |
#else |
# define __erreur(i) i |
# define __erreur(i) i |
# define __erreur_(i) i |
# define __erreur_(i) i |
#endif |
#endif |
|
|
|
#ifdef DEBUG_FICHIERS |
|
# define open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); open(a, __VA_ARGS__); }) |
|
# define pipe(a) \ |
|
({ ufprintf(stderr, "[%d] PIPE %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); pipe(a); }) |
|
# define shm_open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] SHM_OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); shm_open(a, __VA_ARGS__); }) |
|
# define shm_unlink(a) \ |
|
({ ufprintf(stderr, "[%d] SHM_UNLINK %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); shm_unlink(a); }) |
|
# define sem_open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] SEM_OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); sem_open(a, __VA_ARGS__); }) |
|
# define sem_unlink(a) \ |
|
({ ufprintf(stderr, "[%d] SEM_UNLINK %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); sem_unlink(a); }) |
|
# define close(a) \ |
|
({ ufprintf(stderr, "[%d] CLOSE %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); close(a); }) |
|
#endif |
|
|
// -1 : erreur provoquée par une bibliothèque externe |
// -1 : erreur provoquée par une bibliothèque externe |
#ifndef RPLARGS |
#ifndef RPLARGS |
Line 988 pid_t debug_fork();
|
Line 1079 pid_t debug_fork();
|
# define d_ex_chiffrement_indisponible __erreur(90) |
# define d_ex_chiffrement_indisponible __erreur(90) |
# define d_ex_longueur_clef_chiffrement __erreur(91) |
# define d_ex_longueur_clef_chiffrement __erreur(91) |
# define d_ex_taille_message __erreur(92) |
# define d_ex_taille_message __erreur(92) |
|
# define d_ex_type_externe_dup __erreur(93) |
|
# define d_ex_type_externe_drop __erreur(94) |
|
# define d_ex_simplification __erreur(95) |
#endif |
#endif |
|
|
|
|
Line 1016 pid_t debug_fork();
|
Line 1110 pid_t debug_fork();
|
#define BIN __RPL_BIN |
#define BIN __RPL_BIN |
#define CHN __RPL_CHN |
#define CHN __RPL_CHN |
#define CPL __RPL_CPL |
#define CPL __RPL_CPL |
|
#define EXT __RPL_EXT |
#define FCH __RPL_FCH |
#define FCH __RPL_FCH |
#define FCT __RPL_FCT |
#define FCT __RPL_FCT |
#define INT __RPL_INT |
#define INT __RPL_INT |
Line 1027 pid_t debug_fork();
|
Line 1122 pid_t debug_fork();
|
#define NOM __RPL_NOM |
#define NOM __RPL_NOM |
#define NON __RPL_NON |
#define NON __RPL_NON |
#define PRC __RPL_PRC |
#define PRC __RPL_PRC |
|
#define REC __RPL_REC |
#define REL __RPL_REL |
#define REL __RPL_REL |
#define RPN __RPL_RPN |
#define RPN __RPL_RPN |
#define SCK __RPL_SCK |
#define SCK __RPL_SCK |
Line 1038 pid_t debug_fork();
|
Line 1134 pid_t debug_fork();
|
#define VIN __RPL_VIN |
#define VIN __RPL_VIN |
#define VRL __RPL_VRL |
#define VRL __RPL_VRL |
|
|
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE }; |
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE, |
|
RPLCAS_SIMPLIFICATION }; |
|
|
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, FCH, FCT, INT, LST, |
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, EXT, FCH, FCT, INT, LST, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REL, RPN, SCK, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, |
SLB, SPH, SQL, TBL, VCX, VIN, VRL }; |
SLB, SPH, SQL, TBL, VCX, VIN, VRL }; |
|
|
/* |
/* |
Line 1057 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Line 1154 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Sans objet. |
Sans objet. |
Type C/Fortran : unsigned integer8 |
Type C/Fortran : unsigned integer8 |
|
|
CHN : chaine de caracteres (character*(*), unsigned char *) |
CHN : chaine de caracteres (unsigned char *) |
Sans objet. |
Sans objet. |
|
|
CPL : complexe sur 2*64 bits (complex*16, struct_complexe16 *) |
CPL : complexe sur 2*64 bits (complex*16, struct_complexe16 *) |
Sans objet. |
Sans objet. |
Type C/Fortran : complex16 |
Type C/Fortran : complex16 |
|
|
|
EXT : type géré dans une bibliothèque externe. |
|
|
FCH : descripteur de fichier (struct_fichier *). |
FCH : descripteur de fichier (struct_fichier *). |
|
|
FCT : déclaration d'une fonction et de son nombre d'arguments |
FCT : déclaration d'une fonction et de son nombre d'arguments |
Line 1098 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Line 1197 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
PRC : processus (struct_processus_fils *) |
PRC : processus (struct_processus_fils *) |
Sans objet. |
Sans objet. |
|
|
|
REC : enregistrement (struct_record *) |
|
|
REL : reel sur 64 bits (real*8, real8 *) |
REL : reel sur 64 bits (real*8, real8 *) |
Sans objet. |
Sans objet. |
|
|
Line 1129 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Line 1230 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
typedef struct objet |
typedef struct objet |
{ |
{ |
enum t_type type; |
enum t_type type; |
|
integer8 extension_type; |
|
void *descripteur_bibliotheque; |
|
|
volatile long nombre_occurrences; |
volatile long nombre_occurrences; |
|
|
Line 1249 typedef struct descripteur_fichier
|
Line 1352 typedef struct descripteur_fichier
|
pid_t pid; |
pid_t pid; |
pthread_t tid; |
pthread_t tid; |
|
|
union |
struct |
{ |
{ |
file *descripteur_c; |
file *descripteur_c; |
sqlite3 *descripteur_sqlite; |
sqlite3 *descripteur_sqlite; |
Line 1315 typedef struct connecteur_sql
|
Line 1418 typedef struct connecteur_sql
|
*/ |
*/ |
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
|
|
|
# define d_BIND_TO_DEVICE 0 |
|
# define d_BROADCAST 1 |
|
# define d_DONT_ROUTE 2 |
|
# define d_KEEP_ALIVE 3 |
|
# define d_PRIORITY 4 |
|
# define d_RECEIVE_BUFFER 5 |
|
# define d_FORCE_RECEIVE_BUFFER 6 |
|
# define d_SEND_BUFFER 7 |
|
# define d_FORCE_SEND_BUFFER 8 |
|
# define d_RECEIVING_TIMEOUT 9 |
|
# define d_SENDING_TIMEOUT 10 |
|
# define d_REUSE_ADDRESS 11 |
|
|
typedef struct socket |
typedef struct socket |
{ |
{ |
int domaine; |
int domaine; |
Line 1333 typedef struct socket
|
Line 1450 typedef struct socket
|
unsigned char protection; |
unsigned char protection; |
unsigned char type[19 + 1]; |
unsigned char type[19 + 1]; |
|
|
|
integer8 options; |
|
int priorite; |
|
int buffer_reception; |
|
int buffer_emission; |
|
int timeout_emission; |
|
int timeout_reception; |
|
|
struct_objet *format; |
struct_objet *format; |
} struct_socket; |
} struct_socket; |
#endif |
#endif |
Line 1520 typedef struct liste_pile_systeme
|
Line 1644 typedef struct liste_pile_systeme
|
logical1 creation_variables_statiques; |
logical1 creation_variables_statiques; |
logical1 creation_variables_partagees; |
logical1 creation_variables_partagees; |
logical1 evaluation_expression; |
logical1 evaluation_expression; |
|
logical1 debug_programme; |
|
|
unsigned char clause; |
unsigned char clause; |
|
|
Line 1700 typedef struct tableau
|
Line 1825 typedef struct tableau
|
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
|
Structure enregistrement |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
typedef struct record |
|
{ |
|
struct_objet *noms; |
|
struct_objet *donnees; |
|
} struct_record; |
|
|
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
Structure arbre |
Structure arbre |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
typedef struct arbre |
typedef struct arbre |
{ |
{ |
struct_objet *objet; |
struct_liste_chainee *feuille; |
|
|
unsigned long nombre_feuilles; |
integer8 nombre_branches; |
struct arbre **feuilles; |
struct arbre **branches; |
} struct_arbre; |
} struct_arbre; |
|
|
|
|
Line 1724 typedef struct instruction_externe
|
Line 1862 typedef struct instruction_externe
|
unsigned char *nom; |
unsigned char *nom; |
unsigned char *nom_bibliotheque; |
unsigned char *nom_bibliotheque; |
void *descripteur_bibliotheque; |
void *descripteur_bibliotheque; |
|
integer8 position_fleche; |
} struct_instruction_externe; |
} struct_instruction_externe; |
|
|
|
|
Line 1765 typedef struct rpl_arguments
|
Line 1904 typedef struct rpl_arguments
|
unsigned char test_instruction; |
unsigned char test_instruction; |
|
|
integer8 nombre_arguments; |
integer8 nombre_arguments; |
// Nombre d'arguments de la fonction, positif ou nul. |
// Nombre d'arguments de la fonction |
|
// 0 : instruction infixe |
|
// positif : nombre d'arguments (notation algébrique possible) |
|
// -1 : notation algrébrique non autorisée |
|
|
void *s_etat_processus; |
void *s_etat_processus; |
} struct_rpl_arguments; |
} struct_rpl_arguments; |
Line 1890 typedef struct liste_variables_partagees
|
Line 2032 typedef struct liste_variables_partagees
|
} struct_liste_variables_partagees; |
} struct_liste_variables_partagees; |
#endif |
#endif |
|
|
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
|
Structure fonction |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
#ifndef RPLARGS |
|
typedef struct fonction |
|
{ |
|
unsigned char *nom_fonction; |
|
integer8 nombre_arguments; |
|
|
|
void (*fonction)(struct processus *); |
|
|
|
volatile struct_liste_chainee *prediction_saut; |
|
volatile logical1 prediction_execution; |
|
} struct_fonction; |
|
#endif |
|
|
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
|
Structure buffer |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
typedef struct buffer |
|
{ |
|
unsigned char *buffer; |
|
|
|
size_t longueur_requise; |
|
int classe; |
|
} struct_buffer; |
|
|
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Structure processus |
Structure processus |
Line 1918 typedef struct processus
|
Line 2096 typedef struct processus
|
unsigned char evaluation_forcee; /*Y/N*/ |
unsigned char evaluation_forcee; /*Y/N*/ |
unsigned char instruction_valide; /*Y/N*/ |
unsigned char instruction_valide; /*Y/N*/ |
unsigned char instruction_intrinseque; /*Y/I/N*/ |
unsigned char instruction_intrinseque; /*Y/I/N*/ |
|
unsigned char instruction_sensible; /*Y/N*/ |
unsigned char test_instruction; /*Y/N*/ |
unsigned char test_instruction; /*Y/N*/ |
unsigned char affichage_arguments; /*Y/N*/ |
unsigned char affichage_arguments; /*Y/N*/ |
unsigned char constante_symbolique; /*Y/N*/ |
unsigned char constante_symbolique; /*Y/N*/ |
Line 2327 typedef struct processus
|
Line 2506 typedef struct processus
|
struct timeval horodatage_profilage; |
struct timeval horodatage_profilage; |
|
|
pthread_mutex_t mutex_allocation; |
pthread_mutex_t mutex_allocation; |
|
pthread_mutex_t mutex_allocation_buffer; |
pthread_mutex_t mutex_interruptions; |
pthread_mutex_t mutex_interruptions; |
pthread_mutex_t mutex_pile_processus; |
pthread_mutex_t mutex_pile_processus; |
pthread_mutex_t mutex_signaux; |
pthread_mutex_t mutex_signaux; |
Line 2361 typedef struct processus
|
Line 2541 typedef struct processus
|
integer8 taille_pile_objets; |
integer8 taille_pile_objets; |
struct_objet *pile_objets; |
struct_objet *pile_objets; |
|
|
# define TAILLE_CACHE 1024 |
# define TAILLE_CACHE 1024 |
|
# define CACHE(type, nom) \ |
integer8 *objets_adr[TAILLE_CACHE]; |
type *objets_##nom[TAILLE_CACHE]; \ |
int pointeur_adr; |
volatile int pointeur_##nom; |
|
|
logical8 *objets_bin[TAILLE_CACHE]; |
# define CACHE2(type, nom) \ |
int pointeur_bin; |
type *nom[TAILLE_CACHE]; \ |
|
volatile int pointeur_##nom; |
complex16 *objets_cpl[TAILLE_CACHE]; |
|
int pointeur_cpl; |
CACHE(integer8, adr) |
|
CACHE(logical8, bin) |
struct fonction *objets_fct[TAILLE_CACHE]; |
CACHE(complex16, cpl) |
int pointeur_fct; |
CACHE(struct_fonction, fct) |
|
CACHE(integer8, int) |
integer8 *objets_int[TAILLE_CACHE]; |
CACHE(struct_matrice, mat) |
int pointeur_int; |
CACHE(struct_nom, nom) |
|
CACHE(struct_record, rec) |
struct_matrice *objets_mat[TAILLE_CACHE]; |
CACHE(real8, rel) |
int pointeur_mat; |
CACHE(struct_tableau, tab) |
|
CACHE(struct_vecteur, vec) |
struct_nom *objets_nom[TAILLE_CACHE]; |
|
int pointeur_nom; |
CACHE2(struct_liste_chainee, maillons) |
|
CACHE2(struct_arbre_variables, variables_noeud) |
real8 *objets_rel[TAILLE_CACHE]; |
CACHE2(struct_arbre_variables_partagees, variables_partagees_noeud) |
int pointeur_rel; |
CACHE2(struct_liste_variables, variables_feuille) |
|
CACHE2(struct_variable, variables_variable) |
struct_tableau *objets_tab[TAILLE_CACHE]; |
CACHE2(struct_arbre_variables *, variables_tableau_noeuds) |
int pointeur_tab; |
CACHE2(struct_arbre_variables_partagees *, |
|
variables_tableau_noeuds_partages) |
struct_vecteur *objets_vec[TAILLE_CACHE]; |
|
int pointeur_vec; |
CACHE2(struct_buffer, enveloppes_buffers) |
|
unsigned char ***cache_buffer; |
struct_liste_chainee *maillons[TAILLE_CACHE]; |
int *pointeur_cache_buffer; |
int pointeur_maillons; |
} struct_processus; |
|
#endif |
struct_arbre_variables *variables_noeud[TAILLE_CACHE]; |
|
int pointeur_variables_noeud; |
|
|
|
struct_arbre_variables_partagees |
|
*variables_partagees_noeud[TAILLE_CACHE]; |
|
int pointeur_variables_partagees_noeud; |
|
|
|
struct_liste_variables *variables_feuille[TAILLE_CACHE]; |
#ifdef DEBUG_MEMOIRE |
int pointeur_variables_feuille; |
pid_t debug_fork(struct_processus *s_etat_processus); |
|
#endif |
|
|
struct_variable *variables_variable[TAILLE_CACHE]; |
|
int pointeur_variables_variable; |
|
|
|
struct_arbre_variables **variables_tableau_noeuds[TAILLE_CACHE]; |
/* |
int pointeur_variables_tableau_noeuds; |
================================================================================ |
|
MISE EN PLACE DE L'ALLOCATEUR SPÉCIFIQUE |
|
================================================================================*/ |
|
|
struct_arbre_variables_partagees |
#ifndef DEBUG_MEMOIRE |
**variables_tableau_noeuds_partages |
# define malloc(a) rpl_malloc(s_etat_processus, a) |
[TAILLE_CACHE]; |
# define realloc(a, b) rpl_realloc(s_etat_processus, a, b) |
int pointeur_variables_tableau_noeuds_partages; |
# define free(a) rpl_free(s_etat_processus, a) |
} struct_processus; |
|
#endif |
#endif |
|
|
/* |
void *rpl_malloc(struct_processus *s_etat_processus, size_t s); |
-------------------------------------------------------------------------------- |
void *rpl_realloc(struct_processus *s_etat_processus, void *ptr, size_t s); |
Structure fonction |
void rpl_free(struct_processus *s_etat_processus, void *ptr); |
-------------------------------------------------------------------------------- |
void *sys_malloc(size_t s); |
*/ |
void *sys_realloc(void *ptr, size_t s); |
|
void sys_free(void *ptr); |
#ifndef RPLARGS |
|
typedef struct fonction |
|
{ |
|
unsigned char *nom_fonction; |
|
integer8 nombre_arguments; |
|
|
|
void (*fonction)(struct_processus *); |
/* |
|
* Wrapper de readline() pour que la fonction renvoie un pointeur sur un |
|
* buffer alloué par rpl_malloc(). |
|
*/ |
|
|
volatile struct_liste_chainee *prediction_saut; |
#define readline(s) readline_wrapper(s_etat_processus, s) |
volatile logical1 prediction_execution; |
unsigned char *readline_wrapper(struct_processus *s_etat_processus, |
} struct_fonction; |
unsigned char *s); |
#endif |
|
|
|
|
|
/* |
/* |
Line 2501 void instruction_clrcntxt(struct_process
|
Line 2672 void instruction_clrcntxt(struct_process
|
void instruction_clrerr(struct_processus *s_etat_processus); |
void instruction_clrerr(struct_processus *s_etat_processus); |
void instruction_clrfuse(struct_processus *s_etat_processus); |
void instruction_clrfuse(struct_processus *s_etat_processus); |
void instruction_clrmtx(struct_processus *s_etat_processus); |
void instruction_clrmtx(struct_processus *s_etat_processus); |
|
void instruction_clrsock(struct_processus *s_etat_processus); |
void instruction_clrsmphr(struct_processus *s_etat_processus); |
void instruction_clrsmphr(struct_processus *s_etat_processus); |
void instruction_clrswi(struct_processus *s_etat_processus); |
void instruction_clrswi(struct_processus *s_etat_processus); |
void instruction_cls(struct_processus *s_etat_processus); |
void instruction_cls(struct_processus *s_etat_processus); |
Line 2579 void instruction_elseif(struct_processus
|
Line 2751 void instruction_elseif(struct_processus
|
void instruction_end(struct_processus *s_etat_processus); |
void instruction_end(struct_processus *s_etat_processus); |
void instruction_eng(struct_processus *s_etat_processus); |
void instruction_eng(struct_processus *s_etat_processus); |
void instruction_epsilon(struct_processus *s_etat_processus); |
void instruction_epsilon(struct_processus *s_etat_processus); |
|
void instruction_eqv(struct_processus *s_etat_processus); |
void instruction_erase(struct_processus *s_etat_processus); |
void instruction_erase(struct_processus *s_etat_processus); |
void instruction_errm(struct_processus *s_etat_processus); |
void instruction_errm(struct_processus *s_etat_processus); |
void instruction_errn(struct_processus *s_etat_processus); |
void instruction_errn(struct_processus *s_etat_processus); |
Line 2715 void instruction_mtxtrylock(struct_proce
|
Line 2888 void instruction_mtxtrylock(struct_proce
|
void instruction_mtxunlock(struct_processus *s_etat_processus); |
void instruction_mtxunlock(struct_processus *s_etat_processus); |
void instruction_multiplication(struct_processus *s_etat_processus); |
void instruction_multiplication(struct_processus *s_etat_processus); |
|
|
|
void instruction_nbrcpus(struct_processus *s_etat_prorcessus); |
void instruction_ne(struct_processus *s_etat_processus); |
void instruction_ne(struct_processus *s_etat_processus); |
void instruction_neg(struct_processus *s_etat_processus); |
void instruction_neg(struct_processus *s_etat_processus); |
void instruction_next(struct_processus *s_etat_processus); |
void instruction_next(struct_processus *s_etat_processus); |
Line 2804 void instruction_rdz(struct_processus *s
|
Line 2978 void instruction_rdz(struct_processus *s
|
void instruction_re(struct_processus *s_etat_processus); |
void instruction_re(struct_processus *s_etat_processus); |
void instruction_read(struct_processus *s_etat_processus); |
void instruction_read(struct_processus *s_etat_processus); |
void instruction_recode(struct_processus *s_etat_processus); |
void instruction_recode(struct_processus *s_etat_processus); |
|
void instruction_record(struct_processus *s_etat_processus); |
void instruction_recv(struct_processus *s_etat_processus); |
void instruction_recv(struct_processus *s_etat_processus); |
void instruction_redraw(struct_processus *s_etat_processus); |
void instruction_redraw(struct_processus *s_etat_processus); |
void instruction_regex(struct_processus *s_etat_processus); |
void instruction_regex(struct_processus *s_etat_processus); |
Line 3009 void conversion_chaine(struct_processus
|
Line 3184 void conversion_chaine(struct_processus
|
unsigned char *chaine, unsigned char type); |
unsigned char *chaine, unsigned char type); |
void conversion_decimal_vers_hms(real8 *angle); |
void conversion_decimal_vers_hms(real8 *angle); |
void conversion_degres_vers_radians(real8 *angle); |
void conversion_degres_vers_radians(real8 *angle); |
void conversion_element_tex(unsigned char **element, unsigned char *fonction); |
void conversion_element_tex(struct_processus *s_etat_processus, |
|
unsigned char **element, unsigned char *fonction); |
void conversion_format(struct_processus *s_etat_processus, |
void conversion_format(struct_processus *s_etat_processus, |
unsigned char *chaine); |
unsigned char *chaine); |
void conversion_hms_vers_decimal(real8 *angle); |
void conversion_hms_vers_decimal(real8 *angle); |
void conversion_majuscule_limitee(unsigned char *chaine_entree, |
void conversion_majuscule_limitee( |
unsigned char *chaine_sortie, integer8 longueur); |
unsigned char *chaine_entree, unsigned char *chaine_sortie, |
|
integer8 longueur); |
void conversion_radians_vers_degres(real8 *angle); |
void conversion_radians_vers_degres(real8 *angle); |
void copie_arbre_variables(struct_processus *s_etat_processus, |
void copie_arbre_variables(struct_processus *s_etat_processus, |
struct_processus *s_nouvel_etat_processus); |
struct_processus *s_nouvel_etat_processus); |
Line 3083 void interruption3(int signal);
|
Line 3260 void interruption3(int signal);
|
void interruption4(int signal); |
void interruption4(int signal); |
void interruption5(int signal); |
void interruption5(int signal); |
void interruption6(int signal); |
void interruption6(int signal); |
void interruption_depassement_pile(int urgence, stackoverflow_context_t scp); |
#ifdef HAVE_SIGSEGV_RECOVERY |
|
void interruption_depassement_pile(int urgence, |
|
stackoverflow_context_t scp); |
|
#endif |
void inversion_matrice(struct_processus *s_etat_processus, |
void inversion_matrice(struct_processus *s_etat_processus, |
struct_matrice *s_matrice); |
struct_matrice *s_matrice); |
void lancement_daemon(struct_processus *s_etat_processus); |
void lancement_daemon(struct_processus *s_etat_processus); |
Line 3167 void liberation_queue_signaux(struct_pro
|
Line 3347 void liberation_queue_signaux(struct_pro
|
void destruction_queue_signaux(struct_processus *s_etat_processus); |
void destruction_queue_signaux(struct_processus *s_etat_processus); |
int envoi_signal_contexte(struct_processus *s_etat_processus, |
int envoi_signal_contexte(struct_processus *s_etat_processus, |
enum signaux_rpl signal); |
enum signaux_rpl signal); |
int envoi_signal_processus(pid_t pid, enum signaux_rpl signal); |
int envoi_signal_processus(pid_t pid, enum signaux_rpl signal, |
int envoi_signal_thread(pthread_t tid, enum signaux_rpl signal); |
logical1 test_ouverture); |
|
int envoi_signal_thread(struct_processus *s_etat_processus, |
|
pthread_t tid, enum signaux_rpl signal); |
#endif |
#endif |
|
|
/* |
/* |
Line 3205 real8 correlation_statistique(struct_mat
|
Line 3387 real8 correlation_statistique(struct_mat
|
real8 covariance_statistique(struct_matrice *s_matrice, |
real8 covariance_statistique(struct_matrice *s_matrice, |
integer8 colonne_1, integer8 colonne_2, |
integer8 colonne_1, integer8 colonne_2, |
unsigned char type, logical1 *erreur); |
unsigned char type, logical1 *erreur); |
struct_vecteur *ecart_type_statistique(struct_matrice *s_matrice, |
struct_vecteur *ecart_type_statistique(struct_processus *s_etat_processus, |
unsigned char type); |
struct_matrice *s_matrice, unsigned char type); |
struct_vecteur *moyenne_statistique(struct_matrice *s_matrice); |
struct_vecteur *moyenne_statistique(struct_processus *s_etat_processus, |
struct_vecteur *sommation_colonne_statistique(struct_matrice *s_matrice, |
struct_matrice *s_matrice); |
|
struct_vecteur *sommation_colonne_statistique( |
|
struct_processus *s_etat_processus, struct_matrice *s_matrice, |
integer8 colonne); |
integer8 colonne); |
struct_vecteur *sommation_produits_colonnes_statistiques(struct_matrice |
struct_vecteur *sommation_produits_colonnes_statistiques( |
|
struct_processus *s_etat_processus, struct_matrice |
*s_matrice, integer8 colonne_1, integer8 colonne_2); |
*s_matrice, integer8 colonne_1, integer8 colonne_2); |
struct_vecteur *sommation_statistique(struct_matrice *s_matrice); |
struct_vecteur *sommation_statistique(struct_processus *s_etat_processus, |
struct_vecteur *variance_statistique(struct_matrice *s_matrice, |
struct_matrice *s_matrice); |
unsigned char type); |
struct_vecteur *variance_statistique(struct_processus *s_etat_processus, |
|
struct_matrice *s_matrice, unsigned char type); |
#endif |
#endif |
|
|
/* |
/* |
Line 3248 struct_liste_chainee *sauvegarde_argumen
|
Line 3434 struct_liste_chainee *sauvegarde_argumen
|
#ifndef RPLARGS |
#ifndef RPLARGS |
unsigned char *analyse_algebrique(struct_processus *s_etat_processus, |
unsigned char *analyse_algebrique(struct_processus *s_etat_processus, |
unsigned char *chaine_algebrique, struct_liste_chainee **l_base_liste); |
unsigned char *chaine_algebrique, struct_liste_chainee **l_base_liste); |
|
#endif |
unsigned char *analyse_flux(struct_processus *s_etat_processus, |
unsigned char *analyse_flux(struct_processus *s_etat_processus, |
unsigned char *flux, integer8 longueur); |
unsigned char *flux, integer8 longueur); |
unsigned char *chiffrement(const EVP_CIPHER *type_chiffrement, |
#ifndef RPLARGS |
|
unsigned char *chiffrement(struct_processus *s_etat_processus, |
|
const EVP_CIPHER *type_chiffrement, |
logical1 encodage, unsigned char *message, integer8 longueur_message, |
logical1 encodage, unsigned char *message, integer8 longueur_message, |
unsigned char *clef, integer8 longueur_clef, |
unsigned char *clef, integer8 longueur_clef, |
unsigned char *vecteur_initialisation, |
unsigned char *vecteur_initialisation, |
integer8 *longueur_message_chiffre); |
integer8 *longueur_message_chiffre, |
unsigned char *compactage(unsigned char *chaine); |
unsigned char padding); |
unsigned char *conversion_majuscule(unsigned char *chaine); |
unsigned char *compactage(struct_processus *s_etat_processus, |
|
unsigned char *chaine); |
|
unsigned char *conversion_majuscule(struct_processus *s_etat_processus, |
|
unsigned char *chaine); |
unsigned char *creation_nom_fichier(struct_processus *s_etat_processus, |
unsigned char *creation_nom_fichier(struct_processus *s_etat_processus, |
unsigned char *chemin); |
unsigned char *chemin); |
unsigned char *date_compilation(); |
unsigned char *date_compilation(struct_processus *s_etat_processus); |
unsigned char *extraction_chaine(unsigned char *chaine, integer8 i, integer8 j); |
unsigned char *extraction_chaine(struct_processus *s_etat_processus, |
|
unsigned char *chaine, integer8 i, integer8 j); |
unsigned char *formateur(struct_processus *s_etat_processus, long offset, |
unsigned char *formateur(struct_processus *s_etat_processus, long offset, |
struct_objet *s_objet); |
struct_objet *s_objet); |
unsigned char *formateur_fichier(struct_processus *s_etat_processus, |
unsigned char *formateur_fichier(struct_processus *s_etat_processus, |
Line 3268 unsigned char *formateur_fichier(struct_
|
Line 3461 unsigned char *formateur_fichier(struct_
|
integer8 longueur, integer8 longueur_champ, unsigned char format, |
integer8 longueur, integer8 longueur_champ, unsigned char format, |
unsigned char type, integer8 *longueur_effective, integer8 *recursivite, |
unsigned char type, integer8 *longueur_effective, integer8 *recursivite, |
logical1 export_fichier); |
logical1 export_fichier); |
|
#endif |
unsigned char *formateur_flux(struct_processus *s_etat_processus, |
unsigned char *formateur_flux(struct_processus *s_etat_processus, |
unsigned char *donnees, integer8 *longueur); |
unsigned char *donnees, integer8 *longueur); |
|
#ifndef RPLARGS |
unsigned char *formateur_fichier_nombre(struct_processus *s_etat_processus, |
unsigned char *formateur_fichier_nombre(struct_processus *s_etat_processus, |
void *valeur_numerique, unsigned char type, |
void *valeur_numerique, unsigned char type, |
integer8 longueur, integer8 longueur_champ, unsigned char format); |
integer8 longueur, integer8 longueur_champ, unsigned char format); |
Line 3286 unsigned char *formateur_reel(struct_pro
|
Line 3481 unsigned char *formateur_reel(struct_pro
|
unsigned char *messages(struct_processus *s_etat_processus); |
unsigned char *messages(struct_processus *s_etat_processus); |
unsigned char *pointeur_ieme_caractere(struct_processus *s_etat_processus, |
unsigned char *pointeur_ieme_caractere(struct_processus *s_etat_processus, |
unsigned char *chaine, integer8 position); |
unsigned char *chaine, integer8 position); |
unsigned char *purification_chaine(unsigned char *chaine); |
unsigned char *purification_chaine(struct_processus *s_etat_processus, |
|
unsigned char *chaine); |
unsigned char *recherche_chemin_fichiers_temporaires(struct_processus |
unsigned char *recherche_chemin_fichiers_temporaires(struct_processus |
*s_etat_processus); |
*s_etat_processus); |
unsigned char *reencodage(struct_processus *s_etat_processus, |
unsigned char *reencodage(struct_processus *s_etat_processus, |
Line 3352 logical1 retrait_variable_statique(struc
|
Line 3548 logical1 retrait_variable_statique(struc
|
logical1 retrait_variables_statiques_locales( |
logical1 retrait_variables_statiques_locales( |
struct_processus *s_etat_processus); |
struct_processus *s_etat_processus); |
logical1 sequenceur(struct_processus *s_etat_processus); |
logical1 sequenceur(struct_processus *s_etat_processus); |
logical1 sequenceur_optimise(struct_processus *s_etat_processus); |
logical1 sequenceur_optimise(struct_processus *s_etat_processus, |
|
struct_liste_chainee *l_bibliotheques); |
#endif |
#endif |
|
|
/* |
/* |
Line 3390 logical1 validation_chaine(unsigned char
|
Line 3587 logical1 validation_chaine(unsigned char
|
#ifndef RPLARGS |
#ifndef RPLARGS |
ssize_t read_atomic(struct_processus *s_etat_processus, |
ssize_t read_atomic(struct_processus *s_etat_processus, |
int fd, void *buf, size_t count); |
int fd, void *buf, size_t count); |
|
ssize_t read_atomic_signal(struct_processus *s_etat_processus, |
|
int fd, void *buf, size_t count); |
ssize_t write_atomic(struct_processus *s_etat_processus, |
ssize_t write_atomic(struct_processus *s_etat_processus, |
int fd, void *buf, size_t count); |
int fd, void *buf, size_t count); |
#endif |
#endif |
Line 3400 ssize_t write_atomic(struct_processus *s
|
Line 3599 ssize_t write_atomic(struct_processus *s
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
int alsprintf(unsigned char **strp, const char *fmt, ...); |
int alsprintf(struct_processus *s_etat_processus, |
|
unsigned char **strp, const char *fmt, ...); |
|
#ifndef RPLARGS |
|
int association_etat_processus_readline(); |
|
#endif |
int interruption_violation_access(void *adresse_fautive, int gravite); |
int interruption_violation_access(void *adresse_fautive, int gravite); |
#ifndef RPLARGS |
#ifndef RPLARGS |
|
int initialisation_etat_processus_readline(); |
|
int liberation_etat_processus_readline(); |
integer8 liste_variables(struct_processus *s_etat_processus, |
integer8 liste_variables(struct_processus *s_etat_processus, |
struct_tableau_variables *tableau); |
struct_tableau_variables *tableau); |
integer8 nombre_variables(struct_processus *s_etat_processus); |
integer8 nombre_variables(struct_processus *s_etat_processus); |
int readline_analyse_syntaxique(int count, int key); |
int readline_analyse_syntaxique(int count, int key); |
int readline_effacement(int count, int key); |
int readline_effacement(int count, int key); |
#endif |
#endif |
|
int std_fprintf(file *flux, const char *format, ...); |
int tex_fprintf(struct_processus *s_etat_processus, |
int tex_fprintf(struct_processus *s_etat_processus, |
file *flux, const char *format, ...); |
file *flux, const char *format, ...); |
int transliterated_fprintf(struct_processus *s_etat_processus, file *flux, |
int transliterated_fprintf(struct_processus *s_etat_processus, file *flux, |
const char *format, ...); |
const char *format, ...); |
int valsprintf(unsigned char **strp, const char *fmt, va_list ap); |
int valsprintf(struct_processus *s_etat_processus, |
|
unsigned char **strp, const char *fmt, va_list ap); |
int wrapper_instruction_intrinseque(void (*fonction)(), |
int wrapper_instruction_intrinseque(void (*fonction)(), |
struct_rpl_arguments *rpl_arguments); |
struct_rpl_arguments *rpl_arguments); |
|
|
Line 3464 struct_liste_chainee *analyse_rpn(struct
|
Line 3671 struct_liste_chainee *analyse_rpn(struct
|
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
|
Allocateur de buffers à cache |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
void initialisation_allocateur_buffer(struct_processus *s_etat_processus); |
|
void liberation_allocateur_buffer(struct_processus *s_etat_pocessus); |
|
struct_buffer *allocation_buffer(struct_processus *s_etat_processus, |
|
size_t longueur); |
|
void liberation_buffer(struct_processus *s_etat_processus, |
|
struct_buffer *buffer); |
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
Fonctions renvoyant une copie de la structure de description des processus |
Fonctions renvoyant une copie de la structure de description des processus |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
Line 3525 struct_liste_variables_partagees *recher
|
Line 3745 struct_liste_variables_partagees *recher
|
#endif |
#endif |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
|
Fonctions gérant les arbres de simplification |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
#ifndef RPLARGS |
|
struct_arbre *creation_arbre(struct_processus *s_etat_processus, |
|
struct_objet **t_objets, integer8 indice, integer8 indice_maximal); |
|
void liberation_arbre(struct_processus *s_etat_processus, |
|
struct_arbre *s_noeud); |
|
void parcours_arbre(struct_processus *s_etat_processus, struct_arbre *s_noeud); |
|
void simplification_arbre(struct_processus *s_etat_processus, |
|
struct_arbre *s_noeud); |
|
#endif |
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Fonctions gérant la complétion automatique |
Fonctions gérant la complétion automatique |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |