File:  [local] / rpl / src / rpl.h
Revision 1.194: download - view: text, annotated - select for diffs - revision graph
Mon Feb 25 11:24:02 2013 UTC (11 years, 2 months ago) by bertrand
Branches: MAIN
CVS tags: HEAD
DIGEST supporte maintenant les signatures HMAC avec clef.

    1: /*
    2: ================================================================================
    3:   RPL/2 (R) version 4.1.12
    4:   Copyright (C) 1989-2012 Dr. BERTRAND Joël
    5: 
    6:   This file is part of RPL/2.
    7: 
    8:   RPL/2 is free software; you can redistribute it and/or modify it
    9:   under the terms of the CeCILL V2 License as published by the french
   10:   CEA, CNRS and INRIA.
   11:  
   12:   RPL/2 is distributed in the hope that it will be useful, but WITHOUT
   13:   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   14:   FITNESS FOR A PARTICULAR PURPOSE.  See the CeCILL V2 License
   15:   for more details.
   16:  
   17:   You should have received a copy of the CeCILL License
   18:   along with RPL/2. If not, write to info@cecill.info.
   19: ================================================================================
   20: */
   21: 
   22: 
   23: #ifndef INCLUSION_RPL
   24: #define INCLUSION_RPL
   25: 
   26: #ifndef __RPLCAS
   27: #   define _GNU_SOURCE
   28: #   define _XOPEN_SOURCE        700
   29: #endif
   30: 
   31: #define _REENTRANT
   32: 
   33: #ifndef __RPLCAS
   34: #   ifdef Darwin
   35: #       define  _DARWIN_C_SOURCE
   36: #   endif
   37: 
   38: #   ifdef OpenBSD
   39: #       define _BSD_SOURCE
   40: #   endif
   41: #endif
   42: 
   43: #ifdef OS2
   44: #   ifndef __RPLCAS
   45: #       define _BSD_SOURCE
   46: #   endif
   47: 
   48: #   include <types.h>
   49:     enum { SHUT_RD = 0, SHUT_WR, SHUT_RDWR };
   50: #   define SHUT_RD      SHUT_RD
   51: #   define SHUT_WR      SHUT_WR
   52: #   define SHUT_RDWR    SHUT_RDWR
   53: 
   54: #   include "getaddrinfo-conv.h"
   55: 
   56: #   define sched_yield(arg)
   57: #endif
   58: 
   59: 
   60: /*
   61: ================================================================================
   62:   INCLUSIONS
   63: ================================================================================
   64: */
   65: 
   66: #include <stdio.h>
   67: #include <stdlib.h>
   68: #include <math.h>
   69: #include <string.h>
   70: #include <strings.h>
   71: #include <syslog.h>
   72: #include <errno.h>
   73: #include <stdarg.h>
   74: #include <poll.h>
   75: 
   76: #ifndef RPLARGS
   77: #   include <sys/mman.h>
   78: #   include <sys/time.h>
   79: #   include <sys/resource.h>
   80: #   include <sys/select.h>
   81: #   include <sys/socket.h>
   82: #   include <sys/stat.h>
   83: #   include <sys/timeb.h>
   84: #   include <sys/types.h>
   85: #   include <sys/un.h>
   86: #   include <sys/wait.h>
   87: 
   88: #   include <arpa/inet.h>
   89: #   include <netinet/in.h>
   90: #   include <netdb.h>
   91: 
   92: #   include <dlfcn.h>
   93: #   include <fcntl.h>
   94: #   include <pthread.h>
   95: #   include <regex.h>
   96: 
   97: #   ifdef OS2
   98: #       undef pthread_mutexattr_settype
   99: #       define pthread_mutexattr_settype(a, b)
  100: #   endif
  101: 
  102: #   include <pwd.h>
  103: #   ifdef SHARED_MEMORY
  104: #       include <sys/shm.h>
  105: #   endif
  106: 
  107: #   ifndef IPCS_SYSV
  108: #       include <semaphore.h>
  109: #   else
  110: #       include <sys/ipc.h>
  111: #       include <sys/sem.h>
  112: 
  113: #       ifdef OS2
  114: #           define INCL_DOSSEMAPHORES
  115: #           define INCL_DOSMEMMGR
  116: #           define INCL_DOSERRORS
  117: #           include <os2.h>
  118: 
  119:             typedef struct _OS2SEM
  120:             {
  121:                 HMTX    hmtx;
  122:                 HEV     hev;
  123:                 ULONG   shared;
  124:                 ULONG   *cnt;
  125:                 ULONG   *nopened;
  126:                 ULONG   allocated;
  127:             } sem_t;
  128: #       else // IPCS_SYSV
  129:             typedef struct
  130:             {
  131:                 int             sem;
  132:                 int             alloue;
  133:                 unsigned char   *path;
  134:                 pid_t           pid;
  135:                 pthread_t       tid;
  136:             } sem_t;
  137: #       endif
  138: 
  139: #       ifndef SEM_FAILED
  140: #           define SEM_FAILED   NULL
  141: #       endif
  142: 
  143:         sem_t *sem_open_SysV(const char *nom, int oflag, ...);
  144:         int sem_init_SysV(sem_t *sem, int shared, unsigned int value);
  145:         int sem_close_SysV(sem_t *sem);
  146:         int sem_wait_SysV(sem_t *sem);
  147:         int sem_trywait_SysV(sem_t *sem);
  148:         int sem_timedwait_SysV(sem_t *sem, struct timespec *ts);
  149:         int sem_post_SysV(sem_t *sem);
  150:         int sem_getvalue_SysV(sem_t *sem, int *value);
  151:         int sem_unlink_SysV(char *nom);
  152:         int sem_destroy_SysV(sem_t *sem);
  153: #   endif
  154: 
  155: #   include <setjmp.h>
  156: #   include <signal.h>
  157: #   include <termios.h>
  158: #   include <time.h>
  159: #   include <unistd.h>
  160: #   include <locale.h>
  161: 
  162: #   include "history.h"
  163: #   include "readline.h"
  164: #   include "termcap.h"
  165: #   include "iconv.h"
  166: 
  167: #   include "openssl/evp.h"
  168: #   ifndef OPENSSL_NO_MD2
  169: #       include "openssl/md2.h"
  170: #   endif
  171: #   ifndef OPENSSL_NO_MD4
  172: #       include "openssl/md4.h"
  173: #   endif
  174: #   ifndef OPENSSL_NO_MD5
  175: #       include "openssl/md5.h"
  176: #   endif
  177: #   ifndef OPENSSL_NO_MDC2
  178: #       include "openssl/mdc2.h"
  179: #   endif
  180: #   ifndef OPENSSL_NO_RIPEMD
  181: #       include "openssl/ripemd.h"
  182: #   endif
  183: #   ifndef OPENSSL_NO_SHA
  184: #       include "openssl/sha.h"
  185: #   endif
  186: #   ifndef OPENSSL_NO_WHIRLPOOL
  187: #       include "openssl/whrlpool.h"
  188: #   endif
  189: 
  190: #   include "sqlite3.h"
  191: #   include "sigsegv.h"
  192: #   ifdef OS2
  193:         // Bug de libsigsegv
  194: #       undef HAVE_STACK_OVERFLOW_RECOVERY
  195: #   endif
  196: 
  197: #   define HAVE_INLINE
  198: #   define GSL_RANGE_CHECK_OFF
  199: #   include "gsl/gsl_cdf.h"
  200: #   include "gsl/gsl_cblas.h"
  201: #   include "gsl/gsl_errno.h"
  202: #   include "gsl/gsl_fft_complex.h"
  203: #   include "gsl/gsl_permutation.h"
  204: #   include "gsl/gsl_randist.h"
  205: #   include "gsl/gsl_rng.h"
  206: #   include "gsl/gsl_sf.h"
  207: #endif
  208: 
  209: #ifdef SunOS
  210: #   include <ieeefp.h>
  211: #endif
  212: 
  213: // Définition spécifique à Hurd
  214: #ifndef PIPE_BUF
  215: #   define fpathconf (".", _PC_PIPE_BUF)
  216: #endif
  217: 
  218: #ifdef MYSQL_SUPPORT
  219: #   include <mysql.h>
  220: #   define mysqlclose(arg)      mysql_close(arg.mysql)
  221: #else
  222: #   define mysqlclose(arg)
  223: #endif
  224: 
  225: #ifdef POSTGRESQL_SUPPORT
  226: #   include <libpq-fe.h>
  227: #   define postgresqlclose(arg) PQfinish(arg.postgresql)
  228: #else
  229: #   define postgresqlclose(arg)
  230: #endif
  231: 
  232: #include "librplprototypes.h"
  233: 
  234: #ifndef RPLARGS
  235: #   ifndef UNIX_PATH_MAX
  236:         struct sockaddr_un sizecheck;
  237: #       define UNIX_PATH_MAX sizeof(sizecheck.sun_path)
  238: #   endif
  239: #endif
  240: 
  241: #ifdef MAIN_RPL
  242: #   define __EXTERN__
  243: #   define __STATIC_MUTEX_INITIALIZATION__ = PTHREAD_MUTEX_INITIALIZER
  244: #else
  245: #   define __EXTERN__                       extern
  246: #   define __STATIC_MUTEX_INITIALIZATION__
  247: #endif
  248: 
  249: /*
  250: ================================================================================
  251:   Bugs spécifiques
  252: ================================================================================
  253: */
  254: 
  255: // Néant
  256: 
  257: /*
  258: ================================================================================
  259:   TYPES
  260: ================================================================================
  261: */
  262: 
  263: typedef FILE                    file;
  264: typedef unsigned char           t_8_bits;
  265: 
  266: #ifndef RPLARGS
  267: #   include "rpltypes-conv.h"
  268: #else
  269: #   include "rpltypes.h"
  270: #endif
  271: 
  272: enum signaux_rpl
  273: {
  274:     rpl_signull = 0,
  275:     rpl_sigint,
  276:     rpl_sigterm,
  277:     rpl_sigstart,       // Signal envoyé par un père pour lancer son fils.
  278:     rpl_sigcont,        // Signal de redémarrage d'un processus arrêté par
  279:                         // SUSPEND
  280:     rpl_sigstop,        // Signal d'arrêt envoyé par l'instruction STOP ou
  281:                         // FUSE. (FSTOP)
  282:     rpl_sigabort,       // Signal envoyé par l'instruction ABORT (à regrouper
  283:                         // avec FABORT)
  284:     rpl_sigurg,         // Signal d'arrêt urgent
  285:     rpl_siginject,      // Signal indiquant la présence d'une donnée à lire
  286:                         // envoyée depuis le père
  287:     rpl_sigalrm,        // Signal d'alarme (erreur système) depuis un fils
  288:     rpl_sighup,
  289:     rpl_sigtstp,
  290:     rpl_sigexcept,
  291:     rpl_sigmax
  292: };
  293: 
  294: #define LONGUEUR_QUEUE_SIGNAUX          1024
  295: 
  296: // Une structure s_queue_signaux est créée par processus (et non par thread).
  297: // Elle est projetée dans un segment de mémoire partagée pour qu'elle soit
  298: // accessible à la fois du père et des fils.
  299: 
  300: #ifndef RPLARGS
  301: typedef struct queue_signaux
  302: {
  303: #   ifndef IPCS_SYSV
  304: #       ifndef SEMAPHORES_NOMMES
  305:             sem_t               semaphore;
  306:             sem_t               signalisation;
  307: #       endif
  308: #   else
  309:         sem_t                   semaphore;
  310:         sem_t                   signalisation;
  311: #   endif
  312: 
  313:     volatile int                pointeur_lecture;
  314:     volatile int                pointeur_ecriture;
  315:     pthread_t                   thread_signaux;
  316:     volatile logical1           requete_arret;
  317: 
  318:     volatile struct
  319:     {
  320:         pid_t                   pid;
  321:         enum signaux_rpl        signal;
  322:     }                           queue[LONGUEUR_QUEUE_SIGNAUX];
  323: } struct_queue_signaux;
  324: 
  325: __EXTERN__ struct_queue_signaux     *s_queue_signaux;
  326: __EXTERN__ int                      f_queue_signaux;
  327: 
  328: #   ifdef SEMAPHORES_NOMMES
  329:         __EXTERN__ sem_t            *semaphore_queue_signaux;
  330:         __EXTERN__ sem_t            *semaphore_signalisation;
  331: #   endif
  332: #endif
  333: 
  334: #ifdef OS2
  335: #   define readline(s) readline_wrapper(s)
  336:     unsigned char *readline_wrapper(unsigned char *s);
  337: #endif
  338: 
  339: #if ! defined(UNION_SEMUN) && defined(IPCS_SYSV)
  340: union semun
  341: {
  342:     int                 val;
  343:     struct semid_ds     *buf;
  344:     unsigned short      *array;
  345:     struct seminfo      *__buf;
  346: };
  347: #endif
  348: 
  349: #ifndef RTLD_LOCAL
  350: #   define RTLD_LOCAL       0
  351: #endif
  352: 
  353: #ifndef SIGSTKSZ
  354: #   define SIGSTKSZ         65536
  355: #endif
  356: 
  357: /*
  358: ================================================================================
  359:   SÉMAPHORES
  360: ================================================================================
  361: */
  362: 
  363: #ifdef IPCS_SYSV
  364: #   define sem_init(a, b, c)    sem_init_SysV(a, b, c)
  365: #   define sem_destroy(a)       sem_destroy_SysV(a)
  366: #   define sem_wait(a)          sem_wait_SysV(a)
  367: #   define sem_trywait(a)       sem_trywait_SysV(a)
  368: #   define sem_timedwait(a, b)  sem_timedwait_SysV(a, b)
  369: #   define sem_post(a)          sem_post_SysV(a)
  370: #   define sem_getvalue(a, b)   sem_getvalue_SysV(a, b)
  371: #   define sem_open(...)        sem_open_SysV(__VA_ARGS__)
  372: #   define sem_close(a)         sem_close_SysV(a)
  373: #   define sem_unlink(a)        sem_unlink_SysV(a)
  374: #endif
  375: 
  376: 
  377: /*
  378: ================================================================================
  379:   SIGNAUX
  380: ================================================================================
  381: */
  382: 
  383: #ifndef RPLARGS
  384: 
  385: // Signaux utilisés par défaut :
  386: //  SIGINT
  387: //  SIGTSTP
  388: //  SIGCONT
  389: //  SIGPIPE
  390: //  SIGUSR1 et SIGUSR2 sont utilisé par libsigsegv.
  391: //  SIGHUP
  392: //  SIGALRM
  393: 
  394: #   define SIGTEST                  255
  395: 
  396: //  Nombre d'interruptions disponibles
  397: #   define d_NOMBRE_INTERRUPTIONS   64
  398: #endif
  399: 
  400: /*
  401: ================================================================================
  402:   Granularité temporelle
  403: ================================================================================
  404: */
  405: 
  406: #ifndef RPLARGS
  407: #   define GRANULARITE_us           10
  408: #   define GRANULARITE_us_max       100000
  409: #   define INCR_GRANULARITE(g) \
  410:     do  g = 1000 * ((g >= (GRANULARITE_us_max * 1000)) \
  411:             ? GRANULARITE_us_max : ((g / 1000) + GRANULARITE_us)); while(0)
  412: #endif
  413: 
  414: /*
  415: ================================================================================
  416:   Options de debug
  417: ================================================================================
  418: */
  419: 
  420: #ifndef RPLARGS
  421: #   define d_debug_pile_utilisateur         ((integer8) 0x1)
  422: #   define d_debug_pile_systeme             ((integer8) 0x2)
  423: #   define d_debug_appels_fonctions         ((integer8) 0x4)
  424: #   define d_debug_processus                ((integer8) 0x8)
  425: #   define d_debug_analyse                  ((integer8) 0x10)
  426: #   define d_debug_fusible                  ((integer8) 0x20)
  427: #   define d_debug_variables                ((integer8) 0x40)
  428: #   define d_debug_fonctions_intrinseques   ((integer8) 0x80)
  429: #   define d_debug_niveaux                  ((integer8) 0x100)
  430: #   define d_conversion_RPN                 ((integer8) 0x200)
  431: #   define d_traitement_interruption        ((integer8) 0x400)
  432: #   define d_debug_signaux                  ((integer8) 0x800)
  433: #endif
  434: 
  435: /*
  436: ================================================================================
  437:   Variables globales
  438: ================================================================================
  439: */
  440: 
  441: #ifndef RPLARGS
  442: #   ifdef SEMAPHORES_NOMMES
  443: #       define LONGUEUR_NOM_SEMAPHORE   64
  444: #   endif
  445: 
  446: #   ifdef SEMAPHORES_NOMMES
  447: #       define __PTR__      *
  448: #   else
  449: #       define __PTR__
  450: #   endif
  451: 
  452:     __EXTERN__ jmp_buf              contexte_ecriture;
  453:     __EXTERN__ jmp_buf              contexte_impression;
  454:     __EXTERN__ jmp_buf              contexte_initial;
  455:     __EXTERN__ jmp_buf              contexte_processus;
  456:     __EXTERN__ jmp_buf              contexte_thread;
  457: 
  458:     __EXTERN__ volatile int         signal_test;
  459: 
  460:     __EXTERN__ pid_t                pid_processus_pere;
  461: 
  462: #   ifdef SEMAPHORES_NOMMES
  463:     __EXTERN__ pthread_mutex_t      mutex_sem __STATIC_MUTEX_INITIALIZATION__;
  464: #   endif
  465: 
  466:     __EXTERN__ pthread_mutex_t      mutex_liste_threads
  467:                                             __STATIC_MUTEX_INITIALIZATION__;
  468:     __EXTERN__ pthread_mutex_t      mutex_gestionnaires_signaux_atomique
  469:                                             __STATIC_MUTEX_INITIALIZATION__;
  470:     __EXTERN__ pthread_mutex_t      mutex_creation_variable_partagee
  471:                                             __STATIC_MUTEX_INITIALIZATION__;
  472:     __EXTERN__ pthread_mutex_t      mutex_sections_critiques;
  473:     __EXTERN__ pthread_mutex_t      mutex_liste_variables_partagees;
  474: 
  475:     __EXTERN__ sem_t __PTR__        semaphore_gestionnaires_signaux;
  476: 
  477:     __EXTERN__ volatile int         routine_recursive;
  478: #endif
  479: 
  480: #ifdef SEMAPHORES_NOMMES
  481: #define SEM_FORK            0
  482: #define SEM_QUEUE           1
  483: #define SEM_SIGNAUX         2
  484: #define SEM_SIGNALISATION   3
  485: sem_t *sem_init2(unsigned int valeur, pid_t pid, int ordre);
  486: sem_t *sem_init3(unsigned int valeur, pid_t pid, pthread_t tid, int ordre);
  487: int sem_destroy2(sem_t *semaphore_p, pid_t pid, int ordre);
  488: int sem_destroy3(sem_t *semaphore_p, pid_t pid, pthread_t tid, int ordre);
  489: int sem_getvalue2(sem_t *semaphore, int *valeur);
  490: sem_t *sem_open2(pid_t pid, int ordre);
  491: 
  492: // Le mutex est là uniquement pour pouvoir émuler le comportement
  493: // de sem_getvalue() sur un système comme MacOS X qui ne possède pas
  494: // cette fonction.
  495: 
  496: #define sem_getvalue(semaphore, value) sem_getvalue2(semaphore, value)
  497: #define sem_post(semaphore) \
  498:         ({ int r; pthread_mutex_lock(&mutex_sem); \
  499:         r = sem_post(semaphore), pthread_mutex_unlock(&mutex_sem); r; })
  500: #define sem_wait(semaphore) \
  501:         ({ int r; pthread_mutex_lock(&mutex_sem); \
  502:         r = sem_wait(semaphore), pthread_mutex_unlock(&mutex_sem); r; })
  503: #define sem_trywait(semaphore) \
  504:         ({ int r; pthread_mutex_lock(&mutex_sem); \
  505:         r = sem_trywait(semaphore), pthread_mutex_unlock(&mutex_sem); r; })
  506: #endif
  507: 
  508: /*
  509: ================================================================================
  510:   Macros
  511: ================================================================================
  512: */
  513: 
  514: // Par défaut, tout est redirigé vers stderr sauf indication explicite de
  515: // stdout.
  516: 
  517: #define printf(...) transliterated_fprintf(s_etat_processus, \
  518:             stderr, __VA_ARGS__)
  519: #define fprintf(flux, ...) transliterated_fprintf(s_etat_processus, \
  520:             flux, __VA_ARGS__)
  521: #define uprintf(...) transliterated_fprintf(NULL, \
  522:             stderr, __VA_ARGS__)
  523: #define ufprintf(flux, ...) transliterated_fprintf(NULL, \
  524:             flux, __VA_ARGS__)
  525: 
  526: #ifdef SunOS
  527: #   define fopen(...) ({ FILE *desc; \
  528:             while((desc = fopen(__VA_ARGS__)) == NULL) \
  529:             { if ((errno != EINTR) && (errno != 0)) break; } desc; })
  530: #   define freopen(...) ({ FILE *desc; \
  531:             while((desc = freopen(__VA_ARGS__)) == NULL) \
  532:             { if ((errno != EINTR) && (errno != 0)) break; } desc; })
  533: #   define fclose(...) ({ int ios; \
  534:             while((ios = fclose(__VA_ARGS__)) != 0) \
  535:             { if ((errno != EINTR) && (errno != 0)) break; } ios; })
  536: #   define fflush(flux) ({ int ios; \
  537:             while((ios = fflush((flux == stdout) ? stderr : flux)) != 0) \
  538:             { if ((errno != EINTR) && (errno != 0)) break; } ios; })
  539: #   define sem_open(...) ({ sem_t *semaphore; \
  540:             while((semaphore = sem_open(__VA_ARGS__)) == SEM_FAILED) \
  541:             { if (errno != EINTR) break; }  semaphore; })
  542: #else // !SunOS
  543: #   define fflush(flux) fflush((flux == stdout) ? stderr : flux)
  544: #endif
  545: 
  546: // Ajout d'un timeout sur les fonctions pipe() pour éviter une erreur
  547: // système dans le cas où l'on a atteint le nombre maximale de fichiers
  548: // ouverts.
  549: 
  550: #define pipe(descripteurs) \
  551:     ({ \
  552:         struct timespec temporisation; \
  553:         int erreur, nombre_echecs; \
  554:         nombre_echecs = 0; \
  555:         do \
  556:         { \
  557:             if ((erreur = pipe(descripteurs)) == 0) break; \
  558:             nombre_echecs++; \
  559:             temporisation.tv_sec = 0; \
  560:             temporisation.tv_nsec = ((long) 1000000000) * rand(); \
  561:             nanosleep(&temporisation, NULL); \
  562:         } while(nombre_echecs < 100); \
  563:         erreur; \
  564:      })
  565: 
  566: // Redéfinition de abs pour un fonctionnement en entier de type long long int
  567: 
  568: #ifdef __GNUC__
  569: #   define abs(i) ({ typeof(i) _i; _i = (i); (_i >= 0) ? _i : -_i; })
  570: // typeof() est une extension de gcc, mais est présent sur d'autres compilateurs
  571: // comme Sun Studio. Dans le cas où typeof() n'existe pas, il est possible
  572: // d'utiliser la macro suivante, mais elle possède un effet de bord dû à
  573: // l'évaluation multiple de l'argument.
  574: #else
  575: #   define abs(i) (((i) >= 0) ? (i) : (-i))
  576: #endif
  577: 
  578: #define NOTICE(m) \
  579:     do \
  580:     { \
  581:         ufprintf(stderr, "[%d-%llu] %s() from %s at line %d: %s\n", \
  582:                 getpid(), (unsigned long long) pthread_self(), \
  583:                 __FUNCTION__, __FILE__, __LINE__, m); \
  584:         fflush(stderr); \
  585:     } while(0)
  586: 
  587: #ifdef __GLIBC__
  588: #include <execinfo.h>
  589: #define __BACKTRACE
  590: #define BACKTRACE(n) \
  591:     do \
  592:     { \
  593:         void            *buffer[n]; \
  594:         int             nb, i; \
  595:         char            **appels; \
  596:         pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; \
  597:         nb = backtrace(buffer, n); \
  598:         appels = backtrace_symbols(buffer, nb); \
  599:         pthread_mutex_lock(&mutex); \
  600:         uprintf("[%d-%llu] BACKTRACE <%s()> at line #%d\n", \
  601:                 getpid(), pthread_self(), __FUNCTION__, __LINE__); \
  602:         if (appels != NULL) \
  603:         { \
  604:             for(i = 0; i < nb; i++) \
  605:                 uprintf("    %s\n", appels[i]); \
  606:             free(appels); \
  607:         } \
  608:         else \
  609:             uprintf("Nullified backtrace\n"); \
  610:         uprintf("[%d-%llu] END OF BACKTRACE\n", getpid(), pthread_self()); \
  611:         fflush(stdout); \
  612:         pthread_mutex_unlock(&mutex); \
  613:     } while(0)
  614: #else
  615: #define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc")
  616: #endif
  617: 
  618: #ifdef __BACKTRACE
  619: #   define BUG(b, ...) \
  620:             do { if (b) { uprintf("[%d] BUG! <%s()> at line #%d of %s\n", \
  621:             (int) getpid(), __FUNCTION__, __LINE__, __FILE__); \
  622:             __VA_ARGS__; fflush(stdout); \
  623:             BACKTRACE(64); \
  624:             pthread_kill(pthread_self(), SIGBUS); }} while(0)
  625: #else
  626: #   define BUG(b, ...) \
  627:             do { if (b) { uprintf("[%d] BUG! <%s()> at line #%d of %s\n", \
  628:             (int) getpid(), __FUNCTION__, __LINE__, __FILE__); \
  629:             __VA_ARGS__; fflush(stdout); \
  630:             pthread_kill(pthread_self(), SIGBUS); }} while(0)
  631: #endif
  632: 
  633: 
  634: /*
  635: ================================================================================
  636:   Affichage des points de retour des fonctions
  637: ================================================================================
  638: */
  639: 
  640: #ifdef DEBUG_MEMOIRE
  641: void analyse_post_mortem();
  642: void *debug_memoire_ajout(size_t taille, const unsigned char *fonction,
  643:         unsigned long ligne, const unsigned char *argument);
  644: void debug_memoire_initialisation();
  645: void *debug_memoire_modification(void *pointeur, size_t taille,
  646:         const unsigned char *fonction, unsigned long ligne,
  647:         const unsigned char *argument);
  648: void debug_memoire_retrait(void *ptr);
  649: void debug_memoire_verification();
  650: 
  651: pid_t debug_fork();
  652: 
  653: #define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s)
  654: #define free(s) debug_memoire_retrait(s)
  655: #define realloc(s, t) debug_memoire_modification(s, t, \
  656:             __FUNCTION__, __LINE__, #t)
  657: #define fork() debug_fork()
  658: #endif
  659: 
  660: #ifdef DEBUG_RETURN
  661: #define return uprintf("[%d] Return from <%s()> at line #%d " \
  662:         "(%s [%d])\n", (int) getpid(), __FUNCTION__, \
  663:         __LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return
  664: #endif
  665: 
  666: #ifdef DEBUG_MUTEX
  667: #define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \
  668:         "locking at %s() " \
  669:         "line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \
  670:         #mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \
  671:         pthread_mutex_lock(mutex)
  672: #define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \
  673:         "unlocking at " \
  674:         "%s() line #%d\n", (int) getpid(), (unsigned long long) \
  675:         pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \
  676:         fflush(stdout), \
  677:         pthread_mutex_unlock(mutex)
  678: #endif
  679: 
  680: #ifdef DEBUG_SEMAPHORES
  681: #define sem_wait(a) ({ int value; sem_getvalue(a, &value); \
  682:         uprintf("[%d-%llu] Semaphore %s (%p) "\
  683:         "waiting at %s() " \
  684:         "line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \
  685:         #a, a, __FUNCTION__, __LINE__), fflush(stdout); \
  686:         if (value > 1) BUG(1, uprintf("Value %d\n", value)); sem_wait(a); })
  687: #define sem_post(a) ({ int value; sem_getvalue(a, &value); \
  688:         uprintf("[%d-%llu] Semaphore %s (%p) "\
  689:         "posting at %s() " \
  690:         "line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \
  691:         #a, a, __FUNCTION__, __LINE__), fflush(stdout); \
  692:         if (value > 0) BUG(1, uprintf("Value %d\n", value)); sem_post(a); })
  693: #define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \
  694:         if (value == 0) BUG(1, uprintf("Value %d\n", value)); sem_destroy(a); })
  695: #endif
  696: 
  697: 
  698: /*
  699: ================================================================================
  700:   DEFINIONS
  701: ================================================================================
  702: */
  703: 
  704: /*
  705: --------------------------------------------------------------------------------
  706:   Valeurs
  707: --------------------------------------------------------------------------------
  708: */
  709: 
  710: #define d_faux                  ((logical1) 0L)
  711: #define d_vrai                  ((logical1) -1L)
  712: 
  713: #define d_absence_erreur        ((logical1) d_faux)
  714: #define d_erreur                ((logical1) d_vrai)
  715: 
  716: #define d_code_fin_chaine                   '\0'
  717: #define d_code_espace                       ' '
  718: #define d_code_retour_chariot               '\n'
  719: #define d_code_tabulation                   '\t'
  720: #define d_longueur_maximale_instruction     16
  721: 
  722: #define d_INT                   "integer"
  723: #define d_REL                   "real"
  724: #define d_CPL                   "complex"
  725: #define d_VIN                   "[ integer ]"
  726: #define d_VRL                   "[ real ]"
  727: #define d_VCX                   "[ complex ]"
  728: #define d_MIN                   "[[ integer ]]"
  729: #define d_MRL                   "[[ real ]]"
  730: #define d_MCX                   "[[ complex ]]"
  731: #define d_BIN                   "# binary[bodh]"
  732: #define d_NOM                   "'name'"
  733: #define d_CHN                   "\"string\""
  734: #define d_LST                   "{ list }"
  735: #define d_ALG                   "'algebraic'"
  736: #define d_RPN                   "<< RPN >>"
  737: #define d_FCH                   "File $n { format }"
  738: #define d_SLB                   "Library $n"
  739: #define d_SQL                   "Sql $n (type)"
  740: #define d_PRC                   "Process $n"
  741: #define d_SCK                   "Socket $n { format }"
  742: #define d_SPH                   "Semaphore $n 'name'"
  743: #define d_TAB                   "<[ table ]>"
  744: #define d_MTX                   "Mutex $n"
  745: 
  746: /*
  747: --------------------------------------------------------------------------------
  748:   Paramètres du système
  749: --------------------------------------------------------------------------------
  750: */
  751: 
  752: #ifndef RPLARGS
  753: #   define ds_beep                              ""
  754: #   define ds_fichier_historique                ".RPL2_history"
  755: #   define ds_imposition_separateur_decimal     d_vrai
  756: #   define ds_longueur_historique               256
  757: #   define ds_nombre_maximum_fichiers_ouverts   65536
  758: #   define ds_preprocesseur                     "rplpp " \
  759:                                                     "--nostdinc -C 2> /dev/null"
  760: #   define ds_rplcore                           "rpl-core"
  761: #   define ds_rplprofile                        "rpl-profile"
  762: #   define ds_sdat                              "SDAT"
  763: #endif
  764: 
  765: /*
  766: --------------------------------------------------------------------------------
  767:   Erreurs système
  768: --------------------------------------------------------------------------------
  769: */
  770: 
  771: #ifdef DEBUG_ERREURS
  772: #   ifdef MESSAGES
  773: #       define __erreur(i)  i
  774: #       define __erreur_(i) i
  775: #   else
  776: #       undef _ERREURS_VARIABLES
  777: #       ifdef _ERREURS_VARIABLES
  778: #           define __erreur_(i) __erreur(i)
  779: #       else
  780: #           define __erreur_(i) i
  781: #       endif
  782: #       define __erreur(i)  ({ if (strstr(__FUNCTION__, "recherche_variable") \
  783:                 == NULL) ufprintf(stderr, \
  784:                 "ERROR %d AT %s() FROM %s LINE %d\n", \
  785:                 i, __FUNCTION__, __FILE__, __LINE__); i; })
  786: #   endif
  787: #else
  788: #   define __erreur(i)  i
  789: #   define __erreur_(i) i
  790: #endif
  791: 
  792: 
  793: // -1 : erreur provoquée par une bibliothèque externe
  794: #ifndef RPLARGS
  795: #   define d_es                                 2000
  796: #   define d_es_allocation_memoire              __erreur(2001)
  797: #   define d_es_variable_introuvable            __erreur_(2002)
  798: #   define d_es_pile_vide                       __erreur(2003)
  799: #   define d_es_end_incoherent                  __erreur(2004)
  800: #   define d_es_peripherique_stdin              __erreur(2005)
  801: #   define d_es_erreur_fichier                  __erreur(2006)
  802: #   define d_es_execution_bibliotheque          __erreur(2007)
  803: #   define d_es_signal                          __erreur(2008)
  804: #   define d_es_processus                       __erreur(2009)
  805: #   define d_es_pile_operationnelle_vide        __erreur(2010)
  806: #   define d_es_nombre_max_descripteurs         __erreur(2011)
  807: #   define d_es_interruption_invalide           __erreur(2012)
  808: #   define d_es_contexte                        __erreur(2013)
  809: #   define d_es_somme_controle                  __erreur(2014)
  810: #   define d_es_semaphore                       __erreur(2015)
  811: #   define d_es_mutex_acquis_autre_thread       __erreur(2016)
  812: #endif
  813: 
  814: /*
  815: --------------------------------------------------------------------------------
  816:   Exceptions
  817: --------------------------------------------------------------------------------
  818: */
  819: 
  820: #ifndef RPLARGS
  821: #   define d_ep                                 1000
  822: #   define d_ep_division_par_zero               __erreur(1001)
  823: #   define d_ep_matrice_non_inversible          __erreur(1002)
  824: #   define d_ep_resultat_indefini               __erreur(1003)
  825: #   define d_ep_underflow                       __erreur(1004)
  826: #   define d_ep_overflow                        __erreur(1005)
  827: #   define d_ep_domaine_definition              __erreur(1006)
  828: #   define d_ep_perte_precision                 __erreur(1007)
  829: #   define d_ep_decomposition_QR                __erreur(1008)
  830: #   define d_ep_matrice_non_definie_positive    __erreur(1009)
  831: #   define d_ep_decomposition_QZ                __erreur(1010)
  832: #   define d_ep_decomposition_SVD               __erreur(1011)
  833: #endif
  834: 
  835: /*
  836: --------------------------------------------------------------------------------
  837:   Erreurs de compilation
  838: --------------------------------------------------------------------------------
  839: */
  840: 
  841: #ifndef RPLARGS
  842: #   define d_ec                                 3000
  843: #   define d_ec_niveau_definition_negatif       __erreur(3001)
  844: #   define d_ec_nom_definition_invalide         __erreur(3002)
  845: #   define d_ec_erreur_boucle_definie           __erreur(3003)
  846: #   define d_ec_erreur_instruction_end          __erreur(3004)
  847: #   define d_ec_erreur_instruction_until        __erreur(3005)
  848: #   define d_ec_source_incoherent               __erreur(3006)
  849: #   define d_ec_erreur_instruction_while        __erreur(3007)
  850: #   define d_ec_erreur_instruction_then         __erreur(3008)
  851: #   define d_ec_erreur_instruction_else         __erreur(3009)
  852: #   define d_ec_erreur_instruction_elseif       __erreur(3010)
  853: #   define d_ec_erreur_instruction_select       __erreur(3011)
  854: #   define d_ec_erreur_instruction_case         __erreur(3012)
  855: #endif
  856: 
  857: /*
  858: --------------------------------------------------------------------------------
  859:   Erreurs à l'exécution
  860: --------------------------------------------------------------------------------
  861: */
  862: 
  863: // -1 : erreur provoquée par une bibliothèque externe
  864: #ifndef RPLARGS
  865: #   define d_ex                                 0
  866: #   define d_ex_pile_vide                       __erreur(1)
  867: #   define d_ex_manque_argument                 __erreur(2)
  868: #   define d_ex_argument_invalide               __erreur(3)
  869: #   define d_ex_erreur_type_argument            __erreur(4)
  870: #   define d_ex_nom_reserve                     __erreur(5)
  871: #   define d_ex_nombre_arguments                __erreur(6)
  872: #   define d_ex_dimensions_invalides            __erreur(7)
  873: #   define d_ex_expression_invalide             __erreur(8)
  874: #   define d_ex_absence_graphique_courant       __erreur(9)
  875: #   define d_ex_erreur_traitement_condition     __erreur(10)
  876: #   define d_ex_erreur_traitement_boucle        __erreur(11)
  877: #   define d_ex_variable_non_definie            __erreur_(12)
  878: #   define d_ex_drapeau_inexistant              __erreur(13)
  879: #   define d_ex_nom_invalide                    __erreur(14)
  880: #   define d_ex_element_inexistant              __erreur(15)
  881: #   define d_ex_absence_variable                __erreur(16)
  882: #   define d_ex_erreur_evaluation               __erreur(17)
  883: #   define d_ex_semaphore                       __erreur(18)
  884: #   define d_ex_longueur_fft                    __erreur(19)
  885: #   define d_ex_queue_impression                __erreur(20)
  886: #   define d_ex_type_trace_invalide             __erreur(21)
  887: #   define d_ex_erreur_fichier                  __erreur(22)
  888: #   define d_ex_absence_equation                __erreur(23)
  889: #   define d_ex_erreur_bibliotheque             __erreur(24)
  890: #   define d_ex_execution_bibliotheque          __erreur(25)
  891: #   define d_ex_stop                            __erreur(26)
  892: #   define d_ex_matrice_statistique_invalide    __erreur(27)
  893: #   define d_ex_dimensions_matrice_statistique  __erreur(28)
  894: #   define d_ex_absence_observations            __erreur(29)
  895: #   define d_ex_statistiques_echantillon        __erreur(30)
  896: #   define d_ex_observations_inexistantes       __erreur(31)
  897: #   define d_ex_syntaxe                         __erreur(32)
  898: #   define d_ex_cycle_hors_boucle               __erreur(33)
  899: #   define d_ex_conversion_unite                __erreur(34)
  900: #   define d_ex_erreur_parametre_fichier        __erreur(35)
  901: #   define d_ex_erreur_acces_fichier            __erreur(36)
  902: #   define d_ex_erreur_requete_fichier          __erreur(37)
  903: #   define d_ex_erreur_format_fichier           __erreur(38)
  904: #   define d_ex_fichier_verrouille              __erreur(39)
  905: #   define d_ex_verrou_indefini                 __erreur(40)
  906: #   define d_ex_fin_de_fichier_atteinte         __erreur(41)
  907: #   define d_ex_debut_de_fichier_atteint        __erreur(42)
  908: #   define d_ex_erreur_type_fichier             __erreur(43)
  909: #   define d_ex_fichier_vide                    __erreur(44)
  910: #   define d_ex_dimensions_differentes          __erreur(45)
  911: #   define d_ex_routines_mathematiques          __erreur(46)
  912: #   define d_ex_exit_hors_boucle                __erreur(47)
  913: #   define d_ex_longueur_dft                    __erreur(48)
  914: #   define d_ex_contexte                        __erreur(49)
  915: #   define d_ex_processus                       __erreur(50)
  916: #   define d_ex_image_processus                 __erreur(51)
  917: #   define d_ex_erreur_sql                      __erreur(52)
  918: #   define d_ex_variable_verrouillee            __erreur(53)
  919: #   define d_ex_variable_volatile               __erreur(54)
  920: #   define d_ex_erreur_processus                __erreur(55)
  921: #   define d_ex_erreur_impression               __erreur(56)
  922: #   define d_ex_nombre_arguments_fonction       __erreur(57)
  923: #   define d_ex_fonction_indisponible           __erreur(58)
  924: #   define d_ex_bibliotheque_chargee            __erreur(59)
  925: #   define d_ex_aucun_symbole                   __erreur(60)
  926: #   define d_ex_definition_ambigue              __erreur(61)
  927: #   define d_ex_fichier_hors_contexte           __erreur(62)
  928: #   define d_ex_socket_en_ecoute                __erreur(63)
  929: #   define d_ex_interruption_invalide           __erreur(64)
  930: #   define d_ex_erreur_transcodage              __erreur(65)
  931: #   define d_ex_absence_processus_pere          __erreur(66)
  932: #   define d_ex_creation_variable               __erreur(67)
  933: #   define d_ex_fusible                         __erreur(68)
  934: #   define d_ex_iswi_hors_interruption          __erreur(69)
  935: #   define d_ex_daemon                          __erreur(70)
  936: #   define d_ex_mutex                           __erreur(71)
  937: #   define d_ex_variable_statique_partagee      __erreur(72)
  938: #   define d_ex_variable_partagee               __erreur(73)
  939: #   define d_ex_graphique_memorise              __erreur(74)
  940: #   define d_ex_matrice_non_diagonale           __erreur(75)
  941: #   define d_ex_locales                         __erreur(76)
  942: #   define d_ex_representation                  __erreur(77)
  943: #   define d_ex_erreur_profilage                __erreur(78)
  944: #   define d_ex_enregistrement_inexistant       __erreur(79)
  945: #   define d_ex_clef_inexistante                __erreur(80)
  946: #   define d_ex_nom_implicite                   __erreur(81)
  947: #   define d_ex_version_bibliotheque            __erreur(82)
  948: #   define d_ex_creation_variable_globale       __erreur(83)
  949: #   define d_ex_erreur_interne_rplcas           __erreur(84)
  950: #   define d_ex_fichier_corrompu                __erreur(85)
  951: #   define d_ex_mutex_acquis_autre_thread       __erreur(86)
  952: #   define d_ex_expression_reguliere            __erreur(87)
  953: #   define d_ex_instruction_indisponible        __erreur(88)
  954: #   define d_ex_chiffrement                     __erreur(89)
  955: #   define d_ex_chiffrement_indisponible        __erreur(90)
  956: #endif
  957: 
  958: 
  959: /*
  960: ================================================================================
  961:   STRUCTURES
  962: ================================================================================
  963: */
  964: 
  965: /*
  966: --------------------------------------------------------------------------------
  967:   Structure objet
  968: --------------------------------------------------------------------------------
  969: */
  970: 
  971: #ifdef MIN
  972: #   undef MIN
  973: #endif
  974: 
  975: #ifdef MAX
  976: #   undef MAX
  977: #endif
  978: 
  979: #define ADR __RPL_ADR
  980: #define ALG __RPL_ALG
  981: #define BIN __RPL_BIN
  982: #define CHN __RPL_CHN
  983: #define CPL __RPL_CPL
  984: #define FCH __RPL_FCH
  985: #define FCT __RPL_FCT
  986: #define INT __RPL_INT
  987: #define LST __RPL_LST
  988: #define MCX __RPL_MCX
  989: #define MIN __RPL_MIN
  990: #define MRL __RPL_MRL
  991: #define MTX __RPL_MTX
  992: #define NOM __RPL_NOM
  993: #define NON __RPL_NON
  994: #define PRC __RPL_PRC
  995: #define REL __RPL_REL
  996: #define RPN __RPL_RPN
  997: #define SCK __RPL_SCK
  998: #define SLB __RPL_SLB
  999: #define SPH __RPL_SPH
 1000: #define SQL __RPL_SQL
 1001: #define TBL __RPL_TBL
 1002: #define VCX __RPL_VCX
 1003: #define VIN __RPL_VIN
 1004: #define VRL __RPL_VRL
 1005: 
 1006: enum t_rplcas_commandes     { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE };
 1007: 
 1008: enum t_type     { ADR = 0, ALG, BIN, CHN, CPL, FCH, FCT, INT, LST,
 1009:                 MCX, MIN, MRL, MTX, NOM, NON, PRC, REL, RPN, SCK,
 1010:                 SLB, SPH, SQL, TBL, VCX, VIN, VRL };
 1011: 
 1012:     /*
 1013:     ADR : adresse sur 32 bits (au moins) non signés (unsigned long)
 1014:             Adresse d'une définition à interpréter.
 1015: 
 1016:     ALG : expression algébrique (struct_liste_chainee *)
 1017:             La liste chaînée contient la définition convertie en notation
 1018:             polonaise inversée. Ce type diffère du type 'RPN' au niveau
 1019:             du format de sortie (notation algébrique).
 1020: 
 1021:     BIN : entier binaire sur 64 bits (unsigned integer8 *)
 1022:             Sans objet.
 1023:             Type C/Fortran : unsigned integer8
 1024: 
 1025:     CHN : chaine de caracteres (character*(*), unsigned char *)
 1026:             Sans objet.
 1027: 
 1028:     CPL : complexe sur 2*64 bits (complex*16, struct_complexe16 *)
 1029:             Sans objet.
 1030:             Type C/Fortran : complex16
 1031: 
 1032:     FCH : descripteur de fichier (struct_fichier *).
 1033: 
 1034:     FCT : déclaration d'une fonction et de son nombre d'arguments
 1035:             (struct_fonction *). Ce type n'est nécessaire que dans le
 1036:             traitement des types 'ALG' et 'RPN'.
 1037: 
 1038:     INT : entier sur 64 bits (integer*8, integer8 *)
 1039:             Sans objet.
 1040:             Type C/Fortran : integer8
 1041: 
 1042:     LST : liste (struct_liste_chainee *)
 1043:             Les objets sont enregistrés sous forme de liste chaînée récursive.
 1044:             Cela permet de traiter des tableaux de données hétérogènes de
 1045:             grandes dimensions. Le nombre de dimensions maximal est fixé par
 1046:             la mémoire de la station.
 1047: 
 1048:     MCX : matrice de complexes (struct_matrice *)
 1049:             Sans objet.
 1050: 
 1051:     MIN : matrice d'entiers (struct_matrice *)
 1052:             Sans objet.
 1053: 
 1054:     MRL : matrice de reels (struct_matrice *)
 1055:             Sans objet.
 1056: 
 1057:     MTX : mutex (struct_mutex *)
 1058:             Sans objet.
 1059: 
 1060:     NOM : nom de variable (struct_nom *)
 1061:             Sans objet.
 1062: 
 1063:     PRC : processus (struct_processus_fils *)
 1064:             Sans objet.
 1065: 
 1066:     REL : reel sur 64 bits (real*8, real8 *)
 1067:             Sans objet.
 1068: 
 1069:     RPN : definition (struct_liste_chainee *)
 1070:             Ce type diffère du type 'ALG' au niveau du format de sortie
 1071:             (notation polonaise inversée).
 1072: 
 1073:     SCK : socket (struct_socket *)
 1074: 
 1075:     SLB : bibliothèque dynamique partagée (struct_bibliotheque *) 
 1076:             Sans objet.
 1077: 
 1078:     SPH : sémaphore nommé (struct_semaphore *)
 1079: 
 1080:     SQL : connecteur sur une base de données SQL (struct_connecteur_sql *)
 1081: 
 1082:     TBL : tableau multidimensionnel d'objets (struct_tableau *).
 1083: 
 1084:     VCX : vecteur de complexes (struct_vecteur *)
 1085:             Sans objet.
 1086: 
 1087:     VIN : vecteur d'entiers (struct_vecteur *)
 1088:             Sans objet.
 1089: 
 1090:     VRL : vecteur de reels (struct_vecteur *)
 1091:             Sans objet.
 1092:     */
 1093: 
 1094: typedef struct objet
 1095: {
 1096:     enum t_type         type;
 1097: 
 1098:     volatile long       nombre_occurrences;
 1099: 
 1100:     pthread_mutex_t     mutex;
 1101: 
 1102:     void                *objet;
 1103: } struct_objet;
 1104: 
 1105: 
 1106: /*
 1107: --------------------------------------------------------------------------------
 1108:   Structure fichier
 1109: --------------------------------------------------------------------------------
 1110: */
 1111: 
 1112: #ifndef RPLARGS
 1113: typedef struct fichier
 1114: {
 1115:     unsigned long               descripteur;
 1116: 
 1117:     unsigned char               acces;          /* S/D/I */
 1118:     unsigned char               binaire;        /* Y/N/F */
 1119:     unsigned char               ouverture;
 1120:     unsigned char               protection;
 1121:     unsigned char               *nom;
 1122: 
 1123:     struct_objet                *format;
 1124: 
 1125:     pid_t                       pid;
 1126:     pthread_t                   tid;
 1127: 
 1128:     integer8                    position_clef;
 1129: } struct_fichier;
 1130: #endif
 1131: 
 1132: 
 1133: /*
 1134: --------------------------------------------------------------------------------
 1135:   Structure mutex
 1136: --------------------------------------------------------------------------------
 1137: */
 1138: 
 1139: #ifndef RPLARGS
 1140: typedef struct rpl_mutex
 1141: {
 1142:     pthread_mutex_t     mutex;
 1143:     pthread_t           tid;
 1144: } struct_mutex;
 1145: #endif
 1146: 
 1147: 
 1148: /*
 1149: --------------------------------------------------------------------------------
 1150:   Structure sémaphore
 1151: --------------------------------------------------------------------------------
 1152: */
 1153: 
 1154: #ifndef RPLARGS
 1155: typedef struct semaphore
 1156: {
 1157:     unsigned char   *nom;
 1158:     sem_t           *semaphore;
 1159: } struct_semaphore;
 1160: #endif
 1161: 
 1162: 
 1163: /*
 1164: --------------------------------------------------------------------------------
 1165:   Structure marque
 1166: --------------------------------------------------------------------------------
 1167: */
 1168: 
 1169: #ifndef RPLARGS
 1170: typedef struct marque
 1171: {
 1172:     unsigned char       *label;
 1173:     unsigned char       *position;
 1174: 
 1175:     struct marque       *suivant;
 1176: } struct_marque;
 1177: #endif
 1178: 
 1179: 
 1180: /*
 1181: --------------------------------------------------------------------------------
 1182:   Structure bibliothèque
 1183: --------------------------------------------------------------------------------
 1184: */
 1185: 
 1186: #ifndef RPLARGS
 1187: typedef struct bibliotheque
 1188: {
 1189:     void                        *descripteur;
 1190: 
 1191:     pid_t                       pid;
 1192:     pthread_t                   tid;
 1193: 
 1194:     unsigned char               *nom;
 1195: } struct_bibliotheque;
 1196: #endif
 1197: 
 1198: 
 1199: /*
 1200: --------------------------------------------------------------------------------
 1201:   Structure descripteur fichier
 1202: --------------------------------------------------------------------------------
 1203: */
 1204: 
 1205: #ifndef RPLARGS
 1206: typedef struct descripteur_fichier
 1207: {
 1208:     unsigned long               identifiant;
 1209: 
 1210:     unsigned char               effacement;
 1211:     unsigned char               type; // C (file *) ou S (sqlite *)
 1212:     unsigned char               *nom;
 1213: 
 1214:     pid_t                       pid;
 1215:     pthread_t                   tid;
 1216: 
 1217:     union
 1218:     {
 1219:         file                    *descripteur_c;
 1220:         sqlite3                 *descripteur_sqlite;
 1221:     };
 1222: } struct_descripteur_fichier;
 1223: #endif
 1224: 
 1225: 
 1226: /*
 1227: --------------------------------------------------------------------------------
 1228:   Structure connecteur SQL
 1229: --------------------------------------------------------------------------------
 1230: */
 1231: 
 1232: #ifndef RPLARGS
 1233: typedef struct connecteur_sql
 1234: {
 1235:     pid_t                       pid;
 1236:     pthread_t                   tid;
 1237: 
 1238:     /*
 1239:      * "MYSQL"
 1240:      * "POSTGRESQL"
 1241:      */
 1242: 
 1243:     unsigned char               *type;
 1244:     unsigned char               *locale;
 1245: 
 1246:     union
 1247:     {
 1248: #       ifdef MYSQL_SUPPORT
 1249:             MYSQL               *mysql;
 1250: #       endif
 1251: #       ifdef POSTGRESQL_SUPPORT
 1252:             PGconn              *postgresql;
 1253: #       endif
 1254:         sqlite3                 *sqlite;
 1255:     } descripteur;
 1256: } struct_connecteur_sql;
 1257: #endif
 1258: 
 1259: #define sqlclose(s_objet) \
 1260:     if (strcmp((*((struct_connecteur_sql *) (*s_objet).objet)).type, "MYSQL") \
 1261:             == 0) \
 1262:         mysqlclose((*((struct_connecteur_sql *) (*s_objet).objet)) \
 1263:                 .descripteur); \
 1264:     else if (strcmp((*((struct_connecteur_sql *) (*s_objet).objet)).type, \
 1265:             "POSTGRESQL") == 0) \
 1266:         postgresqlclose((*((struct_connecteur_sql *) (*s_objet).objet)) \
 1267:                 .descripteur); \
 1268:     else if (strcmp((*((struct_connecteur_sql *) (*s_objet).objet)).type, \
 1269:             "SQLITE") == 0) \
 1270:         sqlite3_close((*((struct_connecteur_sql *) (*s_objet).objet)) \
 1271:                 .descripteur.sqlite); \
 1272:     else \
 1273:         BUG(1, uprintf("SQL type '%s' not allowed!", \
 1274:                 (*((struct_connecteur_sql *) (*s_objet).objet)).type));
 1275: 
 1276: /*
 1277: --------------------------------------------------------------------------------
 1278:   Structure socket
 1279: --------------------------------------------------------------------------------
 1280: */
 1281: 
 1282: #ifndef RPLARGS
 1283: typedef struct socket
 1284: {
 1285:     int                         domaine;
 1286:     int                         socket;
 1287: 
 1288:     pid_t                       pid;
 1289:     pthread_t                   tid;
 1290: 
 1291:     unsigned char               *adresse;
 1292:     unsigned char               *adresse_distante;
 1293:     unsigned char               binaire;
 1294:     unsigned char               socket_en_ecoute;
 1295:     logical1                    socket_connectee;
 1296:     unsigned char               effacement;
 1297:     unsigned char               localisation;
 1298:     unsigned char               protection;
 1299:     unsigned char               type[19 + 1];
 1300: 
 1301:     struct_objet                *format;
 1302: } struct_socket;
 1303: #endif
 1304: 
 1305: /*
 1306: --------------------------------------------------------------------------------
 1307:   Structure liste chaînee
 1308: --------------------------------------------------------------------------------
 1309: */
 1310: 
 1311: typedef struct liste_chainee
 1312: {
 1313:     struct liste_chainee        *suivant;
 1314: 
 1315:     struct_objet                *donnee;
 1316: } struct_liste_chainee; 
 1317: 
 1318: 
 1319: /*
 1320: --------------------------------------------------------------------------------
 1321:   Structure de gestion des signaux en provenance de rplsignal
 1322: --------------------------------------------------------------------------------
 1323: */
 1324: 
 1325: #define d_NOMBRE_SIGNAUX                64
 1326: 
 1327: typedef struct gestion_signaux
 1328: {
 1329:     unsigned char               masque_signaux[d_NOMBRE_SIGNAUX];
 1330: 
 1331:     /*
 1332:      * 'I' : signal ignoré
 1333:      * 'Q' : signal mis en queue pour un traitement ultérieur
 1334:      * 'N' : traitement normal du signal
 1335:      */
 1336: 
 1337:     integer8                    queue_signaux[d_NOMBRE_SIGNAUX];
 1338:     integer8                    nombre_signaux_en_queue;
 1339:     struct_objet                *corps_signaux[d_NOMBRE_SIGNAUX];
 1340: 
 1341:     pthread_mutex_t             mutex;
 1342: } struct_gestion_signaux;
 1343: 
 1344: #ifndef MAIN_RPL
 1345: #   define __STATIC_GESTION_SIGNAUX__
 1346: #else
 1347: #   define __STATIC_GESTION_SIGNAUX__ = { .mutex = PTHREAD_MUTEX_INITIALIZER }
 1348: #endif
 1349: 
 1350: __EXTERN__ volatile struct_gestion_signaux signaux_externes
 1351:         __STATIC_GESTION_SIGNAUX__;
 1352: 
 1353: 
 1354: /*
 1355: --------------------------------------------------------------------------------
 1356:   Structure liste profilage
 1357: --------------------------------------------------------------------------------
 1358: */
 1359: 
 1360: typedef struct liste_profilage
 1361: {
 1362:     struct liste_profilage      *suivant;
 1363: 
 1364:     unsigned char               *fonction;
 1365: 
 1366:     struct timeval              dernier_appel;
 1367:     struct timeval              cumul;
 1368: 
 1369:     integer8                    nombre_appels;
 1370: } struct_liste_profilage; 
 1371: 
 1372: typedef struct liste_profilage2
 1373: {
 1374:     struct liste_profilage2     *suivant;
 1375: 
 1376:     unsigned char               *fonction;
 1377: } struct_liste_profilage2; 
 1378: 
 1379: /*
 1380: --------------------------------------------------------------------------------
 1381:   Structure contenant les fichiers graphiques (liste chaînée)
 1382: --------------------------------------------------------------------------------
 1383: */
 1384: 
 1385: #ifndef RPLARLS
 1386: typedef struct fichier_graphique
 1387: {
 1388:     struct fichier_graphique    *suivant;
 1389: 
 1390:     logical1                    presence_axes;
 1391: 
 1392:     unsigned char               *nom;
 1393:     unsigned char               type[21];
 1394: 
 1395:     unsigned char               *legende;
 1396: 
 1397:     int                         dimensions;
 1398: 
 1399:     integer8                    systeme_axes;
 1400: } struct_fichier_graphique;
 1401: #endif
 1402: 
 1403: /*
 1404: --------------------------------------------------------------------------------
 1405:   Structure nom
 1406: --------------------------------------------------------------------------------
 1407: */
 1408: 
 1409: typedef struct nom
 1410: {
 1411:     unsigned char               *nom;
 1412:     logical1                    symbole;    /* d_vrai/d_faux */
 1413:     // symbole == d_vrai signifie que le nom a été introduit dans un
 1414:     // calcul sans les apostrophes.
 1415: } struct_nom;
 1416: 
 1417: 
 1418: /*
 1419: --------------------------------------------------------------------------------
 1420:   Structure processus fils
 1421: --------------------------------------------------------------------------------
 1422: */
 1423: 
 1424: #ifndef RPLARGS
 1425: typedef struct descripteur_thread
 1426: {
 1427:     struct processus            *s_etat_processus;
 1428:     struct processus            *s_nouvel_etat_processus;
 1429: 
 1430:     struct_objet                *argument;
 1431: 
 1432:     pid_t                       pid;
 1433:     volatile pthread_t          tid;
 1434: 
 1435:     pthread_t                   thread_pere;
 1436: 
 1437:     pthread_mutex_t             mutex;
 1438:     pthread_mutex_t             mutex_nombre_references;
 1439: 
 1440:     volatile logical1           thread_actif;
 1441: 
 1442:     int                         pipe_erreurs[2];
 1443:     int                         pipe_objets[2];
 1444:     int                         pipe_injections[2];
 1445:     int                         pipe_nombre_injections[2];
 1446:     int                         pipe_interruptions[2];
 1447:     int                         pipe_nombre_objets_attente[2];
 1448:     int                         pipe_nombre_interruptions_attente[2];
 1449:     int                         pipe_acquittement[2];
 1450: 
 1451:     volatile integer8           nombre_objets_dans_pipe;
 1452:     volatile integer8           nombre_interruptions_dans_pipe;
 1453: 
 1454:     logical1                    processus_detache;
 1455:     logical1                    destruction_objet;
 1456: 
 1457:     volatile signed long        nombre_references;
 1458: } struct_descripteur_thread;
 1459: 
 1460: typedef struct processus_fils
 1461: {
 1462:     struct_descripteur_thread       *thread;
 1463: } struct_processus_fils;
 1464: #endif
 1465: 
 1466: 
 1467: /*
 1468: --------------------------------------------------------------------------------
 1469:   Structure liste pile systeme
 1470: --------------------------------------------------------------------------------
 1471: */
 1472: 
 1473: #ifndef RPLARGS
 1474: typedef struct liste_pile_systeme
 1475: {
 1476:     struct liste_pile_systeme   *suivant;
 1477: 
 1478:     struct_liste_chainee        *pointeur_objet_retour;
 1479: 
 1480:     struct_objet                *indice_boucle;
 1481:     struct_objet                *limite_indice_boucle;
 1482:     struct_objet                *objet_de_test;
 1483: 
 1484:     logical1                    arret_si_exception;
 1485:     logical1                    creation_variables_statiques;
 1486:     logical1                    creation_variables_partagees;
 1487:     logical1                    evaluation_expression;
 1488: 
 1489:     unsigned char               clause;
 1490: 
 1491:     /*
 1492:     clause :
 1493:     I : IF
 1494:     R : IFERR
 1495:     X : IFERR indiquant la présence d'une erreur.
 1496:     T : THEN
 1497:     E : ELSE
 1498:     Z : traitement en cours de ELSE
 1499:     D : DO
 1500:     U : UNTIL
 1501:     W : WHILE
 1502:     M : WHILE avec une clause fausse.
 1503:     S : SELECT
 1504:     K : aucun cas CASE n'a encore été traité.
 1505:     C : au moins un cas de SELECT...CASE a été traité.
 1506:     Q : traitement en cours d'un cas CASE.
 1507:     F : traitement du cas DEFAULT
 1508:     */
 1509: 
 1510:     unsigned char               retour_definition;
 1511:     unsigned char               *nom_variable;
 1512:     unsigned char               origine_routine_evaluation;
 1513:     unsigned char               type_cloture;
 1514: 
 1515:     /*
 1516:     type clôture :
 1517:     C     SELECT   : END termine un test SELECT/DEFAULT/END.
 1518:     D     DO       : END termine une boucle DO/UNTIL/END.
 1519:     I     IF       : END termine un test IF/THEN (ELSE)/END.
 1520:     J     IFERR    : END termine un test IFERR/THEN (ELSE)/END.
 1521:     K     CASE     : END termine un test CASE/THEN/END
 1522:     W     WHILE    : END termine une boucle WHILE/REPEAT/END.
 1523:     Q     CRITICAL : END termine une section critique CRITICAL/END
 1524: 
 1525:     F     FOR     : NEXT ou STEP termine une boucle avec compteur.
 1526:     S     START   : NEXT ou STEP termine une boucle sans compteur.
 1527:     L     LOOP    : boucle utilisé dans le traitement de l'instruction RETURN.
 1528:             Elle correspond à une boucle FOR ou START mais sans son
 1529:             initialisation.
 1530:     A     FORALL  : NEXT termine une boucle sur un objet.
 1531:     */
 1532: 
 1533:     unsigned long               adresse_retour;
 1534:     unsigned long               niveau_courant;
 1535:     struct_objet                *pointeur_adresse_retour;
 1536: } struct_liste_pile_systeme;
 1537: #endif
 1538: 
 1539: 
 1540: /*
 1541: --------------------------------------------------------------------------------
 1542:   Structure variable
 1543: --------------------------------------------------------------------------------
 1544: */
 1545: 
 1546: #ifndef RPLARGS
 1547: typedef union position_variable
 1548: {
 1549:     unsigned long       adresse;
 1550:     struct_objet        *pointeur;
 1551: } union_position_variable;
 1552: 
 1553: typedef struct variable
 1554: {
 1555:     unsigned char           *nom;
 1556:     unsigned char           origine; // P(rogramme) ou E(valuation)
 1557: 
 1558:     unsigned long           niveau;
 1559: 
 1560:     union_position_variable variable_statique;
 1561:     union_position_variable variable_partagee;
 1562: 
 1563:     struct_objet            *objet;
 1564: 
 1565:     logical1                variable_verrouillee;
 1566: } struct_variable;
 1567: 
 1568: #endif
 1569: 
 1570: /*
 1571: --------------------------------------------------------------------------------
 1572:   Structure variable partagée
 1573: --------------------------------------------------------------------------------
 1574: */
 1575: 
 1576: #ifndef RPLARGS
 1577: 
 1578: typedef struct variable_partage
 1579: {
 1580:     unsigned char               *nom;
 1581:     unsigned char               origine;
 1582: 
 1583:     unsigned long               niveau;
 1584: 
 1585:     union_position_variable     variable_partagee;
 1586: 
 1587:     struct_objet                *objet;
 1588: 
 1589:     pthread_mutex_t             mutex;
 1590: } struct_variable_partagee;
 1591: 
 1592: #endif
 1593: 
 1594: 
 1595: /*
 1596: --------------------------------------------------------------------------------
 1597:   Structure variable statique
 1598: --------------------------------------------------------------------------------
 1599: */
 1600: 
 1601: #ifndef RPLARGS
 1602: typedef struct variable_statique
 1603: {
 1604:     unsigned char           *nom;
 1605:     unsigned char           origine;
 1606: 
 1607:     // Position de création de la variable statique dans le programme ou dans
 1608:     // l'expression. 'origine' vaut 'P' pour programme ou 'E' pour expression.
 1609: 
 1610:     unsigned long           niveau;
 1611: 
 1612:     union_position_variable variable_statique;
 1613: 
 1614:     struct_objet            *objet;
 1615: } struct_variable_statique;
 1616: #endif
 1617: 
 1618: 
 1619: /*
 1620: --------------------------------------------------------------------------------
 1621:   Structure vecteur
 1622: --------------------------------------------------------------------------------
 1623: */
 1624: 
 1625: typedef struct vecteur
 1626: {
 1627:     unsigned long       taille;
 1628: 
 1629:     unsigned char       type; /* C (complex*16), R (real*8), I (integer*8) */
 1630: 
 1631:     void                *tableau;
 1632: } struct_vecteur;
 1633: 
 1634: 
 1635: /*
 1636: --------------------------------------------------------------------------------
 1637:   Structure matrice
 1638: --------------------------------------------------------------------------------
 1639: */
 1640: 
 1641: typedef struct matrice
 1642: {
 1643:     unsigned long       nombre_lignes;
 1644:     unsigned long       nombre_colonnes;
 1645: 
 1646:     unsigned char       type; /* C (complex*16), R (real*8), I (integer*8) */
 1647: 
 1648:     void                **tableau;
 1649: } struct_matrice;
 1650: 
 1651: 
 1652: /*
 1653: --------------------------------------------------------------------------------
 1654:   Structure tableau
 1655: --------------------------------------------------------------------------------
 1656: */
 1657: 
 1658: typedef struct tableau
 1659: {
 1660:     unsigned long       nombre_elements;
 1661: 
 1662:     struct_objet        **elements;
 1663: } struct_tableau;
 1664: 
 1665: 
 1666: /*
 1667: --------------------------------------------------------------------------------
 1668:   Structure arbre
 1669: --------------------------------------------------------------------------------
 1670: */
 1671: 
 1672: typedef struct arbre
 1673: {
 1674:     struct_objet        *objet;
 1675: 
 1676:     unsigned long       nombre_feuilles;
 1677:     struct arbre        **feuilles;
 1678: } struct_arbre;
 1679: 
 1680: 
 1681: /*
 1682: --------------------------------------------------------------------------------
 1683:   Structures de gestion des instructions externes
 1684: --------------------------------------------------------------------------------
 1685: */
 1686: 
 1687: typedef struct instruction_externe
 1688: {
 1689:     unsigned char       *nom;
 1690:     unsigned char       *nom_bibliotheque;
 1691:     void                *descripteur_bibliotheque;
 1692: } struct_instruction_externe;
 1693: 
 1694: 
 1695: /*
 1696: --------------------------------------------------------------------------------
 1697:   Structure argument (pour les fonctions dynamiques)
 1698: --------------------------------------------------------------------------------
 1699: */
 1700: 
 1701: typedef struct rpl_arguments
 1702: {
 1703: /* Piles operationnelles                                */
 1704: 
 1705:     struct_liste_chainee        *l_base_pile;
 1706:     struct_liste_chainee        *l_base_pile_last;
 1707: 
 1708: /* Etat du calculateur                                  */
 1709: 
 1710:     t_8_bits                    drapeaux_etat[8];
 1711: 
 1712: /* Traitement des erreurs                               */
 1713: 
 1714:     unsigned char               *message_erreur;
 1715:     unsigned char               type_erreur;            /* S = système
 1716:                                                            E = exécution */
 1717:     integer8                    erreur;
 1718: 
 1719: /* Traitement des messages d'aide                       */
 1720: 
 1721:     logical1                    aide;                   /* Affichage d'un
 1722:                                                            message d'aide
 1723:                                                            par la routine */
 1724: 
 1725: /* Nombre d'arguments                                   */
 1726: 
 1727:     unsigned char               affichage_arguments;
 1728:     unsigned char               constante_symbolique;
 1729:     unsigned char               instruction_valide;
 1730:     unsigned char               test_instruction;
 1731: 
 1732:     integer8                    nombre_arguments;
 1733:     // Nombre d'arguments de la fonction, positif ou nul.
 1734: 
 1735:     void                        *s_etat_processus;
 1736: } struct_rpl_arguments;
 1737: 
 1738: /*
 1739: --------------------------------------------------------------------------------
 1740:   Structure d'arbre des instructions intrinsèques
 1741: --------------------------------------------------------------------------------
 1742: */
 1743: 
 1744: #ifndef RPLARGS
 1745: typedef struct instruction
 1746: {
 1747:     struct instruction      **noeuds;
 1748:     void                    (*feuille)(struct processus *);
 1749: } struct_instruction;
 1750: #endif
 1751: 
 1752: /*
 1753: --------------------------------------------------------------------------------
 1754:   Structure d'arbre des variables globales et locales
 1755: --------------------------------------------------------------------------------
 1756: */
 1757: 
 1758: #ifndef RPLARGS
 1759: typedef struct arbre_variables
 1760: {
 1761:     unsigned int                        noeuds_utilises;
 1762:                                         // Nombre de noeuds utilisés dans le
 1763:                                         // tableau **noeuds
 1764:     signed int                          indice_tableau_pere;
 1765:                                         // Position de la structure dans le
 1766:                                         // tableau **noeuds du père
 1767: 
 1768:     struct arbre_variables              *noeud_pere;
 1769:     struct arbre_variables              **noeuds;
 1770: 
 1771:     struct liste_variables              *feuille;
 1772:     struct liste_variables_statiques    *feuille_statique;
 1773: } struct_arbre_variables;
 1774: 
 1775: typedef struct arbre_variables_partagees
 1776: {
 1777:     unsigned int                        noeuds_utilises;
 1778:                                         // Nombre de noeuds utilisés dans le
 1779:                                         // tableau **noeuds
 1780:     signed int                          indice_tableau_pere;
 1781:                                         // Position de la structure dans le
 1782:                                         // tableau **noeuds du père
 1783: 
 1784:     struct arbre_variables_partagees    *noeud_pere;
 1785:     struct arbre_variables_partagees    **noeuds;
 1786: 
 1787:     struct liste_variables_partagees    *feuille;
 1788: 
 1789:     pthread_mutex_t                     mutex_feuille;
 1790: } struct_arbre_variables_partagees;
 1791: 
 1792: #define INITIALISATION_MUTEX(mutex) \
 1793:     do { \
 1794:         pthread_mutexattr_t     attributs_mutex; \
 1795:         pthread_mutexattr_init(&attributs_mutex); \
 1796:         pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL); \
 1797:         pthread_mutex_init(&(mutex), &attributs_mutex); \
 1798:         pthread_mutexattr_destroy(&attributs_mutex); \
 1799:     } while(0)
 1800: 
 1801: typedef struct tableau_variables
 1802: {
 1803:     unsigned char           origine;
 1804:     unsigned char           *nom;       // pointeur sur la struct_variable
 1805:                                         // réelle et non copie de la chaîne
 1806:     unsigned long           niveau;
 1807: 
 1808:     struct_objet            *objet;     // pointeur sur l'objet et non copie
 1809:                                         // de l'objet.
 1810: 
 1811:     logical1                variable_verrouillee;
 1812:     logical1                variable_masquee;
 1813:     union_position_variable variable_statique;
 1814:     union_position_variable variable_partagee;
 1815: } struct_tableau_variables;
 1816: 
 1817: // La liste des variables est une liste doublement chaînée et circulaire.
 1818: typedef struct liste_variables
 1819: {
 1820:     union
 1821:     {
 1822:         // Utilisation dans la gestion des variables
 1823:         struct_variable                 *variable;
 1824:         // Utilisation dans la pile système (variables par niveau)
 1825:         struct_liste_chainee            *liste;
 1826:     };
 1827: 
 1828:     struct arbre_variables              *noeud_pere;
 1829:     struct arbre_variables              *noeud;
 1830:     struct liste_variables              *suivant;
 1831:     struct liste_variables              *precedent;
 1832: } struct_liste_variables;
 1833: 
 1834: // La liste des variables statiques et une liste double chaînée et non
 1835: // circulaire.
 1836: typedef struct liste_variables_statiques
 1837: {
 1838:     struct liste_variables_statiques    *suivant;
 1839:     struct liste_variables_statiques    *precedent;
 1840:     struct liste_variables_statiques    *reference;
 1841:     struct_arbre_variables              *feuille;
 1842:     struct_variable_statique            *variable;
 1843: } struct_liste_variables_statiques;
 1844: 
 1845: typedef struct liste_variables_partagees
 1846: {
 1847:     struct liste_variables_partagees    *suivant;
 1848:     struct liste_variables_partagees    *precedent;
 1849:     struct liste_variables_partagees    *reference;
 1850:     struct_arbre_variables_partagees    *feuille;
 1851:     struct_variable_partagee            *variable;
 1852:     pthread_t                           tid;
 1853:     pid_t                               pid;
 1854: } struct_liste_variables_partagees;
 1855: #endif
 1856: 
 1857: /*
 1858: --------------------------------------------------------------------------------
 1859:   Structure processus
 1860: --------------------------------------------------------------------------------
 1861: */
 1862: 
 1863: #ifndef RPLARGS
 1864: typedef struct processus
 1865: {
 1866: /* Pointeurs sur le programme                           */
 1867: 
 1868:     unsigned char               *definitions_chainees;
 1869:     struct_liste_chainee        *expression_courante;
 1870: 
 1871:     unsigned char               *instruction_courante;
 1872:     struct_objet                *objet_courant;
 1873:     unsigned char               evaluation_expression_compilee;     /*Y/N*/
 1874: 
 1875:     unsigned char               *nom_fichier_source;
 1876:     unsigned char               *nom_fichier_historique;
 1877: 
 1878:     unsigned char               autorisation_conversion_chaine;     /*Y/N*/
 1879:     unsigned char               autorisation_empilement_programme;  /*Y/N*/
 1880:     unsigned char               autorisation_evaluation_nom;        /*Y/N*/
 1881:     unsigned char               autorisation_nom_implicite;         /*Y/N*/
 1882:     unsigned char               evaluation_forcee;                  /*Y/N*/
 1883:     unsigned char               instruction_valide;                 /*Y/N*/
 1884:     unsigned char               instruction_intrinseque;            /*Y/I/N*/
 1885:     unsigned char               test_instruction;                   /*Y/N*/
 1886:     unsigned char               affichage_arguments;                /*Y/N*/
 1887:     unsigned char               constante_symbolique;               /*Y/N*/
 1888:     unsigned char               traitement_symbolique;              /*Y/N*/
 1889:     unsigned char               mode_execution_programme;           /*Y/I/N*/
 1890:     unsigned char               mode_interactif;                    /*Y/N*/
 1891:     unsigned char               mode_evaluation_expression;         /*Y/N*/
 1892:     unsigned char               traitement_cycle_exit;              /*N/E/C*/
 1893:     unsigned char               recherche_type;                     /*Y/N*/
 1894: 
 1895:     unsigned long               position_courante;
 1896:     unsigned long               longueur_definitions_chainees;
 1897: 
 1898: /* Pointeurs sur les instructions                       */
 1899: 
 1900:     int                         *pointeurs_caracteres;
 1901:     int                         nombre_caracteres;
 1902:     struct_instruction          *arbre_instructions;
 1903: 
 1904: /* Requetes                                             */
 1905: 
 1906:     unsigned char               requete_arret;                      /*Y/N*/
 1907: 
 1908: /* Piles operationnelles                                */
 1909: 
 1910:     struct_liste_chainee        *l_base_pile;
 1911:     struct_liste_chainee        *l_base_pile_last;
 1912: 
 1913:     unsigned long               hauteur_pile_operationnelle;
 1914: 
 1915: /* Piles systemes                                       */
 1916: 
 1917:     struct_liste_pile_systeme   *l_base_pile_systeme;
 1918: 
 1919:     unsigned long               hauteur_pile_systeme;
 1920: 
 1921: /* Gestion des processus                                */
 1922: 
 1923:     volatile
 1924:     struct_liste_chainee        *l_base_pile_processus;
 1925: 
 1926:     logical1                    presence_pipes;
 1927: 
 1928:     int                         pipe_acquittement;
 1929:     int                         pipe_donnees;
 1930:     int                         pipe_injections;
 1931:     int                         pipe_nombre_injections;
 1932:     int                         pipe_interruptions;
 1933:     int                         pipe_nombre_objets_attente;
 1934:     int                         pipe_nombre_interruptions_attente;
 1935:     int                         nombre_objets_envoyes_non_lus;
 1936:     int                         nombre_objets_injectes;
 1937: 
 1938:     real8                       pourcentage_maximal_cpu;
 1939:     real8                       temps_maximal_cpu;
 1940: 
 1941:     logical1                    presence_fusible;
 1942:     pthread_t                   thread_fusible;
 1943:     pthread_t                   thread_surveille_par_fusible;
 1944:     pthread_t                   thread_signaux;
 1945:     int                         pipe_signaux[2];
 1946: 
 1947:     volatile int                pointeur_signal_ecriture;
 1948:     volatile int                pointeur_signal_lecture;
 1949:     volatile enum signaux_rpl   signaux_en_queue[LONGUEUR_QUEUE_SIGNAUX];
 1950:     volatile logical1           demarrage_fils;
 1951:     volatile logical1           redemarrage_processus;
 1952: 
 1953: /* Contextes                                            */
 1954: 
 1955:     struct_liste_chainee        *l_base_pile_contextes;
 1956:     struct_liste_chainee        *l_base_pile_taille_contextes;
 1957: 
 1958: /* Variables                                            */
 1959: 
 1960:     // La liste des variables par niveau est doublement chaînée.
 1961:     // À tout moment, elle pointe sur le niveau le plus haut existant et
 1962:     // l_liste_variable_par_niveau->precedent renvoie la liste des
 1963:     // définitions. l_liste_variable_par_niveau->precedent->precedent pointe
 1964:     // sur la liste des variables globales.
 1965:     //
 1966:     // À l'initialisation :
 1967:     // l_liste_variables_par_niveau->suivant == l_liste_variables_par_niveau
 1968:     // l_liste_variables_par_niveau->precedent == l_liste_variables_par_niveau
 1969: 
 1970:     struct_arbre_variables      *s_arbre_variables;
 1971:     struct_liste_variables      *l_liste_variables_par_niveau;
 1972:     struct_liste_variables_statiques
 1973:                                 *l_liste_variables_statiques;
 1974: 
 1975:     struct_arbre_variables_partagees
 1976:                                 **s_arbre_variables_partagees;
 1977:     struct_liste_variables_partagees
 1978:                                 **l_liste_variables_partagees;
 1979: 
 1980:     logical1                    niveau_supprime;
 1981: 
 1982:     struct_variable             *pointeur_variable_courante;
 1983:     struct_liste_variables      *pointeur_feuille_courante;
 1984:     struct_variable_statique    *pointeur_variable_statique_courante;
 1985:     struct_variable_partagee    *pointeur_variable_partagee_courante;
 1986: 
 1987:     int                         *pointeurs_caracteres_variables;
 1988:     int                         nombre_caracteres_variables;
 1989: 
 1990:     unsigned long               niveau_courant;
 1991:     unsigned long               niveau_initial;
 1992: 
 1993:     logical1                    creation_variables_statiques;
 1994:     logical1                    creation_variables_partagees;
 1995:     logical1                    gel_liste_variables;
 1996: 
 1997: /* Fichiers                                             */
 1998: 
 1999:     struct_liste_chainee        *s_fichiers;
 2000: 
 2001: /*  Sockets                                             */
 2002: 
 2003:     struct_liste_chainee        *s_sockets;
 2004: 
 2005: /*  Connecteurs aux bases de données                    */
 2006: 
 2007:     struct_liste_chainee        *s_connecteurs_sql;
 2008: 
 2009: /* Bibliothèques dynamiques                             */
 2010: 
 2011:     struct_liste_chainee        *s_bibliotheques;
 2012:     struct_instruction_externe  *s_instructions_externes;
 2013:     unsigned long               nombre_instructions_externes;
 2014: 
 2015: /* Fichier d'impression                                 */
 2016: 
 2017:     unsigned char               *nom_fichier_impression;
 2018:     unsigned char               format_papier[16];
 2019: 
 2020: /* Parametres graphiques                                */
 2021: 
 2022:     struct_fichier_graphique    *fichiers_graphiques;    /* NULL */
 2023: 
 2024:     unsigned char               type_trace_eq[21];
 2025: 
 2026:                                 /*
 2027:                                  * 2D :
 2028:                                  * FONCTION
 2029:                                  * PARAMETRIQUE
 2030:                                  * POLAIRE
 2031:                                  * COURBES DE NIVEAU
 2032:                                  *
 2033:                                  * 3D :
 2034:                                  * GRILLE 3D
 2035:                                  * COURBE PARAMETRIQUE // A FAIRE
 2036:                                  * SURFACE PARAMETRIQUE // A FAIRE
 2037:                                  * CYNLINDRIQUE // A FAIRE
 2038:                                  * SPHERIQUE // A FAIRE
 2039:                                  */
 2040: 
 2041:     unsigned char               type_trace_sigma[21];
 2042: 
 2043:                                 /*
 2044:                                  * POINTS
 2045:                                  * HISTOGRAMME
 2046:                                  * TABLE TRACANTE
 2047:                                  */
 2048: 
 2049:                                 /*
 2050:                                  * ECHELLES
 2051:                                  */
 2052: 
 2053:     integer8                    systeme_axes;
 2054: 
 2055:     real8                       x_min;
 2056:     real8                       x_max;
 2057:     real8                       y_min;
 2058:     real8                       y_max;
 2059:     real8                       z_min;
 2060:     real8                       z_max;
 2061: 
 2062:     real8                       x_tics;
 2063:     real8                       y_tics;
 2064:     real8                       z_tics;
 2065:     
 2066:     integer8                    mx_tics;
 2067:     integer8                    my_tics;
 2068:     integer8                    mz_tics;
 2069: 
 2070:     logical1                    x_lines;
 2071:     logical1                    y_lines;
 2072:     logical1                    z_lines;
 2073: 
 2074:     logical1                    mx_lines;
 2075:     logical1                    my_lines;
 2076:     logical1                    mz_lines;
 2077: 
 2078:                                 /*
 2079:                                  * -1 : absent du graphique
 2080:                                  *  0 : graduations automatiques
 2081:                                  * >0 : valeur manuelle
 2082:                                  */
 2083: 
 2084:     real8                       x2_min;
 2085:     real8                       x2_max;
 2086:     real8                       y2_min;
 2087:     real8                       y2_max;
 2088:     real8                       z2_min;
 2089:     real8                       z2_max;
 2090: 
 2091:     real8                       x2_tics;
 2092:     real8                       y2_tics;
 2093:     real8                       z2_tics;
 2094: 
 2095:     integer8                    mx2_tics;
 2096:     integer8                    my2_tics;
 2097:     integer8                    mz2_tics;
 2098: 
 2099:     logical1                    x2_lines;
 2100:     logical1                    y2_lines;
 2101:     logical1                    z2_lines;
 2102: 
 2103:     logical1                    mx2_lines;
 2104:     logical1                    my2_lines;
 2105:     logical1                    mz2_lines;
 2106: 
 2107:     real8                       resolution;
 2108: 
 2109:     logical1                    souris_active;
 2110: 
 2111:     logical1                    echelle_automatique_x;
 2112:     logical1                    echelle_automatique_y;
 2113:     logical1                    echelle_automatique_z;
 2114: 
 2115:     logical1                    echelle_automatique_x2;
 2116:     logical1                    echelle_automatique_y2;
 2117:     logical1                    echelle_automatique_z2;
 2118: 
 2119:     logical1                    echelle_log_x;
 2120:     logical1                    echelle_log_y;
 2121:     logical1                    echelle_log_z;
 2122: 
 2123:     logical1                    echelle_log_x2;
 2124:     logical1                    echelle_log_y2;
 2125:     logical1                    echelle_log_z2;
 2126: 
 2127:     real8                       point_de_vue_theta;
 2128:     real8                       point_de_vue_phi;
 2129:     real8                       echelle_3D;
 2130: 
 2131:     unsigned char               *label_x;
 2132:     unsigned char               *label_y;
 2133:     unsigned char               *label_z;
 2134:     unsigned char               *titre;
 2135:     unsigned char               *legende;
 2136: 
 2137:     unsigned char               *nom_fichier_gnuplot;
 2138:     unsigned char               *type_fichier_gnuplot;
 2139: 
 2140:     struct_objet                *indep;
 2141:     struct_objet                *depend;
 2142:     struct_objet                *parametres_courbes_de_niveau;
 2143: 
 2144:     struct_marque               *s_marques;
 2145: 
 2146:     file                        *entree_standard;
 2147: 
 2148:     logical1                    requete_nouveau_plan;
 2149:     logical1                    mise_a_jour_trace_requise;
 2150: 
 2151: /* Parametres statistiques                              */
 2152: 
 2153:     integer8                    colonne_statistique_1;
 2154:     integer8                    colonne_statistique_2;
 2155: 
 2156: /* Etat du calculateur                                  */
 2157: 
 2158:     t_8_bits                    drapeaux_etat[8];
 2159: 
 2160: /* Traitement des exceptions                            */
 2161: 
 2162:     logical1                    arret_si_exception;
 2163:     unsigned int                exception;
 2164:     unsigned int                derniere_exception;
 2165:     unsigned int                exception_processus_fils;
 2166: 
 2167: /* Traitement des erreurs                               */
 2168: 
 2169:     unsigned int                erreur_compilation;
 2170:     unsigned int                erreur_execution;
 2171:     unsigned int                erreur_systeme;
 2172: 
 2173:     struct_objet                *s_objet_errone;
 2174:     struct_objet                *s_objet_erreur;
 2175: 
 2176:     logical1                    erreur_scrutation;
 2177: 
 2178:     volatile unsigned int       erreur_systeme_processus_fils;
 2179:     unsigned int                erreur_execution_processus_fils;
 2180: 
 2181:     pid_t                       pid_erreur_processus_fils;
 2182: 
 2183:     logical1                    erreur_processus_fils;
 2184: 
 2185:     integer8                    derniere_erreur_fonction_externe;
 2186: 
 2187:     unsigned int                derniere_erreur_systeme;
 2188:     unsigned int                derniere_erreur_execution;
 2189:     unsigned int                derniere_erreur_evaluation;
 2190: 
 2191:     unsigned char               *instruction_derniere_erreur;
 2192: 
 2193:     unsigned long               niveau_derniere_erreur;
 2194: 
 2195:     logical1                    core;
 2196:     logical1                    invalidation_message_erreur;
 2197: 
 2198: /* Debug                                                */
 2199: 
 2200:     logical1                    debug;
 2201:     integer8                    type_debug;
 2202:     logical1                    debug_programme;
 2203:     logical1                    execution_pas_suivant;
 2204:     logical1                    traitement_instruction_halt;
 2205: 
 2206: /* Interruptions logicielles                            */
 2207: 
 2208:     unsigned char               masque_interruptions[d_NOMBRE_INTERRUPTIONS];
 2209: 
 2210:     /*
 2211:      * 'I' : interruption ignorée
 2212:      * 'Q' : interruption mise en queue pour un traitement ultérieur
 2213:      * 'N' : traitement normal de l'interruption
 2214:      */
 2215: 
 2216:     integer8                    queue_interruptions[d_NOMBRE_INTERRUPTIONS];
 2217:     integer8                    nombre_interruptions_en_queue;
 2218:     struct_liste_chainee        *pile_origine_interruptions
 2219:                                         [d_NOMBRE_INTERRUPTIONS];
 2220:     volatile integer8           nombre_interruptions_non_affectees;
 2221: 
 2222:     struct_objet                *corps_interruptions[d_NOMBRE_INTERRUPTIONS];
 2223: 
 2224:     unsigned char               traitement_interruption;  /* Y/N */
 2225:     unsigned char               traitement_interruptible; /* Y/N */
 2226:     unsigned char               traitement_at_poke;       /* Y/N */
 2227: 
 2228:     struct_objet                *at_exit;
 2229:     struct_objet                *at_poke;
 2230: 
 2231: /* Variables volatiles                                  */
 2232: 
 2233:     volatile sig_atomic_t       var_volatile_alarme;
 2234:     // Traitement de ctrl+C et des arrêts brutaux
 2235:     volatile sig_atomic_t       var_volatile_requete_arret;
 2236:     // Traitement de ctrl+Z
 2237:     volatile sig_atomic_t       var_volatile_requete_arret2;
 2238:     volatile sig_atomic_t       var_volatile_traitement_retarde_stop;
 2239:     volatile sig_atomic_t       var_volatile_traitement_sigint;
 2240: 
 2241:     volatile sig_atomic_t       var_volatile_processus_racine;
 2242:     volatile sig_atomic_t       var_volatile_processus_pere;
 2243:     volatile sig_atomic_t       var_volatile_recursivite;
 2244: 
 2245:     volatile sig_atomic_t       arret_depuis_abort;
 2246: 
 2247:     volatile int                var_volatile_exception_gsl;
 2248: 
 2249: /* Autres                                               */
 2250: 
 2251:     char                        *rpl_home;
 2252: 
 2253:     gsl_rng                     *generateur_aleatoire;
 2254:     const gsl_rng_type          *type_generateur_aleatoire;
 2255: 
 2256:     void                        *contexte_cas;
 2257: 
 2258:     integer8                    nombre_arguments;
 2259: 
 2260:     /*
 2261:      * Il s'agit du nombre d'arguments utilisé pour l'évaluation
 2262:      * des expressions algébriques.
 2263:      * -1 : la fonction ne peut être dans un objet de type ALG.
 2264:      * -2 : nombre d'arguments inconnu
 2265:      *  0 : la fonction doit apparaître en notation infixe
 2266:      * >0 : la fonction apparaît comme une fonction normale
 2267:      */
 2268: 
 2269:     logical1                    lancement_interactif;
 2270: 
 2271:     unsigned char               *chemin_fichiers_temporaires;
 2272:     unsigned char               langue;
 2273:     unsigned char               retour_routine_evaluation;
 2274:     unsigned char               *localisation;
 2275: 
 2276:     unsigned long               niveau_recursivite;
 2277: 
 2278:     pid_t                       pid_processus_pere;
 2279:     pthread_t                   tid_processus_pere;
 2280:     pthread_t                   tid;
 2281: 
 2282:     logical1                    processus_detache;
 2283: 
 2284: /* Profilage                                            */
 2285: 
 2286:     logical1                    profilage;
 2287:     int                         niveau_profilage;
 2288:     struct_liste_profilage      *pile_profilage;
 2289:     struct_liste_profilage2     *pile_profilage_fonctions;
 2290:     struct timeval              horodatage_profilage;
 2291: 
 2292:     // Mutex spécifique au processus et donnant accès à la pile des processus
 2293:     pthread_mutex_t             mutex;
 2294:     pthread_mutex_t             mutex_allocation;
 2295: 
 2296:     // Mutex autorisant les fork()
 2297:     sem_t __PTR__               semaphore_fork;
 2298: 
 2299: /* Mutexes                                          */
 2300: 
 2301:     struct_liste_chainee        *liste_mutexes;
 2302:     pthread_mutex_t             protection_liste_mutexes;
 2303:     unsigned int                sections_critiques;
 2304: 
 2305: /* Drapeau nécessaire à RESTART                 */
 2306: 
 2307:     volatile logical1           requete_redemarrage;
 2308: 
 2309: /* Gestion optimisée de la mémoire                  */
 2310: 
 2311:     double                      estimation_taille_pile_tampon;
 2312:     unsigned long               taille_pile_tampon;
 2313:     struct_liste_chainee        *pile_tampon;
 2314: 
 2315:     double                      estimation_taille_pile_systeme_tampon;
 2316:     unsigned long               taille_pile_systeme_tampon;
 2317:     struct_liste_pile_systeme   *pile_systeme_tampon;
 2318: 
 2319:     unsigned long               taille_pile_objets;
 2320:     struct_objet                *pile_objets;
 2321: 
 2322: #   define TAILLE_CACHE 16384
 2323: 
 2324:     unsigned long               *objets_adr[TAILLE_CACHE];
 2325:     int                         pointeur_adr;
 2326: 
 2327:     logical8                    *objets_bin[TAILLE_CACHE];
 2328:     int                         pointeur_bin;
 2329: 
 2330:     complex16                   *objets_cpl[TAILLE_CACHE];
 2331:     int                         pointeur_cpl;
 2332: 
 2333:     struct fonction             *objets_fct[TAILLE_CACHE];
 2334:     int                         pointeur_fct;
 2335: 
 2336:     integer8                    *objets_int[TAILLE_CACHE];
 2337:     int                         pointeur_int;
 2338: 
 2339:     struct_matrice              *objets_mat[TAILLE_CACHE];
 2340:     int                         pointeur_mat;
 2341: 
 2342:     struct_nom                  *objets_nom[TAILLE_CACHE];
 2343:     int                         pointeur_nom;
 2344: 
 2345:     real8                       *objets_rel[TAILLE_CACHE];
 2346:     int                         pointeur_rel;
 2347: 
 2348:     struct_tableau              *objets_tab[TAILLE_CACHE];
 2349:     int                         pointeur_tab;
 2350: 
 2351:     struct_vecteur              *objets_vec[TAILLE_CACHE];
 2352:     int                         pointeur_vec;
 2353: 
 2354:     struct_liste_chainee        *maillons[TAILLE_CACHE];
 2355:     int                         pointeur_maillons;
 2356: 
 2357:     struct_arbre_variables      *variables_noeud[TAILLE_CACHE];
 2358:     int                         pointeur_variables_noeud;
 2359: 
 2360:     struct_arbre_variables_partagees
 2361:                                 *variables_partagees_noeud[TAILLE_CACHE];
 2362:     int                         pointeur_variables_partagees_noeud;
 2363: 
 2364:     struct_liste_variables      *variables_feuille[TAILLE_CACHE];
 2365:     int                         pointeur_variables_feuille;
 2366: 
 2367:     struct_variable             *variables_variable[TAILLE_CACHE];
 2368:     int                         pointeur_variables_variable;
 2369: 
 2370:     struct_arbre_variables      **variables_tableau_noeuds[TAILLE_CACHE];
 2371:     int                         pointeur_variables_tableau_noeuds;
 2372: 
 2373:     struct_arbre_variables_partagees
 2374:                                 **variables_tableau_noeuds_partages
 2375:                                 [TAILLE_CACHE];
 2376:     int                         pointeur_variables_tableau_noeuds_partages;
 2377: } struct_processus;
 2378: #endif
 2379: 
 2380: /*
 2381: --------------------------------------------------------------------------------
 2382:   Structure fonction
 2383: --------------------------------------------------------------------------------
 2384: */
 2385: 
 2386: #ifndef RPLARGS
 2387: typedef struct fonction
 2388: {
 2389:     unsigned char                       *nom_fonction;
 2390:     unsigned long                       nombre_arguments;
 2391: 
 2392:     void                                (*fonction)(struct_processus *);
 2393: 
 2394:     volatile struct_liste_chainee       *prediction_saut;
 2395:     volatile logical1                   prediction_execution;
 2396: } struct_fonction;
 2397: #endif
 2398: 
 2399: 
 2400: /*
 2401: ================================================================================
 2402:   PROTOTYPES
 2403: ================================================================================
 2404: */
 2405: 
 2406: /*
 2407: --------------------------------------------------------------------------------
 2408:   Procédures d'exécution des mots-clef du langage RPL/2
 2409: --------------------------------------------------------------------------------
 2410: */
 2411: 
 2412: // BEGIN C PROTOTYPES
 2413: void instruction_sensible_e(struct_processus *s_etat_processus);
 2414: void instruction_sensible_i(struct_processus *s_etat_processus);
 2415: void instruction_sensible_infinity(struct_processus *s_etat_processus);
 2416: 
 2417: void instruction_abort(struct_processus *s_etat_processus);
 2418: void instruction_abs(struct_processus *s_etat_processus);
 2419: void instruction_acos(struct_processus *s_etat_processus);
 2420: void instruction_acosh(struct_processus *s_etat_processus);
 2421: void instruction_alarm(struct_processus *s_etat_processus);
 2422: void instruction_alog(struct_processus *s_etat_processus);
 2423: void instruction_and(struct_processus *s_etat_processus);
 2424: void instruction_append(struct_processus *s_etat_processus);
 2425: void instruction_array_fleche(struct_processus *s_etat_processus);
 2426: void instruction_arg(struct_processus *s_etat_processus);
 2427: void instruction_asin(struct_processus *s_etat_processus);
 2428: void instruction_asinh(struct_processus *s_etat_processus);
 2429: void instruction_asl(struct_processus *s_etat_processus);
 2430: void instruction_asr(struct_processus *s_etat_processus);
 2431: void instruction_atan(struct_processus *s_etat_processus);
 2432: void instruction_atanh(struct_processus *s_etat_processus);
 2433: void instruction_atexit(struct_processus *s_etat_processus);
 2434: void instruction_atpoke(struct_processus *s_etat_processus);
 2435: void instruction_autoscale(struct_processus *s_etat_processus);
 2436: void instruction_axes(struct_processus *s_etat_processus);
 2437: 
 2438: void instruction_b_vers_r(struct_processus *s_etat_processus);
 2439: void instruction_backspace(struct_processus *s_etat_processus);
 2440: void instruction_backtrace(struct_processus *s_etat_processus);
 2441: void instruction_beep(struct_processus *s_etat_processus);
 2442: void instruction_bessel(struct_processus *s_etat_processus);
 2443: void instruction_bin(struct_processus *s_etat_processus);
 2444: 
 2445: void instruction_c_vers_r(struct_processus *s_etat_processus);
 2446: void instruction_case(struct_processus *s_etat_processus);
 2447: void instruction_ceil(struct_processus *s_etat_processus);
 2448: void instruction_centr(struct_processus *s_etat_processus);
 2449: void instruction_cf(struct_processus *s_etat_processus);
 2450: void instruction_chr(struct_processus *s_etat_processus);
 2451: void instruction_cipher(struct_processus *s_etat_processus);
 2452: void instruction_clear(struct_processus *s_etat_processus);
 2453: void instruction_cllcd(struct_processus *s_etat_processus);
 2454: void instruction_clmf(struct_processus *s_etat_processus);
 2455: void instruction_close(struct_processus *s_etat_processus);
 2456: void instruction_clratexit(struct_processus *s_etat_processus);
 2457: void instruction_clratpoke(struct_processus *s_etat_processus);
 2458: void instruction_clrcntxt(struct_processus *s_etat_processus);
 2459: void instruction_clrerr(struct_processus *s_etat_processus);
 2460: void instruction_clrfuse(struct_processus *s_etat_processus);
 2461: void instruction_clrmtx(struct_processus *s_etat_processus);
 2462: void instruction_clrsmphr(struct_processus *s_etat_processus);
 2463: void instruction_clrswi(struct_processus *s_etat_processus);
 2464: void instruction_cls(struct_processus *s_etat_processus);
 2465: void instruction_clusr(struct_processus *s_etat_processus);
 2466: void instruction_cnrm(struct_processus *s_etat_processus);
 2467: void instruction_cols(struct_processus *s_etat_processus);
 2468: void instruction_col_fleche(struct_processus *s_etat_processus);
 2469: void instruction_col_moins(struct_processus *s_etat_processus);
 2470: void instruction_col_plus(struct_processus *s_etat_processus);
 2471: void instruction_comb(struct_processus *s_etat_processus);
 2472: void instruction_con(struct_processus *s_etat_processus);
 2473: void instruction_cond(struct_processus *s_etat_processus);
 2474: void instruction_cont(struct_processus *s_etat_processus);
 2475: void instruction_continue(struct_processus *s_etat_processus);
 2476: void instruction_conj(struct_processus *s_etat_processus);
 2477: void instruction_convert(struct_processus *s_etat_processus);
 2478: void instruction_copy(struct_processus *s_etat_processus);
 2479: void instruction_copyright(struct_processus *s_etat_processus);
 2480: void instruction_corr(struct_processus *s_etat_processus);
 2481: void instruction_cos(struct_processus *s_etat_processus);
 2482: void instruction_cosh(struct_processus *s_etat_processus);
 2483: void instruction_cov(struct_processus *s_etat_processus);
 2484: void instruction_cr(struct_processus *s_etat_processus);
 2485: void instruction_create(struct_processus *s_etat_processus);
 2486: void instruction_critical(struct_processus *s_etat_processus);
 2487: void instruction_crmtx(struct_processus *s_etat_processus);
 2488: void instruction_cross(struct_processus *s_etat_processus);
 2489: void instruction_crsmphr(struct_processus *s_etat_processus);
 2490: void instruction_crtab(struct_processus *s_etat_processus);
 2491: void instruction_cstop(struct_processus *s_etat_processus);
 2492: void instruction_cswp(struct_processus *s_etat_processus);
 2493: void instruction_currenc(struct_processus *s_etat_processus);
 2494: void instruction_cycle(struct_processus *s_etat_processus);
 2495: 
 2496: void instruction_d_vers_r(struct_processus *s_etat_processus);
 2497: void instruction_daemonize(struct_processus *s_etat_processus);
 2498: void instruction_date(struct_processus *s_etat_processus);
 2499: void instruction_dec(struct_processus *s_etat_processus);
 2500: void instruction_decr(struct_processus *s_etat_processus);
 2501: void instruction_default(struct_processus *s_etat_processus);
 2502: void instruction_deg(struct_processus *s_etat_processus);
 2503: void instruction_delete(struct_processus *s_etat_processus);
 2504: void instruction_depnd(struct_processus *s_etat_processus);
 2505: void instruction_depth(struct_processus *s_etat_processus);
 2506: void instruction_der(struct_processus *s_etat_processus);
 2507: void instruction_det(struct_processus *s_etat_processus);
 2508: void instruction_detach(struct_processus *s_etat_processus);
 2509: void instruction_dft(struct_processus *s_etat_processus);
 2510: void instruction_dgtiz(struct_processus *s_etat_processus);
 2511: void instruction_diag_fleche(struct_processus *s_etat_processus);
 2512: void instruction_digest(struct_processus *s_etat_processus);
 2513: void instruction_disp(struct_processus *s_etat_processus);
 2514: void instruction_division(struct_processus *s_etat_processus);
 2515: void instruction_do(struct_processus *s_etat_processus);
 2516: void instruction_dot(struct_processus *s_etat_processus);
 2517: void instruction_draw(struct_processus *s_etat_processus);
 2518: void instruction_drax(struct_processus *s_etat_processus);
 2519: void instruction_drop(struct_processus *s_etat_processus);
 2520: void instruction_drop2(struct_processus *s_etat_processus);
 2521: void instruction_dropcntxt(struct_processus *s_etat_processus);
 2522: void instruction_dropn(struct_processus *s_etat_processus);
 2523: void instruction_drws(struct_processus *s_etat_processus);
 2524: void instruction_dup(struct_processus *s_etat_processus);
 2525: void instruction_dup2(struct_processus *s_etat_processus);
 2526: void instruction_dupcntxt(struct_processus *s_etat_processus);
 2527: void instruction_dupn(struct_processus *s_etat_processus);
 2528: 
 2529: void instruction_e(struct_processus *s_etat_processus);
 2530: void instruction_edit(struct_processus *s_etat_processus);
 2531: void instruction_egalite(struct_processus *s_etat_processus);
 2532: void instruction_egv(struct_processus *s_etat_processus);
 2533: void instruction_egvl(struct_processus *s_etat_processus);
 2534: void instruction_else(struct_processus *s_etat_processus);
 2535: void instruction_elseif(struct_processus *s_etat_processus);
 2536: void instruction_end(struct_processus *s_etat_processus);
 2537: void instruction_eng(struct_processus *s_etat_processus);
 2538: void instruction_epsilon(struct_processus *s_etat_processus);
 2539: void instruction_erase(struct_processus *s_etat_processus);
 2540: void instruction_errm(struct_processus *s_etat_processus);
 2541: void instruction_errn(struct_processus *s_etat_processus);
 2542: void instruction_eval(struct_processus *s_etat_processus);
 2543: void instruction_exget(struct_processus *s_etat_processus);
 2544: void instruction_exit(struct_processus *s_etat_processus);
 2545: void instruction_exp(struct_processus *s_etat_processus);
 2546: void instruction_expm(struct_processus *s_etat_processus);
 2547: void instruction_exsub(struct_processus *s_etat_processus);
 2548: void instruction_externals(struct_processus *s_etat_processus);
 2549: void instruction_eyept(struct_processus *s_etat_processus);
 2550: 
 2551: void instruction_fact(struct_processus *s_etat_processus);
 2552: void instruction_false(struct_processus *s_etat_processus);
 2553: void instruction_fc_test(struct_processus *s_etat_processus);
 2554: void instruction_fc_test_c(struct_processus *s_etat_processus);
 2555: void instruction_fc_test_s(struct_processus *s_etat_processus);
 2556: void instruction_fft(struct_processus *s_etat_processus);
 2557: void instruction_fix(struct_processus *s_etat_processus);
 2558: void instruction_fleche(struct_processus *s_etat_processus);
 2559: void instruction_fleche_array(struct_processus *s_etat_processus);
 2560: void instruction_fleche_col(struct_processus *s_etat_processus);
 2561: void instruction_fleche_diag(struct_processus *s_etat_processus);
 2562: void instruction_fleche_hms(struct_processus *s_etat_processus);
 2563: void instruction_fleche_lcd(struct_processus *s_etat_processus);
 2564: void instruction_fleche_list(struct_processus *s_etat_processus);
 2565: void instruction_fleche_num(struct_processus *s_etat_processus);
 2566: void instruction_fleche_q(struct_processus *s_etat_processus);
 2567: void instruction_fleche_row(struct_processus *s_etat_processus);
 2568: void instruction_fleche_str(struct_processus *s_etat_processus);
 2569: void instruction_fleche_table(struct_processus *s_etat_processus);
 2570: void instruction_floor(struct_processus *s_etat_processus);
 2571: void instruction_for(struct_processus *s_etat_processus);
 2572: void instruction_forall(struct_processus *s_etat_processus);
 2573: void instruction_format(struct_processus *s_etat_processus);
 2574: void instruction_fp(struct_processus *s_etat_processus);
 2575: void instruction_fs_test(struct_processus *s_etat_processus);
 2576: void instruction_fs_test_c(struct_processus *s_etat_processus);
 2577: void instruction_fs_test_s(struct_processus *s_etat_processus);
 2578: void instruction_function(struct_processus *s_etat_processus);
 2579: void instruction_fuse(struct_processus *s_etat_processus);
 2580: 
 2581: void instruction_gamma(struct_processus *s_etat_processus);
 2582: void instruction_ge(struct_processus *s_etat_processus);
 2583: void instruction_gegv(struct_processus *s_etat_processus);
 2584: void instruction_gegvl(struct_processus *s_etat_processus);
 2585: void instruction_get(struct_processus *s_etat_processus);
 2586: void instruction_getc(struct_processus *s_etat_processus);
 2587: void instruction_geti(struct_processus *s_etat_processus);
 2588: void instruction_getr(struct_processus *s_etat_processus);
 2589: void instruction_glegv(struct_processus *s_etat_processus);
 2590: void instruction_gregv(struct_processus *s_etat_processus);
 2591: void instruction_gt(struct_processus *s_etat_processus);
 2592: 
 2593: void instruction_halt(struct_processus *s_etat_processus);
 2594: void instruction_head(struct_processus *s_etat_processus);
 2595: void instruction_help(struct_processus *s_etat_processus);
 2596: void instruction_hex(struct_processus *s_etat_processus);
 2597: void instruction_histogram(struct_processus *s_etat_processus);
 2598: void instruction_hms_fleche(struct_processus *s_etat_processus);
 2599: void instruction_hms_moins(struct_processus *s_etat_processus);
 2600: void instruction_hms_plus(struct_processus *s_etat_processus);
 2601: 
 2602: void instruction_i(struct_processus *s_etat_processus);
 2603: void instruction_idft(struct_processus *s_etat_processus);
 2604: void instruction_idn(struct_processus *s_etat_processus);
 2605: void instruction_if(struct_processus *s_etat_processus);
 2606: void instruction_iferr(struct_processus *s_etat_processus);
 2607: void instruction_ifft(struct_processus *s_etat_processus);
 2608: void instruction_ift(struct_processus *s_etat_processus);
 2609: void instruction_ifte(struct_processus *s_etat_processus);
 2610: void instruction_im(struct_processus *s_etat_processus);
 2611: void instruction_implicit(struct_processus *s_etat_processus);
 2612: void instruction_in(struct_processus *s_etat_processus);
 2613: void instruction_incr(struct_processus *s_etat_processus);
 2614: void instruction_indep(struct_processus *s_etat_processus);
 2615: void instruction_input(struct_processus *s_etat_processus);
 2616: void instruction_infinity(struct_processus *s_etat_processus);
 2617: void instruction_inquire(struct_processus *s_etat_processus);
 2618: void instruction_int(struct_processus *s_etat_processus);
 2619: void instruction_interrupt(struct_processus *s_etat_processus);
 2620: void instruction_inv(struct_processus *s_etat_processus);
 2621: void instruction_ip(struct_processus *s_etat_processus);
 2622: void instruction_iswi(struct_processus *s_etat_processus);
 2623: void instruction_itrace(struct_processus *s_etat_processus);
 2624: 
 2625: void instruction_jdate(struct_processus *s_etat_processus);
 2626: 
 2627: void instruction_key(struct_processus *s_etat_processus);
 2628: void instruction_keylabel(struct_processus *s_etat_processus);
 2629: void instruction_keytitle(struct_processus *s_etat_processus);
 2630: void instruction_kill(struct_processus *s_etat_processus);
 2631: void instruction_kind(struct_processus *s_etat_processus);
 2632: 
 2633: void instruction_label(struct_processus *s_etat_processus);
 2634: void instruction_last(struct_processus *s_etat_processus);
 2635: void instruction_lcase(struct_processus *s_etat_processus);
 2636: void instruction_lcd_fleche(struct_processus *s_etat_processus);
 2637: void instruction_lchol(struct_processus *s_etat_processus);
 2638: void instruction_le(struct_processus *s_etat_processus);
 2639: void instruction_legv(struct_processus *s_etat_processus);
 2640: void instruction_limit(struct_processus *s_etat_processus);
 2641: void instruction_line(struct_processus *s_etat_processus);
 2642: void instruction_list_fleche(struct_processus *s_etat_processus);
 2643: void instruction_ln(struct_processus *s_etat_processus);
 2644: void instruction_lnp1(struct_processus *s_etat_processus);
 2645: void instruction_localization(struct_processus *s_etat_processus);
 2646: void instruction_lock(struct_processus *s_etat_processus);
 2647: void instruction_log(struct_processus *s_etat_processus);
 2648: void instruction_logger(struct_processus *s_etat_processus);
 2649: void instruction_logscale(struct_processus *s_etat_processus);
 2650: void instruction_lq(struct_processus *s_etat_processus);
 2651: void instruction_lsq(struct_processus *s_etat_processus);
 2652: void instruction_lt(struct_processus *s_etat_processus);
 2653: void instruction_lu(struct_processus *s_etat_processus);
 2654: void instruction_l_vers_t(struct_processus *s_etat_processus);
 2655: 
 2656: void instruction_mant(struct_processus *s_etat_processus);
 2657: void instruction_mark(struct_processus *s_etat_processus);
 2658: void instruction_max(struct_processus *s_etat_processus);
 2659: void instruction_maxs(struct_processus *s_etat_processus);
 2660: void instruction_mclrin(struct_processus *s_etat_processus);
 2661: void instruction_mean(struct_processus *s_etat_processus);
 2662: void instruction_mem(struct_processus *s_etat_processus);
 2663: void instruction_memlock(struct_processus *s_etat_processus);
 2664: void instruction_memunlock(struct_processus *s_etat_processus);
 2665: void instruction_min(struct_processus *s_etat_processus);
 2666: void instruction_mins(struct_processus *s_etat_processus);
 2667: void instruction_mod(struct_processus *s_etat_processus);
 2668: void instruction_moins(struct_processus *s_etat_processus);
 2669: void instruction_mtxlock(struct_processus *s_etat_processus);
 2670: void instruction_mtxstatus(struct_processus *s_etat_processus);
 2671: void instruction_mtxtrylock(struct_processus *s_etat_processus);
 2672: void instruction_mtxunlock(struct_processus *s_etat_processus);
 2673: void instruction_multiplication(struct_processus *s_etat_processus);
 2674: 
 2675: void instruction_ne(struct_processus *s_etat_processus);
 2676: void instruction_neg(struct_processus *s_etat_processus);
 2677: void instruction_next(struct_processus *s_etat_processus);
 2678: void instruction_newplane(struct_processus *s_etat_processus);
 2679: void instruction_not(struct_processus *s_etat_processus);
 2680: void instruction_nrand(struct_processus *s_etat_processus);
 2681: void instruction_nrproc(struct_processus *s_etat_processus);
 2682: void instruction_ns(struct_processus *s_etat_processus);
 2683: void instruction_num(struct_processus *s_etat_processus);
 2684: 
 2685: void instruction_obget(struct_processus *s_etat_processus);
 2686: void instruction_obsub(struct_processus *s_etat_processus);
 2687: void instruction_oct(struct_processus *s_etat_processus);
 2688: void instruction_open(struct_processus *s_etat_processus);
 2689: void instruction_or(struct_processus *s_etat_processus);
 2690: void instruction_over(struct_processus *s_etat_processus);
 2691: 
 2692: void instruction_p_vers_r(struct_processus *s_etat_processus);
 2693: void instruction_paper(struct_processus *s_etat_processus);
 2694: void instruction_parameter(struct_processus *s_etat_processus);
 2695: void instruction_parametric(struct_processus *s_etat_processus);
 2696: void instruction_pcov(struct_processus *s_etat_processus);
 2697: void instruction_peek(struct_processus *s_etat_processus);
 2698: void instruction_perm(struct_processus *s_etat_processus);
 2699: void instruction_persist(struct_processus *s_etat_processus);
 2700: void instruction_pi(struct_processus *s_etat_processus);
 2701: void instruction_pick(struct_processus *s_etat_processus);
 2702: void instruction_plot(struct_processus *s_etat_processus);
 2703: void instruction_plotter(struct_processus *s_etat_processus);
 2704: void instruction_plus(struct_processus *s_etat_processus);
 2705: void instruction_pmax(struct_processus *s_etat_processus);
 2706: void instruction_pmin(struct_processus *s_etat_processus);
 2707: void instruction_poke(struct_processus *s_etat_processus);
 2708: void instruction_polar(struct_processus *s_etat_processus);
 2709: void instruction_poll(struct_processus *s_etat_processus);
 2710: void instruction_pos(struct_processus *s_etat_processus);
 2711: void instruction_pourcent(struct_processus *s_etat_processus);
 2712: void instruction_pourcent_ch(struct_processus *s_etat_processus);
 2713: void instruction_pourcent_t(struct_processus *s_etat_processus);
 2714: void instruction_ppar(struct_processus *s_etat_processus);
 2715: void instruction_pr1(struct_processus *s_etat_processus);
 2716: void instruction_print(struct_processus *s_etat_processus);
 2717: void instruction_private(struct_processus *s_etat_processus);
 2718: void instruction_prlcd(struct_processus *s_etat_processus);
 2719: void instruction_prmd(struct_processus *s_etat_processus);
 2720: void instruction_procid(struct_processus *s_etat_processus);
 2721: void instruction_prompt(struct_processus *s_etat_processus);
 2722: void instruction_protect(struct_processus *s_etat_processus);
 2723: void instruction_prst(struct_processus *s_etat_processus);
 2724: void instruction_prstc(struct_processus *s_etat_processus);
 2725: void instruction_prusr(struct_processus *s_etat_processus);
 2726: void instruction_prvar(struct_processus *s_etat_processus);
 2727: void instruction_psdev(struct_processus *s_etat_processus);
 2728: void instruction_puissance(struct_processus *s_etat_processus);
 2729: void instruction_purge(struct_processus *s_etat_processus);
 2730: void instruction_pshcntxt(struct_processus *s_etat_processus);
 2731: void instruction_pshprfl(struct_processus *s_etat_processus);
 2732: void instruction_pulcntxt(struct_processus *s_etat_processus);
 2733: void instruction_pulprfl(struct_processus *s_etat_processus);
 2734: void instruction_put(struct_processus *s_etat_processus);
 2735: void instruction_putc(struct_processus *s_etat_processus);
 2736: void instruction_puti(struct_processus *s_etat_processus);
 2737: void instruction_putr(struct_processus *s_etat_processus);
 2738: void instruction_pvar(struct_processus *s_etat_processus);
 2739: 
 2740: void instruction_qr(struct_processus *s_etat_processus);
 2741: 
 2742: void instruction_r_vers_b(struct_processus *s_etat_processus);
 2743: void instruction_r_vers_c(struct_processus *s_etat_processus);
 2744: void instruction_r_vers_d(struct_processus *s_etat_processus);
 2745: void instruction_r_vers_p(struct_processus *s_etat_processus);
 2746: void instruction_rad(struct_processus *s_etat_processus);
 2747: void instruction_rand(struct_processus *s_etat_processus);
 2748: void instruction_rank(struct_processus *s_etat_processus);
 2749: void instruction_rceq(struct_processus *s_etat_processus);
 2750: void instruction_rci(struct_processus *s_etat_processus);
 2751: void instruction_rcij(struct_processus *s_etat_processus);
 2752: void instruction_rcl(struct_processus *s_etat_processus);
 2753: void instruction_rclf(struct_processus *s_etat_processus);
 2754: void instruction_rcls(struct_processus *s_etat_processus);
 2755: void instruction_rclswi(struct_processus *s_etat_processus);
 2756: void instruction_rcws(struct_processus *s_etat_processus);
 2757: void instruction_rdate(struct_processus *s_etat_processus);
 2758: void instruction_rdm(struct_processus *s_etat_processus);
 2759: void instruction_rdgn(struct_processus *s_etat_processus);
 2760: void instruction_rdz(struct_processus *s_etat_processus);
 2761: void instruction_re(struct_processus *s_etat_processus);
 2762: void instruction_read(struct_processus *s_etat_processus);
 2763: void instruction_recode(struct_processus *s_etat_processus);
 2764: void instruction_recv(struct_processus *s_etat_processus);
 2765: void instruction_redraw(struct_processus *s_etat_processus);
 2766: void instruction_regex(struct_processus *s_etat_processus);
 2767: void instruction_relax(struct_processus *s_etat_processus);
 2768: void instruction_remove(struct_processus *s_etat_processus);
 2769: void instruction_res(struct_processus *s_etat_processus);
 2770: void instruction_restart(struct_processus *s_etat_processus);
 2771: void instruction_recall(struct_processus *s_etat_processus);
 2772: void instruction_regv(struct_processus *s_etat_processus);
 2773: void instruction_repeat(struct_processus *s_etat_processus);
 2774: void instruction_repl(struct_processus *s_etat_processus);
 2775: void instruction_return(struct_processus *s_etat_processus);
 2776: void instruction_revlist(struct_processus *s_etat_processus);
 2777: void instruction_rewind(struct_processus *s_etat_processus);
 2778: void instruction_rfuse(struct_processus *s_etat_processus);
 2779: void instruction_rl(struct_processus *s_etat_processus);
 2780: void instruction_rlb(struct_processus *s_etat_processus);
 2781: void instruction_rnd(struct_processus *s_etat_processus);
 2782: void instruction_rnrm(struct_processus *s_etat_processus);
 2783: void instruction_roll(struct_processus *s_etat_processus);
 2784: void instruction_rolld(struct_processus *s_etat_processus);
 2785: void instruction_rot(struct_processus *s_etat_processus);
 2786: void instruction_row_fleche(struct_processus *s_etat_processus);
 2787: void instruction_row_moins(struct_processus *s_etat_processus);
 2788: void instruction_row_plus(struct_processus *s_etat_processus);
 2789: void instruction_rr(struct_processus *s_etat_processus);
 2790: void instruction_rrb(struct_processus *s_etat_processus);
 2791: void instruction_rsd(struct_processus *s_etat_processus);
 2792: void instruction_rstop(struct_processus *s_etat_processus);
 2793: void instruction_rswp(struct_processus *s_etat_processus);
 2794: 
 2795: void instruction_s_moins(struct_processus *s_etat_processus);
 2796: void instruction_s_plus(struct_processus *s_etat_processus);
 2797: void instruction_same(struct_processus *s_etat_processus);
 2798: void instruction_save(struct_processus *s_etat_processus);
 2799: void instruction_scatter(struct_processus *s_etat_processus);
 2800: void instruction_scale(struct_processus *s_etat_processus);
 2801: void instruction_sched(struct_processus *s_etat_processus);
 2802: void instruction_schur(struct_processus *s_etat_processus);
 2803: void instruction_sci(struct_processus *s_etat_processus);
 2804: void instruction_scls(struct_processus *s_etat_processus);
 2805: void instruction_sconj(struct_processus *s_etat_processus);
 2806: void instruction_sdev(struct_processus *s_etat_processus);
 2807: void instruction_select(struct_processus *s_etat_processus);
 2808: void instruction_send(struct_processus *s_etat_processus);
 2809: void instruction_sf(struct_processus *s_etat_processus);
 2810: void instruction_shared(struct_processus *s_etat_processus);
 2811: void instruction_sign(struct_processus *s_etat_processus);
 2812: void instruction_sin(struct_processus *s_etat_processus);
 2813: void instruction_sinh(struct_processus *s_etat_processus);
 2814: void instruction_sinv(struct_processus *s_etat_processus);
 2815: void instruction_size(struct_processus *s_etat_processus);
 2816: void instruction_sl(struct_processus *s_etat_processus);
 2817: void instruction_slb(struct_processus *s_etat_processus);
 2818: void instruction_slice(struct_processus *s_etat_processus);
 2819: void instruction_slicescale(struct_processus *s_etat_processus);
 2820: void instruction_smphrdecr(struct_processus *s_etat_processus);
 2821: void instruction_smphrgetv(struct_processus *s_etat_processus);
 2822: void instruction_smphrincr(struct_processus *s_etat_processus);
 2823: void instruction_smphrtrydecr(struct_processus *s_etat_processus);
 2824: void instruction_sneg(struct_processus *s_etat_processus);
 2825: void instruction_sort(struct_processus *s_etat_processus);
 2826: void instruction_spar(struct_processus *s_etat_processus);
 2827: void instruction_spawn(struct_processus *s_etat_processus);
 2828: void instruction_splash(struct_processus *s_etat_processus);
 2829: void instruction_sq(struct_processus *s_etat_processus);
 2830: void instruction_sqlconnect(struct_processus *s_etat_processus);
 2831: void instruction_sqldisconnect(struct_processus *s_etat_processus);
 2832: void instruction_sqlquery(struct_processus *s_etat_processus);
 2833: void instruction_sqrt(struct_processus *s_etat_processus);
 2834: void instruction_sr(struct_processus *s_etat_processus);
 2835: void instruction_srb(struct_processus *s_etat_processus);
 2836: void instruction_srev(struct_processus *s_etat_processus);
 2837: void instruction_sst(struct_processus *s_etat_processus);
 2838: void instruction_star_d(struct_processus *s_etat_processus);
 2839: void instruction_star_h(struct_processus *s_etat_processus);
 2840: void instruction_star_s(struct_processus *s_etat_processus);
 2841: void instruction_star_w(struct_processus *s_etat_processus);
 2842: void instruction_start(struct_processus *s_etat_processus);
 2843: void instruction_static(struct_processus *s_etat_processus);
 2844: void instruction_std(struct_processus *s_etat_processus);
 2845: void instruction_step(struct_processus *s_etat_processus);
 2846: void instruction_steq(struct_processus *s_etat_processus);
 2847: void instruction_sto(struct_processus *s_etat_processus);
 2848: void instruction_sto_division(struct_processus *s_etat_processus);
 2849: void instruction_sto_fois(struct_processus *s_etat_processus);
 2850: void instruction_sto_moins(struct_processus *s_etat_processus);
 2851: void instruction_sto_plus(struct_processus *s_etat_processus);
 2852: void instruction_stof(struct_processus *s_etat_processus);
 2853: void instruction_stop(struct_processus *s_etat_processus);
 2854: void instruction_store(struct_processus *s_etat_processus);
 2855: void instruction_stos(struct_processus *s_etat_processus);
 2856: void instruction_stoswi(struct_processus *s_etat_processus);
 2857: void instruction_str_fleche(struct_processus *s_etat_processus);
 2858: void instruction_stws(struct_processus *s_etat_processus);
 2859: void instruction_sub(struct_processus *s_etat_processus);
 2860: void instruction_suspend(struct_processus *s_etat_processus);
 2861: void instruction_svd(struct_processus *s_etat_processus);
 2862: void instruction_svl(struct_processus *s_etat_processus);
 2863: void instruction_swap(struct_processus *s_etat_processus);
 2864: void instruction_swi(struct_processus *s_etat_processus);
 2865: void instruction_swilock(struct_processus *s_etat_processus);
 2866: void instruction_swiqueue(struct_processus *s_etat_processus);
 2867: void instruction_swistatus(struct_processus *s_etat_processus);
 2868: void instruction_swiunlock(struct_processus *s_etat_processus);
 2869: void instruction_swapcntxt(struct_processus *s_etat_processus);
 2870: void instruction_sx(struct_processus *s_etat_processus);
 2871: void instruction_sx2(struct_processus *s_etat_processus);
 2872: void instruction_sxy(struct_processus *s_etat_processus);
 2873: void instruction_sy(struct_processus *s_etat_processus);
 2874: void instruction_sy2(struct_processus *s_etat_processus);
 2875: void instruction_sync(struct_processus *s_etat_processus);
 2876: void instruction_syseval(struct_processus *s_etat_processus);
 2877: 
 2878: void instruction_table_fleche(struct_processus *s_etat_processus);
 2879: void instruction_tail(struct_processus *s_etat_processus);
 2880: void instruction_tan(struct_processus *s_etat_processus);
 2881: void instruction_tanh(struct_processus *s_etat_processus);
 2882: void instruction_target(struct_processus *s_etat_processus);
 2883: void instruction_taylr(struct_processus *s_etat_processus);
 2884: void instruction_then(struct_processus *s_etat_processus);
 2885: void instruction_time(struct_processus *s_etat_processus);
 2886: void instruction_title(struct_processus *s_etat_processus);
 2887: void instruction_tokenize(struct_processus *s_etat_processus);
 2888: void instruction_tot(struct_processus *s_etat_processus);
 2889: void instruction_trim(struct_processus *s_etat_processus);
 2890: void instruction_trn(struct_processus *s_etat_processus);
 2891: void instruction_trnc(struct_processus *s_etat_processus);
 2892: void instruction_true(struct_processus *s_etat_processus);
 2893: void instruction_type(struct_processus *s_etat_processus);
 2894: void instruction_t_vers_l(struct_processus *s_etat_processus);
 2895: 
 2896: void instruction_ucase(struct_processus *s_etat_processus);
 2897: void instruction_uchol(struct_processus *s_etat_processus);
 2898: void instruction_unlock(struct_processus *s_etat_processus);
 2899: void instruction_unprotect(struct_processus *s_etat_processus);
 2900: void instruction_until(struct_processus *s_etat_processus);
 2901: void instruction_use(struct_processus *s_etat_processus);
 2902: void instruction_utpc(struct_processus *s_etat_processus);
 2903: void instruction_utpf(struct_processus *s_etat_processus);
 2904: void instruction_utpn(struct_processus *s_etat_processus);
 2905: void instruction_utpt(struct_processus *s_etat_processus);
 2906: 
 2907: void instruction_var(struct_processus *s_etat_processus);
 2908: void instruction_variable(struct_processus *s_etat_processus);
 2909: void instruction_vars(struct_processus *s_etat_processus);
 2910: void instruction_verify(struct_processus *s_etat_processus);
 2911: void instruction_vers_niveau_inferieur(struct_processus *s_etat_processus);
 2912: void instruction_vers_niveau_superieur(struct_processus *s_etat_processus);
 2913: void instruction_version(struct_processus *s_etat_processus);
 2914: void instruction_visit(struct_processus *s_etat_processus);
 2915: void instruction_volatile(struct_processus *s_etat_processus);
 2916: 
 2917: void instruction_wait(struct_processus *s_etat_processus);
 2918: void instruction_warranty(struct_processus *s_etat_processus);
 2919: void instruction_wfdata(struct_processus *s_etat_processus);
 2920: void instruction_wfack(struct_processus *s_etat_processus);
 2921: void instruction_wflock(struct_processus *s_etat_processus);
 2922: void instruction_wfpoke(struct_processus *s_etat_processus);
 2923: void instruction_wfproc(struct_processus *s_etat_processus);
 2924: void instruction_wfsock(struct_processus *s_etat_processus);
 2925: void instruction_wfswi(struct_processus *s_etat_processus);
 2926: void instruction_while(struct_processus *s_etat_processus);
 2927: void instruction_wireframe(struct_processus *s_etat_processus);
 2928: void instruction_workdir(struct_processus *s_etat_processus);
 2929: void instruction_write(struct_processus *s_etat_processus);
 2930: 
 2931: void instruction_xcol(struct_processus *s_etat_processus);
 2932: void instruction_xor(struct_processus *s_etat_processus);
 2933: void instruction_xpon(struct_processus *s_etat_processus);
 2934: void instruction_xroot(struct_processus *s_etat_processus);
 2935: 
 2936: void instruction_ycol(struct_processus *s_etat_processus);
 2937: void instruction_yield(struct_processus *s_etat_processus);
 2938: 
 2939: /*
 2940: --------------------------------------------------------------------------------
 2941:   Procédures
 2942: --------------------------------------------------------------------------------
 2943: */
 2944: 
 2945: #ifndef RPLARGS
 2946: void affectation_interruptions_logicielles(struct_processus *s_etat_processus);
 2947: void affichage_pile(struct_processus *s_etat_processus,
 2948:         struct_liste_chainee *l_element_courant, unsigned long
 2949:         niveau_courant);
 2950: #endif
 2951: 
 2952: void *allocation_maillon(struct_processus *s_etat_processus);
 2953: 
 2954: #ifndef RPLARGS
 2955: void analyse(struct_processus *s_etat_processus, void (*fonction)());
 2956: void *analyse_instruction(struct_processus *s_etat_processus,
 2957:         unsigned char *candidat);
 2958: void appel_gnuplot(struct_processus *s_etat_processus,
 2959:         unsigned char persistance);
 2960: void cf(struct_processus *s_etat_processus, unsigned char indice_drapeau);
 2961: void cond(struct_processus *s_etat_processus,
 2962:         struct_matrice *s_matrice, real8 *condition);
 2963: void conversion_chaine(struct_processus *s_etat_processus,
 2964:         unsigned char *chaine, unsigned char type);
 2965: void conversion_decimal_vers_hms(real8 *angle);
 2966: void conversion_degres_vers_radians(real8 *angle);
 2967: void conversion_element_tex(unsigned char **element, unsigned char *fonction);
 2968: void conversion_format(struct_processus *s_etat_processus,
 2969:         unsigned char *chaine);
 2970: void conversion_hms_vers_decimal(real8 *angle);
 2971: void conversion_majuscule_limitee(unsigned char *chaine_entree, 
 2972:         unsigned char *chaine_sortie, unsigned long longueur);
 2973: void conversion_radians_vers_degres(real8 *angle);
 2974: void copie_arbre_variables(struct_processus *s_etat_processus,
 2975:         struct_processus *s_nouvel_etat_processus);
 2976: void correction_formateur_tex(struct_processus *s_etat_processus,
 2977:         unsigned char **ligne);
 2978: void depilement_pile_systeme(struct_processus *s_etat_processus);
 2979: void derivation(struct_processus *s_etat_processus,
 2980:         struct_objet **s_expression);
 2981: void determinant(struct_processus *s_etat_processus, struct_matrice *s_matrice,
 2982:         void *valeur);
 2983: void deverrouillage_threads_concurrents(struct_processus *s_etat_processus);
 2984: void ecriture_pile(struct_processus *s_etat_processus, file *flux,
 2985:         struct_liste_chainee *l_element_courant, unsigned long niveau_courant);
 2986: void ecriture_profil(struct_processus *s_etat_processus);
 2987: void effacement_pile_systeme(struct_processus *s_etat_processus);
 2988: void empilement_pile_systeme(struct_processus *s_etat_processus);
 2989: void encart(struct_processus *s_etat_processus, unsigned long duree);
 2990: void evaluation_romberg(struct_processus *s_etat_processus,
 2991:         struct_objet *s_expression, unsigned char *variable, real8 *point,
 2992:         real8 *valeur, logical1 *validite);
 2993: void factorisation_cholesky(struct_processus *s_etat_processus,
 2994:         struct_matrice *s_matrice, unsigned char mode);
 2995: void factorisation_lq(struct_processus *s_etat_processus,
 2996:         struct_matrice *s_matrice, void **tau);
 2997: void factorisation_lu(struct_processus *s_etat_processus,
 2998:         struct_matrice *s_matrice, struct_matrice **s_permutation);
 2999: void factorisation_qr(struct_processus *s_etat_processus,
 3000:         struct_matrice *s_matrice, void **tau);
 3001: void factorisation_schur(struct_processus *s_etat_processus,
 3002:         struct_matrice *s_matrice, struct_matrice **s_schur);
 3003: void *fusible(void *argument);
 3004: void formateur_tex(struct_processus *s_etat_processus, struct_objet *s_objet,
 3005:         unsigned char environnement);
 3006: void formateur_elementaire_tex(struct_processus *s_etat_processus,
 3007:         file *fichier, struct_objet *s_objet, unsigned char environnement);
 3008: void impression_pile(struct_processus *s_etat_processus,
 3009:             struct_liste_chainee *l_element_courant,
 3010:             unsigned char methode, unsigned long niveau_courant);
 3011: void impression_tex(struct_processus *s_etat_processus);
 3012: void informations(struct_processus *s_etat_processus);
 3013: void initialisation_allocateur(struct_processus *s_etat_processus);
 3014: void initialisation_completion(void);
 3015: void initialisation_contexte_cas(struct_processus *s_etat_processus);
 3016: void initialisation_drapeaux(struct_processus *s_etat_processus);
 3017: void initialisation_generateur_aleatoire(struct_processus *s_etat_processus,
 3018:         logical1 initialisation_automatique, unsigned long int racine);
 3019: void initialisation_instructions(struct_processus *s_etat_processus);
 3020: void initialisation_variables(struct_processus *s_etat_processus);
 3021: #endif
 3022: 
 3023: void initialisation_objet(struct_objet *s_objet);
 3024: 
 3025: #ifndef RPLARGS
 3026: void insertion_thread(struct_processus *s_etat_processus,
 3027:         logical1 thread_principal);
 3028: void insertion_thread_surveillance(struct_processus *s_etat_processus,
 3029:         struct_descripteur_thread *s_argument_thread);
 3030: void integrale_romberg(struct_processus *s_etat_processus,
 3031:         struct_objet *s_expression, unsigned char *variable,
 3032:         real8 a, real8 b, real8 precision);
 3033: void interface_cas(struct_processus *s_etat_processus,
 3034:         enum t_rplcas_commandes commande);
 3035: void interruption1(int signal);
 3036: void interruption2(int signal);
 3037: void interruption3(int signal);
 3038: void interruption4(int signal);
 3039: void interruption5(int signal);
 3040: void interruption6(int signal);
 3041: void interruption_depassement_pile(int urgence, stackoverflow_context_t scp);
 3042: void inversion_matrice(struct_processus *s_etat_processus,
 3043:         struct_matrice *s_matrice);
 3044: void lancement_daemon(struct_processus *s_etat_processus);
 3045: void *lancement_thread(void *argument);
 3046: #endif
 3047: 
 3048: void liberation(struct_processus *s_etat_processus, struct_objet *s_objet);
 3049: void liberation_maillon(struct_processus *s_etat_processus,
 3050:         struct_liste_chainee *maillon);
 3051: 
 3052: #ifndef RPLARGS
 3053: void liberation_allocateur(struct_processus *s_etat_processus);
 3054: void liberation_arbre_instructions(struct_processus *s_etat_processus,
 3055:         struct_instruction *arbre);
 3056: void liberation_arbre_variables(struct_processus *s_etat_processus,
 3057:         struct_arbre_variables *arbre, logical1 definitions);
 3058: void liberation_arbre_variables_partagees(struct_processus *s_etat_processus,
 3059:         struct_arbre_variables_partagees *arbre);
 3060: void liberation_contexte_cas(struct_processus *s_etat_processus);
 3061: void liberation_generateur_aleatoire(struct_processus *s_etat_processus);
 3062: void liberation_mutexes_arbre_variables_partagees(struct_processus
 3063:         *s_etat_processus, struct_arbre_variables_partagees *l_element_courant);
 3064: void liberation_threads(struct_processus *s_etat_processus);
 3065: void liberation_profil(struct_processus *s_etat_processus);
 3066: void localisation_courante(struct_processus *s_etat_processus);
 3067: void modification_pid_thread_pere(struct_processus *s_etat_processus);
 3068: void moindres_carres(struct_processus *s_etat_processus,
 3069:         struct_matrice *s_matrice_a, struct_matrice *s_matrice_b,
 3070:         struct_matrice *s_matrice_x);
 3071: void profilage(struct_processus *s_etat_processus, unsigned char *fonction);
 3072: void rang(struct_processus *s_etat_processus, struct_matrice *s_matrice,
 3073:         integer8 *valeur);
 3074: void recherche_type(struct_processus *s_etat_processus);
 3075: void retrait_thread(struct_processus *s_etat_processus);
 3076: void retrait_thread_surveillance(struct_processus *s_etat_processus,
 3077:         struct_descripteur_thread *s_argument_thread);
 3078: void rplcore(struct_processus *s_etat_processus);
 3079: #endif
 3080: 
 3081: void scrutation_injection(struct_processus *s_etat_processus);
 3082: 
 3083: #ifndef RPLARGS
 3084: void scrutation_interruptions(struct_processus *s_etat_processus);
 3085: void sf(struct_processus *s_etat_processus, unsigned char indice_drapeau);
 3086: void *surveillance_processus(void *argument);
 3087: void swap(void *variable_1, void *variable_2, unsigned long taille_octets);
 3088: void *thread_signaux(void *argument);
 3089: void trace(struct_processus *s_etat_processus, FILE *flux);
 3090: void traitement_asynchrone_exceptions_gsl(struct_processus *s_etat_processus);
 3091: void traitement_exceptions_gsl(const char *reason, const char *file,
 3092:         int line, int gsl_errno);
 3093: void traitement_interruptions_logicielles(struct_processus *s_etat_processus);
 3094: void tri_base_symboles_externes(struct_processus *s_etat_processus);
 3095: void tri_vecteur(real8 *vecteur, unsigned long taille);
 3096: void valeurs_propres(struct_processus *s_etat_processus,
 3097:         struct_matrice *s_matrice,
 3098:         struct_vecteur *s_valeurs_propres,
 3099:         struct_matrice *s_vecteurs_propres_gauches,
 3100:         struct_matrice *s_vecteur_propres_droits);
 3101: void valeurs_propres_generalisees(struct_processus *s_etat_processus,
 3102:         struct_matrice *s_matrice,
 3103:         struct_matrice *s_metrique,
 3104:         struct_vecteur *s_valeurs_propres,
 3105:         struct_matrice *s_vecteurs_propres_gauches,
 3106:         struct_matrice *s_vecteur_propres_droits);
 3107: void valeurs_singulieres(struct_processus *s_etat_processus,
 3108:         struct_matrice *s_matrice,
 3109:         struct_matrice *u, struct_vecteur *s, struct_matrice *vh);
 3110: void verrouillage_threads_concurrents(struct_processus *s_etat_processus);
 3111: #endif
 3112: 
 3113: /*
 3114: --------------------------------------------------------------------------------
 3115:   Fonctions de gestion des signaux
 3116: --------------------------------------------------------------------------------
 3117: */
 3118: 
 3119: #ifndef RPLARGS
 3120: void creation_queue_signaux(struct_processus *s_etat_processus);
 3121: void liberation_queue_signaux(struct_processus *s_etat_processus);
 3122: void destruction_queue_signaux(struct_processus *s_etat_processus);
 3123: int envoi_signal_contexte(struct_processus *s_etat_processus,
 3124:         enum signaux_rpl signal);
 3125: int envoi_signal_processus(pid_t pid, enum signaux_rpl signal);
 3126: int envoi_signal_thread(pthread_t tid, enum signaux_rpl signal);
 3127: #endif
 3128: 
 3129: /*
 3130: --------------------------------------------------------------------------------
 3131:   Fonctions de sommation de vecteur dans perte de précision
 3132: --------------------------------------------------------------------------------
 3133: */
 3134: 
 3135: real8 sommation_vecteur_reel(real8 *vecteur, unsigned long *taille,
 3136:         logical1 *erreur_memoire);
 3137: complex16 sommation_vecteur_complexe(complex16 *vecteur, unsigned long *taille,
 3138:         logical1 *erreur_memoire);
 3139: 
 3140: /*
 3141: --------------------------------------------------------------------------------
 3142:   Routine principale
 3143: --------------------------------------------------------------------------------
 3144: */
 3145: 
 3146: #ifndef RPLARGS
 3147: int rplinit(int argc, char *argv[], char *envp[],
 3148:         unsigned char ***resultats, char *rpl_home);
 3149: #endif
 3150: 
 3151: /*
 3152: --------------------------------------------------------------------------------
 3153:   Routines de statistiques
 3154: --------------------------------------------------------------------------------
 3155: */
 3156: 
 3157: #ifndef RPLARGS
 3158: real8 correlation_statistique(struct_matrice *s_matrice,
 3159:         unsigned long colonne_1, unsigned long colonne_2, logical1 *erreur);
 3160: real8 covariance_statistique(struct_matrice *s_matrice,
 3161:         unsigned long colonne_1, unsigned long colonne_2,
 3162:         unsigned char type, logical1 *erreur);
 3163: struct_vecteur *ecart_type_statistique(struct_matrice *s_matrice,
 3164:         unsigned char type);
 3165: struct_vecteur *moyenne_statistique(struct_matrice *s_matrice);
 3166: struct_vecteur *sommation_colonne_statistique(struct_matrice *s_matrice,
 3167:         unsigned long colonne);
 3168: struct_vecteur *sommation_produits_colonnes_statistiques(struct_matrice
 3169:         *s_matrice, unsigned long colonne_1, unsigned long colonne_2);
 3170: struct_vecteur *sommation_statistique(struct_matrice *s_matrice);
 3171: struct_vecteur *variance_statistique(struct_matrice *s_matrice,
 3172:         unsigned char type);
 3173: #endif
 3174: 
 3175: /*
 3176: --------------------------------------------------------------------------------
 3177:   Gestion des bibliothèques
 3178: --------------------------------------------------------------------------------
 3179: */
 3180: 
 3181: #ifndef RPLARGS
 3182: void *chargement_bibliotheque(struct_processus *s_etat_processus,
 3183:         unsigned char *bibliotheque);
 3184: logical1 execution_fonction_de_bibliotheque(struct_processus *s_etat_processus,
 3185:         unsigned char *nom_fonction, unsigned char *bibliothque);
 3186: logical1 retrait_bibliotheque(struct_processus *s_etat_processus,
 3187:         struct_bibliotheque *descripteur);
 3188: #endif
 3189: 
 3190: struct_liste_chainee *depilement_pile_operationnelle(struct_rpl_arguments
 3191:         *s_rpl_arguments, struct_objet **s_objet);
 3192: struct_liste_chainee *empilement_pile_operationnelle(struct_rpl_arguments
 3193:         *s_rpl_arguments, struct_objet *s_objet);
 3194: struct_liste_chainee *sauvegarde_arguments(struct_rpl_arguments
 3195:         *s_rpl_arguments, unsigned long nombre_arguments);
 3196: 
 3197: /*
 3198: --------------------------------------------------------------------------------
 3199:   Fonctions retournant un CHARACTER*(*)
 3200: --------------------------------------------------------------------------------
 3201: */
 3202: 
 3203: #ifndef RPLARGS
 3204: unsigned char *analyse_algebrique(struct_processus *s_etat_processus,
 3205:         unsigned char *chaine_algebrique, struct_liste_chainee **l_base_liste);
 3206: unsigned char *analyse_flux(struct_processus *s_etat_processus,
 3207:         unsigned char *flux, long longueur);
 3208: unsigned char *recherche_chemin_fichiers_temporaires(struct_processus
 3209:         *s_etat_processus);
 3210: unsigned char *compactage(unsigned char *chaine);
 3211: unsigned char *conversion_majuscule(unsigned char *chaine);
 3212: unsigned char *creation_nom_fichier(struct_processus *s_etat_processus,
 3213:         unsigned char *chemin);
 3214: unsigned char *date_compilation();
 3215: unsigned char *extraction_chaine(unsigned char *chaine, unsigned long i,
 3216:         unsigned long j);
 3217: unsigned char *formateur(struct_processus *s_etat_processus, long offset,
 3218:         struct_objet *s_objet);
 3219: unsigned char *formateur_fichier(struct_processus *s_etat_processus,
 3220:         struct_objet *s_objet, struct_objet *s_format,
 3221:         long longueur, long longueur_champ, unsigned char format,
 3222:         unsigned char type, long *longueur_effective, long *recursivite);
 3223: unsigned char *formateur_flux(struct_processus *s_etat_processus,
 3224:         unsigned char *donnees, long *longueur);
 3225: unsigned char *formateur_fichier_nombre(struct_processus *s_etat_processus,
 3226:         void *valeur_numerique, unsigned char type,
 3227:         long longueur, long longueur_champ, unsigned char format);
 3228: unsigned char *formateur_fichier_binaire_nombre(struct_processus
 3229:         *s_etat_processus, void *valeur_numerique, unsigned char type,
 3230:         long longueur, long *longueur_conversion);
 3231: unsigned char *formateur_fichier_reel(struct_processus *s_etat_processus,
 3232:         void *valeur_numerique, unsigned char type,
 3233:         long longueur, long longueur_champ, unsigned char format);
 3234: unsigned char *formateur_nombre(struct_processus *s_etat_processus,
 3235:         void *valeur_numerique, unsigned char type);
 3236: unsigned char *formateur_reel(struct_processus *s_etat_processus,
 3237:         void *valeur_numerique, unsigned char type);
 3238: unsigned char *messages(struct_processus *s_etat_processus);
 3239: unsigned char *pointeur_ieme_caractere(struct_processus *s_etat_processus,
 3240:         unsigned char *chaine, integer8 position);
 3241: unsigned char *purification_chaine(unsigned char *chaine);
 3242: unsigned char *reencodage(struct_processus *s_etat_processus,
 3243:         unsigned char *chaine_entree, unsigned char *codage_entree,
 3244:         unsigned char *codage_sortie);
 3245: unsigned char *transliteration(struct_processus *s_etat_processus,
 3246:         unsigned char *chaine_entree, unsigned char *codage_entree,
 3247:         unsigned char *codage_sortie);
 3248: #endif
 3249: 
 3250: /*
 3251: --------------------------------------------------------------------------------
 3252:   Fonctions retournant un INTEGER*1 (drapeau d'erreur)
 3253: --------------------------------------------------------------------------------
 3254: */
 3255: 
 3256: #ifndef RPLARGS
 3257: logical1 analyse_syntaxique(struct_processus *s_etat_processus);
 3258: logical1 arret_thread_signaux(struct_processus *s_etat_processus);
 3259: logical1 caracteristiques_fichier(struct_processus *s_etat_processus,
 3260:         unsigned char *nom, logical1 *existence, logical1 *ouverture,
 3261:         unsigned long *unite);
 3262: logical1 controle(struct_processus *s_etat_processus, unsigned char *fichier,
 3263:         unsigned char *type, unsigned char *somme_candidate);
 3264: logical1 controle_integrite(struct_processus *s_etat_processus,
 3265:         unsigned char *executable_candidat, unsigned char *executable);
 3266: logical1 creation_variable(struct_processus *s_etat_processus,
 3267:         struct_variable *s_variable,
 3268:         unsigned char autorisation_creation_variable_statique,
 3269:         unsigned char autorisation_creation_variable_partagee);
 3270: logical1 creation_variable_partagee(struct_processus *s_etat_processus,
 3271:         struct_variable_partagee *s_variable);
 3272: logical1 creation_variable_statique(struct_processus *s_etat_processus,
 3273:         struct_variable_statique *s_variable);
 3274: logical1 chainage(struct_processus *s_etat_processus);
 3275: logical1 compilation(struct_processus *s_etat_processus);
 3276: logical1 depilement(struct_processus *s_etat_processus,
 3277:         struct_liste_chainee **l_base_liste, struct_objet **s_objet);
 3278: logical1 destruction_fichier(unsigned char *nom_fichier);
 3279: logical1 empilement(struct_processus *s_etat_processus,
 3280:         struct_liste_chainee **l_base_liste, struct_objet *s_objet);
 3281: logical1 empilement_pile_last(struct_processus *s_etat_processus,
 3282:         unsigned long nombre_arguments);
 3283: logical1 evaluation(struct_processus *s_etat_processus, struct_objet *s_objet,
 3284:         unsigned char type_evaluation);
 3285: logical1 initialisation_fichier_acces_direct(struct_processus *s_etat_processus,
 3286:         sqlite3 *sqlite, logical1 binaire);
 3287: logical1 initialisation_fichier_acces_indexe(struct_processus *s_etat_processus,
 3288:         sqlite3 *sqlite, integer8 position_clef, logical1 binaire);
 3289: logical1 lancement_thread_signaux(struct_processus *s_etat_processus);
 3290: logical1 recherche_instruction_suivante(struct_processus *s_etat_processus);
 3291: logical1 retrait_variable(struct_processus *s_etat_processus,
 3292:         unsigned char *nom_variable, unsigned char type);
 3293: logical1 retrait_variables_par_niveau(struct_processus *s_etat_processus);
 3294: logical1 retrait_variable_partagee(struct_processus *s_etat_processus,
 3295:         unsigned char *nom_variable, union_position_variable position);
 3296: logical1 retrait_variables_partagees_locales(
 3297:         struct_processus *s_etat_processus);
 3298: logical1 retrait_variable_statique(struct_processus *s_etat_processus,
 3299:         unsigned char *nom_variable, union_position_variable position);
 3300: logical1 retrait_variables_statiques_locales(
 3301:         struct_processus *s_etat_processus);
 3302: logical1 sequenceur(struct_processus *s_etat_processus);
 3303: logical1 sequenceur_optimise(struct_processus *s_etat_processus);
 3304: #endif
 3305: 
 3306: /*
 3307: --------------------------------------------------------------------------------
 3308:   Fonctions retournant un INTEGER*1 (drapeau)
 3309: --------------------------------------------------------------------------------
 3310: */
 3311: 
 3312: logical1 depassement_addition(integer8 *a, integer8 *b, integer8 *resultat);
 3313: logical1 depassement_multiplication(integer8 *a, integer8 *b,
 3314:         integer8 *resultat);
 3315: logical1 depassement_puissance(integer8 *a, integer8 *b, integer8 *resultat);
 3316: 
 3317: #ifndef RPLARGS
 3318: logical1 ecriture_pipe(struct_processus *s_etat_processus, int pipe,
 3319:         struct_objet *s_objet);
 3320: logical1 recherche_variable(struct_processus *s_etat_processus,
 3321:         unsigned char *nom_variable);
 3322: logical1 recherche_variable_globale(struct_processus *s_etat_processus,
 3323:         unsigned char *nom_variable);
 3324: logical1 test_cfsf(struct_processus *s_etat_processus,
 3325:         unsigned char indice_drapeau);
 3326: logical1 test_expression_rpn(unsigned char *chaine);
 3327: logical1 test_fonction(unsigned char *chaine);
 3328: logical1 validation_chaine(unsigned char *chaine);
 3329: #endif
 3330: 
 3331: /*
 3332: --------------------------------------------------------------------------------
 3333:   Fonctions retournant un ssize_t
 3334: --------------------------------------------------------------------------------
 3335: */
 3336: 
 3337: #ifndef RPLARGS
 3338: ssize_t read_atomic(struct_processus *s_etat_processus,
 3339:         int fd, void *buf, size_t count);
 3340: ssize_t write_atomic(struct_processus *s_etat_processus,
 3341:         int fd, void *buf, size_t count);
 3342: #endif
 3343: 
 3344: /*
 3345: --------------------------------------------------------------------------------
 3346:   Fonctions renvoyant un int
 3347: --------------------------------------------------------------------------------
 3348: */
 3349: 
 3350: int alsprintf(unsigned char **strp, const char *fmt, ...);
 3351: int interruption_violation_access(void *adresse_fautive, int gravite);
 3352: #ifndef RPLARGS
 3353: int liste_variables(struct_processus *s_etat_processus,
 3354:         struct_tableau_variables *tableau);
 3355: int nombre_variables(struct_processus *s_etat_processus);
 3356: int readline_analyse_syntaxique(int count, int key);
 3357: int readline_effacement(int count, int key);
 3358: #endif
 3359: int tex_fprintf(struct_processus *s_etat_processus,
 3360:         file *flux, const char *format, ...);
 3361: int transliterated_fprintf(struct_processus *s_etat_processus, file *flux,
 3362:         const char *format, ...);
 3363: int valsprintf(unsigned char **strp, const char *fmt, va_list ap);
 3364: int wrapper_instruction_intrinseque(void (*fonction)(),
 3365:         struct_rpl_arguments *rpl_arguments);
 3366: 
 3367: /*
 3368: --------------------------------------------------------------------------------
 3369:   Fonctions renvoyant un INTEGER*1 (longueur d'un entier binaire)
 3370: --------------------------------------------------------------------------------
 3371: */
 3372: 
 3373: #ifndef RPLARGS
 3374: unsigned char longueur_entiers_binaires(struct_processus *s_etat_processus);
 3375: #endif
 3376: 
 3377: /*
 3378: --------------------------------------------------------------------------------
 3379:   Fonctions retournant un INTEGER*8 (valeur binaire non signée)
 3380: --------------------------------------------------------------------------------
 3381: */
 3382: 
 3383: #ifndef RPLARGS
 3384: logical8 masque_entiers_binaires(struct_processus *s_etat_processus);
 3385: #endif
 3386: 
 3387: /*
 3388: --------------------------------------------------------------------------------
 3389:   Fonctions retournant un INTEGER*8 (entier standard RPL/2)
 3390: --------------------------------------------------------------------------------
 3391: */
 3392: 
 3393: #ifndef RPLARGS
 3394: integer8 occupation_memoire(struct_objet *s_objet);
 3395: integer8 longueur_chaine(struct_processus *s_etat_processus,
 3396:         unsigned char *chaine);
 3397: integer8 position_caractere_de_chaine(struct_processus *s_etat_processus,
 3398:         unsigned char *chaine, unsigned char *position);
 3399: #endif
 3400: 
 3401: /*
 3402: --------------------------------------------------------------------------------
 3403:   Fonctions renvoyant une liste chaînée (pointeur sur *struct_liste_chainee)
 3404: --------------------------------------------------------------------------------
 3405: */
 3406: 
 3407: #ifndef RPLARGS
 3408: struct_liste_chainee *analyse_rpn(struct_processus *s_etat_processus,
 3409:         unsigned char *chaine_rpn);
 3410: #endif
 3411: 
 3412: /*
 3413: --------------------------------------------------------------------------------
 3414:   Fonctions renvoyant une copie de la structure de description des processus
 3415: --------------------------------------------------------------------------------
 3416: */
 3417: 
 3418: #ifndef RPLARGS
 3419: struct_processus *copie_etat_processus(struct_processus *s_etat_processus);
 3420: #endif
 3421: 
 3422: /*
 3423: --------------------------------------------------------------------------------
 3424:   Fonctions renvoyant un pointeur sur un fichier (file *) ou un descripteur
 3425: --------------------------------------------------------------------------------
 3426: */
 3427: 
 3428: #ifndef RPLARGS
 3429: file *creation_fichier_tex(struct_processus *s_etat_processus);
 3430: struct_descripteur_fichier *descripteur_fichier(struct_processus
 3431:         *s_etat_processus, struct_fichier *s_fichier);
 3432: #endif
 3433: 
 3434: /*
 3435: --------------------------------------------------------------------------------
 3436:   Fonctions renvoyant un pointeur sur une *struct_objet
 3437: --------------------------------------------------------------------------------
 3438: */
 3439: 
 3440: struct_objet *copie_objet(struct_processus *s_etat_processus,
 3441:         struct_objet *s_objet, unsigned char type);
 3442: 
 3443: struct_objet *allocation(struct_processus *s_etat_processus, enum t_type type);
 3444: #ifndef RPLARGS
 3445: struct_objet *formateur_date(struct_processus *s_etat_processus,
 3446:         struct timeval *temps);
 3447: struct_objet *lecture_pipe(struct_processus *s_etat_processus, int pipe);
 3448: struct_objet *parametres_sql(struct_processus *s_etat_processus,
 3449:         struct_objet *s_parametres);
 3450: struct_objet *simplification(struct_processus *s_etat_processus,
 3451:         struct_objet *s_objet);
 3452: 
 3453: struct_arbre_variables *allocation_noeud(struct_processus *s_etat_processus);
 3454: struct_arbre_variables **allocation_tableau_noeuds(
 3455:         struct_processus *s_etat_processus);
 3456: 
 3457: /*
 3458: --------------------------------------------------------------------------------
 3459:   Fonctions renvoyant un pointeur sur une *struct_liste_variables_statiques
 3460:   ou *struct_liste_variables_partagees
 3461: --------------------------------------------------------------------------------
 3462: */
 3463: 
 3464: struct_liste_variables_statiques *recherche_variable_statique(struct_processus
 3465:         *s_etat_processus, unsigned char *nom_variable,
 3466:         union_position_variable position, unsigned char origine);
 3467: struct_liste_variables_partagees *recherche_variable_partagee(struct_processus
 3468:         *s_etat_processus, unsigned char *nom_variable,
 3469:         union_position_variable position, unsigned char origine);
 3470: #endif
 3471: 
 3472: /*
 3473: --------------------------------------------------------------------------------
 3474:   Fonctions gérant les arbres de simplification
 3475: --------------------------------------------------------------------------------
 3476: */
 3477: 
 3478: #ifndef RPLARGS
 3479: struct_arbre *creation_arbre(struct_processus *s_etat_processus,
 3480:         struct_objet **t_objets, unsigned long indice,
 3481:         unsigned long indice_maximal);
 3482: void liberation_arbre(struct_processus *s_etat_processus,
 3483:         struct_arbre *s_noeud);
 3484: void parcours_arbre(struct_processus *s_etat_processus, struct_arbre *s_noeud);
 3485: void simplification_arbre(struct_processus *s_etat_processus,
 3486:         struct_arbre *s_noeud);
 3487: #endif
 3488: 
 3489: /*
 3490: --------------------------------------------------------------------------------
 3491:   Fonctions gérant la complétion automatique
 3492: --------------------------------------------------------------------------------
 3493: */
 3494: 
 3495: char **completion_rpl();
 3496: char *generateur_commandes();
 3497: char **completion_matches();
 3498: 
 3499: // END C PROTOTYPES
 3500: 
 3501: /*
 3502: --------------------------------------------------------------------------------
 3503:   Arithmétique
 3504: --------------------------------------------------------------------------------
 3505: */
 3506: 
 3507: void f77absc_(complex16 *c, real8 *resultat);
 3508: 
 3509: void f77additioncc_(complex16 *ca, complex16 *cb, complex16 *resultat);
 3510: void f77additionci_(complex16 *ca, integer8 *ib, complex16 *resultat);
 3511: void f77additioncr_(complex16 *ca, real8 *rb, complex16 *resultat);
 3512: 
 3513: void f77divisioncc_(complex16 *ca, complex16 *rb, complex16 *resultat);
 3514: void f77divisionci_(complex16 *ca, integer8 *ib, complex16 *resultat);
 3515: void f77divisioncr_(complex16 *ca, real8 *rb, complex16 *resultat);
 3516: void f77divisionic_(integer8 *ib, complex16 *cb, complex16 *resultat);
 3517: void f77divisionrc_(real8 *ra, complex16 *cb, complex16 *resultat);
 3518: 
 3519: void f77multiplicationcc_(complex16 *ca, complex16 *cb, complex16 *resultat);
 3520: void f77multiplicationci_(complex16 *ca, integer8 *ib, complex16 *resultat);
 3521: void f77multiplicationcr_(complex16 *ca, real8 *rb, complex16 *resultat);
 3522: 
 3523: void f77puissancecc_(complex16 *ca, complex16 *cb, complex16 *resultat);
 3524: void f77puissanceci_(complex16 *ca, integer8 *ib, complex16 *resultat);
 3525: void f77puissancecr_(complex16 *ca, real8 *rb, complex16 *resultat);
 3526: void f77puissanceic_(integer8 *ia, complex16 *cb, complex16 *resultat);
 3527: void f77puissanceii_(integer8 *ia, integer8 *ib, integer8 *resultat);
 3528: void f77puissanceir_(integer8 *ia, real8 *rb, real8 *resultat);
 3529: void f77puissancerc_(real8 *ra, complex16 *cb, complex16 *resultat);
 3530: void f77puissanceri_(real8 *ra, integer8 *ib, real8 *resultat);
 3531: void f77puissancerr_(real8 *ra, real8 *rb, real8 *resultat);
 3532: 
 3533: void f77racinecarreec_(complex16 *ca, complex16 *resultat);
 3534: void f77racinecarreein_(integer8 *ia, complex16 *resultat);
 3535: void f77racinecarreeip_(integer8 *ia, real8 *resultat);
 3536: void f77racinecarreern_(real8 *ia, complex16 *resultat);
 3537: void f77racinecarreerp_(real8 *ia, real8 *resultat);
 3538: 
 3539: void f77soustractioncc_(complex16 *ca, complex16 *cb, complex16 *resultat);
 3540: void f77soustractionci_(complex16 *ca, integer8 *ib, complex16 *resultat);
 3541: void f77soustractioncr_(complex16 *ca, real8 *rb, complex16 *resultat);
 3542: void f77soustractionic_(integer8 *ib, complex16 *cb, complex16 *resultat);
 3543: void f77soustractionrc_(real8 *ra, complex16 *cb, complex16 *resultat);
 3544: 
 3545: /*
 3546: --------------------------------------------------------------------------------
 3547:   Trigonométrie complexe
 3548: --------------------------------------------------------------------------------
 3549: */
 3550: 
 3551: void f77acos_(complex16 *argument, complex16 *resultat);
 3552: void f77asin_(complex16 *argument, complex16 *resultat);
 3553: void f77atan_(complex16 *argument, complex16 *resultat, integer4 *erreur);
 3554: void f77cos_(complex16 *argument, complex16 *resultat);
 3555: void f77sin_(complex16 *argument, complex16 *resultat);
 3556: void f77tan_(complex16 *argument, complex16 *resultat, integer4 *erreur);
 3557: 
 3558: /*
 3559: --------------------------------------------------------------------------------
 3560:   Fonctions hyperboliques
 3561: --------------------------------------------------------------------------------
 3562: */
 3563: 
 3564: void f77acoshc_(complex16 *argument, complex16 *resultat);
 3565: void f77alogc_(complex16 *argument, complex16 *resultat);
 3566: void f77asinhc_(complex16 *argument, complex16 *resultat);
 3567: void f77atanhc_(complex16 *argument, complex16 *resultat);
 3568: void f77cosh_(complex16 *argument, complex16 *resultat);
 3569: void f77expc_(complex16 *argument, complex16 *resultat);
 3570: void f77lnc_(complex16 *argument, complex16 *resultat, integer4 *erreur);
 3571: void f77lnin_(integer8 *argument, complex16 *resultat, integer4 *erreur);
 3572: void f77lnrn_(real8 *argument, complex16 *resultat, integer4 *erreur);
 3573: void f77logc_(complex16 *argument, complex16 *resultat, integer4 *erreur);
 3574: void f77login_(integer8 *argument, complex16 *resultat, integer4 *erreur);
 3575: void f77logrn_(real8 *argument, complex16 *resultat, integer4 *erreur);
 3576: void f77sinh_(complex16 *argument, complex16 *resultat);
 3577: void f77tanh_(complex16 *argument, complex16 *resultat, integer4 *erreur);
 3578: void f77acoshi_(integer8 *argument, real8 *resultat);
 3579: void f77acoshr_(real8 *argument, real8 *resultat);
 3580: void f77asinhi_(integer8 *argument, real8 *resultat);
 3581: void f77asinhr_(real8 *argument, real8 *resultat);
 3582: void f77atanhi_(integer8 *argument, real8 *resultat);
 3583: void f77atanhr_(real8 *argument, real8 *resultat);
 3584: void f77lnip_(integer8 *argument, real8 *resultat, integer4 *erreur);
 3585: void f77lnrp_(real8 *argument, real8 *resultat, integer4 *erreur);
 3586: void f77logip_(integer8 *argument, real8 *resultat, integer4 *erreur);
 3587: void f77logrp_(real8 *argument, real8 *resultat, integer4 *erreur);
 3588: 
 3589: /*
 3590: --------------------------------------------------------------------------------
 3591:   Calculs divers
 3592: --------------------------------------------------------------------------------
 3593: */
 3594: 
 3595: void f90arrangement(integer8 *n, integer8 *k, real8 *resultat);
 3596: void f90combinaison(integer8 *n, integer8 *k, real8 *resultat);
 3597: void f90fcd(real8 *x, integer8 *n1, integer8 *n2, real8 *resultat);
 3598: void f90gausscd(real8 *x, real8 *moyenne, real8 *variance, real8 *resultat);
 3599: void f90tcd(real8 *x, integer8 *n, real8 *resultat);
 3600: void f90x2cd(real8 *x, integer8 *n, real8 *resultat);
 3601: 
 3602: // BEGIN C PROTOTYPES
 3603: void dft(complex16 *dft, integer4 *nombre_lignes, integer4 *nombre_colonnes,
 3604:         integer4 *inverse, integer4 *erreur);
 3605: // END C PROTOTYPES
 3606: 
 3607: /*
 3608: --------------------------------------------------------------------------------
 3609:   Fonctions Lapack
 3610: --------------------------------------------------------------------------------
 3611: */
 3612: 
 3613:     /*
 3614:      * Calcul de la longueur d'un espace de travail
 3615:      */
 3616: 
 3617: #ifndef RPLARGS
 3618: integer4 ilaenv_(integer4 *optimal, char *nom_fonction, char *option,
 3619:         integer4 *n1, integer4 *n2, integer4 *n3, integer4 *n4,
 3620:         integer4 longueur_nom_fonction, integer4 longueur_option);
 3621: 
 3622:     /*
 3623:      * Inversion
 3624:      */
 3625: 
 3626: void dgetri_(integer4 *ordre_a, real8 *a, integer4 *lda, integer4 *pivot,
 3627:         real8 *work, integer4 *dim_work, integer4 *ios);
 3628: void zgetri_(integer4 *ordre_a, complex16 *a, integer4 *lda, integer4 *pivot,
 3629:         complex16 *work, integer4 *dim_work, integer4 *ios);
 3630: 
 3631:     /*
 3632:      * Valeurs propres
 3633:      */
 3634: 
 3635: void zgeev_(unsigned char *calcul_vp_gauches, unsigned char *calcul_vp_droits,
 3636:         integer4 *dim_matrice1, complex16 *matrice_f77,
 3637:         integer4 *dim_matrice2, complex16 *valeurs_propres,
 3638:         complex16 *vpg_f77, integer4 *dim_matrice3,
 3639:         complex16 *vpd_f77, integer4 *dim_matrice4,
 3640:         complex16 *work, integer4 *lwork, real8 *rwork,
 3641:         integer4 *erreur, integer4 longueur_1, integer4 longueur_2);
 3642: 
 3643:     /*
 3644:      * Valeurs propres généralisées
 3645:      */
 3646: 
 3647: void zggev_(unsigned char *calcul_vp_gauches, unsigned char *calcul_vp_droits,
 3648:         integer4 *dim_matrice1, complex16 *matrice_f77,
 3649:         integer4 *dim_matrice2, complex16 *metrique_f77,
 3650:         integer4 *dim_matrice3, complex16 *alpha, complex16 *beta,
 3651:         complex16 *vpg_f77, integer4 *dim_matrice4,
 3652:         complex16 *vpd_f77, integer4 *dim_matrice5,
 3653:         complex16 *work, integer4 *lwork, real8 *rwork,
 3654:         integer4 *erreur, integer4 longueur_1, integer4 longueur_2);
 3655: 
 3656:     /*
 3657:      * Moindres carrés
 3658:      */
 3659: 
 3660: void dgelsd_(integer4 *nombre_lignes_a, integer4 *nombre_colonnes_a,
 3661:         integer4 *nombre_colonnes_b, real8 *matrice_a, integer4 *lda,
 3662:         real8 *matrice_b, integer4 *ldb, real8 *valeurs_singulieres,
 3663:         real8 *rcond, integer4 *rank, real8 *work, integer4 *lwork,
 3664:         integer4 *iwork, integer4 *info);
 3665: void zgelsd_(integer4 *nombre_lignes_a, integer4 *nombre_colonnes_a,
 3666:         integer4 *nombre_colonnes_b, complex16 *matrice_a, integer4 *lda,
 3667:         complex16 *matrice_b, integer4 *ldb, real8 *valeurs_singulieres,
 3668:         real8 *rcond, integer4 *rank, complex16 *work, integer4 *lwork,
 3669:         real8 *rwork, integer4 *iwork, integer4 *info);
 3670: 
 3671:     /*
 3672:      * Moindres carrés généralisé
 3673:      */
 3674: 
 3675:     /*
 3676:      * Décomposition en valeurs singulières
 3677:      */
 3678: 
 3679: void dgesvd_(unsigned char *jobu, unsigned char *jobvh,
 3680:         integer4 *m, integer4 *n, real8 *a, integer4 *lda,
 3681:         real8 *s, real8 *u, integer4 *ldu, real8 *vh, integer4 *ldvh,
 3682:         real8 *work, integer4 *lwork, integer4 *info, integer4 longueur_jobu,
 3683:         integer4 longueur_jobvh);
 3684: void zgesvd_(unsigned char *jobu, unsigned char *jobvh,
 3685:         integer4 *m, integer4 *n, real8 *a, integer4 *lda,
 3686:         real8 *s, real8 *u, integer4 *ldu, real8 *vh, integer4 *ldvh,
 3687:         real8 *work, integer4 *lwork, real8 *rwork, integer4 *info,
 3688:         integer4 longueur_jobu, integer4 longueur_jobvh);
 3689: 
 3690:     /*
 3691:      * Factorisations diverses
 3692:      */
 3693: 
 3694:         /* LU de Crout */
 3695: void dgetrf_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, real8 *a,
 3696:         integer4 *lda, integer4 *pivot, integer4 *ios);
 3697: void zgetrf_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, complex16 *a,
 3698:         integer4 *lda, integer4 *pivot, integer4 *ios);
 3699: 
 3700:         /* LQ */
 3701: void dgelq2_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, real8 *a,
 3702:         integer4 *lda, real8 *tau, real8 *work, integer4 *ios);
 3703: void zgelq2_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, complex16 *a,
 3704:         integer4 *lda, complex16 *tau, complex16 *work, integer4 *ios);
 3705: 
 3706:         /* QR */
 3707: void dgeqp3_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, real8 *a,
 3708:         integer4 *lda, integer4 *pivot, real8 *tau, real8 *work,
 3709:         integer4 *lwork, integer4 *ios);
 3710: void zgeqp3_(integer4 *nb_lignes_a, integer4 *nb_colonnes_a, complex16 *a,
 3711:         integer4 *lda, integer4 *pivot, complex16 *tau, complex16 *work,
 3712:         integer4 *lwork, real8 *rwork, integer4 *ios);
 3713: 
 3714:         /* Cholesky */
 3715: void dpptrf_(unsigned char *mode, integer4 *n, complex16 *triangle,
 3716:         integer4 *ios, integer4 longueur);
 3717: void zpptrf_(unsigned char *mode, integer4 *n, complex16 *triangle,
 3718:         integer4 *ios, integer4 longueur);
 3719: 
 3720:         /* Schur */
 3721: void dgees_(unsigned char *calcul_vecteur, unsigned char *valeurs_triees,
 3722:         logical4 (*fonction_tri)(), integer4 *n, real8 *a,
 3723:         integer4 *lda, integer4 *sdim, real8 *wr, real8 *wi,
 3724:         real8 *vs, integer4 *ldvs, real8 *work, integer4 *lwork,
 3725:         logical4 *bwork, integer4 *info, integer4 l1, integer4 l2);
 3726: void zgees_(unsigned char *calcul_vecteur, unsigned char *valeurs_triees,
 3727:         logical4 (*fonction_tri)(), integer4 *n, complex16 *a,
 3728:         integer4 *lda, integer4 *sdim, complex16 *w,
 3729:         complex16 *vs, integer4 *ldvs, complex16 *work, integer4 *lwork,
 3730:         real8 *rwork, logical4 *bwork, integer4 *info,
 3731:         integer4 l1, integer4 l2);
 3732: 
 3733:         /* Déterminant et rang */
 3734: void dgecon_(unsigned char *norm, integer4 *n, real8 *a, integer4 *lda,
 3735:         real8 *anorm, real8 *rcond, real8 *work, integer4 *iwork,
 3736:         integer4 *info, integer4 l1);
 3737: void dgelsy_(integer4 *m, integer4 *n, integer4 *nrhs, real8 *a,
 3738:         integer4 *lda, real8 *b, integer4 *ldb, integer4 *jpvt, real8 *rcond,
 3739:         integer4 *rank, real8 *work, integer4 *lwork, integer4 *info);
 3740: real8 dlange_(unsigned char *norme, integer4 *n, integer4 *m, real8 *a,
 3741:         integer4 *lda, real8 *work, integer4 longueur);
 3742: real8 zlange_(unsigned char *norme, integer4 *n, integer4 *m, real8 *a,
 3743:         integer4 *lda, real8 *work, integer4 longueur);
 3744: void zgecon_(unsigned char *norm, integer4 *n, complex16 *a, integer4 *lda,
 3745:         real8 *anorm, real8 *rcond, complex16 *work, real8 *rwork,
 3746:         integer4 *info, integer4 l1);
 3747: void zgelsy_(integer4 *m, integer4 *n, integer4 *nrhs, complex16 *a,
 3748:         integer4 *lda, complex16 *b, integer4 *ldb, integer4 *jpvt,
 3749:         real8 *rcond, integer4 *rank, complex16 *work, integer4 *lwork,
 3750:         real8 *rwork, integer4 *info);
 3751: #endif
 3752: 
 3753: /*
 3754:  * Fonction testant la requête d'arrêt (nécessaire pour tester le
 3755:  * drapeau depuis une bibliothèque).
 3756:  */
 3757: 
 3758: int test_arret(struct_processus *s_etat_processus);
 3759: 
 3760: #endif
 3761: 
 3762: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>