File:  [local] / rpl / src / rpl.c
Revision 1.148: download - view: text, annotated - select for diffs - revision graph
Tue Aug 27 13:48:05 2013 UTC (10 years, 8 months ago) by bertrand
Branches: MAIN
CVS tags: rpl-4_1_15, HEAD
Correction d'une erreur aboutissant à un segfault dans le cas où une
localisation est forcée à la compilation.

    1: /*
    2: ================================================================================
    3:   RPL/2 (R) version 4.1.15
    4:   Copyright (C) 1989-2013 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: #define  MAIN_RPL
   24: #include "rpl-conv.h"
   25: 
   26: 
   27: /*
   28: ================================================================================
   29:   Programme principal
   30: ================================================================================
   31: */
   32: 
   33: int
   34: rplinit(int argc, char *argv[], char *envp[],
   35:         unsigned char ***resultats, char *rpl_home)
   36: {
   37: #   include                             "copyright-conv.h"
   38: #   include                             "licence-conv.h"
   39: 
   40:     char                                **arg_exec;
   41: 
   42: #   ifdef HAVE_STACK_OVERFLOW_RECOVERY
   43:     char                                pile_signaux[SIGSTKSZ];
   44: #   endif
   45: 
   46: #   define RPL_PATH_MAX                 1024
   47:     char                                repertoire_initial[RPL_PATH_MAX];
   48: 
   49:     file                                *f_source;
   50: 
   51:     int                                 erreur_historique;
   52:     int                                 option_P;
   53: 
   54:     integer8                            i;
   55: 
   56:     logical1                            core;
   57:     logical1                            debug;
   58:     logical1                            erreur_fichier;
   59:     logical1                            existence;
   60:     logical1                            mode_interactif;
   61:     logical1                            option_a;
   62:     logical1                            option_A;
   63:     logical1                            option_c;
   64:     logical1                            option_d;
   65:     logical1                            option_D;
   66:     logical1                            option_h;
   67:     logical1                            option_i;
   68:     logical1                            option_l;
   69:     logical1                            option_n;
   70:     logical1                            option_p;
   71:     logical1                            option_s;
   72:     logical1                            option_S;
   73:     logical1                            option_t;
   74:     logical1                            option_v;
   75:     logical1                            ouverture;
   76: 
   77:     pthread_mutexattr_t                 attributs_mutex;
   78: 
   79:     ssize_t                             longueur_ecriture;
   80: 
   81:     struct_objet                        *s_objet;
   82: 
   83:     struct_processus                    *s_etat_processus;
   84: 
   85:     struct_liste_variables_partagees    *l_element_partage_courant;
   86:     struct_liste_variables_partagees    *l_element_partage_suivant;
   87: 
   88:     struct_liste_variables_statiques    *l_element_statique_courant;
   89:     struct_liste_variables_statiques    *l_element_statique_suivant;
   90: 
   91:     struct_arbre_variables_partagees    *s_arbre_variables_partagees;
   92:     struct_liste_variables_partagees    *l_liste_variables_partagees;
   93: 
   94:     struct sigaction                    action;
   95:     struct sigaction                    registre;
   96: 
   97:     struct timespec                     attente;
   98: 
   99:     unsigned char                       *arguments;
  100:     unsigned char                       drapeau_encart;
  101:     unsigned char                       *type_debug;
  102:     unsigned char                       *home;
  103:     unsigned char                       *langue;
  104:     unsigned char                       *message;
  105:     unsigned char                       *nom_fichier_temporaire;
  106:     unsigned char                       option;
  107:     unsigned char                       presence_definition;
  108:     unsigned char                       *ptr;
  109:     unsigned char                       *tampon;
  110: 
  111:     unsigned long                       unite_fichier;
  112: 
  113:     void                                *l_element_courant;
  114:     void                                *l_element_suivant;
  115: 
  116:     volatile int                        erreur;
  117:     volatile unsigned char              traitement_fichier_temporaire;
  118: 
  119:     errno = 0;
  120:     s_queue_signaux = NULL;
  121:     routine_recursive = 0;
  122:     pid_processus_pere = getpid();
  123: 
  124: #   ifdef DEBUG_MEMOIRE
  125:     debug_memoire_initialisation();
  126: #   endif
  127: 
  128:     setvbuf(stdout, NULL, _IOLBF, 0);
  129:     setvbuf(stderr, NULL, _IOLBF, 0);
  130: 
  131: #   ifndef SEMAPHORES_NOMMES
  132:     sem_init(&semaphore_gestionnaires_signaux, 0, 0);
  133: #   else
  134:     semaphore_gestionnaires_signaux = sem_init2(0, getpid(), SEM_SIGNAUX);
  135:     
  136:     if (semaphore_gestionnaires_signaux == SEM_FAILED)
  137:     {
  138:         erreur = d_es_allocation_memoire;
  139: 
  140:         if ((langue = getenv("LANG")) != NULL)
  141:         {
  142:             if (strncmp(langue, "fr", 2) == 0)
  143:             {
  144:                 uprintf("+++Système : Mémoire insuffisante\n");
  145:             }
  146:             else
  147:             {
  148:                 uprintf("+++System : Not enough memory\n");
  149:             }
  150:         }
  151:         else
  152:         {
  153:             uprintf("+++System : Not enough memory\n");
  154:         }
  155: 
  156:         return(EXIT_FAILURE);
  157:     }
  158: #   endif
  159: 
  160:     if ((s_etat_processus = malloc(sizeof(struct_processus))) == NULL)
  161:     {
  162: #       ifndef SEMAPHORES_NOMMES
  163:         sem_post(&semaphore_gestionnaires_signaux);
  164:         sem_destroy(&semaphore_gestionnaires_signaux);
  165: #       else
  166:         sem_post(semaphore_gestionnaires_signaux);
  167:         sem_destroy2(semaphore_gestionnaires_signaux, getpid(), SEM_SIGNAUX);
  168: #       endif
  169: 
  170:         erreur = d_es_allocation_memoire;
  171: 
  172:         if ((langue = getenv("LANG")) != NULL)
  173:         {
  174:             if (strncmp(langue, "fr", 2) == 0)
  175:             {
  176:                 uprintf("+++Système : Mémoire insuffisante\n");
  177:             }
  178:             else
  179:             {
  180:                 uprintf("+++System : Not enough memory\n");
  181:             }
  182:         }
  183:         else
  184:         {
  185:             uprintf("+++System : Not enough memory\n");
  186:         }
  187: 
  188:         return(EXIT_FAILURE);
  189:     }
  190: 
  191:     if ((langue = getenv("LANG")) != NULL)
  192:     {
  193:         (*s_etat_processus).langue = (strncmp(langue, "fr", 2) == 0)
  194:                 ? 'F' : 'E';
  195:     }
  196:     else
  197:     {
  198:         (*s_etat_processus).langue = 'E';
  199:     }
  200: 
  201:     if (getcwd(repertoire_initial, RPL_PATH_MAX) == NULL)
  202:     {
  203: #       ifndef SEMAPHORES_NOMMES
  204:         sem_post(&semaphore_gestionnaires_signaux);
  205:         sem_destroy(&semaphore_gestionnaires_signaux);
  206: #       else
  207:         sem_post(semaphore_gestionnaires_signaux);
  208:         sem_destroy2(semaphore_gestionnaires_signaux, getpid(), SEM_SIGNAUX);
  209: #       endif
  210: 
  211:         if ((*s_etat_processus).langue == 'F')
  212:         {
  213:             uprintf("+++Système : Mémoire insuffisante\n");
  214:         }
  215:         else
  216:         {
  217:             uprintf("+++System : Not enough memory\n");
  218:         }
  219: 
  220:         return(EXIT_FAILURE);
  221:     }
  222: 
  223:     if ((arg_exec = malloc((((size_t) argc) + 1) * sizeof(char *))) == NULL)
  224:     {
  225: #       ifndef SEMAPHORES_NOMMES
  226:         sem_post(&semaphore_gestionnaires_signaux);
  227:         sem_destroy(&semaphore_gestionnaires_signaux);
  228: #       else
  229:         sem_post(semaphore_gestionnaires_signaux);
  230:         sem_destroy2(semaphore_gestionnaires_signaux, getpid(), SEM_SIGNAUX);
  231: #       endif
  232: 
  233:         if ((*s_etat_processus).langue == 'F')
  234:         {
  235:             uprintf("+++Système : Mémoire insuffisante\n");
  236:         }
  237:         else
  238:         {
  239:             uprintf("+++System : Not enough memory\n");
  240:         }
  241: 
  242:         return(EXIT_FAILURE);
  243:     }
  244: 
  245:     for(i = 0; i < argc; i++)
  246:     {
  247:         arg_exec[i] = argv[i];
  248:     }
  249: 
  250:     argv[argc] = NULL;
  251: 
  252:     initialisation_contexte_cas(s_etat_processus);
  253: 
  254:     (*s_etat_processus).exception = d_ep;
  255:     (*s_etat_processus).erreur_systeme = d_es;
  256:     (*s_etat_processus).erreur_execution = d_ex;
  257: 
  258:     (*s_etat_processus).requete_redemarrage = d_faux;
  259:     (*s_etat_processus).rpl_home = rpl_home;
  260: 
  261:     pthread_mutexattr_init(&attributs_mutex);
  262:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
  263:     pthread_mutex_init(&((*s_etat_processus).mutex_pile_processus),
  264:             &attributs_mutex);
  265:     pthread_mutexattr_destroy(&attributs_mutex);
  266: 
  267:     pthread_mutexattr_init(&attributs_mutex);
  268:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
  269:     pthread_mutex_init(&((*s_etat_processus).mutex_interruptions),
  270:             &attributs_mutex);
  271:     pthread_mutexattr_destroy(&attributs_mutex);
  272: 
  273:     pthread_mutexattr_init(&attributs_mutex);
  274:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
  275:     pthread_mutex_init(&((*s_etat_processus).mutex_signaux),
  276:             &attributs_mutex);
  277:     pthread_mutexattr_destroy(&attributs_mutex);
  278: 
  279:     pthread_mutexattr_init(&attributs_mutex);
  280:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
  281:     pthread_mutex_init(&((*s_etat_processus).mutex_allocation),
  282:             &attributs_mutex);
  283:     pthread_mutexattr_destroy(&attributs_mutex);
  284: 
  285:     pthread_mutexattr_init(&attributs_mutex);
  286:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE);
  287:     pthread_mutex_init(&mutex_sections_critiques, &attributs_mutex);
  288:     pthread_mutexattr_destroy(&attributs_mutex);
  289: 
  290:     pthread_mutexattr_init(&attributs_mutex);
  291:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE);
  292:     pthread_mutex_init(&mutex_liste_variables_partagees, &attributs_mutex);
  293:     pthread_mutexattr_destroy(&attributs_mutex);
  294: 
  295: #   ifndef SEMAPHORES_NOMMES
  296:         sem_init(&((*s_etat_processus).semaphore_fork), 0, 0);
  297: #   else
  298:         if (((*s_etat_processus).semaphore_fork = sem_init3(0, getpid(),
  299:                 pthread_self(), SEM_FORK)) == SEM_FAILED)
  300:         {
  301: #           ifndef SEMAPHORES_NOMMES
  302:                 sem_post(&semaphore_gestionnaires_signaux);
  303:                 sem_destroy(&semaphore_gestionnaires_signaux);
  304: #           else
  305:                 sem_post(semaphore_gestionnaires_signaux);
  306:                 sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  307:                         SEM_SIGNAUX);
  308: #           endif
  309: 
  310:             liberation(contexte_cas(s_etat_processus);
  311: 
  312:             if ((*s_etat_processus).langue == 'F')
  313:             {
  314:                 uprintf("+++Système : Mémoire insuffisante\n");
  315:             }
  316:             else
  317:             {
  318:                 uprintf("+++System : Not enough memory\n");
  319:             }
  320: 
  321:             return(EXIT_FAILURE);
  322:         }
  323: #   endif
  324: 
  325:     pthread_mutexattr_init(&attributs_mutex);
  326:     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
  327:     pthread_mutex_init(&((*s_etat_processus).protection_liste_mutexes),
  328:             &attributs_mutex);
  329:     pthread_mutexattr_destroy(&attributs_mutex);
  330: 
  331:     (*s_etat_processus).chemin_fichiers_temporaires =
  332:             recherche_chemin_fichiers_temporaires(s_etat_processus);
  333: 
  334:     insertion_thread(s_etat_processus, d_vrai);
  335:     creation_queue_signaux(s_etat_processus);
  336: 
  337:     if ((*s_etat_processus).erreur_systeme != d_es)
  338:     {
  339: #       ifndef SEMAPHORES_NOMMES
  340:             sem_post(&((*s_etat_processus).semaphore_fork));
  341:             sem_post(&semaphore_gestionnaires_signaux);
  342:             sem_destroy(&semaphore_gestionnaires_signaux);
  343:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  344: #       else
  345:             sem_post((*s_etat_processus).semaphore_fork);
  346:             sem_post(semaphore_gestionnaires_signaux);
  347:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  348:                     SEM_SIGNAUX);
  349:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  350:                     pthread_self(), SEM_FORK);
  351: #       endif
  352: 
  353:         liberation_contexte_cas(s_etat_processus);
  354: 
  355:         if ((*s_etat_processus).langue == 'F')
  356:         {
  357:             uprintf("+++Système : Mémoire insuffisante\n");
  358:         }
  359:         else
  360:         {
  361:             uprintf("+++System : Not enough memory\n");
  362:         }
  363: 
  364:         return(EXIT_FAILURE);
  365:     }
  366: 
  367:     if (d_forced_locale == 0)
  368:     {
  369:         localisation_courante(s_etat_processus);
  370:     }
  371:     else
  372:     {
  373:         if (((*s_etat_processus).localisation = malloc((strlen(d_locale)
  374:                 + 1) * sizeof(unsigned char))) == NULL)
  375:         {
  376: #           ifndef SEMAPHORES_NOMMES
  377:                 sem_post(&((*s_etat_processus).semaphore_fork));
  378:                 sem_post(&semaphore_gestionnaires_signaux);
  379:                 sem_destroy(&semaphore_gestionnaires_signaux);
  380:                 sem_destroy(&((*s_etat_processus).semaphore_fork));
  381: #           else
  382:                 sem_post((*s_etat_processus).semaphore_fork);
  383:                 sem_post(semaphore_gestionnaires_signaux);
  384:                 sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  385:                         SEM_SIGNAUX);
  386:                 sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  387:                         pthread_self(), SEM_FORK);
  388: #           endif
  389: 
  390:             liberation_contexte_cas(s_etat_processus);
  391:             liberation_queue_signaux(s_etat_processus);
  392: 
  393:             if ((*s_etat_processus).langue == 'F')
  394:             {
  395:                 uprintf("+++Système : Mémoire insuffisante\n");
  396:             }
  397:             else
  398:             {
  399:                 uprintf("+++System : Not enough memory\n");
  400:             }
  401: 
  402:             return(EXIT_FAILURE);
  403:         }
  404: 
  405:         strcpy((*s_etat_processus).localisation, d_locale);
  406:     }
  407: 
  408:     (*s_etat_processus).erreur_systeme = d_es;
  409: 
  410:     if ((*s_etat_processus).localisation == NULL)
  411:     {
  412:         if (((*s_etat_processus).localisation = malloc((strlen(d_locale) + 1) *
  413:                 sizeof(unsigned char))) == NULL)
  414:         {
  415: #           ifndef SEMAPHORES_NOMMES
  416:                 sem_post(&((*s_etat_processus).semaphore_fork));
  417:                 sem_post(&semaphore_gestionnaires_signaux);
  418:                 sem_destroy(&semaphore_gestionnaires_signaux);
  419:                 sem_destroy(&((*s_etat_processus).semaphore_fork));
  420: #           else
  421:                 sem_post((*s_etat_processus).semaphore_fork);
  422:                 sem_post(semaphore_gestionnaires_signaux);
  423:                 sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  424:                         SEM_SIGNAUX);
  425:                 sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  426:                         pthread_self(), SEM_FORK);
  427: #           endif
  428: 
  429:             liberation_contexte_cas(s_etat_processus);
  430:             liberation_queue_signaux(s_etat_processus);
  431: 
  432:             if ((*s_etat_processus).langue == 'F')
  433:             {
  434:                 uprintf("+++Système : Mémoire insuffisante\n");
  435:             }
  436:             else
  437:             {
  438:                 uprintf("+++System : Not enough memory\n");
  439:             }
  440: 
  441:             return(EXIT_FAILURE);
  442:         }
  443: 
  444:         strcpy((*s_etat_processus).localisation, d_locale);
  445:     }
  446: 
  447:     printf("+++RPL/2 (R) version %s (%s)\n", d_version_rpl,
  448:             ((*s_etat_processus).langue == 'F') ? d_date_rpl : d_date_en_rpl);
  449: 
  450:     if ((*s_etat_processus).langue == 'F')
  451:     {
  452:         printf("+++Copyright (C) 1989 à 2012, 2013 BERTRAND Joël\n");
  453:     }
  454:     else
  455:     {
  456:         printf("+++Copyright (C) 1989 to 2012, 2013 BERTRAND Joel\n");
  457:     }
  458: 
  459:     if (getenv("HOME") != NULL)
  460:     {
  461:         home = getenv("HOME");
  462:     }
  463:     else if ((getenv("USER") != NULL) && (getpwnam(getenv("USER")) != NULL))
  464:     {
  465:         home = getpwnam(getenv("USER"))->pw_dir;
  466:     }
  467:     else if ((getenv("LOGNAME") != NULL) && (getpwnam(getenv("LOGNAME"))
  468:             != NULL))
  469:     {
  470:         home = getpwnam(getenv("LOGNAME"))->pw_dir;
  471:     }
  472:     else if ((getuid() != ((uid_t) -1)) && (getpwuid(getuid()) != NULL))
  473:     {
  474:         home = getpwuid(getuid())->pw_dir;
  475:     }
  476:     else
  477:     {
  478:         home = "";
  479:     }
  480: 
  481: #   ifdef HAVE_STACK_OVERFLOW_RECOVERY
  482:         if (stackoverflow_install_handler(interruption_depassement_pile,
  483:                 pile_signaux, sizeof(pile_signaux)) != 0)
  484:         {
  485: #           ifndef SEMAPHORES_NOMMES
  486:                 sem_post(&((*s_etat_processus).semaphore_fork));
  487:                 sem_post(&semaphore_gestionnaires_signaux);
  488:                 sem_destroy(&semaphore_gestionnaires_signaux);
  489:                 sem_destroy(&((*s_etat_processus).semaphore_fork));
  490: #           else
  491:                 sem_post((*s_etat_processus).semaphore_fork);
  492:                 sem_post(semaphore_gestionnaires_signaux);
  493:                 sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  494:                         SEM_SIGNAUX);
  495:                 sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  496:                         pthread_self(), SEM_FORK);
  497: #           endif
  498: 
  499:             liberation_contexte_cas(s_etat_processus);
  500:             liberation_queue_signaux(s_etat_processus);
  501: 
  502:             erreur = d_es_signal;
  503: 
  504:             if ((*s_etat_processus).langue == 'F')
  505:             {
  506:                 printf("+++Système : Initialisation de la pile alternative "
  507:                         "impossible\n");
  508:             }
  509:             else
  510:             {
  511:                 printf("+++System : Initialization of alternate "
  512:                         "stack failed\n");
  513:             }
  514: 
  515:             return(EXIT_FAILURE);
  516:         }
  517: #   else
  518:         if ((*s_etat_processus).langue == 'F')
  519:         {
  520:             printf("+++Attention : Le système ne supporte pas de pile "
  521:                     "alternative\n");
  522:         }
  523:         else
  524:         {
  525:             printf("+++Warning : Operating system does not support alternate "
  526:                     "stack\n");
  527:         }
  528: #   endif
  529: 
  530:     if (lancement_thread_signaux(s_etat_processus) != d_absence_erreur)
  531:     {
  532: #       ifndef SEMAPHORES_NOMMES
  533:             sem_post(&((*s_etat_processus).semaphore_fork));
  534:             sem_post(&semaphore_gestionnaires_signaux);
  535:             sem_destroy(&semaphore_gestionnaires_signaux);
  536:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  537: #       else
  538:             sem_post((*s_etat_processus).semaphore_fork);
  539:             sem_post(semaphore_gestionnaires_signaux);
  540:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  541:                     SEM_SIGNAUX);
  542:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  543:                     pthread_self(), SEM_FORK);
  544: #       endif
  545: 
  546:         liberation_contexte_cas(s_etat_processus);
  547:         liberation_queue_signaux(s_etat_processus);
  548: 
  549: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  550:             stackoverflow_deinstall_handler();
  551: #       endif
  552: 
  553:         erreur = d_es_signal;
  554: 
  555:         if ((*s_etat_processus).langue == 'F')
  556:         {
  557:             printf("+++Système : Initialisation des signaux POSIX "
  558:                     "impossible\n");
  559:         }
  560:         else
  561:         {
  562:             printf("+++System : Initialization of POSIX signals failed\n");
  563:         }
  564: 
  565:         return(EXIT_FAILURE);
  566:     }
  567: 
  568:     action.sa_handler = interruption1;
  569:     action.sa_flags = 0;
  570: 
  571:     if (sigaction(SIGINT, &action, NULL) != 0)
  572:     {
  573: #       ifndef SEMAPHORES_NOMMES
  574:             sem_post(&((*s_etat_processus).semaphore_fork));
  575:             sem_post(&semaphore_gestionnaires_signaux);
  576:             sem_destroy(&semaphore_gestionnaires_signaux);
  577:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  578: #       else
  579:             sem_post((*s_etat_processus).semaphore_fork);
  580:             sem_post(semaphore_gestionnaires_signaux);
  581:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  582:                     SEM_SIGNAUX);
  583:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  584:                     pthread_self(), SEM_FORK);
  585: #       endif
  586: 
  587:         liberation_contexte_cas(s_etat_processus);
  588:         liberation_queue_signaux(s_etat_processus);
  589: 
  590: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  591:             stackoverflow_deinstall_handler();
  592: #       endif
  593: 
  594:         erreur = d_es_signal;
  595: 
  596:         if ((*s_etat_processus).langue == 'F')
  597:         {
  598:             printf("+++Système : Initialisation des signaux POSIX "
  599:                     "impossible\n");
  600:         }
  601:         else
  602:         {
  603:             printf("+++System : Initialization of POSIX signals failed\n");
  604:         }
  605: 
  606:         return(EXIT_FAILURE);
  607:     }
  608: 
  609:     signal_test = SIGTEST;
  610:     raise(SIGINT);
  611: 
  612:     attente.tv_sec = 0;
  613:     attente.tv_nsec = 1000000;
  614: 
  615:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
  616:     {
  617:         nanosleep(&attente, NULL);
  618:     }
  619: 
  620:     if (signal_test != SIGINT)
  621:     {
  622: #       ifndef SEMAPHORES_NOMMES
  623:             sem_post(&((*s_etat_processus).semaphore_fork));
  624:             sem_post(&semaphore_gestionnaires_signaux);
  625:             sem_destroy(&semaphore_gestionnaires_signaux);
  626:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  627: #       else
  628:             sem_post((*s_etat_processus).semaphore_fork);
  629:             sem_post(semaphore_gestionnaires_signaux);
  630:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  631:                     SEM_SIGNAUX);
  632:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  633:                     pthread_self(), SEM_FORK);
  634: #       endif
  635: 
  636:         liberation_contexte_cas(s_etat_processus);
  637:         liberation_queue_signaux(s_etat_processus);
  638: 
  639: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  640:             stackoverflow_deinstall_handler();
  641: #       endif
  642: 
  643:         erreur = d_es_signal;
  644: 
  645:         if ((*s_etat_processus).langue == 'F')
  646:         {
  647:             printf("+++Système : Initialisation des signaux POSIX "
  648:                     "impossible\n");
  649:         }
  650:         else
  651:         {
  652:             printf("+++System : Initialization of POSIX signals failed\n");
  653:         }
  654: 
  655:         return(EXIT_FAILURE);
  656:     }
  657: 
  658:     if (sigaction(SIGTERM, &action, NULL) != 0)
  659:     {
  660: #       ifndef SEMAPHORES_NOMMES
  661:             sem_post(&((*s_etat_processus).semaphore_fork));
  662:             sem_post(&semaphore_gestionnaires_signaux);
  663:             sem_destroy(&semaphore_gestionnaires_signaux);
  664:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  665: #       else
  666:             sem_post((*s_etat_processus).semaphore_fork);
  667:             sem_post(semaphore_gestionnaires_signaux);
  668:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  669:                     SEM_SIGNAUX);
  670:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  671:                     pthread_self(), SEM_FORK);
  672: #       endif
  673: 
  674:         liberation_contexte_cas(s_etat_processus);
  675:         liberation_queue_signaux(s_etat_processus);
  676: 
  677: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  678:             stackoverflow_deinstall_handler();
  679: #       endif
  680: 
  681:         erreur = d_es_signal;
  682: 
  683:         if ((*s_etat_processus).langue == 'F')
  684:         {
  685:             printf("+++Système : Initialisation des signaux POSIX "
  686:                     "impossible\n");
  687:         }
  688:         else
  689:         {
  690:             printf("+++System : Initialization of POSIX signals failed\n");
  691:         }
  692: 
  693:         return(EXIT_FAILURE);
  694:     }
  695: 
  696:     signal_test = SIGTEST;
  697:     raise(SIGTERM);
  698: 
  699:     attente.tv_sec = 0;
  700:     attente.tv_nsec = 1000000;
  701: 
  702:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
  703:     {
  704:         nanosleep(&attente, NULL);
  705:     }
  706: 
  707:     if (signal_test != SIGTERM)
  708:     {
  709: #       ifndef SEMAPHORES_NOMMES
  710:             sem_post(&((*s_etat_processus).semaphore_fork));
  711:             sem_post(&semaphore_gestionnaires_signaux);
  712:             sem_destroy(&semaphore_gestionnaires_signaux);
  713:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  714: #       else
  715:             sem_post((*s_etat_processus).semaphore_fork);
  716:             sem_post(semaphore_gestionnaires_signaux);
  717:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  718:                     SEM_SIGNAUX);
  719:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  720:                     pthread_self(), SEM_FORK);
  721: #       endif
  722: 
  723:         liberation_contexte_cas(s_etat_processus);
  724:         liberation_queue_signaux(s_etat_processus);
  725: 
  726: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  727:             stackoverflow_deinstall_handler();
  728: #       endif
  729: 
  730:         erreur = d_es_signal;
  731: 
  732:         if ((*s_etat_processus).langue == 'F')
  733:         {
  734:             printf("+++Système : Initialisation des signaux POSIX "
  735:                     "impossible\n");
  736:         }
  737:         else
  738:         {
  739:             printf("+++System : Initialization of POSIX signals failed\n");
  740:         }
  741: 
  742:         return(EXIT_FAILURE);
  743:     }
  744: 
  745:     if (sigaction(SIGALRM, &action, NULL) != 0)
  746:     {
  747: #       ifndef SEMAPHORES_NOMMES
  748:             sem_post(&((*s_etat_processus).semaphore_fork));
  749:             sem_post(&semaphore_gestionnaires_signaux);
  750:             sem_destroy(&semaphore_gestionnaires_signaux);
  751:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  752: #       else
  753:             sem_post((*s_etat_processus).semaphore_fork);
  754:             sem_post(semaphore_gestionnaires_signaux);
  755:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  756:                     SEM_SIGNAUX);
  757:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  758:                     pthread_self(), SEM_FORK);
  759: #       endif
  760: 
  761:         liberation_contexte_cas(s_etat_processus);
  762:         liberation_queue_signaux(s_etat_processus);
  763: 
  764: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  765:             stackoverflow_deinstall_handler();
  766: #       endif
  767: 
  768:         erreur = d_es_signal;
  769: 
  770:         if ((*s_etat_processus).langue == 'F')
  771:         {
  772:             printf("+++Système : Initialisation des signaux POSIX "
  773:                     "impossible\n");
  774:         }
  775:         else
  776:         {
  777:             printf("+++System : Initialization of POSIX signals failed\n");
  778:         }
  779: 
  780:         return(EXIT_FAILURE);
  781:     }
  782: 
  783:     signal_test = SIGTEST;
  784:     raise(SIGALRM);
  785: 
  786:     attente.tv_sec = 0;
  787:     attente.tv_nsec = 1000000;
  788: 
  789:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
  790:     {
  791:         nanosleep(&attente, NULL);
  792:     }
  793: 
  794:     if (signal_test != SIGALRM)
  795:     {
  796: #       ifndef SEMAPHORES_NOMMES
  797:             sem_post(&((*s_etat_processus).semaphore_fork));
  798:             sem_post(&semaphore_gestionnaires_signaux);
  799:             sem_destroy(&semaphore_gestionnaires_signaux);
  800:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  801: #       else
  802:             sem_post((*s_etat_processus).semaphore_fork);
  803:             sem_post(semaphore_gestionnaires_signaux);
  804:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  805:                     SEM_SIGNAUX);
  806:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  807:                     pthread_self(), SEM_FORK);
  808: #       endif
  809: 
  810:         liberation_contexte_cas(s_etat_processus);
  811:         liberation_queue_signaux(s_etat_processus);
  812: 
  813: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  814:             stackoverflow_deinstall_handler();
  815: #       endif
  816: 
  817:         erreur = d_es_signal;
  818: 
  819:         if ((*s_etat_processus).langue == 'F')
  820:         {
  821:             printf("+++Système : Initialisation des signaux POSIX "
  822:                     "impossible\n");
  823:         }
  824:         else
  825:         {
  826:             printf("+++System : Initialization of POSIX signals failed\n");
  827:         }
  828: 
  829:         return(EXIT_FAILURE);
  830:     }
  831: 
  832:     action.sa_handler = interruption2;
  833:     action.sa_flags = 0;
  834: 
  835:     if (sigaction(SIGTSTP, &action, NULL) != 0)
  836:     {
  837: #       ifndef SEMAPHORES_NOMMES
  838:             sem_post(&((*s_etat_processus).semaphore_fork));
  839:             sem_post(&semaphore_gestionnaires_signaux);
  840:             sem_destroy(&semaphore_gestionnaires_signaux);
  841:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  842: #       else
  843:             sem_post((*s_etat_processus).semaphore_fork);
  844:             sem_post(semaphore_gestionnaires_signaux);
  845:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  846:                     SEM_SIGNAUX);
  847:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  848:                     pthread_self(), SEM_FORK);
  849: #       endif
  850: 
  851:         liberation_contexte_cas(s_etat_processus);
  852:         liberation_queue_signaux(s_etat_processus);
  853: 
  854: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  855:             stackoverflow_deinstall_handler();
  856: #       endif
  857: 
  858:         if ((*s_etat_processus).langue == 'F')
  859:         {
  860:             printf("+++Système : Initialisation des signaux POSIX "
  861:                     "impossible\n");
  862:         }
  863:         else
  864:         {
  865:             printf("+++System : Initialization of POSIX signals failed\n");
  866:         }
  867: 
  868:         return(EXIT_FAILURE);
  869:     }
  870: 
  871:     signal_test = SIGTEST;
  872:     raise(SIGTSTP);
  873: 
  874:     attente.tv_sec = 0;
  875:     attente.tv_nsec = 1000000;
  876: 
  877:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
  878:     {
  879:         nanosleep(&attente, NULL);
  880:     }
  881: 
  882:     if (signal_test != SIGTSTP)
  883:     {
  884: #       ifndef SEMAPHORES_NOMMES
  885:             sem_post(&((*s_etat_processus).semaphore_fork));
  886:             sem_post(&semaphore_gestionnaires_signaux);
  887:             sem_destroy(&semaphore_gestionnaires_signaux);
  888:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  889: #       else
  890:             sem_post((*s_etat_processus).semaphore_fork);
  891:             sem_post(semaphore_gestionnaires_signaux);
  892:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  893:                     SEM_SIGNAUX);
  894:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  895:                     pthread_self(), SEM_FORK);
  896: #       endif
  897: 
  898:         liberation_contexte_cas(s_etat_processus);
  899:         liberation_queue_signaux(s_etat_processus);
  900: 
  901: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  902:             stackoverflow_deinstall_handler();
  903: #       endif
  904: 
  905:         erreur = d_es_signal;
  906: 
  907:         if ((*s_etat_processus).langue == 'F')
  908:         {
  909:             printf("+++Système : Initialisation des signaux POSIX "
  910:                     "impossible\n");
  911:         }
  912:         else
  913:         {
  914:             printf("+++System : Initialization of POSIX signals failed\n");
  915:         }
  916: 
  917:         return(EXIT_FAILURE);
  918:     }
  919: 
  920:     action.sa_handler = interruption5;
  921:     action.sa_flags = 0;
  922: 
  923:     if (sigaction(SIGPIPE, &action, NULL) != 0)
  924:     {
  925: #       ifndef SEMAPHORES_NOMMES
  926:             sem_post(&((*s_etat_processus).semaphore_fork));
  927:             sem_post(&semaphore_gestionnaires_signaux);
  928:             sem_destroy(&semaphore_gestionnaires_signaux);
  929:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  930: #       else
  931:             sem_post((*s_etat_processus).semaphore_fork);
  932:             sem_post(semaphore_gestionnaires_signaux);
  933:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  934:                     SEM_SIGNAUX);
  935:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  936:                     pthread_self(), SEM_FORK);
  937: #       endif
  938: 
  939:         liberation_contexte_cas(s_etat_processus);
  940:         liberation_queue_signaux(s_etat_processus);
  941: 
  942: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  943:             stackoverflow_deinstall_handler();
  944: #       endif
  945: 
  946:         erreur = d_es_signal;
  947: 
  948:         if ((*s_etat_processus).langue == 'F')
  949:         {
  950:             printf("+++Système : Initialisation des signaux POSIX "
  951:                     "impossible\n");
  952:         }
  953:         else
  954:         {
  955:             printf("+++System : Initialization of POSIX signals failed\n");
  956:         }
  957: 
  958:         return(EXIT_FAILURE);
  959:     }
  960: 
  961:     signal_test = SIGTEST;
  962:     raise(SIGPIPE);
  963: 
  964:     attente.tv_sec = 0;
  965:     attente.tv_nsec = 1000000;
  966: 
  967:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
  968:     {
  969:         nanosleep(&attente, NULL);
  970:     }
  971: 
  972:     if (signal_test != SIGPIPE)
  973:     {
  974: #       ifndef SEMAPHORES_NOMMES
  975:             sem_post(&((*s_etat_processus).semaphore_fork));
  976:             sem_post(&semaphore_gestionnaires_signaux);
  977:             sem_destroy(&semaphore_gestionnaires_signaux);
  978:             sem_destroy(&((*s_etat_processus).semaphore_fork));
  979: #       else
  980:             sem_post((*s_etat_processus).semaphore_fork);
  981:             sem_post(semaphore_gestionnaires_signaux);
  982:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
  983:                     SEM_SIGNAUX);
  984:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
  985:                     pthread_self(), SEM_FORK);
  986: #       endif
  987: 
  988:         liberation_contexte_cas(s_etat_processus);
  989:         liberation_queue_signaux(s_etat_processus);
  990: 
  991: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
  992:             stackoverflow_deinstall_handler();
  993: #       endif
  994: 
  995:         erreur = d_es_signal;
  996: 
  997:         if ((*s_etat_processus).langue == 'F')
  998:         {
  999:             printf("+++Système : Initialisation des signaux POSIX "
 1000:                     "impossible\n");
 1001:         }
 1002:         else
 1003:         {
 1004:             printf("+++System : Initialization of POSIX signals failed\n");
 1005:         }
 1006: 
 1007:         return(EXIT_FAILURE);
 1008:     }
 1009: 
 1010:     action.sa_handler = interruption1;
 1011:     action.sa_flags = 0;
 1012: 
 1013:     if (sigaction(SIGUSR1, &action, NULL) != 0)
 1014:     {
 1015: #       ifndef SEMAPHORES_NOMMES
 1016:             sem_post(&((*s_etat_processus).semaphore_fork));
 1017:             sem_post(&semaphore_gestionnaires_signaux);
 1018:             sem_destroy(&semaphore_gestionnaires_signaux);
 1019:             sem_destroy(&((*s_etat_processus).semaphore_fork));
 1020: #       else
 1021:             sem_post((*s_etat_processus).semaphore_fork);
 1022:             sem_post(semaphore_gestionnaires_signaux);
 1023:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
 1024:                     SEM_SIGNAUX);
 1025:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
 1026:                     pthread_self(), SEM_FORK);
 1027: #       endif
 1028: 
 1029:         liberation_contexte_cas(s_etat_processus);
 1030:         liberation_queue_signaux(s_etat_processus);
 1031: 
 1032: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1033:             stackoverflow_deinstall_handler();
 1034: #       endif
 1035: 
 1036:         erreur = d_es_signal;
 1037: 
 1038:         if ((*s_etat_processus).langue == 'F')
 1039:         {
 1040:             printf("+++Système : Initialisation des signaux POSIX "
 1041:                     "impossible\n");
 1042:         }
 1043:         else
 1044:         {
 1045:             printf("+++System : Initialization of POSIX signals failed\n");
 1046:         }
 1047: 
 1048:         return(EXIT_FAILURE);
 1049:     }
 1050: 
 1051:     signal_test = SIGTEST;
 1052:     raise(SIGUSR1);
 1053: 
 1054:     attente.tv_sec = 0;
 1055:     attente.tv_nsec = 1000000;
 1056: 
 1057:     for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
 1058:     {
 1059:         nanosleep(&attente, NULL);
 1060:     }
 1061: 
 1062:     if (signal_test != SIGUSR1)
 1063:     {
 1064: #       ifndef SEMAPHORES_NOMMES
 1065:             sem_post(&((*s_etat_processus).semaphore_fork));
 1066:             sem_post(&semaphore_gestionnaires_signaux);
 1067:             sem_destroy(&semaphore_gestionnaires_signaux);
 1068:             sem_destroy(&((*s_etat_processus).semaphore_fork));
 1069: #       else
 1070:             sem_post((*s_etat_processus).semaphore_fork);
 1071:             sem_post(semaphore_gestionnaires_signaux);
 1072:             sem_destroy2(semaphore_gestionnaires_signaux, getpid(),
 1073:                     SEM_SIGNAUX);
 1074:             sem_destroy3((*s_etat_processus).semphore_fork, getpid(),
 1075:                     pthread_self(), SEM_FORK);
 1076: #       endif
 1077: 
 1078:         liberation_contexte_cas(s_etat_processus);
 1079:         liberation_queue_signaux(s_etat_processus);
 1080: 
 1081: #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1082:             stackoverflow_deinstall_handler();
 1083: #       endif
 1084: 
 1085:         erreur = d_es_signal;
 1086: 
 1087:         if ((*s_etat_processus).langue == 'F')
 1088:         {
 1089:             printf("+++Système : Initialisation des signaux POSIX "
 1090:                     "impossible\n");
 1091:         }
 1092:         else
 1093:         {
 1094:             printf("+++System : Initialization of POSIX signals failed\n");
 1095:         }
 1096: 
 1097:         return(EXIT_FAILURE);
 1098:     }
 1099: 
 1100:     signal_test = SIGTEST + 1;
 1101: 
 1102:     erreur = d_absence_erreur;
 1103:     core = d_faux;
 1104:     mode_interactif = d_faux;
 1105:     (*s_etat_processus).nom_fichier_source = NULL;
 1106:     (*s_etat_processus).definitions_chainees = NULL;
 1107:     (*s_etat_processus).type_debug = 0;
 1108:     traitement_fichier_temporaire = 'N';
 1109:     option = ' ';
 1110:     drapeau_encart = 'Y';
 1111:     debug = d_faux;
 1112:     arguments = NULL;
 1113: 
 1114:     (*s_etat_processus).s_fichiers = NULL;
 1115:     (*s_etat_processus).s_sockets = NULL;
 1116:     (*s_etat_processus).s_connecteurs_sql = NULL;
 1117: 
 1118:     setlogmask(LOG_MASK(LOG_NOTICE));
 1119:     openlog(argv[0], LOG_ODELAY | LOG_PID, LOG_USER);
 1120: 
 1121:     if (argc == 1)
 1122:     {
 1123:         erreur = d_erreur;
 1124:         informations(s_etat_processus);
 1125:     }
 1126:     else
 1127:     {
 1128:         presence_definition = 'N';
 1129:         (*s_etat_processus).debug = d_faux;
 1130:         (*s_etat_processus).lancement_interactif = d_faux;
 1131: 
 1132:         option_a = d_faux;
 1133:         option_A = d_faux;
 1134:         option_c = d_faux;
 1135:         option_d = d_faux;
 1136:         option_D = d_faux;
 1137:         option_h = d_faux;
 1138:         option_i = d_faux;
 1139:         option_l = d_faux;
 1140:         option_n = d_faux;
 1141:         option_p = d_faux;
 1142:         option_P = 0;
 1143:         option_s = d_faux;
 1144:         option_S = d_faux;
 1145:         option_t = d_faux;
 1146:         option_v = d_faux;
 1147: 
 1148:         // Lorsque le programme est appelé depuis un shebang, argv[0] contient
 1149:         // le chemin du programme et argv[1] tous les arguments.
 1150:         // argv[2] contient quant à lui le nom du script RPL/2.
 1151:         //
 1152:         // Exemple :
 1153:         // argv[0] : /usr/local/bin/rpl
 1154:         // argv[1] : -csdp -t 800
 1155:         // argv[2] : ./on_exit.rpl
 1156: 
 1157:         while((--argc) > 0)
 1158:         {
 1159:             if ((*(++argv))[0] == '-')
 1160:             {
 1161:                 while((option = *(++argv[0])) != '\0')
 1162:                 {
 1163:                     switch(option)
 1164:                     {
 1165:                         case 'a' :
 1166:                         {
 1167:                             if (option_a == d_vrai)
 1168:                             {
 1169: #                               ifndef SEMAPHORES_NOMMES
 1170:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1171:                                 sem_post(&semaphore_gestionnaires_signaux);
 1172:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1173:                                 sem_destroy(&((*s_etat_processus)
 1174:                                         .semaphore_fork));
 1175: #                               else
 1176:                                 sem_post((*s_etat_processus).semaphore_fork);
 1177:                                 sem_post(semaphore_gestionnaires_signaux);
 1178:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1179:                                         getpid(), SEM_SIGNAUX);
 1180:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1181:                                         getpid(), pthread_self(), SEM_FORK);
 1182: #                               endif
 1183: 
 1184:                                 liberation_contexte_cas(s_etat_processus);
 1185:                                 liberation_queue_signaux(s_etat_processus);
 1186: 
 1187: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1188:                                 stackoverflow_deinstall_handler();
 1189: #                               endif
 1190: 
 1191:                                 if ((*s_etat_processus).langue == 'F')
 1192:                                 {
 1193:                                     printf("+++Erreur : option -a présente "
 1194:                                             "plus d'une fois\n");
 1195:                                 }
 1196:                                 else
 1197:                                 {
 1198:                                     printf("+++Error : more than one -a "
 1199:                                             "on command line");
 1200:                                 }
 1201: 
 1202:                                 return(EXIT_FAILURE);
 1203:                             }
 1204: 
 1205:                             option_a = d_vrai;
 1206:                             break;
 1207:                         }
 1208: 
 1209:                         case 'A' :
 1210:                         {
 1211:                             if (option_A == d_vrai)
 1212:                             {
 1213: #                               ifndef SEMAPHORES_NOMMES
 1214:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1215:                                 sem_post(&semaphore_gestionnaires_signaux);
 1216:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1217:                                 sem_destroy(&((*s_etat_processus)
 1218:                                         .semaphore_fork));
 1219: #                               else
 1220:                                 sem_post((*s_etat_processus).semaphore_fork);
 1221:                                 sem_post(semaphore_gestionnaires_signaux);
 1222:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1223:                                         getpid(), SEM_SIGNAUX);
 1224:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1225:                                         getpid(), pthread_self(), SEM_FORK);
 1226: #                               endif
 1227: 
 1228:                                 liberation_contexte_cas(s_etat_processus);
 1229:                                 liberation_queue_signaux(s_etat_processus);
 1230: 
 1231: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1232:                                 stackoverflow_deinstall_handler();
 1233: #                               endif
 1234: 
 1235:                                 if ((*s_etat_processus).langue == 'F')
 1236:                                 {
 1237:                                     printf("+++Erreur : option -A présente "
 1238:                                             "plus d'une fois\n");
 1239:                                 }
 1240:                                 else
 1241:                                 {
 1242:                                     printf("+++Error : more than one -A "
 1243:                                             "on command line");
 1244:                                 }
 1245: 
 1246:                                 return(EXIT_FAILURE);
 1247:                             }
 1248: 
 1249:                             option_A = d_vrai;
 1250: 
 1251:                             while(*(++argv[0]) == ' ');
 1252:                             argv[0]--;
 1253: 
 1254:                             if ((*(++argv[0])) != '\0')
 1255:                             {
 1256:                                 if ((arguments = malloc((strlen(argv[0]) + 7) *
 1257:                                         sizeof(unsigned char))) == NULL)
 1258:                                 {
 1259: #                                   ifndef SEMAPHORES_NOMMES
 1260:                                     sem_post(&((*s_etat_processus)
 1261:                                             .semaphore_fork));
 1262:                                     sem_post(&semaphore_gestionnaires_signaux);
 1263:                                     sem_destroy(
 1264:                                             &semaphore_gestionnaires_signaux);
 1265:                                     sem_destroy(&((*s_etat_processus)
 1266:                                             .semaphore_fork));
 1267: #                                   else
 1268:                                     sem_post((*s_etat_processus)
 1269:                                             .semaphore_fork);
 1270:                                     sem_post(semaphore_gestionnaires_signaux);
 1271:                                     sem_destroy2(
 1272:                                             semaphore_gestionnaires_signaux,
 1273:                                             getpid(), SEM_SIGNAUX);
 1274:                                     sem_destroy3((*s_etat_processus)
 1275:                                             .semphore_fork, getpid(),
 1276:                                             pthread_self(), SEM_FORK);
 1277: #                                   endif
 1278: 
 1279:                                     liberation_contexte_cas(s_etat_processus);
 1280:                                     liberation_queue_signaux(s_etat_processus);
 1281: 
 1282: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1283:                                     stackoverflow_deinstall_handler();
 1284: #                                   endif
 1285: 
 1286:                                     if ((*s_etat_processus).langue == 'F')
 1287:                                     {
 1288:                                         printf("+++Système : Mémoire "
 1289:                                                 "insuffisante\n");
 1290:                                     }
 1291:                                     else
 1292:                                     {
 1293:                                         printf("+++System : Not enough "
 1294:                                                 "memory\n");
 1295:                                     }
 1296: 
 1297:                                     return(EXIT_FAILURE);
 1298:                                 }
 1299: 
 1300:                                 ptr = arguments;
 1301:                                 (*ptr) = d_code_fin_chaine;
 1302:                                 strcat(ptr, "<< ");
 1303:                                 ptr += 3;
 1304: 
 1305:                                 while(*(argv[0]) != '\0')
 1306:                                 {
 1307:                                     *(ptr++) = *(argv[0]++);
 1308:                                 }
 1309: 
 1310:                                 (*ptr) = '\0';
 1311: 
 1312:                                 strcat(arguments, " >>");
 1313:                                 argv[0]--;
 1314:                             }
 1315:                             else if ((--argc) > 0)
 1316:                             {
 1317:                                 argv++;
 1318: 
 1319:                                 if ((arguments = malloc((strlen(argv[0]) + 7) *
 1320:                                         sizeof(unsigned char))) == NULL)
 1321:                                 {
 1322: #                                   ifndef SEMAPHORES_NOMMES
 1323:                                     sem_post(&((*s_etat_processus)
 1324:                                             .semaphore_fork));
 1325:                                     sem_post(&semaphore_gestionnaires_signaux);
 1326:                                     sem_destroy(
 1327:                                             &semaphore_gestionnaires_signaux);
 1328:                                     sem_destroy(&((*s_etat_processus)
 1329:                                             .semaphore_fork));
 1330: #                                   else
 1331:                                     sem_post((*s_etat_processus)
 1332:                                             .semaphore_fork);
 1333:                                     sem_post(semaphore_gestionnaires_signaux);
 1334:                                     sem_destroy2(
 1335:                                             semaphore_gestionnaires_signaux,
 1336:                                             getpid(), SEM_SIGNAUX);
 1337:                                     sem_destroy3((*s_etat_processus)
 1338:                                             .semphore_fork, getpid(),
 1339:                                             pthread_self(), SEM_FORK);
 1340: #                                   endif
 1341: 
 1342:                                     liberation_contexte_cas(s_etat_processus);
 1343:                                     liberation_queue_signaux(s_etat_processus);
 1344: 
 1345: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1346:                                     stackoverflow_deinstall_handler();
 1347: #                                   endif
 1348: 
 1349:                                     if ((*s_etat_processus).langue == 'F')
 1350:                                     {
 1351:                                         printf("+++Système : Mémoire "
 1352:                                                 "insuffisante\n");
 1353:                                     }
 1354:                                     else
 1355:                                     {
 1356:                                         printf("+++System : Not enough "
 1357:                                                 "memory\n");
 1358:                                     }
 1359: 
 1360:                                     return(EXIT_FAILURE);
 1361:                                 }
 1362: 
 1363:                                 ptr = arguments;
 1364:                                 (*ptr) = d_code_fin_chaine;
 1365:                                 strcat(ptr, "<< ");
 1366:                                 ptr += 3;
 1367: 
 1368:                                 while(*(argv[0]) != '\0')
 1369:                                 {
 1370:                                     *(ptr++) = *(argv[0]++);
 1371:                                 }
 1372: 
 1373:                                 (*ptr) = '\0';
 1374: 
 1375:                                 strcat(arguments, " >>");
 1376:                                 argv[0]--;
 1377:                             }
 1378:                             else
 1379:                             {
 1380: #                               ifndef SEMAPHORES_NOMMES
 1381:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1382:                                 sem_post(&semaphore_gestionnaires_signaux);
 1383:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1384:                                 sem_destroy(&((*s_etat_processus)
 1385:                                         .semaphore_fork));
 1386: #                               else
 1387:                                 sem_post((*s_etat_processus).semaphore_fork);
 1388:                                 sem_post(semaphore_gestionnaires_signaux);
 1389:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1390:                                         getpid(), SEM_SIGNAUX);
 1391:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1392:                                         getpid(), pthread_self(), SEM_FORK);
 1393: #                               endif
 1394: 
 1395:                                 liberation_contexte_cas(s_etat_processus);
 1396:                                 liberation_queue_signaux(s_etat_processus);
 1397: 
 1398: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1399:                                 stackoverflow_deinstall_handler();
 1400: #                               endif
 1401: 
 1402:                                 if ((*s_etat_processus).langue == 'F')
 1403:                                 {
 1404:                                     printf("+++Erreur : Aucune donnée "
 1405:                                             "spécifié après l'option -A\n");
 1406:                                 }
 1407:                                 else
 1408:                                 {
 1409:                                     printf("+++Error : Data required after "
 1410:                                             "-A option\n");
 1411:                                 }
 1412: 
 1413:                                 return(EXIT_FAILURE);
 1414:                             }
 1415: 
 1416:                             break;
 1417:                         }
 1418: 
 1419:                         case 'c' :
 1420:                         {
 1421:                             if (option_c == d_vrai)
 1422:                             {
 1423: #                               ifndef SEMAPHORES_NOMMES
 1424:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1425:                                 sem_post(&semaphore_gestionnaires_signaux);
 1426:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1427:                                 sem_destroy(&((*s_etat_processus)
 1428:                                         .semaphore_fork));
 1429: #                               else
 1430:                                 sem_post((*s_etat_processus).semaphore_fork);
 1431:                                 sem_post(semaphore_gestionnaires_signaux);
 1432:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1433:                                         getpid(), SEM_SIGNAUX);
 1434:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1435:                                         getpid(), pthread_self(), SEM_FORK);
 1436: #                               endif
 1437: 
 1438:                                 liberation_contexte_cas(s_etat_processus);
 1439:                                 liberation_queue_signaux(s_etat_processus);
 1440: 
 1441: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1442:                                 stackoverflow_deinstall_handler();
 1443: #                               endif
 1444: 
 1445:                                 if ((*s_etat_processus).langue == 'F')
 1446:                                 {
 1447:                                     printf("+++Erreur : option -c présente "
 1448:                                             "plus d'une fois\n");
 1449:                                 }
 1450:                                 else
 1451:                                 {
 1452:                                     printf("+++Error : more than one -c "
 1453:                                             "on command line");
 1454:                                 }
 1455: 
 1456:                                 return(EXIT_FAILURE);
 1457:                             }
 1458: 
 1459:                             option_c = d_vrai;
 1460:                             core = d_vrai;
 1461:                             break;
 1462:                         }
 1463: 
 1464:                         case 'd' :
 1465:                         {
 1466:                             if (option_d == d_vrai)
 1467:                             {
 1468: #                               ifndef SEMAPHORES_NOMMES
 1469:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1470:                                 sem_post(&semaphore_gestionnaires_signaux);
 1471:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1472:                                 sem_destroy(&((*s_etat_processus)
 1473:                                         .semaphore_fork));
 1474: #                               else
 1475:                                 sem_post((*s_etat_processus).semaphore_fork);
 1476:                                 sem_post(semaphore_gestionnaires_signaux);
 1477:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1478:                                         getpid(), SEM_SIGNAUX);
 1479:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1480:                                         getpid(), pthread_self(), SEM_FORK);
 1481: #                               endif
 1482: 
 1483:                                 liberation_contexte_cas(s_etat_processus);
 1484:                                 liberation_queue_signaux(s_etat_processus);
 1485: 
 1486: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1487:                                 stackoverflow_deinstall_handler();
 1488: #                               endif
 1489: 
 1490:                                 if ((*s_etat_processus).langue == 'F')
 1491:                                 {
 1492:                                     printf("+++Erreur : option -d présente "
 1493:                                             "plus d'une fois\n");
 1494:                                 }
 1495:                                 else
 1496:                                 {
 1497:                                     printf("+++Error : more than one -d "
 1498:                                             "on command line");
 1499:                                 }
 1500: 
 1501:                                 return(EXIT_FAILURE);
 1502:                             }
 1503: 
 1504:                             option_d = d_vrai;
 1505:                             debug = d_vrai;
 1506:                             break;
 1507:                         }
 1508: 
 1509:                         case 'D' :
 1510:                         {
 1511:                             if (option_D == d_vrai)
 1512:                             {
 1513: #                               ifndef SEMAPHORES_NOMMES
 1514:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1515:                                 sem_post(&semaphore_gestionnaires_signaux);
 1516:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1517:                                 sem_destroy(&((*s_etat_processus)
 1518:                                         .semaphore_fork));
 1519: #                               else
 1520:                                 sem_post((*s_etat_processus).semaphore_fork);
 1521:                                 sem_post(semaphore_gestionnaires_signaux);
 1522:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1523:                                         getpid(), SEM_SIGNAUX);
 1524:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1525:                                         getpid(), pthread_self(), SEM_FORK);
 1526: #                               endif
 1527: 
 1528:                                 liberation_contexte_cas(s_etat_processus);
 1529:                                 liberation_queue_signaux(s_etat_processus);
 1530: 
 1531: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1532:                                 stackoverflow_deinstall_handler();
 1533: #                               endif
 1534: 
 1535:                                 if ((*s_etat_processus).langue == 'F')
 1536:                                 {
 1537:                                     printf("+++Erreur : option -D présente "
 1538:                                             "plus d'une fois\n");
 1539:                                 }
 1540:                                 else
 1541:                                 {
 1542:                                     printf("+++Error : more than one -D "
 1543:                                             "on command line");
 1544:                                 }
 1545: 
 1546:                                 return(EXIT_FAILURE);
 1547:                             }
 1548: 
 1549:                             option_D = d_vrai;
 1550:                             break;
 1551:                         }
 1552: 
 1553:                         case 'h' :
 1554:                         {
 1555:                             if (option_h == d_vrai)
 1556:                             {
 1557: #                               ifndef SEMAPHORES_NOMMES
 1558:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1559:                                 sem_post(&semaphore_gestionnaires_signaux);
 1560:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1561:                                 sem_destroy(&((*s_etat_processus)
 1562:                                         .semaphore_fork));
 1563: #                               else
 1564:                                 sem_post((*s_etat_processus).semaphore_fork);
 1565:                                 sem_post(semaphore_gestionnaires_signaux);
 1566:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1567:                                         getpid(), SEM_SIGNAUX);
 1568:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1569:                                         getpid(), pthread_self(), SEM_FORK);
 1570: #                               endif
 1571: 
 1572:                                 liberation_contexte_cas(s_etat_processus);
 1573:                                 liberation_queue_signaux(s_etat_processus);
 1574: 
 1575: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1576:                                 stackoverflow_deinstall_handler();
 1577: #                               endif
 1578: 
 1579:                                 if ((*s_etat_processus).langue == 'F')
 1580:                                 {
 1581:                                     printf("+++Erreur : option -h présente "
 1582:                                             "plus d'une fois\n");
 1583:                                 }
 1584:                                 else
 1585:                                 {
 1586:                                     printf("+++Error : more than one -h "
 1587:                                             "on command line");
 1588:                                 }
 1589: 
 1590:                                 return(EXIT_FAILURE);
 1591:                             }
 1592: 
 1593:                             option_h = d_vrai;
 1594:                             informations(s_etat_processus);
 1595:                             break;
 1596:                         }
 1597: 
 1598:                         case 'i' :
 1599:                         {
 1600:                             if (option_i == d_vrai) 
 1601:                             {
 1602: #                               ifndef SEMAPHORES_NOMMES
 1603:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1604:                                 sem_post(&semaphore_gestionnaires_signaux);
 1605:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1606:                                 sem_destroy(&((*s_etat_processus)
 1607:                                         .semaphore_fork));
 1608: #                               else
 1609:                                 sem_post((*s_etat_processus).semaphore_fork);
 1610:                                 sem_post(semaphore_gestionnaires_signaux);
 1611:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1612:                                         getpid(), SEM_SIGNAUX);
 1613:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1614:                                         getpid(), pthread_self(), SEM_FORK);
 1615: #                               endif
 1616: 
 1617:                                 liberation_contexte_cas(s_etat_processus);
 1618:                                 liberation_queue_signaux(s_etat_processus);
 1619: 
 1620: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1621:                                 stackoverflow_deinstall_handler();
 1622: #                               endif
 1623: 
 1624:                                 if ((*s_etat_processus).langue == 'F')
 1625:                                 {
 1626:                                     printf("+++Erreur : option -i présente "
 1627:                                             "plus d'une fois\n");
 1628:                                 }
 1629:                                 else
 1630:                                 {
 1631:                                     printf("+++Error : more than one -i "
 1632:                                             "on command line");
 1633:                                 }
 1634: 
 1635:                                 return(EXIT_FAILURE);
 1636:                             }
 1637:                             else if (option_S == d_vrai)
 1638:                             {
 1639: #                               ifndef SEMAPHORES_NOMMES
 1640:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1641:                                 sem_post(&semaphore_gestionnaires_signaux);
 1642:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1643:                                 sem_destroy(&((*s_etat_processus)
 1644:                                         .semaphore_fork));
 1645: #                               else
 1646:                                 sem_post((*s_etat_processus).semaphore_fork);
 1647:                                 sem_post(semaphore_gestionnaires_signaux);
 1648:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1649:                                         getpid(), SEM_SIGNAUX);
 1650:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1651:                                         getpid(), pthread_self(), SEM_FORK);
 1652: #                               endif
 1653: 
 1654:                                 liberation_contexte_cas(s_etat_processus);
 1655:                                 liberation_queue_signaux(s_etat_processus);
 1656: 
 1657: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1658:                                 stackoverflow_deinstall_handler();
 1659: #                               endif
 1660: 
 1661:                                 if ((*s_etat_processus).langue == 'F')
 1662:                                 {
 1663:                                     printf("+++Erreur : options -i et -S "
 1664:                                             "incompatibles\n");
 1665:                                 }
 1666:                                 else
 1667:                                 {
 1668:                                     printf("+++Error : incompatible options -i "
 1669:                                             "and -S\n");
 1670:                                 }
 1671: 
 1672:                                 return(EXIT_FAILURE);
 1673:                             }
 1674:                             else if (option_p == d_vrai)
 1675:                             {
 1676: #                               ifndef SEMAPHORES_NOMMES
 1677:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1678:                                 sem_post(&semaphore_gestionnaires_signaux);
 1679:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1680:                                 sem_destroy(&((*s_etat_processus)
 1681:                                         .semaphore_fork));
 1682: #                               else
 1683:                                 sem_post((*s_etat_processus).semaphore_fork);
 1684:                                 sem_post(semaphore_gestionnaires_signaux);
 1685:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1686:                                         getpid(), SEM_SIGNAUX);
 1687:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1688:                                         getpid(), pthread_self(), SEM_FORK);
 1689: #                               endif
 1690: 
 1691:                                 liberation_contexte_cas(s_etat_processus);
 1692:                                 liberation_queue_signaux(s_etat_processus);
 1693: 
 1694: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1695:                                 stackoverflow_deinstall_handler();
 1696: #                               endif
 1697: 
 1698:                                 if ((*s_etat_processus).langue == 'F')
 1699:                                 {
 1700:                                     printf("+++Erreur : options -i et -p "
 1701:                                             "incompatibles\n");
 1702:                                 }
 1703:                                 else
 1704:                                 {
 1705:                                     printf("+++Error : incompatible options -i "
 1706:                                             "and -p\n");
 1707:                                 }
 1708: 
 1709:                                 return(EXIT_FAILURE);
 1710:                             }
 1711: 
 1712:                             option_i = d_vrai;
 1713:                             mode_interactif = d_vrai;
 1714:                             presence_definition = 'O';
 1715:                             break;
 1716:                         }
 1717: 
 1718:                         case 'l' :
 1719:                         {
 1720:                             if (option_l == d_vrai)
 1721:                             {
 1722: #                               ifndef SEMAPHORES_NOMMES
 1723:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1724:                                 sem_post(&semaphore_gestionnaires_signaux);
 1725:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1726:                                 sem_destroy(&((*s_etat_processus)
 1727:                                         .semaphore_fork));
 1728: #                               else
 1729:                                 sem_post((*s_etat_processus).semaphore_fork);
 1730:                                 sem_post(semaphore_gestionnaires_signaux);
 1731:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1732:                                         getpid(), SEM_SIGNAUX);
 1733:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1734:                                         getpid(), pthread_self(), SEM_FORK);
 1735: #                               endif
 1736: 
 1737:                                 liberation_contexte_cas(s_etat_processus);
 1738:                                 liberation_queue_signaux(s_etat_processus);
 1739: 
 1740: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1741:                                 stackoverflow_deinstall_handler();
 1742: #                               endif
 1743: 
 1744:                                 if ((*s_etat_processus).langue == 'F')
 1745:                                 {
 1746:                                     printf("+++Erreur : option -l présente "
 1747:                                             "plus d'une fois\n");
 1748:                                 }
 1749:                                 else
 1750:                                 {
 1751:                                     printf("+++Error : more than one -l "
 1752:                                             "on command line");
 1753:                                 }
 1754: 
 1755:                                 return(EXIT_FAILURE);
 1756:                             }
 1757: 
 1758:                             option_l = d_vrai;
 1759: 
 1760:                             if ((*s_etat_processus).langue == 'F')
 1761:                             {
 1762:                                 printf("%s\n\n", CeCILL_fr);
 1763:                             }
 1764:                             else
 1765:                             {
 1766:                                 printf("%s\n\n", CeCILL_en);
 1767:                             }
 1768: 
 1769:                             break;
 1770:                         }
 1771: 
 1772:                         case 'n' :
 1773:                         {
 1774:                             if (option_n == d_vrai)
 1775:                             {
 1776: #                               ifndef SEMAPHORES_NOMMES
 1777:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1778:                                 sem_post(&semaphore_gestionnaires_signaux);
 1779:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1780:                                 sem_destroy(&((*s_etat_processus)
 1781:                                         .semaphore_fork));
 1782: #                               else
 1783:                                 sem_post((*s_etat_processus).semaphore_fork);
 1784:                                 sem_post(semaphore_gestionnaires_signaux);
 1785:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1786:                                         getpid(), SEM_SIGNAUX);
 1787:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1788:                                         getpid(), pthread_self(), SEM_FORK);
 1789: #                               endif
 1790: 
 1791:                                 liberation_contexte_cas(s_etat_processus);
 1792:                                 liberation_queue_signaux(s_etat_processus);
 1793: 
 1794: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1795:                                 stackoverflow_deinstall_handler();
 1796: #                               endif
 1797: 
 1798:                                 if ((*s_etat_processus).langue == 'F')
 1799:                                 {
 1800:                                     printf("+++Erreur : option -n présente "
 1801:                                             "plus d'une fois\n");
 1802:                                 }
 1803:                                 else
 1804:                                 {
 1805:                                     printf("+++Error : more than one -n "
 1806:                                             "on command line");
 1807:                                 }
 1808: 
 1809:                                 return(EXIT_FAILURE);
 1810:                             }
 1811: 
 1812:                             option_n = d_vrai;
 1813: 
 1814:                             break;
 1815:                         }
 1816: 
 1817:                         case 'p' :
 1818:                         {
 1819:                             if (option_p == d_vrai)
 1820:                             {
 1821: #                               ifndef SEMAPHORES_NOMMES
 1822:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1823:                                 sem_post(&semaphore_gestionnaires_signaux);
 1824:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1825:                                 sem_destroy(&((*s_etat_processus)
 1826:                                         .semaphore_fork));
 1827: #                               else
 1828:                                 sem_post((*s_etat_processus).semaphore_fork);
 1829:                                 sem_post(semaphore_gestionnaires_signaux);
 1830:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1831:                                         getpid(), SEM_SIGNAUX);
 1832:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1833:                                         getpid(), pthread_self(), SEM_FORK);
 1834: #                               endif
 1835: 
 1836:                                 liberation_contexte_cas(s_etat_processus);
 1837:                                 liberation_queue_signaux(s_etat_processus);
 1838: 
 1839: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1840:                                 stackoverflow_deinstall_handler();
 1841: #                               endif
 1842: 
 1843:                                 if ((*s_etat_processus).langue == 'F')
 1844:                                 {
 1845:                                     printf("+++Erreur : option -p présente "
 1846:                                             "plus d'une fois\n");
 1847:                                 }
 1848:                                 else
 1849:                                 {
 1850:                                     printf("+++Error : more than one -p "
 1851:                                             "on command line");
 1852:                                 }
 1853: 
 1854:                                 return(EXIT_FAILURE);
 1855:                             }
 1856:                             else if (option_i == d_vrai)
 1857:                             {
 1858: #                               ifndef SEMAPHORES_NOMMES
 1859:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1860:                                 sem_post(&semaphore_gestionnaires_signaux);
 1861:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1862:                                 sem_destroy(&((*s_etat_processus)
 1863:                                         .semaphore_fork));
 1864: #                               else
 1865:                                 sem_post((*s_etat_processus).semaphore_fork);
 1866:                                 sem_post(semaphore_gestionnaires_signaux);
 1867:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1868:                                         getpid(), SEM_SIGNAUX);
 1869:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1870:                                         getpid(), pthread_self(), SEM_FORK);
 1871: #                               endif
 1872: 
 1873:                                 liberation_contexte_cas(s_etat_processus);
 1874:                                 liberation_queue_signaux(s_etat_processus);
 1875: 
 1876: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1877:                                 stackoverflow_deinstall_handler();
 1878: #                               endif
 1879: 
 1880:                                 if ((*s_etat_processus).langue == 'F')
 1881:                                 {
 1882:                                     printf("+++Erreur : options -i et -p "
 1883:                                             "incompatibles\n");
 1884:                                 }
 1885:                                 else
 1886:                                 {
 1887:                                     printf("+++Error : incompatible options -i "
 1888:                                             "and -p\n");
 1889:                                 }
 1890: 
 1891:                                 return(EXIT_FAILURE);
 1892:                             }
 1893: 
 1894:                             option_p = d_vrai;
 1895: 
 1896:                             break;
 1897:                         }
 1898: 
 1899:                         case 'P' :
 1900:                         {
 1901:                             if (option_P > 2)
 1902:                             {
 1903: #                               ifndef SEMAPHORES_NOMMES
 1904:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1905:                                 sem_post(&semaphore_gestionnaires_signaux);
 1906:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1907:                                 sem_destroy(&((*s_etat_processus)
 1908:                                         .semaphore_fork));
 1909: #                               else
 1910:                                 sem_post((*s_etat_processus).semaphore_fork);
 1911:                                 sem_post(semaphore_gestionnaires_signaux);
 1912:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1913:                                         getpid(), SEM_SIGNAUX);
 1914:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1915:                                         getpid(), pthread_self(), SEM_FORK);
 1916: #                               endif
 1917: 
 1918:                                 liberation_contexte_cas(s_etat_processus);
 1919:                                 liberation_queue_signaux(s_etat_processus);
 1920: 
 1921: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1922:                                 stackoverflow_deinstall_handler();
 1923: #                               endif
 1924: 
 1925:                                 if ((*s_etat_processus).langue == 'F')
 1926:                                 {
 1927:                                     printf("+++Erreur : option -P présente "
 1928:                                             "plus de deux fois\n");
 1929:                                 }
 1930:                                 else
 1931:                                 {
 1932:                                     printf("+++Error : more than two -P "
 1933:                                             "on command line");
 1934:                                 }
 1935: 
 1936:                                 return(EXIT_FAILURE);
 1937:                             }
 1938: 
 1939:                             option_P++;
 1940: 
 1941:                             break;
 1942:                         }
 1943: 
 1944:                         case 's' :
 1945:                         {
 1946:                             if (option_s == d_vrai)
 1947:                             {
 1948: #                               ifndef SEMAPHORES_NOMMES
 1949:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1950:                                 sem_post(&semaphore_gestionnaires_signaux);
 1951:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1952:                                 sem_destroy(&((*s_etat_processus)
 1953:                                         .semaphore_fork));
 1954: #                               else
 1955:                                 sem_post((*s_etat_processus).semaphore_fork);
 1956:                                 sem_post(semaphore_gestionnaires_signaux);
 1957:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 1958:                                         getpid(), SEM_SIGNAUX);
 1959:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 1960:                                         getpid(), pthread_self(), SEM_FORK);
 1961: #                               endif
 1962: 
 1963:                                 liberation_contexte_cas(s_etat_processus);
 1964:                                 liberation_queue_signaux(s_etat_processus);
 1965: 
 1966: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 1967:                                 stackoverflow_deinstall_handler();
 1968: #                               endif
 1969: 
 1970:                                 if ((*s_etat_processus).langue == 'F')
 1971:                                 {
 1972:                                     printf("+++Erreur : option -s présente "
 1973:                                             "plus d'une fois\n");
 1974:                                 }
 1975:                                 else
 1976:                                 {
 1977:                                     printf("+++Error : more than one -s "
 1978:                                             "on command line");
 1979:                                 }
 1980: 
 1981:                                 return(EXIT_FAILURE);
 1982:                             }
 1983: 
 1984:                             option_s = d_vrai;
 1985:                             drapeau_encart = 'N';
 1986:                             break;
 1987:                         }
 1988: 
 1989:                         case 'S' :
 1990:                         {
 1991:                             if (option_S == d_vrai)
 1992:                             {
 1993: #                               ifndef SEMAPHORES_NOMMES
 1994:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 1995:                                 sem_post(&semaphore_gestionnaires_signaux);
 1996:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 1997:                                 sem_destroy(&((*s_etat_processus)
 1998:                                         .semaphore_fork));
 1999: #                               else
 2000:                                 sem_post((*s_etat_processus).semaphore_fork);
 2001:                                 sem_post(semaphore_gestionnaires_signaux);
 2002:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2003:                                         getpid(), SEM_SIGNAUX);
 2004:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2005:                                         getpid(), pthread_self(), SEM_FORK);
 2006: #                               endif
 2007: 
 2008:                                 liberation_contexte_cas(s_etat_processus);
 2009:                                 liberation_queue_signaux(s_etat_processus);
 2010: 
 2011: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2012:                                 stackoverflow_deinstall_handler();
 2013: #                               endif
 2014: 
 2015:                                 if ((*s_etat_processus).langue == 'F')
 2016:                                 {
 2017:                                     printf("+++Erreur : option -S présente "
 2018:                                             "plus d'une fois\n");
 2019:                                 }
 2020:                                 else
 2021:                                 {
 2022:                                     printf("+++Error : more than one -S "
 2023:                                             "on command line");
 2024:                                 }
 2025: 
 2026:                                 return(EXIT_FAILURE);
 2027:                             }
 2028:                             else if (option_i == d_vrai)
 2029:                             {
 2030: #                               ifndef SEMAPHORES_NOMMES
 2031:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2032:                                 sem_post(&semaphore_gestionnaires_signaux);
 2033:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2034:                                 sem_destroy(&((*s_etat_processus)
 2035:                                         .semaphore_fork));
 2036: #                               else
 2037:                                 sem_post((*s_etat_processus).semaphore_fork);
 2038:                                 sem_post(semaphore_gestionnaires_signaux);
 2039:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2040:                                         getpid(), SEM_SIGNAUX);
 2041:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2042:                                         getpid(), pthread_self(), SEM_FORK);
 2043: #                               endif
 2044: 
 2045:                                 liberation_contexte_cas(s_etat_processus);
 2046:                                 liberation_queue_signaux(s_etat_processus);
 2047: 
 2048: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2049:                                 stackoverflow_deinstall_handler();
 2050: #                               endif
 2051: 
 2052:                                 if ((*s_etat_processus).langue == 'F')
 2053:                                 {
 2054:                                     printf("+++Erreur : options -i et -S "
 2055:                                             "incompatibles\n");
 2056:                                 }
 2057:                                 else
 2058:                                 {
 2059:                                     printf("+++Error : incompatible options -S "
 2060:                                             "and -i\n");
 2061:                                 }
 2062: 
 2063:                                 return(EXIT_FAILURE);
 2064:                             }
 2065: 
 2066:                             option_S = d_vrai;
 2067: 
 2068:                             while(*(++argv[0]) == ' ');
 2069:                             argv[0]--;
 2070: 
 2071:                             if ((*(++argv[0])) != '\0')
 2072:                             {
 2073:                                 if (((*s_etat_processus).definitions_chainees =
 2074:                                         malloc((strlen(argv[0]) + 1) *
 2075:                                         sizeof(unsigned char))) == NULL)
 2076:                                 {
 2077: #                                   ifndef SEMAPHORES_NOMMES
 2078:                                     sem_post(&((*s_etat_processus)
 2079:                                             .semaphore_fork));
 2080:                                     sem_post(&semaphore_gestionnaires_signaux);
 2081:                                     sem_destroy(
 2082:                                             &semaphore_gestionnaires_signaux);
 2083:                                     sem_destroy(&((*s_etat_processus)
 2084:                                             .semaphore_fork));
 2085: #                                   else
 2086:                                     sem_post((*s_etat_processus)
 2087:                                             .semaphore_fork);
 2088:                                     sem_post(semaphore_gestionnaires_signaux);
 2089:                                     sem_destroy2(
 2090:                                             semaphore_gestionnaires_signaux,
 2091:                                             getpid(), SEM_SIGNAUX);
 2092:                                     sem_destroy3((*s_etat_processus)
 2093:                                             .semphore_fork, getpid(),
 2094:                                             pthread_self(), SEM_FORK);
 2095: #                                   endif
 2096: 
 2097:                                     liberation_contexte_cas(s_etat_processus);
 2098:                                     liberation_queue_signaux(s_etat_processus);
 2099: 
 2100: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2101:                                     stackoverflow_deinstall_handler();
 2102: #                                   endif
 2103: 
 2104:                                     if ((*s_etat_processus).langue == 'F')
 2105:                                     {
 2106:                                         printf("+++Système : Mémoire "
 2107:                                                 "insuffisante\n");
 2108:                                     }
 2109:                                     else
 2110:                                     {
 2111:                                         printf("+++System : Not enough "
 2112:                                                 "memory\n");
 2113:                                     }
 2114: 
 2115:                                     return(EXIT_FAILURE);
 2116:                                 }
 2117: 
 2118:                                 ptr = (*s_etat_processus).definitions_chainees;
 2119: 
 2120:                                 while(*(argv[0]) != '\0')
 2121:                                 {
 2122:                                     *(ptr++) = *(argv[0]++);
 2123:                                 }
 2124: 
 2125:                                 (*ptr) = '\0';
 2126: 
 2127:                                 argv[0]--;
 2128:                                 presence_definition = 'O';
 2129:                             }
 2130:                             else if ((--argc) > 0)
 2131:                             {
 2132:                                 argv++;
 2133: 
 2134:                                 if (((*s_etat_processus).definitions_chainees =
 2135:                                         malloc((strlen(argv[0]) + 1) *
 2136:                                         sizeof(unsigned char))) == NULL)
 2137:                                 {
 2138: #                                   ifndef SEMAPHORES_NOMMES
 2139:                                     sem_post(&((*s_etat_processus)
 2140:                                             .semaphore_fork));
 2141:                                     sem_post(&semaphore_gestionnaires_signaux);
 2142:                                     sem_destroy(
 2143:                                             &semaphore_gestionnaires_signaux);
 2144:                                     sem_destroy(&((*s_etat_processus)
 2145:                                             .semaphore_fork));
 2146: #                                   else
 2147:                                     sem_post((*s_etat_processus)
 2148:                                             .semaphore_fork);
 2149:                                     sem_post(semaphore_gestionnaires_signaux);
 2150:                                     sem_destroy2(
 2151:                                             semaphore_gestionnaires_signaux,
 2152:                                             getpid(), SEM_SIGNAUX);
 2153:                                     sem_destroy3((*s_etat_processus)
 2154:                                             .semphore_fork, getpid(),
 2155:                                             pthread_self(), SEM_FORK);
 2156: #                                   endif
 2157: 
 2158:                                     liberation_contexte_cas(s_etat_processus);
 2159:                                     liberation_queue_signaux(s_etat_processus);
 2160: 
 2161: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2162:                                     stackoverflow_deinstall_handler();
 2163: #                                   endif
 2164: 
 2165:                                     if ((*s_etat_processus).langue == 'F')
 2166:                                     {
 2167:                                         printf("+++Système : Mémoire "
 2168:                                                 "insuffisante\n");
 2169:                                     }
 2170:                                     else
 2171:                                     {
 2172:                                         printf("+++System : Not enough "
 2173:                                                 "memory\n");
 2174:                                     }
 2175: 
 2176:                                     return(EXIT_FAILURE);
 2177:                                 }
 2178: 
 2179:                                 ptr = (*s_etat_processus).definitions_chainees;
 2180: 
 2181:                                 while(*(argv[0]) != '\0')
 2182:                                 {
 2183:                                     *(ptr++) = *(argv[0]++);
 2184:                                 }
 2185: 
 2186:                                 (*ptr) = '\0';
 2187: 
 2188:                                 argv[0]--;
 2189:                                 presence_definition = 'O';
 2190:                             }
 2191:                             else
 2192:                             {
 2193: #                               ifndef SEMAPHORES_NOMMES
 2194:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2195:                                 sem_post(&semaphore_gestionnaires_signaux);
 2196:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2197:                                 sem_destroy(&((*s_etat_processus)
 2198:                                         .semaphore_fork));
 2199: #                               else
 2200:                                 sem_post((*s_etat_processus).semaphore_fork);
 2201:                                 sem_post(semaphore_gestionnaires_signaux);
 2202:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2203:                                         getpid(), SEM_SIGNAUX);
 2204:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2205:                                         getpid(), pthread_self(), SEM_FORK);
 2206: #                               endif
 2207: 
 2208:                                 liberation_contexte_cas(s_etat_processus);
 2209:                                 liberation_queue_signaux(s_etat_processus);
 2210: 
 2211: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2212:                                 stackoverflow_deinstall_handler();
 2213: #                               endif
 2214: 
 2215:                                 if ((*s_etat_processus).langue == 'F')
 2216:                                 {
 2217:                                     printf("+++Erreur : Aucun script "
 2218:                                             "spécifié après l'option -S\n");
 2219:                                 }
 2220:                                 else
 2221:                                 {
 2222:                                     printf("+++Error : Script required after "
 2223:                                             "-S option\n");
 2224:                                 }
 2225: 
 2226:                                 return(EXIT_FAILURE);
 2227:                             }
 2228: 
 2229:                             if (((*s_etat_processus).definitions_chainees =
 2230:                                     compactage((*s_etat_processus)
 2231:                                     .definitions_chainees)) == NULL)
 2232:                             {
 2233: #                               ifndef SEMAPHORES_NOMMES
 2234:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2235:                                 sem_post(&semaphore_gestionnaires_signaux);
 2236:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2237:                                 sem_destroy(&((*s_etat_processus)
 2238:                                         .semaphore_fork));
 2239: #                               else
 2240:                                 sem_post((*s_etat_processus).semaphore_fork);
 2241:                                 sem_post(semaphore_gestionnaires_signaux);
 2242:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2243:                                         getpid(), SEM_SIGNAUX);
 2244:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2245:                                         getpid(), pthread_self(), SEM_FORK);
 2246: #                               endif
 2247: 
 2248:                                 liberation_contexte_cas(s_etat_processus);
 2249:                                 liberation_queue_signaux(s_etat_processus);
 2250: 
 2251: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2252:                                 stackoverflow_deinstall_handler();
 2253: #                               endif
 2254: 
 2255:                                 if ((*s_etat_processus).langue == 'F')
 2256:                                 {
 2257:                                     printf("+++Système : Mémoire "
 2258:                                             "insuffisante\n");
 2259:                                 }
 2260:                                 else
 2261:                                 {
 2262:                                     printf("+++System : Not enough "
 2263:                                             "memory\n");
 2264:                                 }
 2265: 
 2266:                                 return(EXIT_FAILURE);
 2267:                             }
 2268: 
 2269:                             (*s_etat_processus).longueur_definitions_chainees =
 2270:                                     (integer8) strlen((*s_etat_processus)
 2271:                                     .definitions_chainees);
 2272: 
 2273:                             break;
 2274:                         }
 2275: 
 2276:                         case 't' :
 2277:                         {
 2278:                             if (option_t == d_vrai)
 2279:                             {
 2280: #                               ifndef SEMAPHORES_NOMMES
 2281:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2282:                                 sem_post(&semaphore_gestionnaires_signaux);
 2283:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2284:                                 sem_destroy(&((*s_etat_processus)
 2285:                                         .semaphore_fork));
 2286: #                               else
 2287:                                 sem_post((*s_etat_processus).semaphore_fork);
 2288:                                 sem_post(semaphore_gestionnaires_signaux);
 2289:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2290:                                         getpid(), SEM_SIGNAUX);
 2291:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2292:                                         getpid(), pthread_self(), SEM_FORK);
 2293: #                               endif
 2294: 
 2295:                                 liberation_contexte_cas(s_etat_processus);
 2296:                                 liberation_queue_signaux(s_etat_processus);
 2297: 
 2298: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2299:                                 stackoverflow_deinstall_handler();
 2300: #                               endif
 2301: 
 2302:                                 if ((*s_etat_processus).langue == 'F')
 2303:                                 {
 2304:                                     printf("+++Erreur : option -t présente "
 2305:                                             "plus d'une fois\n");
 2306:                                 }
 2307:                                 else
 2308:                                 {
 2309:                                     printf("+++Error : more than one -t "
 2310:                                             "on command line");
 2311:                                 }
 2312: 
 2313:                                 return(EXIT_FAILURE);
 2314:                             }
 2315: 
 2316:                             option_t = d_vrai;
 2317:                             (*s_etat_processus).debug = d_vrai;
 2318: 
 2319:                             while(*(++argv[0]) == ' ');
 2320:                             argv[0]--;
 2321: 
 2322:                             if ((*(++argv[0])) != '\0')
 2323:                             {
 2324:                                 if ((type_debug = malloc((strlen(argv[0]) + 1) *
 2325:                                         sizeof(unsigned char))) == NULL)
 2326:                                 {
 2327: #                                   ifndef SEMAPHORES_NOMMES
 2328:                                     sem_post(&((*s_etat_processus)
 2329:                                             .semaphore_fork));
 2330:                                     sem_post(&semaphore_gestionnaires_signaux);
 2331:                                     sem_destroy(
 2332:                                             &semaphore_gestionnaires_signaux);
 2333:                                     sem_destroy(&((*s_etat_processus)
 2334:                                             .semaphore_fork));
 2335: #                                   else
 2336:                                     sem_post((*s_etat_processus)
 2337:                                             .semaphore_fork);
 2338:                                     sem_post(semaphore_gestionnaires_signaux);
 2339:                                     sem_destroy2(
 2340:                                             semaphore_gestionnaires_signaux,
 2341:                                             getpid(), SEM_SIGNAUX);
 2342:                                     sem_destroy3((*s_etat_processus)
 2343:                                             .semphore_fork, getpid(),
 2344:                                             pthread_self(), SEM_FORK);
 2345: #                                   endif
 2346: 
 2347:                                     liberation_contexte_cas(s_etat_processus);
 2348:                                     liberation_queue_signaux(s_etat_processus);
 2349: 
 2350: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2351:                                     stackoverflow_deinstall_handler();
 2352: #                                   endif
 2353: 
 2354:                                     if ((*s_etat_processus).langue == 'F')
 2355:                                     {
 2356:                                         printf("+++Système : Mémoire "
 2357:                                                 "insuffisante\n");
 2358:                                     }
 2359:                                     else
 2360:                                     {
 2361:                                         printf("+++System : Not enough "
 2362:                                                 "memory\n");
 2363:                                     }
 2364: 
 2365:                                     return(EXIT_FAILURE);
 2366:                                 }
 2367: 
 2368:                                 ptr = type_debug;
 2369: 
 2370:                                 while((*(argv[0]) != '\0') &&
 2371:                                         (*(argv[0]) != ' '))
 2372:                                 {
 2373:                                     *(ptr++) = *(argv[0]++);
 2374:                                 }
 2375: 
 2376:                                 (*ptr) = '\0';
 2377: 
 2378:                                 argv[0]--;
 2379:                             }
 2380:                             else if ((--argc) > 0)
 2381:                             {
 2382:                                 argv++;
 2383: 
 2384:                                 if ((type_debug =
 2385:                                         malloc((strlen(argv[0]) + 1) *
 2386:                                         sizeof(unsigned char))) == NULL)
 2387:                                 {
 2388: #                                   ifndef SEMAPHORES_NOMMES
 2389:                                     sem_post(&((*s_etat_processus)
 2390:                                             .semaphore_fork));
 2391:                                     sem_post(&semaphore_gestionnaires_signaux);
 2392:                                     sem_destroy(
 2393:                                             &semaphore_gestionnaires_signaux);
 2394:                                     sem_destroy(&((*s_etat_processus)
 2395:                                             .semaphore_fork));
 2396: #                                   else
 2397:                                     sem_post((*s_etat_processus)
 2398:                                             .semaphore_fork);
 2399:                                     sem_post(semaphore_gestionnaires_signaux);
 2400:                                     sem_destroy2(
 2401:                                             semaphore_gestionnaires_signaux,
 2402:                                             getpid(), SEM_SIGNAUX);
 2403:                                     sem_destroy3((*s_etat_processus)
 2404:                                             .semphore_fork, getpid(),
 2405:                                             pthread_self(), SEM_FORK);
 2406: #                                   endif
 2407: 
 2408:                                     liberation_contexte_cas(s_etat_processus);
 2409:                                     liberation_queue_signaux(s_etat_processus);
 2410: 
 2411: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2412:                                     stackoverflow_deinstall_handler();
 2413: #                                   endif
 2414: 
 2415:                                     if ((*s_etat_processus).langue == 'F')
 2416:                                     {
 2417:                                         printf("+++Système : Mémoire "
 2418:                                                 "insuffisante\n");
 2419:                                     }
 2420:                                     else
 2421:                                     {
 2422:                                         printf("+++System : Not enough "
 2423:                                                 "memory\n");
 2424:                                     }
 2425: 
 2426:                                     return(EXIT_FAILURE);
 2427:                                 }
 2428: 
 2429:                                 ptr = type_debug;
 2430: 
 2431:                                 while(*(argv[0]) != '\0')
 2432:                                 {
 2433:                                     *(ptr++) = *(argv[0]++);
 2434:                                 }
 2435: 
 2436:                                 (*ptr) = '\0';
 2437: 
 2438:                                 argv[0]--;
 2439:                             }
 2440:                             else
 2441:                             {
 2442: #                               ifndef SEMAPHORES_NOMMES
 2443:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2444:                                 sem_post(&semaphore_gestionnaires_signaux);
 2445:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2446:                                 sem_destroy(&((*s_etat_processus)
 2447:                                         .semaphore_fork));
 2448: #                               else
 2449:                                 sem_post((*s_etat_processus).semaphore_fork);
 2450:                                 sem_post(semaphore_gestionnaires_signaux);
 2451:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2452:                                         getpid(), SEM_SIGNAUX);
 2453:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2454:                                         getpid(), pthread_self(), SEM_FORK);
 2455: #                               endif
 2456: 
 2457:                                 liberation_contexte_cas(s_etat_processus);
 2458:                                 liberation_queue_signaux(s_etat_processus);
 2459: 
 2460: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2461:                                 stackoverflow_deinstall_handler();
 2462: #                               endif
 2463: 
 2464:                                 if ((*s_etat_processus).langue == 'F')
 2465:                                 {
 2466:                                     printf("+++Erreur : Aucun niveau "
 2467:                                             "de débogage spécifié après "
 2468:                                             "l'option -t\n");
 2469:                                 }
 2470:                                 else
 2471:                                 {
 2472:                                     printf("+++Error : Debug level not "
 2473:                                             "specified after -t option\n");
 2474:                                 }
 2475: 
 2476:                                 return(EXIT_FAILURE);
 2477:                             }
 2478: 
 2479:                             ptr = type_debug;
 2480: 
 2481:                             while(*ptr != '\0')
 2482:                             {
 2483:                                 switch(*ptr)
 2484:                                 {
 2485:                                     case '0':
 2486:                                     case '1':
 2487:                                     case '2':
 2488:                                     case '3':
 2489:                                     case '4':
 2490:                                     case '5':
 2491:                                     case '6':
 2492:                                     case '7':
 2493:                                     case '8':
 2494:                                     case '9':
 2495:                                     case 'A':
 2496:                                     case 'B':
 2497:                                     case 'C':
 2498:                                     case 'D':
 2499:                                     case 'E':
 2500:                                     case 'F':
 2501:                                     {
 2502:                                         break;
 2503:                                     }
 2504: 
 2505:                                     default:
 2506:                                     {
 2507: #                                       ifndef SEMAPHORES_NOMMES
 2508:                                         sem_post(&((*s_etat_processus)
 2509:                                                 .semaphore_fork));
 2510:                                         sem_post(
 2511:                                                 &semaphore_gestionnaires_signaux
 2512:                                                 );
 2513:                                         sem_destroy(
 2514:                                                 &semaphore_gestionnaires_signaux
 2515:                                                 );
 2516:                                         sem_destroy(&((*s_etat_processus)
 2517:                                                 .semaphore_fork));
 2518: #                                       else
 2519:                                         sem_post((*s_etat_processus)
 2520:                                                 .semaphore_fork);
 2521:                                         sem_post(
 2522:                                                 semaphore_gestionnaires_signaux
 2523:                                                 );
 2524:                                         sem_destroy2(
 2525:                                                 semaphore_gestionnaires_signaux,
 2526:                                                 getpid(), SEM_SIGNAUX);
 2527:                                         sem_destroy3((*s_etat_processus)
 2528:                                                 .semphore_fork, getpid(),
 2529:                                                 pthread_self(), SEM_FORK);
 2530: #                                       endif
 2531: 
 2532:                                         liberation_contexte_cas(
 2533:                                                 s_etat_processus);
 2534:                                         liberation_queue_signaux(
 2535:                                                 s_etat_processus);
 2536: 
 2537: #                                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2538:                                         stackoverflow_deinstall_handler();
 2539: #                                       endif
 2540: 
 2541:                                         if ((*s_etat_processus).langue == 'F')
 2542:                                         {
 2543:                                             printf("+++Erreur : Niveau "
 2544:                                                     "de débogage non "
 2545:                                                     "hexadécimal\n");
 2546:                                         }
 2547:                                         else
 2548:                                         {
 2549:                                             printf("+++Error : Debug level must"
 2550:                                                     " be hexadecimal "
 2551:                                                     "integer\n");
 2552:                                         }
 2553: 
 2554:                                         return(EXIT_FAILURE);
 2555:                                     }
 2556:                                 }
 2557: 
 2558:                                 ptr++;
 2559:                             }
 2560: 
 2561:                             if (sscanf(type_debug, "%llX",
 2562:                                     &((*s_etat_processus).type_debug)) != 1)
 2563:                             {
 2564: #                               ifndef SEMAPHORES_NOMMES
 2565:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2566:                                 sem_post(&semaphore_gestionnaires_signaux);
 2567:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2568:                                 sem_destroy(&((*s_etat_processus)
 2569:                                         .semaphore_fork));
 2570: #                               else
 2571:                                 sem_post((*s_etat_processus).semaphore_fork);
 2572:                                 sem_post(semaphore_gestionnaires_signaux);
 2573:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2574:                                         getpid(), SEM_SIGNAUX);
 2575:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2576:                                         getpid(), pthread_self(), SEM_FORK);
 2577: #                               endif
 2578: 
 2579:                                 liberation_contexte_cas(s_etat_processus);
 2580:                                 liberation_queue_signaux(s_etat_processus);
 2581: 
 2582: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2583:                                 stackoverflow_deinstall_handler();
 2584: #                               endif
 2585: 
 2586:                                 if ((*s_etat_processus).langue == 'F')
 2587:                                 {
 2588:                                     printf("+++Erreur : Niveau "
 2589:                                             "de débogage non entier\n");
 2590:                                 }
 2591:                                 else
 2592:                                 {
 2593:                                     printf("+++Error : Debug level must"
 2594:                                             " be integer\n");
 2595:                                 }
 2596: 
 2597:                                 return(EXIT_FAILURE);
 2598:                             }
 2599: 
 2600:                             free(type_debug);
 2601:                             break;
 2602:                         }
 2603: 
 2604:                         case 'v' :
 2605:                         {
 2606:                             if (option_v == d_vrai)
 2607:                             {
 2608: #                               ifndef SEMAPHORES_NOMMES
 2609:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 2610:                                 sem_post(&semaphore_gestionnaires_signaux);
 2611:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 2612:                                 sem_destroy(&((*s_etat_processus)
 2613:                                         .semaphore_fork));
 2614: #                               else
 2615:                                 sem_post((*s_etat_processus).semaphore_fork);
 2616:                                 sem_post(semaphore_gestionnaires_signaux);
 2617:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 2618:                                         getpid(), SEM_SIGNAUX);
 2619:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 2620:                                         getpid(), pthread_self(), SEM_FORK);
 2621: #                               endif
 2622: 
 2623:                                 liberation_contexte_cas(s_etat_processus);
 2624:                                 liberation_queue_signaux(s_etat_processus);
 2625: 
 2626: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2627:                                 stackoverflow_deinstall_handler();
 2628: #                               endif
 2629: 
 2630:                                 if ((*s_etat_processus).langue == 'F')
 2631:                                 {
 2632:                                     printf("+++Erreur : option -v présente "
 2633:                                             "plus d'une fois\n");
 2634:                                 }
 2635:                                 else
 2636:                                 {
 2637:                                     printf("+++Error : more than one -v "
 2638:                                             "on command line");
 2639:                                 }
 2640: 
 2641:                                 return(EXIT_FAILURE);
 2642:                             }
 2643: 
 2644:                             option_v = d_vrai;
 2645:                             printf("\n");
 2646: 
 2647:                             if ((*s_etat_processus).langue == 'F')
 2648:                             {
 2649:                                 printf("  Reverse Polish Lisp/2 version %s "
 2650:                                         "pour systèmes "
 2651:                                         "POSIX\n", d_version_rpl);
 2652:                                 printf("      Langage procédural de très haut "
 2653:                                         "niveau, semi-compilé, "
 2654:                                         "extensible,\n");
 2655:                                 printf("      destiné principalement aux "
 2656:                                         "calculs scientifiques et "
 2657:                                         "symboliques\n");
 2658:                                 printf("%s\n", copyright);
 2659:                             }
 2660:                             else
 2661:                             {
 2662:                                 printf("  Reverse Polish Lisp/2 version %s "
 2663:                                         "for POSIX operating systems\n",
 2664:                                         d_version_rpl);
 2665:                                 printf("      Half-compiled, high-level "
 2666:                                         "procedural language,\n");
 2667:                                 printf("      mainly aiming at scientific "
 2668:                                         "calculations\n");
 2669:                                 printf("%s\n", copyright_anglais);
 2670:                             }
 2671: 
 2672:                             printf("\n");
 2673:                             break;
 2674:                         }
 2675: 
 2676:                         case '-':
 2677:                         case ' ':
 2678:                         {
 2679:                             break;
 2680:                         }
 2681: 
 2682:                         default :
 2683:                         {
 2684:                             if ((*s_etat_processus).langue == 'F')
 2685:                             {
 2686:                                 printf("+++Information : Option -%c inconnue\n",
 2687:                                         option);
 2688:                             }
 2689:                             else
 2690:                             {
 2691:                                 printf("+++Warning : -%c option unknown\n",
 2692:                                         option);
 2693:                             }
 2694: 
 2695:                             informations(s_etat_processus);
 2696:                             break;
 2697:                         }
 2698:                     }
 2699:                 }
 2700:             }
 2701:             else
 2702:             {
 2703:                 if (presence_definition == 'O')
 2704:                 {
 2705:                     argc = 0;
 2706: 
 2707:                     if ((*s_etat_processus).langue == 'F')
 2708:                     {
 2709:                         printf("+++Erreur : Plusieurs définitions\n");
 2710:                     }
 2711:                     else
 2712:                     {
 2713:                         printf("+++Error : More than one definition\n");
 2714:                     }
 2715: 
 2716:                     erreur = d_erreur;
 2717:                 }
 2718:                 else
 2719:                 {
 2720:                     (*s_etat_processus).nom_fichier_source = argv[0];
 2721:                     presence_definition = 'O';
 2722:                 }
 2723:             }
 2724:         }
 2725: 
 2726:         /*
 2727:          * Dans le cas où le programme est appelé avec l'option -d,
 2728:          * on ne récupère par les signaux de violation d'accès. On
 2729:          * tente simplement la récupération des dépassements de pile.
 2730:          */
 2731: 
 2732:         if (debug == d_faux)
 2733:         {
 2734: #   ifdef HAVE_SIGSEGV_RECOVERY
 2735:             if (sigsegv_install_handler(interruption_violation_access) != 0)
 2736:             {
 2737: #               ifndef SEMAPHORES_NOMMES
 2738:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2739:                     sem_post(&semaphore_gestionnaires_signaux);
 2740:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2741:                     sem_destroy(&((*s_etat_processus)
 2742:                             .semaphore_fork));
 2743: #               else
 2744:                     sem_post((*s_etat_processus).semaphore_fork);
 2745:                     sem_post(semaphore_gestionnaires_signaux);
 2746:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2747:                             getpid(), SEM_SIGNAUX);
 2748:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2749:                             getpid(), pthread_self(), SEM_FORK);
 2750: #               endif
 2751: 
 2752:                 liberation_contexte_cas(s_etat_processus);
 2753:                 liberation_queue_signaux(s_etat_processus);
 2754: 
 2755: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2756:                     stackoverflow_deinstall_handler();
 2757: #               endif
 2758: 
 2759:                 erreur = d_es_signal;
 2760: 
 2761:                 if ((*s_etat_processus).langue == 'F')
 2762:                 {
 2763:                     printf("+++Système : Initialisation de la pile alternative "
 2764:                             "impossible\n");
 2765:                 }
 2766:                 else
 2767:                 {
 2768:                     printf("+++System : Initialization of alternate "
 2769:                             "stack failed\n");
 2770:                 }
 2771: 
 2772:                 return(EXIT_FAILURE);
 2773:             }
 2774: #   else
 2775:             action.sa_handler = interruption3;
 2776:             action.sa_flags = 0;
 2777: 
 2778:             if (sigaction(SIGSEGV, &action, NULL) != 0)
 2779:             {
 2780: #               ifndef SEMAPHORES_NOMMES
 2781:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2782:                     sem_post(&semaphore_gestionnaires_signaux);
 2783:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2784:                     sem_destroy(&((*s_etat_processus)
 2785:                             .semaphore_fork));
 2786: #               else
 2787:                     sem_post((*s_etat_processus).semaphore_fork);
 2788:                     sem_post(semaphore_gestionnaires_signaux);
 2789:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2790:                             getpid(), SEM_SIGNAUX);
 2791:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2792:                             getpid(), pthread_self(), SEM_FORK);
 2793: #               endif
 2794: 
 2795:                 liberation_contexte_cas(s_etat_processus);
 2796:                 liberation_queue_signaux(s_etat_processus);
 2797: 
 2798: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2799:                     stackoverflow_deinstall_handler();
 2800: #               endif
 2801: 
 2802:                 if ((*s_etat_processus).langue == 'F')
 2803:                 {
 2804:                     printf("+++Système : Initialisation des signaux POSIX "
 2805:                             "impossible\n");
 2806:                 }
 2807:                 else
 2808:                 {
 2809:                     printf("+++System : Initialization of POSIX signals "
 2810:                             "failed\n");
 2811:                 }
 2812: 
 2813:                 return(EXIT_FAILURE);
 2814:             }
 2815: 
 2816:             signal_test = SIGTEST;
 2817:             raise(SIGSEGV);
 2818: 
 2819:             attente.tv_sec = 0;
 2820:             attente.tv_nsec = 1000000;
 2821: 
 2822:             for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
 2823:             {
 2824:                 nanosleep(&attente, NULL);
 2825:             }
 2826: 
 2827:             if (signal_test != SIGSEGV)
 2828:             {
 2829: #               ifndef SEMAPHORES_NOMMES
 2830:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2831:                     sem_post(&semaphore_gestionnaires_signaux);
 2832:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2833:                     sem_destroy(&((*s_etat_processus)
 2834:                             .semaphore_fork));
 2835: #               else
 2836:                     sem_post((*s_etat_processus).semaphore_fork);
 2837:                     sem_post(semaphore_gestionnaires_signaux);
 2838:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2839:                             getpid(), SEM_SIGNAUX);
 2840:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2841:                             getpid(), pthread_self(), SEM_FORK);
 2842: #               endif
 2843: 
 2844:                 liberation_contexte_cas(s_etat_processus);
 2845:                 liberation_queue_signaux(s_etat_processus);
 2846: 
 2847: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2848:                     stackoverflow_deinstall_handler();
 2849: #               endif
 2850: 
 2851:                 erreur = d_es_signal;
 2852: 
 2853:                 if ((*s_etat_processus).langue == 'F')
 2854:                 {
 2855:                     printf("+++Système : Initialisation des signaux POSIX "
 2856:                             "impossible\n");
 2857:                 }
 2858:                 else
 2859:                 {
 2860:                     printf("+++System : Initialization of POSIX signals "
 2861:                             "failed\n");
 2862:                 }
 2863: 
 2864:                 return(EXIT_FAILURE);
 2865:             }
 2866: #   endif
 2867: 
 2868:             action.sa_handler = interruption3;
 2869:             action.sa_flags = 0;
 2870: 
 2871:             if (sigaction(SIGBUS, &action, NULL) != 0)
 2872:             {
 2873: #               ifndef SEMAPHORES_NOMMES
 2874:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2875:                     sem_post(&semaphore_gestionnaires_signaux);
 2876:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2877:                     sem_destroy(&((*s_etat_processus)
 2878:                             .semaphore_fork));
 2879: #               else
 2880:                     sem_post((*s_etat_processus).semaphore_fork);
 2881:                     sem_post(semaphore_gestionnaires_signaux);
 2882:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2883:                             getpid(), SEM_SIGNAUX);
 2884:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2885:                             getpid(), pthread_self(), SEM_FORK);
 2886: #               endif
 2887: 
 2888:                 liberation_contexte_cas(s_etat_processus);
 2889:                 liberation_queue_signaux(s_etat_processus);
 2890: 
 2891: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2892:                     stackoverflow_deinstall_handler();
 2893: #               endif
 2894: 
 2895: #               ifdef HAVE_SIGSEGV_RECOVERY
 2896:                     if (debug == d_faux)
 2897:                     {
 2898:                         sigsegv_deinstall_handler();
 2899:                     }
 2900: #               endif
 2901: 
 2902:                 if ((*s_etat_processus).langue == 'F')
 2903:                 {
 2904:                     printf("+++Système : Initialisation des signaux POSIX "
 2905:                             "impossible\n");
 2906:                 }
 2907:                 else
 2908:                 {
 2909:                     printf("+++System : Initialization of POSIX signals "
 2910:                             "failed\n");
 2911:                 }
 2912: 
 2913:                 return(EXIT_FAILURE);
 2914:             }
 2915: 
 2916:             signal_test = SIGTEST;
 2917:             raise(SIGBUS);
 2918: 
 2919:             attente.tv_sec = 0;
 2920:             attente.tv_nsec = 1000000;
 2921: 
 2922:             for(i = 0; (i < 1000) && (signal_test == SIGTEST); i++)
 2923:             {
 2924:                 nanosleep(&attente, NULL);
 2925:             }
 2926: 
 2927:             if (signal_test != SIGBUS)
 2928:             {
 2929: #               ifndef SEMAPHORES_NOMMES
 2930:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2931:                     sem_post(&semaphore_gestionnaires_signaux);
 2932:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2933:                     sem_destroy(&((*s_etat_processus)
 2934:                             .semaphore_fork));
 2935: #               else
 2936:                     sem_post((*s_etat_processus).semaphore_fork);
 2937:                     sem_post(semaphore_gestionnaires_signaux);
 2938:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2939:                             getpid(), SEM_SIGNAUX);
 2940:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2941:                             getpid(), pthread_self(), SEM_FORK);
 2942: #               endif
 2943: 
 2944:                 liberation_contexte_cas(s_etat_processus);
 2945:                 liberation_queue_signaux(s_etat_processus);
 2946: 
 2947: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 2948:                     stackoverflow_deinstall_handler();
 2949: #               endif
 2950: 
 2951: #               ifdef HAVE_SIGSEGV_RECOVERY
 2952:                     if (debug == d_faux)
 2953:                     {
 2954:                         sigsegv_deinstall_handler();
 2955:                     }
 2956: #               endif
 2957: 
 2958:                 erreur = d_es_signal;
 2959: 
 2960:                 if ((*s_etat_processus).langue == 'F')
 2961:                 {
 2962:                     printf("+++Système : Initialisation des signaux POSIX "
 2963:                             "impossible\n");
 2964:                 }
 2965:                 else
 2966:                 {
 2967:                     printf("+++System : Initialization of POSIX signals "
 2968:                             "failed\n");
 2969:                 }
 2970: 
 2971:                 return(EXIT_FAILURE);
 2972:             }
 2973: 
 2974:         }
 2975: 
 2976:         if (option_n == d_vrai)
 2977:         {
 2978:             action.sa_handler = interruption4;
 2979:             action.sa_flags = 0;
 2980: 
 2981:             if (sigaction(SIGHUP, &action, NULL) != 0)
 2982:             {
 2983: #               ifndef SEMAPHORES_NOMMES
 2984:                     sem_post(&((*s_etat_processus).semaphore_fork));
 2985:                     sem_post(&semaphore_gestionnaires_signaux);
 2986:                     sem_destroy(&semaphore_gestionnaires_signaux);
 2987:                     sem_destroy(&((*s_etat_processus)
 2988:                             .semaphore_fork));
 2989: #               else
 2990:                     sem_post((*s_etat_processus).semaphore_fork);
 2991:                     sem_post(semaphore_gestionnaires_signaux);
 2992:                     sem_destroy2(semaphore_gestionnaires_signaux,
 2993:                             getpid(), SEM_SIGNAUX);
 2994:                     sem_destroy3((*s_etat_processus).semphore_fork,
 2995:                             getpid(), pthread_self(), SEM_FORK);
 2996: #               endif
 2997: 
 2998:                 liberation_contexte_cas(s_etat_processus);
 2999:                 liberation_queue_signaux(s_etat_processus);
 3000: 
 3001: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3002:                     stackoverflow_deinstall_handler();
 3003: #               endif
 3004: 
 3005: #               ifdef HAVE_SIGSEGV_RECOVERY
 3006:                     if (debug == d_faux)
 3007:                     {
 3008:                         sigsegv_deinstall_handler();
 3009:                     }
 3010: #               endif
 3011: 
 3012:                 if ((*s_etat_processus).langue == 'F')
 3013:                 {
 3014:                     printf("+++Système : Initialisation des signaux POSIX "
 3015:                             "impossible\n");
 3016:                 }
 3017:                 else
 3018:                 {
 3019:                     printf("+++System : Initialization of POSIX signals "
 3020:                             "failed\n");
 3021:                 }
 3022: 
 3023:                 return(EXIT_FAILURE);
 3024:             }
 3025:         }
 3026: 
 3027:         if (mode_interactif == d_vrai)
 3028:         {
 3029:             printf("\n");
 3030: 
 3031:             if ((*s_etat_processus).langue == 'F')
 3032:             {
 3033:                 printf("+++Ce logiciel est un logiciel libre"
 3034:                         " sans aucune garantie de "
 3035:                         "fonctionnement.\n");
 3036:                 printf("+++Pour plus de détails, utilisez la "
 3037:                         "commande 'warranty'.\n");
 3038:             }
 3039:             else
 3040:             {
 3041:                 printf("+++This is a free software with "
 3042:                         "absolutely no warranty.\n");
 3043:                 printf("+++For details, type 'warranty'.\n");
 3044:             }
 3045: 
 3046:             printf("\n");
 3047: 
 3048:             traitement_fichier_temporaire = 'Y';
 3049: 
 3050:             if ((nom_fichier_temporaire =
 3051:                     creation_nom_fichier(s_etat_processus, (*s_etat_processus)
 3052:                     .chemin_fichiers_temporaires)) == NULL)
 3053:             {
 3054: #               ifndef SEMAPHORES_NOMMES
 3055:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3056:                     sem_post(&semaphore_gestionnaires_signaux);
 3057:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3058:                     sem_destroy(&((*s_etat_processus)
 3059:                             .semaphore_fork));
 3060: #               else
 3061:                     sem_post((*s_etat_processus).semaphore_fork);
 3062:                     sem_post(semaphore_gestionnaires_signaux);
 3063:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3064:                             getpid(), SEM_SIGNAUX);
 3065:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3066:                             getpid(), pthread_self(), SEM_FORK);
 3067: #               endif
 3068: 
 3069:                 liberation_contexte_cas(s_etat_processus);
 3070:                 liberation_queue_signaux(s_etat_processus);
 3071: 
 3072: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3073:                     stackoverflow_deinstall_handler();
 3074: #               endif
 3075: 
 3076: #               ifdef HAVE_SIGSEGV_RECOVERY
 3077:                     if (debug == d_faux)
 3078:                     {
 3079:                         sigsegv_deinstall_handler();
 3080:                     }
 3081: #               endif
 3082: 
 3083:                 if ((*s_etat_processus).langue == 'F')
 3084:                 {
 3085:                     printf("+++Système : Fichier indisponible\n");
 3086:                 }
 3087:                 else
 3088:                 {
 3089:                     printf("+++System : File unavailable\n");
 3090:                 }
 3091: 
 3092:                 return(EXIT_FAILURE);
 3093:             }
 3094: 
 3095:             if ((f_source = fopen(nom_fichier_temporaire, "w"))
 3096:                     == NULL)
 3097:             {
 3098: #               ifndef SEMAPHORES_NOMMES
 3099:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3100:                     sem_post(&semaphore_gestionnaires_signaux);
 3101:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3102:                     sem_destroy(&((*s_etat_processus)
 3103:                             .semaphore_fork));
 3104: #               else
 3105:                     sem_post((*s_etat_processus).semaphore_fork);
 3106:                     sem_post(semaphore_gestionnaires_signaux);
 3107:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3108:                             getpid(), SEM_SIGNAUX);
 3109:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3110:                             getpid(), pthread_self(), SEM_FORK);
 3111: #               endif
 3112: 
 3113:                 liberation_contexte_cas(s_etat_processus);
 3114:                 liberation_queue_signaux(s_etat_processus);
 3115: 
 3116: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3117:                     stackoverflow_deinstall_handler();
 3118: #               endif
 3119: 
 3120: #               ifdef HAVE_SIGSEGV_RECOVERY
 3121:                     if (debug == d_faux)
 3122:                     {
 3123:                         sigsegv_deinstall_handler();
 3124:                     }
 3125: #               endif
 3126: 
 3127:                 if ((*s_etat_processus).langue == 'F')
 3128:                 {
 3129:                     printf("+++Système : Fichier introuvable\n");
 3130:                 }
 3131:                 else
 3132:                 {
 3133:                     printf("+++System : File not found\n");
 3134:                 }
 3135: 
 3136:                 return(EXIT_FAILURE);
 3137:             }
 3138: 
 3139:             if (fprintf(f_source, "MODE_INTERACTIF\n") < 0)
 3140:             {
 3141: #               ifndef SEMAPHORES_NOMMES
 3142:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3143:                     sem_post(&semaphore_gestionnaires_signaux);
 3144:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3145:                     sem_destroy(&((*s_etat_processus)
 3146:                             .semaphore_fork));
 3147: #               else
 3148:                     sem_post((*s_etat_processus).semaphore_fork);
 3149:                     sem_post(semaphore_gestionnaires_signaux);
 3150:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3151:                             getpid(), SEM_SIGNAUX);
 3152:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3153:                             getpid(), pthread_self(), SEM_FORK);
 3154: #               endif
 3155: 
 3156:                 liberation_contexte_cas(s_etat_processus);
 3157:                 liberation_queue_signaux(s_etat_processus);
 3158: 
 3159: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3160:                     stackoverflow_deinstall_handler();
 3161: #               endif
 3162: 
 3163: #               ifdef HAVE_SIGSEGV_RECOVERY
 3164:                     if (debug == d_faux)
 3165:                     {
 3166:                         sigsegv_deinstall_handler();
 3167:                     }
 3168: #               endif
 3169: 
 3170:                 if ((*s_etat_processus).langue == 'F')
 3171:                 {
 3172:                     printf("+++Système : Erreur d'écriture dans un fichier\n");
 3173:                 }
 3174:                 else
 3175:                 {
 3176:                     printf("+++System : Cannot write in file\n");
 3177:                 }
 3178: 
 3179:                 return(EXIT_FAILURE);
 3180:             }
 3181: 
 3182:             if (fprintf(f_source,
 3183:                     "<< DO HALT UNTIL FALSE END >>\n") < 0)
 3184:             {
 3185: #               ifndef SEMAPHORES_NOMMES
 3186:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3187:                     sem_post(&semaphore_gestionnaires_signaux);
 3188:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3189:                     sem_destroy(&((*s_etat_processus)
 3190:                             .semaphore_fork));
 3191: #               else
 3192:                     sem_post((*s_etat_processus).semaphore_fork);
 3193:                     sem_post(semaphore_gestionnaires_signaux);
 3194:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3195:                             getpid(), SEM_SIGNAUX);
 3196:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3197:                             getpid(), pthread_self(), SEM_FORK);
 3198: #               endif
 3199: 
 3200:                 liberation_contexte_cas(s_etat_processus);
 3201:                 liberation_queue_signaux(s_etat_processus);
 3202: 
 3203: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3204:                     stackoverflow_deinstall_handler();
 3205: #               endif
 3206: 
 3207: #               ifdef HAVE_SIGSEGV_RECOVERY
 3208:                     if (debug == d_faux)
 3209:                     {
 3210:                         sigsegv_deinstall_handler();
 3211:                     }
 3212: #               endif
 3213: 
 3214:                 if ((*s_etat_processus).langue == 'F')
 3215:                 {
 3216:                     printf("+++Système : Erreur d'écriture dans un fichier\n");
 3217:                 }
 3218:                 else
 3219:                 {
 3220:                     printf("+++System : Cannot write in file\n");
 3221:                 }
 3222: 
 3223:                 return(EXIT_FAILURE);
 3224:             }
 3225: 
 3226:             if (fclose(f_source) != 0)
 3227:             {
 3228: #               ifndef SEMAPHORES_NOMMES
 3229:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3230:                     sem_post(&semaphore_gestionnaires_signaux);
 3231:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3232:                     sem_destroy(&((*s_etat_processus)
 3233:                             .semaphore_fork));
 3234: #               else
 3235:                     sem_post((*s_etat_processus).semaphore_fork);
 3236:                     sem_post(semaphore_gestionnaires_signaux);
 3237:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3238:                             getpid(), SEM_SIGNAUX);
 3239:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3240:                             getpid(), pthread_self(), SEM_FORK);
 3241: #               endif
 3242: 
 3243:                 liberation_contexte_cas(s_etat_processus);
 3244:                 liberation_queue_signaux(s_etat_processus);
 3245: 
 3246: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3247:                     stackoverflow_deinstall_handler();
 3248: #               endif
 3249: 
 3250: #               ifdef HAVE_SIGSEGV_RECOVERY
 3251:                     if (debug == d_faux)
 3252:                     {
 3253:                         sigsegv_deinstall_handler();
 3254:                     }
 3255: #               endif
 3256: 
 3257:                 if ((*s_etat_processus).langue == 'F')
 3258:                 {
 3259:                     printf("+++Système : Fichier indisponible\n");
 3260:                 }
 3261:                 else
 3262:                 {
 3263:                     printf("+++System : File unavailable\n");
 3264:                 }
 3265: 
 3266:                 return(EXIT_FAILURE);
 3267:             }
 3268: 
 3269:             (*s_etat_processus).lancement_interactif = d_vrai;
 3270:             (*s_etat_processus).nom_fichier_source =
 3271:                     nom_fichier_temporaire;
 3272: 
 3273:             presence_definition = 'O';
 3274:         }
 3275:         else
 3276:         {
 3277:             nom_fichier_temporaire = NULL;
 3278:         }
 3279: 
 3280:         if ((*s_etat_processus).nom_fichier_source == NULL)
 3281:         {
 3282:             erreur_fichier = d_erreur;
 3283:         }
 3284:         else
 3285:         {
 3286:             erreur_fichier = caracteristiques_fichier(s_etat_processus,
 3287:                     (*s_etat_processus).nom_fichier_source,
 3288:                     &existence, &ouverture, &unite_fichier);
 3289:         }
 3290: 
 3291:         if (((existence == d_faux) || (erreur_fichier != d_absence_erreur)) &&
 3292:                 (option_S == d_faux))
 3293:         {
 3294: #           ifndef SEMAPHORES_NOMMES
 3295:                 sem_post(&((*s_etat_processus).semaphore_fork));
 3296:                 sem_post(&semaphore_gestionnaires_signaux);
 3297:                 sem_destroy(&semaphore_gestionnaires_signaux);
 3298:                 sem_destroy(&((*s_etat_processus).semaphore_fork));
 3299: #           else
 3300:                 sem_post((*s_etat_processus).semaphore_fork);
 3301:                 sem_post(semaphore_gestionnaires_signaux);
 3302:                 sem_destroy2(semaphore_gestionnaires_signaux,
 3303:                         getpid(), SEM_SIGNAUX);
 3304:                 sem_destroy3((*s_etat_processus).semphore_fork,
 3305:                         getpid(), pthread_self(), SEM_FORK);
 3306: #           endif
 3307: 
 3308:             liberation_contexte_cas(s_etat_processus);
 3309:             liberation_queue_signaux(s_etat_processus);
 3310: 
 3311: #           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3312:                 stackoverflow_deinstall_handler();
 3313: #           endif
 3314: 
 3315: #           ifdef HAVE_SIGSEGV_RECOVERY
 3316:                 if (debug == d_faux)
 3317:                 {
 3318:                     sigsegv_deinstall_handler();
 3319:                 }
 3320: #           endif
 3321: 
 3322:             if (presence_definition == 'O')
 3323:             {
 3324:                 if ((*s_etat_processus).langue == 'F')
 3325:                 {
 3326:                     printf("+++Erreur : Fichier %s inexistant\n",
 3327:                             (*s_etat_processus).nom_fichier_source);
 3328:                 }
 3329:                 else
 3330:                 {
 3331:                     printf("+++Error : File %s not found\n",
 3332:                             (*s_etat_processus).nom_fichier_source);
 3333:                 }
 3334: 
 3335:                 erreur = d_erreur;
 3336:             }
 3337:             else
 3338:             {
 3339:                 if ((*s_etat_processus).langue == 'F')
 3340:                 {
 3341:                     printf("+++Erreur : Absence de définition à exécuter\n");
 3342:                 }
 3343:                 else
 3344:                 {
 3345:                     printf("+++Error : Any executable definition\n");
 3346:                 }
 3347:             }
 3348: 
 3349:             return(EXIT_FAILURE);
 3350:         }
 3351: 
 3352:         if ((*s_etat_processus).chemin_fichiers_temporaires == NULL)
 3353:         {
 3354: #           ifndef SEMAPHORES_NOMMES
 3355:                 sem_post(&((*s_etat_processus).semaphore_fork));
 3356:                 sem_post(&semaphore_gestionnaires_signaux);
 3357:                 sem_destroy(&semaphore_gestionnaires_signaux);
 3358:                 sem_destroy(&((*s_etat_processus).semaphore_fork));
 3359: #           else
 3360:                 sem_post((*s_etat_processus).semaphore_fork);
 3361:                 sem_post(semaphore_gestionnaires_signaux);
 3362:                 sem_destroy2(semaphore_gestionnaires_signaux,
 3363:                         getpid(), SEM_SIGNAUX);
 3364:                 sem_destroy3((*s_etat_processus).semphore_fork,
 3365:                         getpid(), pthread_self(), SEM_FORK);
 3366: #           endif
 3367: 
 3368:             liberation_contexte_cas(s_etat_processus);
 3369:             liberation_queue_signaux(s_etat_processus);
 3370: 
 3371: #           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3372:                 stackoverflow_deinstall_handler();
 3373: #           endif
 3374: 
 3375: #           ifdef HAVE_SIGSEGV_RECOVERY
 3376:                 if (debug == d_faux)
 3377:                 {
 3378:                     sigsegv_deinstall_handler();
 3379:                 }
 3380: #           endif
 3381: 
 3382:             if ((*s_etat_processus).langue == 'F')
 3383:             {
 3384:                 printf("+++Système : Chemin des fichiers temporaires nul\n");
 3385:             }
 3386:             else
 3387:             {
 3388:                 printf("+++System : Null temporary files path\n");
 3389:             }
 3390: 
 3391:             return(EXIT_FAILURE);
 3392:         }
 3393: 
 3394:         if ((*s_etat_processus).debug == d_vrai)
 3395:         {
 3396:             if ((*s_etat_processus).langue == 'F')
 3397:             {
 3398:                 printf("[%d] Chemin des fichiers temporaires %s\n\n",
 3399:                         (int) getpid(),
 3400:                         (*s_etat_processus).chemin_fichiers_temporaires);
 3401:             }
 3402:             else
 3403:             {
 3404:                 printf("[%d] Temporary files path %s\n\n",
 3405:                         (int) getpid(),
 3406:                         (*s_etat_processus).chemin_fichiers_temporaires);
 3407:             }
 3408:         }
 3409: 
 3410:         if ((erreur == d_absence_erreur) && (presence_definition == 'O'))
 3411:         {
 3412:             (*s_etat_processus).profilage = (option_P != 0) ? d_vrai : d_faux;
 3413:             (*s_etat_processus).niveau_profilage = option_P;
 3414:             (*s_etat_processus).pile_profilage = NULL;
 3415:             (*s_etat_processus).pile_profilage_fonctions = NULL;
 3416:             gettimeofday(&((*s_etat_processus).horodatage_profilage), NULL);
 3417: 
 3418:             (*s_etat_processus).liste_mutexes = NULL;
 3419:             (*s_etat_processus).sections_critiques = 0;
 3420:             (*s_etat_processus).initialisation_scheduler = d_faux;
 3421: 
 3422:             (*s_etat_processus).test_instruction = 'N';
 3423:             (*s_etat_processus).nombre_arguments = 0;
 3424:             (*s_etat_processus).affichage_arguments = 'N';
 3425:             (*s_etat_processus).autorisation_conversion_chaine = 'Y';
 3426:             (*s_etat_processus).autorisation_evaluation_nom = 'Y';
 3427: 
 3428:             if (mode_interactif == d_vrai)
 3429:             {
 3430:                 (*s_etat_processus).autorisation_nom_implicite = 'Y';
 3431:             }
 3432:             else
 3433:             {
 3434:                 (*s_etat_processus).autorisation_nom_implicite = 'N';
 3435:             }
 3436: 
 3437:             (*s_etat_processus).autorisation_empilement_programme = 'N';
 3438:             (*s_etat_processus).requete_arret = 'N';
 3439:             (*s_etat_processus).evaluation_forcee = 'N';
 3440:             (*s_etat_processus).recherche_type = 'N';
 3441: 
 3442:             (*s_etat_processus).constante_symbolique = 'N';
 3443:             (*s_etat_processus).traitement_symbolique = 'N';
 3444: 
 3445:             (*s_etat_processus).expression_courante = NULL;
 3446:             (*s_etat_processus).objet_courant = NULL;
 3447:             (*s_etat_processus).evaluation_expression_compilee = 'N';
 3448: 
 3449:             (*s_etat_processus).l_base_pile = NULL;
 3450:             (*s_etat_processus).l_base_pile_last = NULL;
 3451: 
 3452:             (*s_etat_processus).s_arbre_variables = NULL;
 3453:             (*s_etat_processus).l_liste_variables_par_niveau = NULL;
 3454:             (*s_etat_processus).l_liste_variables_statiques = NULL;
 3455:             (*s_etat_processus).gel_liste_variables = d_faux;
 3456:             s_arbre_variables_partagees = NULL;
 3457:             l_liste_variables_partagees = NULL;
 3458:             (*s_etat_processus).s_arbre_variables_partagees =
 3459:                     &s_arbre_variables_partagees;
 3460:             (*s_etat_processus).l_liste_variables_partagees =
 3461:                     &l_liste_variables_partagees;
 3462:             (*s_etat_processus).pointeur_variable_courante = NULL;
 3463:             (*s_etat_processus).pointeur_variable_statique_courante = NULL;
 3464:             (*s_etat_processus).pointeur_variable_partagee_courante = NULL;
 3465:             (*s_etat_processus).niveau_courant = 0;
 3466:             (*s_etat_processus).niveau_initial = 0;
 3467:             (*s_etat_processus).creation_variables_statiques = d_faux;
 3468:             (*s_etat_processus).creation_variables_partagees = d_faux;
 3469: 
 3470:             (*s_etat_processus).s_bibliotheques = NULL;
 3471:             (*s_etat_processus).s_instructions_externes = NULL;
 3472:             (*s_etat_processus).nombre_instructions_externes = 0;
 3473: 
 3474:             (*s_etat_processus).systeme_axes = 0;
 3475: 
 3476:             (*s_etat_processus).x_min = -10.;
 3477:             (*s_etat_processus).x_max = 10.;
 3478:             (*s_etat_processus).y_min = -10.;
 3479:             (*s_etat_processus).y_max = 10.;
 3480:             (*s_etat_processus).z_min = -10.;
 3481:             (*s_etat_processus).z_max = 10.;
 3482: 
 3483:             (*s_etat_processus).x2_min = -10.;
 3484:             (*s_etat_processus).x2_max = 10.;
 3485:             (*s_etat_processus).y2_min = -10.;
 3486:             (*s_etat_processus).y2_max = 10.;
 3487:             (*s_etat_processus).z2_min = -10.;
 3488:             (*s_etat_processus).z2_max = 10.;
 3489: 
 3490:             (*s_etat_processus).resolution = .01;
 3491: 
 3492:             (*s_etat_processus).souris_active = d_faux;
 3493: 
 3494:             (*s_etat_processus).echelle_automatique_x = d_faux;
 3495:             (*s_etat_processus).echelle_automatique_y = d_faux;
 3496:             (*s_etat_processus).echelle_automatique_z = d_faux;
 3497: 
 3498:             (*s_etat_processus).echelle_automatique_x2 = d_faux;
 3499:             (*s_etat_processus).echelle_automatique_y2 = d_faux;
 3500:             (*s_etat_processus).echelle_automatique_z2 = d_faux;
 3501: 
 3502:             (*s_etat_processus).echelle_log_x = d_faux;
 3503:             (*s_etat_processus).echelle_log_y = d_faux;
 3504:             (*s_etat_processus).echelle_log_z = d_faux;
 3505: 
 3506:             (*s_etat_processus).echelle_log_x2 = d_faux;
 3507:             (*s_etat_processus).echelle_log_y2 = d_faux;
 3508:             (*s_etat_processus).echelle_log_z2 = d_faux;
 3509: 
 3510:             (*s_etat_processus).point_de_vue_theta = 4 * atan((real8) 1) / 6;
 3511:             (*s_etat_processus).point_de_vue_phi = 4 * atan((real8) 1) / 3;
 3512:             (*s_etat_processus).echelle_3D = 1;
 3513: 
 3514:             strcpy((*s_etat_processus).type_trace_eq, "FONCTION");
 3515:             strcpy((*s_etat_processus).type_trace_sigma, "POINTS");
 3516:             (*s_etat_processus).fichiers_graphiques = NULL;
 3517:             (*s_etat_processus).nom_fichier_impression = NULL;
 3518:             strcpy((*s_etat_processus).format_papier, "a4paper");
 3519:             (*s_etat_processus).entree_standard = NULL;
 3520:             (*s_etat_processus).s_marques = NULL;
 3521:             (*s_etat_processus).requete_nouveau_plan = d_vrai;
 3522:             (*s_etat_processus).mise_a_jour_trace_requise = d_faux;
 3523: 
 3524:             (*s_etat_processus).l_base_pile = NULL;
 3525:             (*s_etat_processus).hauteur_pile_operationnelle = 0;
 3526:             (*s_etat_processus).l_base_pile_contextes = NULL;
 3527:             (*s_etat_processus).l_base_pile_taille_contextes = NULL;
 3528: 
 3529:             (*s_etat_processus).position_courante = 0;
 3530: 
 3531:             (*s_etat_processus).l_base_pile_systeme = NULL;
 3532:             (*s_etat_processus).hauteur_pile_systeme = 0;
 3533: 
 3534:             (*s_etat_processus).l_base_pile_processus = NULL;
 3535:             (*s_etat_processus).presence_pipes = d_faux;
 3536:             (*s_etat_processus).pipe_donnees = 0;
 3537:             (*s_etat_processus).pipe_acquittement = 0;
 3538:             (*s_etat_processus).pipe_injections = 0;
 3539:             (*s_etat_processus).pipe_nombre_injections = 0;
 3540:             (*s_etat_processus).nombre_objets_injectes = 0;
 3541:             (*s_etat_processus).nombre_objets_envoyes_non_lus = 0;
 3542:             (*s_etat_processus).pourcentage_maximal_cpu = 100;
 3543:             (*s_etat_processus).temps_maximal_cpu = 0;
 3544:             (*s_etat_processus).thread_fusible = 0;
 3545:             (*s_etat_processus).presence_fusible = d_faux;
 3546: 
 3547:             (*s_etat_processus).niveau_recursivite = 0;
 3548:             (*s_etat_processus).generateur_aleatoire = NULL;
 3549:             (*s_etat_processus).type_generateur_aleatoire = NULL;
 3550: 
 3551:             (*s_etat_processus).colonne_statistique_1 = 1; 
 3552:             (*s_etat_processus).colonne_statistique_2 = 2; 
 3553: 
 3554:             (*s_etat_processus).debug_programme = d_faux;
 3555:             (*s_etat_processus).execution_pas_suivant = d_faux;
 3556:             (*s_etat_processus).traitement_instruction_halt = d_faux;
 3557: 
 3558:             (*s_etat_processus).derniere_exception = d_ep;
 3559:             (*s_etat_processus).derniere_erreur_systeme = d_es;
 3560:             (*s_etat_processus).derniere_erreur_execution = d_ex;
 3561:             (*s_etat_processus).derniere_erreur_evaluation = d_ex;
 3562:             (*s_etat_processus).derniere_erreur_fonction_externe = 0;
 3563: 
 3564:             (*s_etat_processus).erreur_processus_fils = d_faux;
 3565:             (*s_etat_processus).erreur_systeme_processus_fils = d_es;
 3566:             (*s_etat_processus).erreur_execution_processus_fils = d_ex;
 3567:             (*s_etat_processus).pid_erreur_processus_fils = 0;
 3568:             (*s_etat_processus).exception_processus_fils = d_ep;
 3569:             (*s_etat_processus).core = core;
 3570:             (*s_etat_processus).invalidation_message_erreur = d_faux;
 3571:             (*s_etat_processus).s_objet_errone = NULL;
 3572:             (*s_etat_processus).s_objet_erreur = NULL;
 3573: 
 3574:             (*s_etat_processus).retour_routine_evaluation = 'N';
 3575: 
 3576:             (*s_etat_processus).traitement_interruption = 'N';
 3577:             (*s_etat_processus).traitement_interruptible = 'Y';
 3578:             (*s_etat_processus).nombre_interruptions_en_queue = 0;
 3579:             (*s_etat_processus).nombre_interruptions_non_affectees = 0;
 3580: 
 3581:             for(i = 0; i < d_NOMBRE_INTERRUPTIONS; i++)
 3582:             {
 3583:                 (*s_etat_processus).masque_interruptions[i] = 'N';
 3584:                 (*s_etat_processus).queue_interruptions[i] = 0;
 3585:                 (*s_etat_processus).corps_interruptions[i] = NULL;
 3586:                 (*s_etat_processus).pile_origine_interruptions[i] = NULL;
 3587:             }
 3588: 
 3589:             (*s_etat_processus).at_exit = NULL;
 3590:             (*s_etat_processus).at_poke = NULL;
 3591:             (*s_etat_processus).traitement_at_poke = 'N';
 3592: 
 3593:             (*s_etat_processus).pointeurs_caracteres = NULL;
 3594:             (*s_etat_processus).arbre_instructions = NULL;
 3595: 
 3596:             (*s_etat_processus).tid_processus_pere = pthread_self();
 3597:             (*s_etat_processus).tid = pthread_self();
 3598:             (*s_etat_processus).pid_processus_pere = getpid();
 3599:             (*s_etat_processus).processus_detache = d_vrai;
 3600:             (*s_etat_processus).var_volatile_processus_pere = -1;
 3601:             (*s_etat_processus).var_volatile_processus_racine = -1;
 3602:             (*s_etat_processus).var_volatile_traitement_retarde_stop = 0;
 3603:             (*s_etat_processus).var_volatile_alarme = 0;
 3604:             (*s_etat_processus).var_volatile_requete_arret = 0;
 3605:             (*s_etat_processus).var_volatile_requete_arret2 = 0;
 3606:             (*s_etat_processus).var_volatile_traitement_retarde_stop = 0;
 3607:             (*s_etat_processus).var_volatile_traitement_sigint = 0;
 3608:             (*s_etat_processus).var_volatile_recursivite = 0;
 3609:             (*s_etat_processus).var_volatile_exception_gsl = 0;
 3610:             (*s_etat_processus).arret_depuis_abort = 0;
 3611:             (*s_etat_processus).pointeur_signal_lecture = 0;
 3612:             (*s_etat_processus).pointeur_signal_ecriture = 0;
 3613: 
 3614:             initialisation_allocateur(s_etat_processus);
 3615:             initialisation_drapeaux(s_etat_processus);
 3616:             initialisation_variables(s_etat_processus);
 3617:             initialisation_instructions(s_etat_processus);
 3618: 
 3619:             if ((*s_etat_processus).erreur_systeme != d_es)
 3620:             {
 3621: #               ifndef SEMAPHORES_NOMMES
 3622:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3623:                     sem_post(&semaphore_gestionnaires_signaux);
 3624:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3625:                     sem_destroy(&((*s_etat_processus).semaphore_fork));
 3626: #               else
 3627:                     sem_post((*s_etat_processus).semaphore_fork);
 3628:                     sem_post(semaphore_gestionnaires_signaux);
 3629:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3630:                             getpid(), SEM_SIGNAUX);
 3631:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3632:                             getpid(), pthread_self(), SEM_FORK);
 3633: #               endif
 3634: 
 3635:                 liberation_contexte_cas(s_etat_processus);
 3636:                 liberation_queue_signaux(s_etat_processus);
 3637: 
 3638: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3639:                     stackoverflow_deinstall_handler();
 3640: #               endif
 3641: 
 3642: #               ifdef HAVE_SIGSEGV_RECOVERY
 3643:                     if (debug == d_faux)
 3644:                     {
 3645:                         sigsegv_deinstall_handler();
 3646:                     }
 3647: #               endif
 3648: 
 3649:                 if ((*s_etat_processus).langue == 'F')
 3650:                 {
 3651:                     printf("+++Système : Mémoire insuffisante\n");
 3652:                 }
 3653:                 else
 3654:                 {
 3655:                     printf("+++System : Not enough memory\n");
 3656:                 }
 3657: 
 3658:                 return(EXIT_FAILURE);
 3659:             }
 3660: 
 3661:             if (((*s_etat_processus).instruction_derniere_erreur =
 3662:                     malloc(sizeof(unsigned char))) == NULL)
 3663:             {
 3664: #               ifndef SEMAPHORES_NOMMES
 3665:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3666:                     sem_post(&semaphore_gestionnaires_signaux);
 3667:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3668:                     sem_destroy(&((*s_etat_processus).semaphore_fork));
 3669: #               else
 3670:                     sem_post((*s_etat_processus).semaphore_fork);
 3671:                     sem_post(semaphore_gestionnaires_signaux);
 3672:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3673:                             getpid(), SEM_SIGNAUX);
 3674:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3675:                             getpid(), pthread_self(), SEM_FORK);
 3676: #               endif
 3677: 
 3678:                 liberation_contexte_cas(s_etat_processus);
 3679:                 liberation_queue_signaux(s_etat_processus);
 3680: 
 3681: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3682:                     stackoverflow_deinstall_handler();
 3683: #               endif
 3684: 
 3685: #               ifdef HAVE_SIGSEGV_RECOVERY
 3686:                     if (debug == d_faux)
 3687:                     {
 3688:                         sigsegv_deinstall_handler();
 3689:                     }
 3690: #               endif
 3691: 
 3692:                 erreur = d_es_allocation_memoire;
 3693: 
 3694:                 if ((*s_etat_processus).langue == 'F')
 3695:                 {
 3696:                     printf("+++Système : Mémoire insuffisante\n");
 3697:                 }
 3698:                 else
 3699:                 {
 3700:                     printf("+++System : Not enough memory\n");
 3701:                 }
 3702: 
 3703:                 return(EXIT_FAILURE);
 3704:             }
 3705: 
 3706:             strcpy((*s_etat_processus).instruction_derniere_erreur, "");
 3707:             (*s_etat_processus).niveau_derniere_erreur = 0;
 3708: 
 3709:             if (traitement_fichier_temporaire == 'Y')
 3710:             {
 3711:                 (*s_etat_processus).mode_interactif = 'Y';
 3712:             }
 3713:             else
 3714:             {
 3715:                 (*s_etat_processus).mode_interactif = 'N';
 3716:             }
 3717: 
 3718:             if (((*s_etat_processus).instruction_courante = (unsigned char *)
 3719:                     malloc(sizeof(unsigned char))) == NULL)
 3720:             {
 3721: #               ifndef SEMAPHORES_NOMMES
 3722:                     sem_post(&((*s_etat_processus).semaphore_fork));
 3723:                     sem_post(&semaphore_gestionnaires_signaux);
 3724:                     sem_destroy(&semaphore_gestionnaires_signaux);
 3725:                     sem_destroy(&((*s_etat_processus).semaphore_fork));
 3726: #               else
 3727:                     sem_post((*s_etat_processus).semaphore_fork);
 3728:                     sem_post(semaphore_gestionnaires_signaux);
 3729:                     sem_destroy2(semaphore_gestionnaires_signaux,
 3730:                             getpid(), SEM_SIGNAUX);
 3731:                     sem_destroy3((*s_etat_processus).semphore_fork,
 3732:                             getpid(), pthread_self(), SEM_FORK);
 3733: #               endif
 3734: 
 3735:                 liberation_contexte_cas(s_etat_processus);
 3736:                 liberation_queue_signaux(s_etat_processus);
 3737: 
 3738: #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3739:                     stackoverflow_deinstall_handler();
 3740: #               endif
 3741: 
 3742: #               ifdef HAVE_SIGSEGV_RECOVERY
 3743:                     if (debug == d_faux)
 3744:                     {
 3745:                         sigsegv_deinstall_handler();
 3746:                     }
 3747: #               endif
 3748: 
 3749:                 erreur = d_es_allocation_memoire;
 3750: 
 3751:                 if ((*s_etat_processus).langue == 'F')
 3752:                 {
 3753:                     printf("+++Système : Mémoire insuffisante\n");
 3754:                 }
 3755:                 else
 3756:                 {
 3757:                     printf("+++System : Not enough memory\n");
 3758:                 }
 3759: 
 3760:                 return(EXIT_FAILURE);
 3761:             }
 3762: 
 3763:             (*s_etat_processus).instruction_courante[0] = d_code_fin_chaine;
 3764: 
 3765:             empilement_pile_systeme(s_etat_processus);
 3766: 
 3767:             free((*s_etat_processus).instruction_courante);
 3768: 
 3769:             if ((*s_etat_processus).erreur_systeme != d_es)
 3770:             {
 3771:                 erreur = d_es_allocation_memoire;
 3772:             }
 3773:             else
 3774:             {
 3775:                 (*((*s_etat_processus).l_base_pile_systeme))
 3776:                         .retour_definition = 'Y';
 3777: 
 3778:                 (*s_etat_processus).indep = allocation(s_etat_processus, NON);
 3779:                 (*s_etat_processus).depend = allocation(s_etat_processus, NON);
 3780:                 (*s_etat_processus).parametres_courbes_de_niveau =
 3781:                         allocation(s_etat_processus, NON);
 3782: 
 3783:                 if (((*s_etat_processus).indep != NULL) &&
 3784:                         ((*s_etat_processus).depend != NULL) &&
 3785:                         ((*s_etat_processus).parametres_courbes_de_niveau
 3786:                         != NULL))
 3787:                 {
 3788:                     (*((*s_etat_processus).indep)).type = NOM;
 3789:                     (*((*s_etat_processus).depend)).type = NOM;
 3790:                     (*((*s_etat_processus).
 3791:                             parametres_courbes_de_niveau)).type = LST;
 3792: 
 3793:                     initialisation_objet((*s_etat_processus).indep);
 3794:                     initialisation_objet((*s_etat_processus).depend);
 3795:                     initialisation_objet((*s_etat_processus)
 3796:                             .parametres_courbes_de_niveau);
 3797: 
 3798:                     (*((*s_etat_processus).indep)).objet = (struct_nom *)
 3799:                             malloc(sizeof(struct_nom));
 3800:                     (*((*s_etat_processus).depend)).objet = (struct_nom *)
 3801:                             malloc(sizeof(struct_nom));
 3802:                     (*((*s_etat_processus).parametres_courbes_de_niveau))
 3803:                             .objet = (struct_liste_chainee *)
 3804:                             malloc(sizeof(struct_liste_chainee));
 3805: 
 3806:                     if (((*((*s_etat_processus).depend)).objet == NULL) ||
 3807:                             ((*((*s_etat_processus).depend)).objet == NULL) ||
 3808:                             ((*((*s_etat_processus).
 3809:                             parametres_courbes_de_niveau)).objet == NULL))
 3810:                     {
 3811: #                       ifndef SEMAPHORES_NOMMES
 3812:                             sem_post(&((*s_etat_processus).semaphore_fork));
 3813:                             sem_post(&semaphore_gestionnaires_signaux);
 3814:                             sem_destroy(&semaphore_gestionnaires_signaux);
 3815:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 3816: #                       else
 3817:                             sem_post((*s_etat_processus).semaphore_fork);
 3818:                             sem_post(semaphore_gestionnaires_signaux);
 3819:                             sem_destroy2(semaphore_gestionnaires_signaux,
 3820:                                     getpid(), SEM_SIGNAUX);
 3821:                             sem_destroy3((*s_etat_processus).semphore_fork,
 3822:                                     getpid(), pthread_self(), SEM_FORK);
 3823: #                       endif
 3824: 
 3825:                         liberation_contexte_cas(s_etat_processus);
 3826:                         liberation_queue_signaux(s_etat_processus);
 3827: 
 3828: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3829:                             stackoverflow_deinstall_handler();
 3830: #                       endif
 3831: 
 3832: #                       ifdef HAVE_SIGSEGV_RECOVERY
 3833:                             if (debug == d_faux)
 3834:                             {
 3835:                                 sigsegv_deinstall_handler();
 3836:                             }
 3837: #                       endif
 3838: 
 3839:                         erreur = d_es_allocation_memoire;
 3840:                         
 3841:                         if ((*s_etat_processus).langue == 'F')
 3842:                         {
 3843:                             printf("+++Système : Mémoire insuffisante\n");
 3844:                         }
 3845:                         else
 3846:                         {
 3847:                             printf("+++System : Not enough memory\n");
 3848:                         }
 3849: 
 3850:                         return(EXIT_FAILURE);
 3851:                     }
 3852: 
 3853:                     (*((struct_nom *) (*((*s_etat_processus).indep)).objet))
 3854:                             .nom = malloc(2 * sizeof(unsigned char));
 3855:                     (*((struct_nom *) (*((*s_etat_processus).depend)).objet))
 3856:                             .nom = malloc(2 * sizeof(unsigned char));
 3857: 
 3858:                     if (((*((struct_nom *) (*((*s_etat_processus).indep))
 3859:                             .objet)).nom == NULL) || ((*((struct_nom *)
 3860:                             (*((*s_etat_processus).depend)).objet)).nom ==
 3861:                             NULL))
 3862:                     {
 3863: #                       ifndef SEMAPHORES_NOMMES
 3864:                             sem_post(&((*s_etat_processus).semaphore_fork));
 3865:                             sem_post(&semaphore_gestionnaires_signaux);
 3866:                             sem_destroy(&semaphore_gestionnaires_signaux);
 3867:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 3868: #                       else
 3869:                             sem_post((*s_etat_processus).semaphore_fork);
 3870:                             sem_post(semaphore_gestionnaires_signaux);
 3871:                             sem_destroy2(semaphore_gestionnaires_signaux,
 3872:                                     getpid(), SEM_SIGNAUX);
 3873:                             sem_destroy3((*s_etat_processus).semphore_fork,
 3874:                                     getpid(), pthread_self(), SEM_FORK);
 3875: #                       endif
 3876: 
 3877:                         liberation_contexte_cas(s_etat_processus);
 3878:                         liberation_queue_signaux(s_etat_processus);
 3879: 
 3880: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3881:                             stackoverflow_deinstall_handler();
 3882: #                       endif
 3883: 
 3884: #                       ifdef HAVE_SIGSEGV_RECOVERY
 3885:                             if (debug == d_faux)
 3886:                             {
 3887:                                 sigsegv_deinstall_handler();
 3888:                             }
 3889: #                       endif
 3890: 
 3891:                         erreur = d_es_allocation_memoire;
 3892: 
 3893:                         if ((*s_etat_processus).langue == 'F')
 3894:                         {
 3895:                             printf("+++Système : Mémoire insuffisante\n");
 3896:                         }
 3897:                         else
 3898:                         {
 3899:                             printf("+++System : Not enough memory\n");
 3900:                         }
 3901: 
 3902:                         return(EXIT_FAILURE);
 3903:                     }
 3904: 
 3905:                     strcpy((*((struct_nom *) (*((*s_etat_processus).indep))
 3906:                             .objet)).nom, "X");
 3907:                     strcpy((*((struct_nom *) (*((*s_etat_processus).depend))
 3908:                             .objet)).nom, "Y");
 3909: 
 3910:                     (*((struct_nom *) (*((*s_etat_processus).indep))
 3911:                             .objet)).symbole = d_vrai;
 3912:                     (*((struct_nom *) (*((*s_etat_processus).depend))
 3913:                             .objet)).symbole = d_vrai;
 3914: 
 3915:                     (*((struct_liste_chainee *) (*((*s_etat_processus)
 3916:                             .parametres_courbes_de_niveau)).objet)).suivant
 3917:                             = NULL;
 3918: 
 3919:                     (*((struct_liste_chainee *) (*((*s_etat_processus)
 3920:                             .parametres_courbes_de_niveau)).objet)).donnee
 3921:                             = malloc(sizeof(struct_objet));
 3922: 
 3923:                     (*s_etat_processus).legende =
 3924:                             malloc(sizeof(unsigned char));
 3925:                     (*s_etat_processus).label_x =
 3926:                             malloc(sizeof(unsigned char));
 3927:                     (*s_etat_processus).label_y =
 3928:                             malloc(sizeof(unsigned char));
 3929:                     (*s_etat_processus).label_z =
 3930:                             malloc(sizeof(unsigned char));
 3931:                     (*s_etat_processus).titre =
 3932:                             malloc(sizeof(unsigned char));
 3933: 
 3934:                     if (((*s_etat_processus).label_x == NULL) ||
 3935:                             ((*s_etat_processus).label_y == NULL) ||
 3936:                             ((*s_etat_processus).label_z == NULL) ||
 3937:                             ((*s_etat_processus).titre == NULL) ||
 3938:                             ((*s_etat_processus).legende == NULL) ||
 3939:                             ((*((struct_liste_chainee *) (*((*s_etat_processus)
 3940:                             .parametres_courbes_de_niveau)).objet)).donnee
 3941:                             == NULL))
 3942:                     {
 3943: #                       ifndef SEMAPHORES_NOMMES
 3944:                             sem_post(&((*s_etat_processus).semaphore_fork));
 3945:                             sem_post(&semaphore_gestionnaires_signaux);
 3946:                             sem_destroy(&semaphore_gestionnaires_signaux);
 3947:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 3948: #                       else
 3949:                             sem_post((*s_etat_processus).semaphore_fork);
 3950:                             sem_post(semaphore_gestionnaires_signaux);
 3951:                             sem_destroy2(semaphore_gestionnaires_signaux,
 3952:                                     getpid(), SEM_SIGNAUX);
 3953:                             sem_destroy3((*s_etat_processus).semphore_fork,
 3954:                                     getpid(), pthread_self(), SEM_FORK);
 3955: #                       endif
 3956: 
 3957:                         liberation_contexte_cas(s_etat_processus);
 3958:                         liberation_queue_signaux(s_etat_processus);
 3959: 
 3960: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 3961:                             stackoverflow_deinstall_handler();
 3962: #                       endif
 3963: 
 3964: #                       ifdef HAVE_SIGSEGV_RECOVERY
 3965:                             if (debug == d_faux)
 3966:                             {
 3967:                                 sigsegv_deinstall_handler();
 3968:                             }
 3969: #                       endif
 3970: 
 3971:                         erreur = d_es_allocation_memoire;
 3972: 
 3973:                         if ((*s_etat_processus).langue == 'F')
 3974:                         {
 3975:                             printf("+++Système : Mémoire insuffisante\n");
 3976:                         }
 3977:                         else
 3978:                         {
 3979:                             printf("+++System : Not enough memory\n");
 3980:                         }
 3981: 
 3982:                         return(EXIT_FAILURE);
 3983:                     }
 3984: 
 3985:                     (*(*((struct_liste_chainee *) (*((*s_etat_processus)
 3986:                             .parametres_courbes_de_niveau)).objet)).donnee)
 3987:                             .type = CHN;
 3988: 
 3989:                     initialisation_objet((*((struct_liste_chainee *)
 3990:                             (*((*s_etat_processus)
 3991:                             .parametres_courbes_de_niveau))
 3992:                             .objet)).donnee);
 3993: 
 3994:                     if (((*(*((struct_liste_chainee *) (*((*s_etat_processus)
 3995:                             .parametres_courbes_de_niveau)).objet)).donnee)
 3996:                             .objet = malloc(10 * sizeof(unsigned char)))
 3997:                             == NULL)
 3998:                     {
 3999: #                       ifndef SEMAPHORES_NOMMES
 4000:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4001:                             sem_post(&semaphore_gestionnaires_signaux);
 4002:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4003:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4004: #                       else
 4005:                             sem_post((*s_etat_processus).semaphore_fork);
 4006:                             sem_post(semaphore_gestionnaires_signaux);
 4007:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4008:                                     getpid(), SEM_SIGNAUX);
 4009:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4010:                                     getpid(), pthread_self(), SEM_FORK);
 4011: #                       endif
 4012: 
 4013:                         liberation_contexte_cas(s_etat_processus);
 4014:                         liberation_queue_signaux(s_etat_processus);
 4015: 
 4016: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4017:                             stackoverflow_deinstall_handler();
 4018: #                       endif
 4019: 
 4020: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4021:                             if (debug == d_faux)
 4022:                             {
 4023:                                 sigsegv_deinstall_handler();
 4024:                             }
 4025: #                       endif
 4026: 
 4027:                         erreur = d_es_allocation_memoire;
 4028: 
 4029:                         if ((*s_etat_processus).langue == 'F')
 4030:                         {
 4031:                             printf("+++Système : Mémoire insuffisante\n");
 4032:                         }
 4033:                         else
 4034:                         {
 4035:                             printf("+++System : Not enough memory\n");
 4036:                         }
 4037: 
 4038:                         return(EXIT_FAILURE);
 4039:                     }
 4040: 
 4041:                     strcpy((unsigned char *) (*(*((struct_liste_chainee *)
 4042:                             (*((*s_etat_processus)
 4043:                             .parametres_courbes_de_niveau))
 4044:                             .objet)).donnee).objet, "AUTOMATIC");
 4045: 
 4046:                     (*s_etat_processus).label_x[0] = d_code_fin_chaine;
 4047:                     (*s_etat_processus).label_y[0] = d_code_fin_chaine;
 4048:                     (*s_etat_processus).label_z[0] = d_code_fin_chaine;
 4049:                     (*s_etat_processus).titre[0] = d_code_fin_chaine;
 4050:                     (*s_etat_processus).legende[0] = d_code_fin_chaine;
 4051: 
 4052:                     (*s_etat_processus).nom_fichier_gnuplot = NULL;
 4053:                     (*s_etat_processus).type_fichier_gnuplot = NULL;
 4054: 
 4055:                     (*s_etat_processus).x_tics = 0;
 4056:                     (*s_etat_processus).y_tics = 0;
 4057:                     (*s_etat_processus).z_tics = 0;
 4058: 
 4059:                     (*s_etat_processus).x_lines = d_vrai;
 4060:                     (*s_etat_processus).y_lines = d_vrai;
 4061:                     (*s_etat_processus).z_lines = d_vrai;
 4062: 
 4063:                     (*s_etat_processus).mx_tics = -1;
 4064:                     (*s_etat_processus).my_tics = -1;
 4065:                     (*s_etat_processus).mz_tics = -1;
 4066: 
 4067:                     (*s_etat_processus).mx_lines = d_faux;
 4068:                     (*s_etat_processus).my_lines = d_faux;
 4069:                     (*s_etat_processus).mz_lines = d_faux;
 4070: 
 4071:                     (*s_etat_processus).x2_tics = -1;
 4072:                     (*s_etat_processus).y2_tics = -1;
 4073:                     (*s_etat_processus).z2_tics = -1;
 4074: 
 4075:                     (*s_etat_processus).x2_lines = d_faux;
 4076:                     (*s_etat_processus).y2_lines = d_faux;
 4077:                     (*s_etat_processus).z2_lines = d_faux;
 4078: 
 4079:                     (*s_etat_processus).mx2_tics = -1;
 4080:                     (*s_etat_processus).my2_tics = -1;
 4081:                     (*s_etat_processus).mz2_tics = -1;
 4082: 
 4083:                     (*s_etat_processus).mx2_lines = d_faux;
 4084:                     (*s_etat_processus).my2_lines = d_faux;
 4085:                     (*s_etat_processus).mz2_lines = d_faux;
 4086: 
 4087:                     (*s_etat_processus).mode_evaluation_expression = 'N';
 4088:                     (*s_etat_processus).mode_execution_programme = 'Y';
 4089: 
 4090:                     if ((*s_etat_processus).definitions_chainees == NULL)
 4091:                     {
 4092:                         if ((erreur = chainage(s_etat_processus)) !=
 4093:                                 d_absence_erreur)
 4094:                         {
 4095: #                           ifndef SEMAPHORES_NOMMES
 4096:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 4097:                                 sem_post(&semaphore_gestionnaires_signaux);
 4098:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 4099:                                 sem_destroy(&((*s_etat_processus)
 4100:                                         .semaphore_fork));
 4101: #                           else
 4102:                                 sem_post((*s_etat_processus).semaphore_fork);
 4103:                                 sem_post(semaphore_gestionnaires_signaux);
 4104:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 4105:                                         getpid(), SEM_SIGNAUX);
 4106:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 4107:                                         getpid(), pthread_self(), SEM_FORK);
 4108: #                           endif
 4109: 
 4110:                             liberation_contexte_cas(s_etat_processus);
 4111:                             liberation_queue_signaux(s_etat_processus);
 4112: 
 4113: #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4114:                                 stackoverflow_deinstall_handler();
 4115: #                           endif
 4116: 
 4117: #                           ifdef HAVE_SIGSEGV_RECOVERY
 4118:                                 if (debug == d_faux)
 4119:                                 {
 4120:                                     sigsegv_deinstall_handler();
 4121:                                 }
 4122: #                           endif
 4123: 
 4124:                             if ((*s_etat_processus).langue == 'F')
 4125:                             {
 4126:                                 printf("+++Fatal :"
 4127:                                         " Chaînage des définitions"
 4128:                                         " impossible\n");
 4129:                             }
 4130:                             else
 4131:                             {
 4132:                                 printf("+++Fatal : Error in "
 4133:                                         "compilation\n");
 4134:                             }
 4135: 
 4136:                             if (traitement_fichier_temporaire == 'Y')
 4137:                             {
 4138:                                 if (destruction_fichier(
 4139:                                         nom_fichier_temporaire)
 4140:                                         == d_erreur)
 4141:                                 {
 4142:                                     return(EXIT_FAILURE);
 4143:                                 }
 4144: 
 4145:                                 free(nom_fichier_temporaire);
 4146:                             }
 4147: 
 4148:                             return(EXIT_FAILURE);
 4149:                         }
 4150:                     }
 4151: 
 4152:                     if ((erreur = compilation(s_etat_processus)) !=
 4153:                             d_absence_erreur)
 4154:                     {
 4155: #                       ifndef SEMAPHORES_NOMMES
 4156:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4157:                             sem_post(&semaphore_gestionnaires_signaux);
 4158:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4159:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4160: #                       else
 4161:                             sem_post((*s_etat_processus).semaphore_fork);
 4162:                             sem_post(semaphore_gestionnaires_signaux);
 4163:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4164:                                     getpid(), SEM_SIGNAUX);
 4165:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4166:                                     getpid(), pthread_self(), SEM_FORK);
 4167: #                       endif
 4168: 
 4169:                         liberation_contexte_cas(s_etat_processus);
 4170:                         liberation_queue_signaux(s_etat_processus);
 4171: 
 4172: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4173:                             stackoverflow_deinstall_handler();
 4174: #                       endif
 4175: 
 4176: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4177:                             if (debug == d_faux)
 4178:                             {
 4179:                                 sigsegv_deinstall_handler();
 4180:                             }
 4181: #                       endif
 4182: 
 4183:                         if (traitement_fichier_temporaire == 'Y')
 4184:                         {
 4185:                             if (destruction_fichier(nom_fichier_temporaire)
 4186:                                     == d_erreur)
 4187:                             {
 4188:                                 return(EXIT_FAILURE);
 4189:                             }
 4190: 
 4191:                             free(nom_fichier_temporaire);
 4192:                         }
 4193: 
 4194:                         printf("%s [%d]\n", message =
 4195:                                 messages(s_etat_processus), (int) getpid());
 4196:                         free(message);
 4197: 
 4198:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 4199:                         {
 4200:                             printf("%s", ds_beep);
 4201:                         }
 4202: 
 4203:                         if ((*s_etat_processus).core == d_vrai)
 4204:                         {
 4205:                             printf("\n");
 4206:                             
 4207:                             if ((*s_etat_processus).langue == 'F')
 4208:                             {
 4209:                                 printf("+++Information : Génération du fichier "
 4210:                                         "rpl-core [%d]\n", (int) getpid());
 4211:                             }
 4212:                             else
 4213:                             {
 4214:                                 printf("+++Information : Writing rpl-core "
 4215:                                         "file [%d]\n", (int) getpid());
 4216:                             }
 4217: 
 4218:                             rplcore(s_etat_processus);
 4219: 
 4220:                             if ((*s_etat_processus).langue == 'F')
 4221:                             {
 4222:                                 printf("+++Information : Processus tracé "
 4223:                                         "[%d]\n", (int) getpid());
 4224:                             }
 4225:                             else
 4226:                             {
 4227:                                 printf("+++Information : Done [%d]\n",
 4228:                                         (int) getpid());
 4229:                             }
 4230: 
 4231:                             printf("\n");
 4232:                         }
 4233: 
 4234:                         return(EXIT_FAILURE);
 4235:                     }
 4236: 
 4237:                     (*s_etat_processus).position_courante = 0;
 4238:                     (*s_etat_processus).traitement_cycle_exit = 'N';
 4239: 
 4240:                     if ((*s_etat_processus).s_arbre_variables == NULL)
 4241:                     {
 4242: #                       ifndef SEMAPHORES_NOMMES
 4243:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4244:                             sem_post(&semaphore_gestionnaires_signaux);
 4245:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4246:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4247: #                       else
 4248:                             sem_post((*s_etat_processus).semaphore_fork);
 4249:                             sem_post(semaphore_gestionnaires_signaux);
 4250:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4251:                                     getpid(), SEM_SIGNAUX);
 4252:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4253:                                     getpid(), pthread_self(), SEM_FORK);
 4254: #                       endif
 4255: 
 4256:                         liberation_contexte_cas(s_etat_processus);
 4257:                         liberation_queue_signaux(s_etat_processus);
 4258: 
 4259: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4260:                             stackoverflow_deinstall_handler();
 4261: #                       endif
 4262: 
 4263: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4264:                             if (debug == d_faux)
 4265:                             {
 4266:                                 sigsegv_deinstall_handler();
 4267:                             }
 4268: #                       endif
 4269: 
 4270:                         if ((*s_etat_processus).langue == 'F')
 4271:                         {
 4272:                             printf("+++Fatal : Aucun point d'entrée\n");
 4273:                         }
 4274:                         else
 4275:                         {
 4276:                             printf("+++Fatal : Any entry point\n");
 4277:                         }
 4278: 
 4279:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 4280:                         {
 4281:                             printf("%s", ds_beep);
 4282:                         }
 4283: 
 4284:                         return(EXIT_FAILURE);
 4285:                     }
 4286: 
 4287:                     if (recherche_instruction_suivante(s_etat_processus)
 4288:                             == d_erreur)
 4289:                     {
 4290: #                       ifndef SEMAPHORES_NOMMES
 4291:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4292:                             sem_post(&semaphore_gestionnaires_signaux);
 4293:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4294:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4295: #                       else
 4296:                             sem_post((*s_etat_processus).semaphore_fork);
 4297:                             sem_post(semaphore_gestionnaires_signaux);
 4298:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4299:                                     getpid(), SEM_SIGNAUX);
 4300:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4301:                                     getpid(), pthread_self(), SEM_FORK);
 4302: #                       endif
 4303: 
 4304:                         liberation_contexte_cas(s_etat_processus);
 4305:                         liberation_queue_signaux(s_etat_processus);
 4306: 
 4307: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4308:                             stackoverflow_deinstall_handler();
 4309: #                       endif
 4310: 
 4311: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4312:                             if (debug == d_faux)
 4313:                             {
 4314:                                 sigsegv_deinstall_handler();
 4315:                             }
 4316: #                       endif
 4317: 
 4318:                         if ((*s_etat_processus).langue == 'F')
 4319:                         {
 4320:                             printf("+++Fatal : Aucun point d'entrée\n");
 4321:                         }
 4322:                         else
 4323:                         {
 4324:                             printf("+++Fatal : Any entry point\n");
 4325:                         }
 4326: 
 4327:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 4328:                         {
 4329:                             printf("%s", ds_beep);
 4330:                         }
 4331: 
 4332:                         return(EXIT_FAILURE);
 4333:                     }
 4334: 
 4335:                     if (recherche_variable(s_etat_processus,
 4336:                             (*s_etat_processus)
 4337:                             .instruction_courante) == d_faux)
 4338:                     {
 4339: #                       ifndef SEMAPHORES_NOMMES
 4340:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4341:                             sem_post(&semaphore_gestionnaires_signaux);
 4342:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4343:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4344: #                       else
 4345:                             sem_post((*s_etat_processus).semaphore_fork);
 4346:                             sem_post(semaphore_gestionnaires_signaux);
 4347:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4348:                                     getpid(), SEM_SIGNAUX);
 4349:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4350:                                     getpid(), pthread_self(), SEM_FORK);
 4351: #                       endif
 4352: 
 4353:                         liberation_contexte_cas(s_etat_processus);
 4354:                         liberation_queue_signaux(s_etat_processus);
 4355: 
 4356: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4357:                             stackoverflow_deinstall_handler();
 4358: #                       endif
 4359: 
 4360: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4361:                             if (debug == d_faux)
 4362:                             {
 4363:                                 sigsegv_deinstall_handler();
 4364:                             }
 4365: #                       endif
 4366: 
 4367:                         if ((*s_etat_processus).langue == 'F')
 4368:                         {
 4369:                             printf("+++Fatal : Aucun point d'entrée\n");
 4370:                         }
 4371:                         else
 4372:                         {
 4373:                             printf("+++Fatal : Any entry point\n");
 4374:                         }
 4375: 
 4376:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 4377:                         {
 4378:                             printf("%s", ds_beep);
 4379:                         }
 4380: 
 4381:                         return(EXIT_FAILURE);
 4382:                     }
 4383: 
 4384:                     if ((*(*s_etat_processus).pointeur_variable_courante)
 4385:                             .niveau != 0)
 4386:                     {
 4387: #                       ifndef SEMAPHORES_NOMMES
 4388:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4389:                             sem_post(&semaphore_gestionnaires_signaux);
 4390:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4391:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4392: #                       else
 4393:                             sem_post((*s_etat_processus).semaphore_fork);
 4394:                             sem_post(semaphore_gestionnaires_signaux);
 4395:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4396:                                     getpid(), SEM_SIGNAUX);
 4397:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4398:                                     getpid(), pthread_self(), SEM_FORK);
 4399: #                       endif
 4400: 
 4401:                         liberation_contexte_cas(s_etat_processus);
 4402:                         liberation_queue_signaux(s_etat_processus);
 4403: 
 4404: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4405:                             stackoverflow_deinstall_handler();
 4406: #                       endif
 4407: 
 4408: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4409:                             if (debug == d_faux)
 4410:                             {
 4411:                                 sigsegv_deinstall_handler();
 4412:                             }
 4413: #                       endif
 4414: 
 4415:                         if ((*s_etat_processus).langue == 'F')
 4416:                         {
 4417:                             printf("+++Fatal : Aucun point d'entrée\n");
 4418:                         }
 4419:                         else
 4420:                         {
 4421:                             printf("+++Fatal : Any entry point\n");
 4422:                         }
 4423: 
 4424:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 4425:                         {
 4426:                             printf("%s", ds_beep);
 4427:                         }
 4428: 
 4429:                         return(EXIT_FAILURE);
 4430:                     }
 4431: 
 4432:                     free((*s_etat_processus).instruction_courante);
 4433:                     (*s_etat_processus).position_courante = 0;
 4434: 
 4435:                     if (((*s_etat_processus).nom_fichier_historique =
 4436:                             malloc((strlen(home) +
 4437:                             strlen(ds_fichier_historique) + 2) *
 4438:                             sizeof(unsigned char))) == NULL)
 4439:                     {
 4440: #                       ifndef SEMAPHORES_NOMMES
 4441:                             sem_post(&((*s_etat_processus).semaphore_fork));
 4442:                             sem_post(&semaphore_gestionnaires_signaux);
 4443:                             sem_destroy(&semaphore_gestionnaires_signaux);
 4444:                             sem_destroy(&((*s_etat_processus).semaphore_fork));
 4445: #                       else
 4446:                             sem_post((*s_etat_processus).semaphore_fork);
 4447:                             sem_post(semaphore_gestionnaires_signaux);
 4448:                             sem_destroy2(semaphore_gestionnaires_signaux,
 4449:                                     getpid(), SEM_SIGNAUX);
 4450:                             sem_destroy3((*s_etat_processus).semphore_fork,
 4451:                                     getpid(), pthread_self(), SEM_FORK);
 4452: #                       endif
 4453: 
 4454:                         liberation_contexte_cas(s_etat_processus);
 4455:                         liberation_queue_signaux(s_etat_processus);
 4456: 
 4457: #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4458:                             stackoverflow_deinstall_handler();
 4459: #                       endif
 4460: 
 4461: #                       ifdef HAVE_SIGSEGV_RECOVERY
 4462:                             if (debug == d_faux)
 4463:                             {
 4464:                                 sigsegv_deinstall_handler();
 4465:                             }
 4466: #                       endif
 4467: 
 4468:                         erreur = d_es_allocation_memoire;
 4469: 
 4470:                         if ((*s_etat_processus).langue == 'F')
 4471:                         {
 4472:                             printf("+++Système : Mémoire insuffisante\n");
 4473:                         }
 4474:                         else
 4475:                         {
 4476:                             printf("+++System : Not enough memory\n");
 4477:                         }
 4478: 
 4479:                         return(EXIT_FAILURE);
 4480:                     }
 4481: 
 4482:                     sprintf((*s_etat_processus).nom_fichier_historique, "%s/%s",
 4483:                             home, ds_fichier_historique);
 4484: 
 4485:                     using_history();
 4486: 
 4487:                     // Pour pouvoir utiliser le keymap avant le premier
 4488:                     // appel à readline().
 4489:                     rl_initialize();
 4490: 
 4491:                     erreur_historique = read_history(
 4492:                             (*s_etat_processus).nom_fichier_historique);
 4493: 
 4494:                     gsl_set_error_handler(&traitement_exceptions_gsl);
 4495: 
 4496:                     if (drapeau_encart == 'Y')
 4497:                     {
 4498:                         (*s_etat_processus).erreur_systeme = d_es;
 4499:                         encart(s_etat_processus,
 4500:                                 (integer8) (5 * 1000000));
 4501: 
 4502:                         if ((*s_etat_processus).erreur_systeme != d_es)
 4503:                         {
 4504:                             if ((message = messages(s_etat_processus))
 4505:                                     == NULL)
 4506:                             {
 4507: #                               ifndef SEMAPHORES_NOMMES
 4508:                                     sem_post(&((*s_etat_processus)
 4509:                                             .semaphore_fork));
 4510:                                     sem_post(&semaphore_gestionnaires_signaux);
 4511:                                     sem_destroy(
 4512:                                             &semaphore_gestionnaires_signaux);
 4513:                                     sem_destroy(&((*s_etat_processus)
 4514:                                             .semaphore_fork));
 4515: #                               else
 4516:                                     sem_post((*s_etat_processus)
 4517:                                             .semaphore_fork);
 4518:                                     sem_post(semaphore_gestionnaires_signaux);
 4519:                                     sem_destroy2(
 4520:                                             semaphore_gestionnaires_signaux,
 4521:                                             getpid(), SEM_SIGNAUX);
 4522:                                     sem_destroy3((*s_etat_processus)
 4523:                                             .semphore_fork,
 4524:                                             getpid(), pthread_self(), SEM_FORK);
 4525: #                               endif
 4526: 
 4527:                                 liberation_contexte_cas(s_etat_processus);
 4528:                                 liberation_queue_signaux(s_etat_processus);
 4529: 
 4530: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4531:                                     stackoverflow_deinstall_handler();
 4532: #                               endif
 4533: 
 4534: #                               ifdef HAVE_SIGSEGV_RECOVERY
 4535:                                     if (debug == d_faux)
 4536:                                     {
 4537:                                         sigsegv_deinstall_handler();
 4538:                                     }
 4539: #                               endif
 4540: 
 4541:                                 erreur = d_es_allocation_memoire;
 4542: 
 4543:                                 if ((*s_etat_processus).langue == 'F')
 4544:                                 {
 4545:                                     printf("+++Système : Mémoire "
 4546:                                             "insuffisante\n");
 4547:                                 }
 4548:                                 else
 4549:                                 {
 4550:                                     printf("+++System : Not enough "
 4551:                                             "memory\n");
 4552:                                 }
 4553: 
 4554:                                 return(EXIT_FAILURE);
 4555:                             }
 4556: 
 4557:                             printf("%s [%d]\n", message, (int) getpid());
 4558:                             free(message);
 4559: 
 4560:                             return(EXIT_FAILURE);
 4561:                         }
 4562:                     }
 4563: 
 4564:                     fflush(stdout);
 4565: 
 4566:                     if (arguments != NULL)
 4567:                     {
 4568:                         tampon = (*s_etat_processus).definitions_chainees;
 4569:                         (*s_etat_processus).definitions_chainees =
 4570:                                 arguments;
 4571: 
 4572:                         if (analyse_syntaxique(s_etat_processus) ==
 4573:                                 d_erreur)
 4574:                         {
 4575:                             if ((*s_etat_processus).erreur_systeme != d_es)
 4576:                             {
 4577: #                               ifndef SEMAPHORES_NOMMES
 4578:                                     sem_post(&((*s_etat_processus)
 4579:                                             .semaphore_fork));
 4580:                                     sem_post(&semaphore_gestionnaires_signaux);
 4581:                                     sem_destroy(
 4582:                                             &semaphore_gestionnaires_signaux);
 4583:                                     sem_destroy(&((*s_etat_processus)
 4584:                                             .semaphore_fork));
 4585: #                               else
 4586:                                     sem_post((*s_etat_processus)
 4587:                                             .semaphore_fork);
 4588:                                     sem_post(semaphore_gestionnaires_signaux);
 4589:                                     sem_destroy2(
 4590:                                             semaphore_gestionnaires_signaux,
 4591:                                             getpid(), SEM_SIGNAUX);
 4592:                                     sem_destroy3((*s_etat_processus)
 4593:                                             .semphore_fork,
 4594:                                             getpid(), pthread_self(), SEM_FORK);
 4595: #                               endif
 4596: 
 4597:                                 liberation_contexte_cas(s_etat_processus);
 4598:                                 liberation_queue_signaux(s_etat_processus);
 4599: 
 4600: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4601:                                     stackoverflow_deinstall_handler();
 4602: #                               endif
 4603: 
 4604: #                               ifdef HAVE_SIGSEGV_RECOVERY
 4605:                                     if (debug == d_faux)
 4606:                                     {
 4607:                                         sigsegv_deinstall_handler();
 4608:                                     }
 4609: #                               endif
 4610: 
 4611:                                 erreur = d_es_allocation_memoire;
 4612: 
 4613:                                 if ((*s_etat_processus).langue == 'F')
 4614:                                 {
 4615:                                     printf("+++Système : Mémoire "
 4616:                                             "insuffisante\n");
 4617:                                 }
 4618:                                 else
 4619:                                 {
 4620:                                     printf("+++System : Not enough "
 4621:                                             "memory\n");
 4622:                                 }
 4623: 
 4624:                                 return(EXIT_FAILURE);
 4625:                             }
 4626:                             else
 4627:                             {
 4628: #                               ifndef SEMAPHORES_NOMMES
 4629:                                     sem_post(&((*s_etat_processus)
 4630:                                             .semaphore_fork));
 4631:                                     sem_post(&semaphore_gestionnaires_signaux);
 4632:                                     sem_destroy(
 4633:                                             &semaphore_gestionnaires_signaux);
 4634:                                     sem_destroy(&((*s_etat_processus)
 4635:                                             .semaphore_fork));
 4636: #                               else
 4637:                                     sem_post((*s_etat_processus)
 4638:                                             .semaphore_fork);
 4639:                                     sem_post(semaphore_gestionnaires_signaux);
 4640:                                     sem_destroy2(
 4641:                                             semaphore_gestionnaires_signaux,
 4642:                                             getpid(), SEM_SIGNAUX);
 4643:                                     sem_destroy3((*s_etat_processus)
 4644:                                             .semphore_fork,
 4645:                                             getpid(), pthread_self(), SEM_FORK);
 4646: #                               endif
 4647: 
 4648:                                 liberation_contexte_cas(s_etat_processus);
 4649:                                 liberation_queue_signaux(s_etat_processus);
 4650: 
 4651: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4652:                                     stackoverflow_deinstall_handler();
 4653: #                               endif
 4654: 
 4655: #                               ifdef HAVE_SIGSEGV_RECOVERY
 4656:                                     if (debug == d_faux)
 4657:                                     {
 4658:                                         sigsegv_deinstall_handler();
 4659:                                     }
 4660: #                               endif
 4661: 
 4662:                                 if ((*s_etat_processus).langue == 'F')
 4663:                                 {
 4664:                                     printf("+++Erreur : Erreur de "
 4665:                                             "syntaxe\n");
 4666:                                 }
 4667:                                 else
 4668:                                 {
 4669:                                     printf("+++Error : Syntax error\n");
 4670:                                 }
 4671: 
 4672:                                 return(EXIT_FAILURE);
 4673:                             }
 4674:                         }
 4675: 
 4676:                         (*s_etat_processus).instruction_courante
 4677:                                 = arguments;
 4678:                         (*s_etat_processus).definitions_chainees = tampon;
 4679:                         (*s_etat_processus).position_courante = 0;
 4680: 
 4681:                         recherche_type(s_etat_processus);
 4682: 
 4683:                         if ((*s_etat_processus).erreur_systeme != d_es)
 4684:                         {
 4685: #                           ifndef SEMAPHORES_NOMMES
 4686:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 4687:                                 sem_post(&semaphore_gestionnaires_signaux);
 4688:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 4689:                                 sem_destroy(&((*s_etat_processus)
 4690:                                         .semaphore_fork));
 4691: #                           else
 4692:                                 sem_post((*s_etat_processus).semaphore_fork);
 4693:                                 sem_post(semaphore_gestionnaires_signaux);
 4694:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 4695:                                         getpid(), SEM_SIGNAUX);
 4696:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 4697:                                         getpid(), pthread_self(), SEM_FORK);
 4698: #                           endif
 4699: 
 4700:                             liberation_contexte_cas(s_etat_processus);
 4701:                             liberation_queue_signaux(s_etat_processus);
 4702: 
 4703: #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4704:                                 stackoverflow_deinstall_handler();
 4705: #                           endif
 4706: 
 4707: #                           ifdef HAVE_SIGSEGV_RECOVERY
 4708:                                 if (debug == d_faux)
 4709:                                 {
 4710:                                     sigsegv_deinstall_handler();
 4711:                                 }
 4712: #                           endif
 4713: 
 4714:                             if ((message = messages(s_etat_processus))
 4715:                                     == NULL)
 4716:                             {
 4717:                                 erreur = d_es_allocation_memoire;
 4718: 
 4719:                                 if ((*s_etat_processus).langue == 'F')
 4720:                                 {
 4721:                                     printf("+++Système : Mémoire "
 4722:                                             "insuffisante\n");
 4723:                                 }
 4724:                                 else
 4725:                                 {
 4726:                                     printf("+++System : Not enough "
 4727:                                             "memory\n");
 4728:                                 }
 4729: 
 4730:                                 return(EXIT_FAILURE);
 4731:                             }
 4732: 
 4733:                             printf("%s [%d]\n", message, (int) getpid());
 4734:                             free(message);
 4735: 
 4736:                             return(EXIT_FAILURE);
 4737:                         }
 4738: 
 4739:                         if ((*s_etat_processus).erreur_execution != d_ex)
 4740:                         {
 4741:                             if ((message = messages(s_etat_processus))
 4742:                                     == NULL)
 4743:                             {
 4744: #                               ifndef SEMAPHORES_NOMMES
 4745:                                     sem_post(&((*s_etat_processus)
 4746:                                             .semaphore_fork));
 4747:                                     sem_post(&semaphore_gestionnaires_signaux);
 4748:                                     sem_destroy(
 4749:                                             &semaphore_gestionnaires_signaux);
 4750:                                     sem_destroy(&((*s_etat_processus)
 4751:                                             .semaphore_fork));
 4752: #                               else
 4753:                                     sem_post((*s_etat_processus)
 4754:                                             .semaphore_fork);
 4755:                                     sem_post(semaphore_gestionnaires_signaux);
 4756:                                     sem_destroy2(
 4757:                                             semaphore_gestionnaires_signaux,
 4758:                                             getpid(), SEM_SIGNAUX);
 4759:                                     sem_destroy3((*s_etat_processus)
 4760:                                             .semphore_fork,
 4761:                                             getpid(), pthread_self(), SEM_FORK);
 4762: #                               endif
 4763: 
 4764:                                 liberation_contexte_cas(s_etat_processus);
 4765:                                 liberation_queue_signaux(s_etat_processus);
 4766: 
 4767: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4768:                                     stackoverflow_deinstall_handler();
 4769: #                               endif
 4770: 
 4771: #                               ifdef HAVE_SIGSEGV_RECOVERY
 4772:                                     if (debug == d_faux)
 4773:                                     {
 4774:                                         sigsegv_deinstall_handler();
 4775:                                     }
 4776: #                               endif
 4777: 
 4778:                                 erreur = d_es_allocation_memoire;
 4779: 
 4780:                                 if ((*s_etat_processus).langue == 'F')
 4781:                                 {
 4782:                                     printf("+++Erreur : Mémoire "
 4783:                                             "insuffisante\n");
 4784:                                 }
 4785:                                 else
 4786:                                 {
 4787:                                     printf("+++Error : Not enough "
 4788:                                             "memory\n");
 4789:                                 }
 4790: 
 4791:                                 return(EXIT_FAILURE);
 4792:                             }
 4793: 
 4794:                             printf("%s [%d]\n", message, (int) getpid());
 4795:                             free(message);
 4796: 
 4797: #                           ifndef SEMAPHORES_NOMMES
 4798:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 4799:                                 sem_post(&semaphore_gestionnaires_signaux);
 4800:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 4801:                                 sem_destroy(&((*s_etat_processus)
 4802:                                         .semaphore_fork));
 4803: #                           else
 4804:                                 sem_post((*s_etat_processus).semaphore_fork);
 4805:                                 sem_post(semaphore_gestionnaires_signaux);
 4806:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 4807:                                         getpid(), SEM_SIGNAUX);
 4808:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 4809:                                         getpid(), pthread_self(), SEM_FORK);
 4810: #                           endif
 4811: 
 4812:                             liberation_contexte_cas(s_etat_processus);
 4813:                             liberation_queue_signaux(s_etat_processus);
 4814: 
 4815: #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4816:                                 stackoverflow_deinstall_handler();
 4817: #                           endif
 4818: 
 4819: #                           ifdef HAVE_SIGSEGV_RECOVERY
 4820:                                 if (debug == d_faux)
 4821:                                 {
 4822:                                     sigsegv_deinstall_handler();
 4823:                                 }
 4824: #                           endif
 4825: 
 4826:                             return(EXIT_FAILURE);
 4827:                         }
 4828: 
 4829:                         if (depilement(s_etat_processus,
 4830:                                 &((*s_etat_processus).l_base_pile),
 4831:                                 &s_objet) == d_erreur)
 4832:                         {
 4833:                             if ((message = messages(s_etat_processus))
 4834:                                     == NULL)
 4835:                             {
 4836: #                               ifndef SEMAPHORES_NOMMES
 4837:                                     sem_post(&((*s_etat_processus)
 4838:                                             .semaphore_fork));
 4839:                                     sem_post(&semaphore_gestionnaires_signaux);
 4840:                                     sem_destroy(
 4841:                                             &semaphore_gestionnaires_signaux);
 4842:                                     sem_destroy(&((*s_etat_processus)
 4843:                                             .semaphore_fork));
 4844: #                               else
 4845:                                     sem_post((*s_etat_processus)
 4846:                                             .semaphore_fork);
 4847:                                     sem_post(semaphore_gestionnaires_signaux);
 4848:                                     sem_destroy2(
 4849:                                             semaphore_gestionnaires_signaux,
 4850:                                             getpid(), SEM_SIGNAUX);
 4851:                                     sem_destroy3((*s_etat_processus)
 4852:                                             .semphore_fork,
 4853:                                             getpid(), pthread_self(), SEM_FORK);
 4854: #                               endif
 4855: 
 4856:                                 liberation_contexte_cas(s_etat_processus);
 4857:                                 liberation_queue_signaux(s_etat_processus);
 4858: 
 4859: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4860:                                     stackoverflow_deinstall_handler();
 4861: #                               endif
 4862: 
 4863: #                               ifdef HAVE_SIGSEGV_RECOVERY
 4864:                                     if (debug == d_faux)
 4865:                                     {
 4866:                                         sigsegv_deinstall_handler();
 4867:                                     }
 4868: #                               endif
 4869: 
 4870:                                 erreur = d_es_allocation_memoire;
 4871:                                 erreur = d_es_allocation_memoire;
 4872: 
 4873:                                 if ((*s_etat_processus).langue == 'F')
 4874:                                 {
 4875:                                     printf("+++Erreur : Mémoire "
 4876:                                             "insuffisante\n");
 4877:                                 }
 4878:                                 else
 4879:                                 {
 4880:                                     printf("+++Error : Not enough "
 4881:                                             "memory\n");
 4882:                                 }
 4883: 
 4884:                                 return(EXIT_FAILURE);
 4885:                             }
 4886: 
 4887:                             printf("%s [%d]\n", message, (int) getpid());
 4888:                             free(message);
 4889: 
 4890: #                           ifndef SEMAPHORES_NOMMES
 4891:                                 sem_post(&((*s_etat_processus).semaphore_fork));
 4892:                                 sem_post(&semaphore_gestionnaires_signaux);
 4893:                                 sem_destroy(&semaphore_gestionnaires_signaux);
 4894:                                 sem_destroy(&((*s_etat_processus)
 4895:                                         .semaphore_fork));
 4896: #                           else
 4897:                                 sem_post((*s_etat_processus).semaphore_fork);
 4898:                                 sem_post(semaphore_gestionnaires_signaux);
 4899:                                 sem_destroy2(semaphore_gestionnaires_signaux,
 4900:                                         getpid(), SEM_SIGNAUX);
 4901:                                 sem_destroy3((*s_etat_processus).semphore_fork,
 4902:                                         getpid(), pthread_self(), SEM_FORK);
 4903: #                           endif
 4904: 
 4905:                             liberation_contexte_cas(s_etat_processus);
 4906:                             liberation_queue_signaux(s_etat_processus);
 4907: 
 4908: #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4909:                                 stackoverflow_deinstall_handler();
 4910: #                           endif
 4911: 
 4912: #                           ifdef HAVE_SIGSEGV_RECOVERY
 4913:                                 if (debug == d_faux)
 4914:                                 {
 4915:                                     sigsegv_deinstall_handler();
 4916:                                 }
 4917: #                           endif
 4918: 
 4919:                             return(EXIT_FAILURE);
 4920:                         }
 4921: 
 4922:                         empilement_pile_systeme(s_etat_processus);
 4923: 
 4924:                         if (evaluation(s_etat_processus, s_objet, 'E')
 4925:                                 == d_erreur)
 4926:                         {
 4927:                             if ((*s_etat_processus).erreur_systeme != d_es)
 4928:                             {
 4929:                                 if ((message = messages(s_etat_processus))
 4930:                                         == NULL)
 4931:                                 {
 4932: #                                   ifndef SEMAPHORES_NOMMES
 4933:                                         sem_post(&((*s_etat_processus)
 4934:                                                 .semaphore_fork));
 4935:                                         sem_post(
 4936:                                                 &semaphore_gestionnaires_signaux
 4937:                                                 );
 4938:                                         sem_destroy(
 4939:                                                 &semaphore_gestionnaires_signaux
 4940:                                                 );
 4941:                                         sem_destroy(&((*s_etat_processus)
 4942:                                                 .semaphore_fork));
 4943: #                                   else
 4944:                                         sem_post((*s_etat_processus)
 4945:                                                 .semaphore_fork);
 4946:                                         sem_post(
 4947:                                                 semaphore_gestionnaires_signaux
 4948:                                                 );
 4949:                                         sem_destroy2(
 4950:                                                 semaphore_gestionnaires_signaux,
 4951:                                                 getpid(), SEM_SIGNAUX);
 4952:                                         sem_destroy3((*s_etat_processus)
 4953:                                                 .semphore_fork, getpid(),
 4954:                                                 pthread_self(), SEM_FORK);
 4955: #                                   endif
 4956: 
 4957:                                     liberation_contexte_cas(s_etat_processus);
 4958:                                     liberation_queue_signaux(s_etat_processus);
 4959: 
 4960: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 4961:                                         stackoverflow_deinstall_handler();
 4962: #                                   endif
 4963: 
 4964: #                                   ifdef HAVE_SIGSEGV_RECOVERY
 4965:                                         if (debug == d_faux)
 4966:                                         {
 4967:                                             sigsegv_deinstall_handler();
 4968:                                         }
 4969: #                                   endif
 4970: 
 4971:                                     erreur = d_es_allocation_memoire;
 4972: 
 4973:                                     if ((*s_etat_processus).langue == 'F')
 4974:                                     {
 4975:                                         printf("+++Système : Mémoire "
 4976:                                                 "insuffisante\n");
 4977:                                     }
 4978:                                     else
 4979:                                     {
 4980:                                         printf("+++System : Not enough "
 4981:                                                 "memory\n");
 4982:                                     }
 4983: 
 4984:                                     return(EXIT_FAILURE);
 4985:                                 }
 4986: 
 4987:                                 printf("%s [%d]\n", message,
 4988:                                         (int) getpid());
 4989:                                 free(message);
 4990: 
 4991: #                               ifndef SEMAPHORES_NOMMES
 4992:                                     sem_post(&((*s_etat_processus)
 4993:                                             .semaphore_fork));
 4994:                                     sem_post(&semaphore_gestionnaires_signaux);
 4995:                                     sem_destroy(
 4996:                                             &semaphore_gestionnaires_signaux);
 4997:                                     sem_destroy(&((*s_etat_processus)
 4998:                                             .semaphore_fork));
 4999: #                               else
 5000:                                     sem_post((*s_etat_processus)
 5001:                                             .semaphore_fork);
 5002:                                     sem_post(semaphore_gestionnaires_signaux);
 5003:                                     sem_destroy2(
 5004:                                             semaphore_gestionnaires_signaux,
 5005:                                             getpid(), SEM_SIGNAUX);
 5006:                                     sem_destroy3((*s_etat_processus)
 5007:                                             .semphore_fork,
 5008:                                             getpid(), pthread_self(), SEM_FORK);
 5009: #                               endif
 5010: 
 5011:                                 liberation_contexte_cas(s_etat_processus);
 5012:                                 liberation_queue_signaux(s_etat_processus);
 5013: 
 5014: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 5015:                                     stackoverflow_deinstall_handler();
 5016: #                               endif
 5017: 
 5018: #                               ifdef HAVE_SIGSEGV_RECOVERY
 5019:                                     if (debug == d_faux)
 5020:                                     {
 5021:                                         sigsegv_deinstall_handler();
 5022:                                     }
 5023: #                               endif
 5024: 
 5025:                                 erreur = d_es_allocation_memoire;
 5026:                                 return(EXIT_FAILURE);
 5027:                             }
 5028: 
 5029:                             if ((*s_etat_processus).erreur_execution
 5030:                                     != d_ex)
 5031:                             {
 5032:                                 if ((message = messages(s_etat_processus))
 5033:                                         == NULL)
 5034:                                 {
 5035: #                                   ifndef SEMAPHORES_NOMMES
 5036:                                         sem_post(&((*s_etat_processus)
 5037:                                                 .semaphore_fork));
 5038:                                         sem_post(
 5039:                                                 &semaphore_gestionnaires_signaux
 5040:                                                 );
 5041:                                         sem_destroy(
 5042:                                                 &semaphore_gestionnaires_signaux
 5043:                                                 );
 5044:                                         sem_destroy(&((*s_etat_processus)
 5045:                                                 .semaphore_fork));
 5046: #                                   else
 5047:                                         sem_post((*s_etat_processus)
 5048:                                                 .semaphore_fork);
 5049:                                         sem_post(
 5050:                                                 semaphore_gestionnaires_signaux
 5051:                                                 );
 5052:                                         sem_destroy2(
 5053:                                                 semaphore_gestionnaires_signaux,
 5054:                                                 getpid(), SEM_SIGNAUX);
 5055:                                         sem_destroy3((*s_etat_processus)
 5056:                                                 .semphore_fork, getpid(),
 5057:                                                 pthread_self(), SEM_FORK);
 5058: #                                   endif
 5059: 
 5060:                                     liberation_contexte_cas(s_etat_processus);
 5061:                                     liberation_queue_signaux(s_etat_processus);
 5062: 
 5063: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 5064:                                         stackoverflow_deinstall_handler();
 5065: #                                   endif
 5066: 
 5067: #                                   ifdef HAVE_SIGSEGV_RECOVERY
 5068:                                         if (debug == d_faux)
 5069:                                         {
 5070:                                             sigsegv_deinstall_handler();
 5071:                                         }
 5072: #                                   endif
 5073: 
 5074:                                     erreur = d_es_allocation_memoire;
 5075: 
 5076:                                     if ((*s_etat_processus).langue == 'F')
 5077:                                     {
 5078:                                         printf("+++Erreur : Mémoire "
 5079:                                                 "insuffisante\n");
 5080:                                     }
 5081:                                     else
 5082:                                     {
 5083:                                         printf("+++Error : Not enough "
 5084:                                                 "memory\n");
 5085:                                     }
 5086: 
 5087:                                     return(EXIT_FAILURE);
 5088:                                 }
 5089: 
 5090:                                 printf("%s [%d]\n", message,
 5091:                                         (int) getpid());
 5092:                                 free(message);
 5093: 
 5094: #                               ifndef SEMAPHORES_NOMMES
 5095:                                     sem_post(&((*s_etat_processus)
 5096:                                             .semaphore_fork));
 5097:                                     sem_post(&semaphore_gestionnaires_signaux);
 5098:                                     sem_destroy(
 5099:                                             &semaphore_gestionnaires_signaux);
 5100:                                     sem_destroy(&((*s_etat_processus)
 5101:                                             .semaphore_fork));
 5102: #                               else
 5103:                                     sem_post((*s_etat_processus)
 5104:                                             .semaphore_fork);
 5105:                                     sem_post(semaphore_gestionnaires_signaux);
 5106:                                     sem_destroy2(
 5107:                                             semaphore_gestionnaires_signaux,
 5108:                                             getpid(), SEM_SIGNAUX);
 5109:                                     sem_destroy3((*s_etat_processus)
 5110:                                             .semphore_fork,
 5111:                                             getpid(), pthread_self(), SEM_FORK);
 5112: #                               endif
 5113: 
 5114:                                 liberation_contexte_cas(s_etat_processus);
 5115:                                 liberation_queue_signaux(s_etat_processus);
 5116: 
 5117: #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
 5118:                                     stackoverflow_deinstall_handler();
 5119: #                               endif
 5120: 
 5121: #                               ifdef HAVE_SIGSEGV_RECOVERY
 5122:                                     if (debug == d_faux)
 5123:                                     {
 5124:                                         sigsegv_deinstall_handler();
 5125:                                     }
 5126: #                               endif
 5127: 
 5128:                                 return(EXIT_FAILURE);
 5129:                             }
 5130:                         }
 5131: 
 5132:                         (*s_etat_processus).instruction_courante = NULL;
 5133:                         liberation(s_etat_processus, s_objet);
 5134: 
 5135:                         free(arguments);
 5136:                     }
 5137: 
 5138:                     if (option_a == d_vrai)
 5139:                     {
 5140:                         fprintf(stdout, "%s\n", (*s_etat_processus)
 5141:                                 .definitions_chainees);
 5142:                     }
 5143:                     else
 5144:                     {
 5145:                         if (option_D == d_vrai)
 5146:                         {
 5147:                             lancement_daemon(s_etat_processus);
 5148:                         }
 5149: 
 5150:                         if (option_p == d_faux)
 5151:                         {
 5152:                             if (setjmp(contexte_initial) == 0)
 5153:                             {
 5154:                                 erreur = sequenceur(s_etat_processus);
 5155: 
 5156:                                 if (erreur == d_absence_erreur)
 5157:                                 {
 5158:                                     if (((*s_etat_processus)
 5159:                                             .arret_depuis_abort == 0) &&
 5160:                                             ((*s_etat_processus).at_exit
 5161:                                             != NULL))
 5162:                                     {
 5163:                                         // Permet de traiter ATEXIT
 5164:                                         // même après réception d'un SIGINT.
 5165:                                         (*s_etat_processus)
 5166:                                                 .var_volatile_alarme = 0;
 5167:                                         (*s_etat_processus)
 5168:                                                 .var_volatile_requete_arret = 0;
 5169: 
 5170:                                         if ((*s_etat_processus).profilage ==
 5171:                                                 d_vrai)
 5172:                                         {
 5173:                                             profilage(s_etat_processus,
 5174:                                                     "ATEXIT");
 5175:                                         }
 5176: 
 5177:                                         erreur = evaluation(s_etat_processus,
 5178:                                                 (*s_etat_processus).at_exit,
 5179:                                                 'E');
 5180: 
 5181:                                         if ((*s_etat_processus).profilage ==
 5182:                                                 d_vrai)
 5183:                                         {
 5184:                                             profilage(s_etat_processus, NULL);
 5185:                                         }
 5186: 
 5187:                                         if (((*s_etat_processus)
 5188:                                                 .erreur_execution != d_ex) ||
 5189:                                                 ((*s_etat_processus).exception
 5190:                                                 != d_ep) || ((*s_etat_processus)
 5191:                                                 .erreur_systeme != d_es))
 5192:                                         {
 5193:                                             printf("%s [%d]\n", message =
 5194:                                                     messages(s_etat_processus),
 5195:                                                     (int) getpid());
 5196:                                             free(message);
 5197: 
 5198:                                             if (test_cfsf(s_etat_processus, 51)
 5199:                                                     == d_faux)
 5200:                                             {
 5201:                                                 printf("%s", ds_beep);
 5202:                                             }
 5203: 
 5204:                                             if ((*s_etat_processus).core ==
 5205:                                                     d_vrai)
 5206:                                             {
 5207:                                                 printf("\n");
 5208: 
 5209:                                                 if ((*s_etat_processus).langue
 5210:                                                         == 'F')
 5211:                                                 {
 5212:                                                     printf("+++Information : Gé"
 5213:                                                             "nération du fichie"
 5214:                                                             "r rpl-core "
 5215:                                                             "[%d]\n", (int)
 5216:                                                             getpid());
 5217:                                                 }
 5218:                                                 else
 5219:                                                 {
 5220:                                                     printf("+++Information : Wr"
 5221:                                                             "iting rpl-core fil"
 5222:                                                             "e [%d]\n",
 5223:                                                             (int) getpid());
 5224:                                                 }
 5225: 
 5226:                                                 rplcore(s_etat_processus);
 5227: 
 5228:                                                 if ((*s_etat_processus).langue
 5229:                                                         == 'F')
 5230:                                                 {
 5231:                                                     printf("+++Information : Pr"
 5232:                                                             "ocessus tracé [%d]"
 5233:                                                             "\n",
 5234:                                                             (int) getpid());
 5235:                                                 }
 5236:                                                 else
 5237:                                                 {
 5238:                                                     printf("+++Information : Do"
 5239:                                                             "ne [%d]\n", (int)
 5240:                                                             getpid());
 5241:                                                 }
 5242: 
 5243:                                                 printf("\n");
 5244:                                                 fflush(stdout);
 5245:                                             }
 5246:                                         }
 5247:                                     }
 5248:                                 }
 5249:                             }
 5250:                         }
 5251:                         else
 5252:                         {
 5253:                             if (setjmp(contexte_initial) == 0)
 5254:                             {
 5255:                                 erreur = sequenceur_optimise(s_etat_processus);
 5256: 
 5257:                                 if (erreur == d_absence_erreur)
 5258:                                 {
 5259:                                     if (((*s_etat_processus)
 5260:                                             .arret_depuis_abort == 0) &&
 5261:                                             ((*s_etat_processus).at_exit
 5262:                                             != NULL))
 5263:                                     {
 5264:                                         // Permet de traiter ATEXIT
 5265:                                         // même après réception d'un SIGINT.
 5266:                                         (*s_etat_processus)
 5267:                                                 .var_volatile_alarme = 0;
 5268:                                         (*s_etat_processus)
 5269:                                                 .var_volatile_requete_arret = 0;
 5270: 
 5271:                                         if ((*s_etat_processus).profilage ==
 5272:                                                 d_vrai)
 5273:                                         {
 5274:                                             profilage(s_etat_processus,
 5275:                                                     "ATEXIT");
 5276:                                         }
 5277: 
 5278:                                         erreur = evaluation(s_etat_processus,
 5279:                                                 (*s_etat_processus).at_exit,
 5280:                                                 'E');
 5281: 
 5282:                                         if ((*s_etat_processus).profilage ==
 5283:                                                 d_vrai)
 5284:                                         {
 5285:                                             profilage(s_etat_processus, NULL);
 5286:                                         }
 5287: 
 5288:                                         if (((*s_etat_processus)
 5289:                                                 .erreur_execution != d_ex) ||
 5290:                                                 ((*s_etat_processus).exception
 5291:                                                 != d_ep) || ((*s_etat_processus)
 5292:                                                 .erreur_systeme != d_es))
 5293:                                         {
 5294:                                             printf("%s [%d]\n", message =
 5295:                                                     messages(s_etat_processus),
 5296:                                                     (int) getpid());
 5297:                                             free(message);
 5298: 
 5299:                                             if (test_cfsf(s_etat_processus, 51)
 5300:                                                     == d_faux)
 5301:                                             {
 5302:                                                 printf("%s", ds_beep);
 5303:                                             }
 5304: 
 5305:                                             if ((*s_etat_processus).core ==
 5306:                                                     d_vrai)
 5307:                                             {
 5308:                                                 printf("\n");
 5309: 
 5310:                                                 if ((*s_etat_processus).langue
 5311:                                                         == 'F')
 5312:                                                 {
 5313:                                                     printf("+++Information : Gé"
 5314:                                                             "nération du fichie"
 5315:                                                             "r rpl-core "
 5316:                                                             "[%d]\n", (int)
 5317:                                                             getpid());
 5318:                                                 }
 5319:                                                 else
 5320:                                                 {
 5321:                                                     printf("+++Information : Wr"
 5322:                                                             "iting rpl-core fil"
 5323:                                                             "e [%d]\n",
 5324:                                                             (int) getpid());
 5325:                                                 }
 5326: 
 5327:                                                 rplcore(s_etat_processus);
 5328: 
 5329:                                                 if ((*s_etat_processus).langue
 5330:                                                         == 'F')
 5331:                                                 {
 5332:                                                     printf("+++Information : Pr"
 5333:                                                             "ocessus tracé [%d]"
 5334:                                                             "\n",
 5335:                                                             (int) getpid());
 5336:                                                 }
 5337:                                                 else
 5338:                                                 {
 5339:                                                     printf("+++Information : Do"
 5340:                                                             "ne [%d]\n", (int)
 5341:                                                             getpid());
 5342:                                                 }
 5343: 
 5344:                                                 printf("\n");
 5345:                                                 fflush(stdout);
 5346:                                             }
 5347:                                         }
 5348:                                     }
 5349:                                 }
 5350:                             }
 5351:                         }
 5352:                     }
 5353: 
 5354:                     for(i = 0; i < (*s_etat_processus).sections_critiques; i++)
 5355:                     {
 5356:                         pthread_mutex_unlock(&mutex_sections_critiques);
 5357:                     }
 5358: 
 5359:                     liberation(s_etat_processus, (*s_etat_processus).at_exit);
 5360:                     liberation(s_etat_processus, (*s_etat_processus).at_poke);
 5361: 
 5362:                     if ((*s_etat_processus).generateur_aleatoire != NULL)
 5363:                     {
 5364:                         liberation_generateur_aleatoire(s_etat_processus);
 5365:                     }
 5366: 
 5367:                     l_element_courant = (*s_etat_processus).liste_mutexes;
 5368:                     while(l_element_courant != NULL)
 5369:                     {
 5370:                         liberation(s_etat_processus,
 5371:                                 (*((struct_liste_chainee *)
 5372:                                 l_element_courant)).donnee);
 5373:                         l_element_suivant = (*((struct_liste_chainee *)
 5374:                                 l_element_courant)).suivant;
 5375:                         free((struct_liste_chainee *) l_element_courant);
 5376:                         l_element_courant = l_element_suivant;
 5377:                     }
 5378: 
 5379:                     /*
 5380:                      * Arrêt des processus fils
 5381:                      */
 5382: 
 5383:                     if ((*s_etat_processus).presence_fusible == d_vrai)
 5384:                     {
 5385:                         pthread_cancel((*s_etat_processus).thread_fusible);
 5386:                     }
 5387: 
 5388:                     pthread_mutex_lock(&((*s_etat_processus)
 5389:                             .mutex_pile_processus));
 5390: 
 5391:                     l_element_courant = (void *) (*s_etat_processus)
 5392:                             .l_base_pile_processus;
 5393: 
 5394:                     while(l_element_courant != NULL)
 5395:                     {
 5396:                         if ((*s_etat_processus).debug == d_vrai)
 5397:                         {
 5398:                             if (((*s_etat_processus).type_debug &
 5399:                                     d_debug_processus) != 0)
 5400:                             {
 5401:                                 if ((*(*((struct_processus_fils *)
 5402:                                         (*(*((struct_liste_chainee *)
 5403:                                         l_element_courant)).donnee)
 5404:                                         .objet)).thread)
 5405:                                         .processus_detache == d_vrai)
 5406:                                 {
 5407:                                     if ((*s_etat_processus).langue == 'F')
 5408:                                     {
 5409:                                         printf("[%d] Signalement pour arrêt du "
 5410:                                                 "processus %d\n",
 5411:                                                 (int) getpid(), (int)
 5412:                                                 (*(*((struct_processus_fils *)
 5413:                                                 (*(*((struct_liste_chainee *)
 5414:                                                 l_element_courant)).donnee)
 5415:                                                 .objet)).thread).pid);
 5416:                                     }
 5417:                                     else
 5418:                                     {
 5419:                                         printf("[%d] Send stop signal to "
 5420:                                                 "process %d\n",
 5421:                                                 (int) getpid(), (int)
 5422:                                                 (*(*((struct_processus_fils *)
 5423:                                                 (*(*((struct_liste_chainee *)
 5424:                                                 l_element_courant)).donnee)
 5425:                                                 .objet)).thread).pid);
 5426:                                     }
 5427:                                 }
 5428:                                 else
 5429:                                 {
 5430:                                     if ((*s_etat_processus).langue == 'F')
 5431:                                     {
 5432:                                         printf("[%d] Signalement pour arrêt du "
 5433:                                                 "thread %llu\n", (int) getpid(),
 5434:                                                 (unsigned long long)
 5435:                                                 (*(*((struct_processus_fils *)
 5436:                                                 (*(*((struct_liste_chainee *)
 5437:                                                 l_element_courant)).donnee)
 5438:                                                 .objet)).thread).tid);
 5439:                                     }
 5440:                                     else
 5441:                                     {
 5442:                                         printf("[%d] Send stop signal to "
 5443:                                                 "thread %llu\n",
 5444:                                                 (int) getpid(),
 5445:                                                 (unsigned long long)
 5446:                                                 (*(*((struct_processus_fils *)
 5447:                                                 (*(*((struct_liste_chainee *)
 5448:                                                 l_element_courant)).donnee)
 5449:                                                 .objet)).thread).tid);
 5450:                                     }
 5451:                                 }
 5452:                             }
 5453:                         }
 5454: 
 5455:                         if ((*(*((struct_processus_fils *)
 5456:                                 (*(*((struct_liste_chainee *)
 5457:                                 l_element_courant)).donnee).objet))
 5458:                                 .thread).processus_detache == d_vrai)
 5459:                         {
 5460:                             if ((*s_etat_processus).var_volatile_alarme != 0)
 5461:                             {
 5462:                                 envoi_signal_processus(
 5463:                                         (*(*((struct_processus_fils *)
 5464:                                         (*(*((struct_liste_chainee *)
 5465:                                         l_element_courant)).donnee).objet))
 5466:                                         .thread).pid, rpl_sigurg);
 5467:                             }
 5468:                             else
 5469:                             {
 5470:                                 if ((*s_etat_processus).arret_depuis_abort
 5471:                                         == -1)
 5472:                                 {
 5473:                                     envoi_signal_processus(
 5474:                                             (*(*((struct_processus_fils *)
 5475:                                             (*(*((struct_liste_chainee *)
 5476:                                             l_element_courant)).donnee).objet))
 5477:                                             .thread).pid, rpl_sigabort);
 5478:                                 }
 5479:                                 else
 5480:                                 {
 5481:                                     envoi_signal_processus(
 5482:                                             (*(*((struct_processus_fils *)
 5483:                                             (*(*((struct_liste_chainee *)
 5484:                                             l_element_courant)).donnee).objet))
 5485:                                             .thread).pid, rpl_sigstop);
 5486:                                 }
 5487:                             }
 5488:                         }
 5489:                         else
 5490:                         {
 5491:                             pthread_mutex_lock(&((*(*((struct_processus_fils *)
 5492:                                     (*(*((struct_liste_chainee *)
 5493:                                     l_element_courant)).donnee).objet)).thread)
 5494:                                     .mutex));
 5495: 
 5496:                             if ((*(*((struct_processus_fils *)
 5497:                                     (*(*((struct_liste_chainee *)
 5498:                                     l_element_courant)).donnee).objet)).thread)
 5499:                                     .thread_actif == d_vrai)
 5500:                             {
 5501:                                 if ((*s_etat_processus).var_volatile_alarme
 5502:                                         != 0)
 5503:                                 {
 5504:                                     envoi_signal_thread(
 5505:                                             (*(*((struct_processus_fils *)
 5506:                                             (*(*((struct_liste_chainee *)
 5507:                                             l_element_courant)).donnee).objet))
 5508:                                             .thread).tid, rpl_sigurg);
 5509:                                 }
 5510:                                 else
 5511:                                 {
 5512:                                     if ((*s_etat_processus).arret_depuis_abort
 5513:                                             == -1)
 5514:                                     {
 5515:                                         envoi_signal_thread(
 5516:                                                 (*(*((struct_processus_fils *)
 5517:                                                 (*(*((struct_liste_chainee *)
 5518:                                                 l_element_courant)).donnee)
 5519:                                                 .objet)).thread).tid,
 5520:                                                 rpl_sigabort);
 5521:                                     }
 5522:                                     else
 5523:                                     {
 5524:                                         envoi_signal_thread(
 5525:                                                 (*(*((struct_processus_fils *)
 5526:                                                 (*(*((struct_liste_chainee *)
 5527:                                                 l_element_courant)).donnee)
 5528:                                                 .objet)).thread).tid,
 5529:                                                 rpl_sigstop);
 5530:                                     }
 5531:                                 }
 5532:                             }
 5533: 
 5534:                             pthread_mutex_unlock(
 5535:                                     &((*(*((struct_processus_fils *)
 5536:                                     (*(*((struct_liste_chainee *)
 5537:                                     l_element_courant)).donnee).objet)).thread)
 5538:                                     .mutex));
 5539:                         }
 5540: 
 5541:                         l_element_courant = (*((struct_liste_chainee *)
 5542:                                 l_element_courant)).suivant;
 5543:                     }
 5544: 
 5545:                     /*
 5546:                      * Attente de la fin de tous les processus fils
 5547:                      */
 5548: 
 5549:                     for(i = 0; i < d_NOMBRE_INTERRUPTIONS;
 5550:                             (*s_etat_processus).masque_interruptions[i++]
 5551:                             = 'I');
 5552: 
 5553:                     attente.tv_sec = 0;
 5554:                     attente.tv_nsec = GRANULARITE_us * 1000;
 5555: 
 5556:                     while((*s_etat_processus).l_base_pile_processus != NULL)
 5557:                     {
 5558:                         l_element_courant = (void *)
 5559:                                 (*s_etat_processus).l_base_pile_processus;
 5560: 
 5561:                         for(i = 0; i < (*(*((struct_processus_fils *)
 5562:                                 (*(*((struct_liste_chainee *)
 5563:                                 l_element_courant)).donnee).objet)).thread)
 5564:                                 .nombre_objets_dans_pipe; i++)
 5565:                         {
 5566:                             if ((s_objet = lecture_pipe(
 5567:                                     s_etat_processus,
 5568:                                     (*(*((struct_processus_fils *)
 5569:                                     (*(*((struct_liste_chainee *)
 5570:                                     l_element_courant)).donnee).objet)).thread)
 5571:                                     .pipe_objets[0])) != NULL)
 5572:                             {
 5573:                                 liberation(s_etat_processus, s_objet);
 5574: 
 5575:                                 (*(*((struct_processus_fils *)
 5576:                                         (*(*((struct_liste_chainee *)
 5577:                                         l_element_courant)).donnee).objet))
 5578:                                         .thread).nombre_objets_dans_pipe--;
 5579: 
 5580:                                 action.sa_handler = SIG_IGN;
 5581:                                 action.sa_flags = 0;
 5582: 
 5583:                                 if (sigaction(SIGPIPE, &action, &registre)
 5584:                                         != 0)
 5585:                                 {
 5586: #                                   ifndef SEMAPHORES_NOMMES
 5587:                                         sem_post(&((*s_etat_processus)
 5588:                                                 .semaphore_fork));
 5589:                                         sem_post(
 5590:                                                 &semaphore_gestionnaires_signaux
 5591:                                                 );
 5592:                                         sem_destroy(
 5593:                                                 &semaphore_gestionnaires_signaux
 5594:                                                 );
 5595:                                         sem_destroy(&((*s_etat_processus)
 5596:                                                 .semaphore_fork));
 5597: #                                   else
 5598:                                         sem_post((*s_etat_processus)
 5599:                                                 .semaphore_fork);
 5600:                                         sem_post(
 5601:                                                 semaphore_gestionnaires_signaux
 5602:                                                 );
 5603:                                         sem_destroy2(
 5604:                                                 semaphore_gestionnaires_signaux,
 5605:                                                 getpid(), SEM_SIGNAUX);
 5606:                                         sem_destroy3((*s_etat_processus)
 5607:                                                 .semphore_fork, getpid(),
 5608:                                                 pthread_self(), SEM_FORK);
 5609: #                                   endif
 5610: 
 5611:                                     liberation_contexte_cas(s_etat_processus);
 5612:                                     liberation_queue_signaux(s_etat_processus);
 5613: 
 5614: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 5615:                                         stackoverflow_deinstall_handler();
 5616: #                                   endif
 5617: 
 5618: #                                   ifdef HAVE_SIGSEGV_RECOVERY
 5619:                                         if (debug == d_faux)
 5620:                                         {
 5621:                                             sigsegv_deinstall_handler();
 5622:                                         }
 5623: #                                   endif
 5624: 
 5625:                                     pthread_mutex_unlock(&((*s_etat_processus)
 5626:                                             .mutex_pile_processus));
 5627:                                     return(EXIT_FAILURE);
 5628:                                 }
 5629: 
 5630:                                 while((longueur_ecriture =
 5631:                                         write_atomic(s_etat_processus,
 5632:                                         (*(*((struct_processus_fils *)
 5633:                                         (*(*((struct_liste_chainee *)
 5634:                                         l_element_courant)).donnee).objet))
 5635:                                         .thread).pipe_nombre_injections[1], "+",
 5636:                                         sizeof(unsigned char))) !=
 5637:                                         sizeof(unsigned char))
 5638:                                 {
 5639:                                     if (longueur_ecriture == -1)
 5640:                                     {
 5641:                                         // Le processus n'existe plus.
 5642:                                         break;
 5643:                                     }
 5644:                                 }
 5645: 
 5646:                                 if (sigaction(SIGPIPE, &registre, NULL)
 5647:                                         != 0)
 5648:                                 {
 5649: #                                   ifndef SEMAPHORES_NOMMES
 5650:                                         sem_post(&((*s_etat_processus)
 5651:                                                 .semaphore_fork));
 5652:                                         sem_post(
 5653:                                                 &semaphore_gestionnaires_signaux
 5654:                                                 );
 5655:                                         sem_destroy(
 5656:                                                 &semaphore_gestionnaires_signaux
 5657:                                                 );
 5658:                                         sem_destroy(&((*s_etat_processus)
 5659:                                                 .semaphore_fork));
 5660: #                                   else
 5661:                                         sem_post((*s_etat_processus)
 5662:                                                 .semaphore_fork);
 5663:                                         sem_post(
 5664:                                                 semaphore_gestionnaires_signaux
 5665:                                                 );
 5666:                                         sem_destroy2(
 5667:                                                 semaphore_gestionnaires_signaux,
 5668:                                                 getpid(), SEM_SIGNAUX);
 5669:                                         sem_destroy3((*s_etat_processus)
 5670:                                                 .semphore_fork, getpid(),
 5671:                                                 pthread_self(), SEM_FORK);
 5672: #                                   endif
 5673: 
 5674:                                     liberation_contexte_cas(s_etat_processus);
 5675:                                     liberation_queue_signaux(s_etat_processus);
 5676: 
 5677: #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 5678:                                         stackoverflow_deinstall_handler();
 5679: #                                   endif
 5680: 
 5681: #                                   ifdef HAVE_SIGSEGV_RECOVERY
 5682:                                         if (debug == d_faux)
 5683:                                         {
 5684:                                             sigsegv_deinstall_handler();
 5685:                                         }
 5686: #                                   endif
 5687: 
 5688:                                     pthread_mutex_unlock(&((*s_etat_processus)
 5689:                                             .mutex_pile_processus));
 5690:                                     return(EXIT_FAILURE);
 5691:                                 }
 5692:                             }
 5693:                         }
 5694: 
 5695:                         pthread_mutex_lock(&((*s_etat_processus)
 5696:                                 .mutex_interruptions));
 5697: 
 5698:                         if ((*s_etat_processus)
 5699:                                 .nombre_interruptions_non_affectees != 0)
 5700:                         {
 5701:                             affectation_interruptions_logicielles(
 5702:                                     s_etat_processus);
 5703:                         }
 5704: 
 5705:                         pthread_mutex_unlock(&((*s_etat_processus)
 5706:                                 .mutex_interruptions));
 5707:                         pthread_mutex_unlock(&((*s_etat_processus)
 5708:                                 .mutex_pile_processus));
 5709:                         nanosleep(&attente, NULL);
 5710:                         scrutation_interruptions(s_etat_processus);
 5711:                         pthread_mutex_lock(&((*s_etat_processus)
 5712:                                 .mutex_pile_processus));
 5713:                     }
 5714: 
 5715:                     pthread_mutex_unlock(&((*s_etat_processus)
 5716:                             .mutex_pile_processus));
 5717: 
 5718:                     erreur_historique = write_history(
 5719:                             (*s_etat_processus).nom_fichier_historique);
 5720:                     clear_history();
 5721: 
 5722:                     if (erreur_historique != 0)
 5723:                     {
 5724:                         if ((*s_etat_processus).langue == 'F')
 5725:                         {
 5726:                             printf("+++Erreur : L'historique ne peut être "
 5727:                                     "écrit\n");
 5728:                         }
 5729:                         else
 5730:                         {
 5731:                             printf("+++Error : History cannot be "
 5732:                                     "written\n");
 5733:                         }
 5734: 
 5735:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 5736:                         {
 5737:                             printf("%s", ds_beep);
 5738:                         }
 5739:                     }
 5740: 
 5741:                     free((*s_etat_processus).nom_fichier_historique);
 5742: 
 5743:                     if (((*s_etat_processus).core == d_vrai) &&
 5744:                             (erreur == d_erreur) &&
 5745:                             ((*s_etat_processus).var_volatile_traitement_sigint
 5746:                             == 0))
 5747:                     {
 5748:                         printf("\n");
 5749:                         
 5750:                         if ((*s_etat_processus).langue == 'F')
 5751:                         {
 5752:                             printf("+++Information : Génération du fichier "
 5753:                                     "rpl-core [%d]\n", (int) getpid());
 5754:                         }
 5755:                         else
 5756:                         {
 5757:                             printf("+++Information : Writing rpl-core "
 5758:                                     "file [%d]\n", (int) getpid());
 5759:                         }
 5760: 
 5761:                         rplcore(s_etat_processus);
 5762: 
 5763:                         if ((*s_etat_processus).langue == 'F')
 5764:                         {
 5765:                             printf("+++Information : Processus tracé [%d]\n",
 5766:                                     (int) getpid());
 5767:                         }
 5768:                         else
 5769:                         {
 5770:                             printf("+++Information : Done [%d]\n",
 5771:                                     (int) getpid());
 5772:                         }
 5773: 
 5774:                         printf("\n");
 5775:                     }
 5776: 
 5777:                     free((*s_etat_processus).definitions_chainees);
 5778: 
 5779:                     /*
 5780:                      * Libération de l'arbre des instructions
 5781:                      */
 5782: 
 5783:                     liberation_arbre_instructions(s_etat_processus,
 5784:                             (*s_etat_processus).arbre_instructions);
 5785:                     free((*s_etat_processus).pointeurs_caracteres);
 5786: 
 5787:                     if ((*s_etat_processus).entree_standard != NULL)
 5788:                     {
 5789:                         pclose((*s_etat_processus).entree_standard);
 5790:                         (*s_etat_processus).entree_standard = NULL;
 5791:                     }
 5792: 
 5793:                     if ((*s_etat_processus).nom_fichier_impression != NULL)
 5794:                     {
 5795:                         if (test_cfsf(s_etat_processus, 51) == d_faux)
 5796:                         {
 5797:                             printf("%s", ds_beep);
 5798:                         }
 5799: 
 5800:                         if ((*s_etat_processus).langue == 'F')
 5801:                         {
 5802:                             printf("+++Attention : Queue d'impression "
 5803:                                     "non vide !\n");
 5804:                         }
 5805:                         else
 5806:                         {
 5807:                             printf("+++Warning : Non empty printing "
 5808:                                     "spool queue !\n");
 5809:                         }
 5810: 
 5811:                         instruction_erase(s_etat_processus);
 5812:                     }
 5813: 
 5814:                     if ((*s_etat_processus).fichiers_graphiques != NULL)
 5815:                     {
 5816:                         instruction_cllcd(s_etat_processus);
 5817:                     }
 5818: 
 5819:                     liberation(s_etat_processus, (*s_etat_processus).indep);
 5820:                     liberation(s_etat_processus, (*s_etat_processus).depend);
 5821: 
 5822:                     free((*s_etat_processus).label_x);
 5823:                     free((*s_etat_processus).label_y);
 5824:                     free((*s_etat_processus).label_z);
 5825:                     free((*s_etat_processus).titre);
 5826:                     free((*s_etat_processus).legende);
 5827: 
 5828:                     liberation(s_etat_processus, (*s_etat_processus)
 5829:                             .parametres_courbes_de_niveau);
 5830: 
 5831:                     for(i = 0; i < d_NOMBRE_INTERRUPTIONS; i++)
 5832:                     {
 5833:                         liberation(s_etat_processus,
 5834:                                 (*s_etat_processus).corps_interruptions[i]);
 5835: 
 5836:                         l_element_courant = (*s_etat_processus)
 5837:                                 .pile_origine_interruptions[i];
 5838: 
 5839:                         while(l_element_courant != NULL)
 5840:                         {
 5841:                             l_element_suivant = (*((struct_liste_chainee *)
 5842:                                     l_element_courant)).suivant;
 5843: 
 5844:                             liberation(s_etat_processus,
 5845:                                     (*((struct_liste_chainee *)
 5846:                                     l_element_courant)).donnee);
 5847:                             free(l_element_courant);
 5848: 
 5849:                             l_element_courant = l_element_suivant;
 5850:                         }
 5851:                     }
 5852: 
 5853:                     if ((*s_etat_processus).instruction_derniere_erreur
 5854:                             != NULL)
 5855:                     {
 5856:                         free((*s_etat_processus).instruction_derniere_erreur);
 5857:                         (*s_etat_processus).instruction_derniere_erreur = NULL;
 5858:                     }
 5859: 
 5860:                     /*
 5861:                      * Le pointeur s_etat_processus.nom_fichier_source est
 5862:                      * alloué par le système. Il ne faut donc pas
 5863:                      * le libérer...
 5864:                      */
 5865: 
 5866:                     liberation_arbre_variables_partagees(s_etat_processus,
 5867:                             (*(*s_etat_processus).s_arbre_variables_partagees));
 5868:                     liberation_arbre_variables(s_etat_processus,
 5869:                             (*s_etat_processus).s_arbre_variables, d_vrai);
 5870:                     free((*s_etat_processus).pointeurs_caracteres_variables);
 5871: 
 5872:                     l_element_statique_courant = (*s_etat_processus)
 5873:                             .l_liste_variables_statiques;
 5874: 
 5875:                     while(l_element_statique_courant != NULL)
 5876:                     {
 5877:                         l_element_statique_suivant =
 5878:                             (*l_element_statique_courant).suivant;
 5879:                         free(l_element_statique_courant);
 5880:                         l_element_statique_courant = l_element_statique_suivant;
 5881:                     }
 5882: 
 5883:                     l_element_partage_courant = (*(*s_etat_processus)
 5884:                             .l_liste_variables_partagees);
 5885: 
 5886:                     while(l_element_partage_courant != NULL)
 5887:                     {
 5888:                         l_element_partage_suivant =
 5889:                                 (*l_element_partage_courant).suivant;
 5890:                         free(l_element_partage_courant);
 5891:                         l_element_partage_courant = l_element_partage_suivant;
 5892:                     }
 5893: 
 5894:                     /*
 5895:                      * Si resultats est non nul, rplinit a été appelé
 5896:                      * depuis rpl() [librpl] et non main().
 5897:                      * On copie alors le contenu de la * pile dans un
 5898:                      * tableau **resultats dont le pointeur de base a
 5899:                      * été alloué dans rpl().
 5900:                      */
 5901: 
 5902:                     if (resultats != NULL)
 5903:                     {
 5904:                         if ((*resultats) != NULL)
 5905:                         {
 5906:                             free((*resultats));
 5907: 
 5908:                             if (((*resultats) = malloc(((size_t)
 5909:                                     ((*s_etat_processus)
 5910:                                     .hauteur_pile_operationnelle + 1))
 5911:                                     * sizeof(unsigned char **))) != NULL)
 5912:                             {
 5913:                                 (*resultats)[(*s_etat_processus)
 5914:                                         .hauteur_pile_operationnelle] = NULL;
 5915:                                 l_element_courant = (void *) (*s_etat_processus)
 5916:                                         .l_base_pile;
 5917: 
 5918:                                 for(i = 0; i < (*s_etat_processus)
 5919:                                         .hauteur_pile_operationnelle; i++)
 5920:                                 {
 5921:                                     if (l_element_courant != NULL)
 5922:                                     {
 5923:                                         (*resultats)[i] =
 5924:                                                 formateur(s_etat_processus,
 5925:                                                 0, (*((struct_liste_chainee *)
 5926:                                                 l_element_courant)).donnee);
 5927: 
 5928:                                         if ((*resultats)[i] == NULL)
 5929:                                         {
 5930:                                             i = (*s_etat_processus).
 5931:                                                     hauteur_pile_operationnelle;
 5932:                                         }
 5933:                                         else
 5934:                                         {
 5935:                                             l_element_suivant =
 5936:                                                     (*((struct_liste_chainee *)
 5937:                                                     l_element_courant)).suivant;
 5938:                                         }
 5939:                                     }
 5940:                                 }
 5941:                             }
 5942:                             else
 5943:                             {
 5944:                                 (*resultats) = NULL;
 5945:                                 erreur = d_es_allocation_memoire;
 5946:                             }
 5947:                         }
 5948:                     }
 5949: 
 5950:                     l_element_courant = (void *) (*s_etat_processus)
 5951:                             .l_base_pile;
 5952:                     while(l_element_courant != NULL)
 5953:                     {
 5954:                         l_element_suivant = (*((struct_liste_chainee *)
 5955:                                 l_element_courant)).suivant;
 5956: 
 5957:                         liberation(s_etat_processus,
 5958:                                 (*((struct_liste_chainee *)
 5959:                                 l_element_courant)).donnee);
 5960:                         free((struct_liste_chainee *) l_element_courant);
 5961: 
 5962:                         l_element_courant = l_element_suivant;
 5963:                     }
 5964: 
 5965:                     l_element_courant = (void *) (*s_etat_processus)
 5966:                             .l_base_pile_contextes;
 5967:                     while(l_element_courant != NULL)
 5968:                     {
 5969:                         l_element_suivant = (*((struct_liste_chainee *)
 5970:                                 l_element_courant)).suivant;
 5971: 
 5972:                         liberation(s_etat_processus,
 5973:                                 (*((struct_liste_chainee *)
 5974:                                 l_element_courant)).donnee);
 5975:                         free((struct_liste_chainee *) l_element_courant);
 5976: 
 5977:                         l_element_courant = l_element_suivant;
 5978:                     }
 5979: 
 5980:                     l_element_courant = (void *) (*s_etat_processus)
 5981:                             .l_base_pile_taille_contextes;
 5982:                     while(l_element_courant != NULL)
 5983:                     {
 5984:                         l_element_suivant = (*((struct_liste_chainee *)
 5985:                                 l_element_courant)).suivant;
 5986: 
 5987:                         liberation(s_etat_processus,
 5988:                                 (*((struct_liste_chainee *)
 5989:                                 l_element_courant)).donnee);
 5990:                         free((struct_liste_chainee *) l_element_courant);
 5991: 
 5992:                         l_element_courant = l_element_suivant;
 5993:                     }
 5994: 
 5995:                     for(i = 0; i < (*s_etat_processus)
 5996:                             .nombre_instructions_externes; i++)
 5997:                     {
 5998:                         free((*s_etat_processus).s_instructions_externes[i]
 5999:                                 .nom);
 6000:                         free((*s_etat_processus).s_instructions_externes[i]
 6001:                                 .nom_bibliotheque);
 6002:                     }
 6003: 
 6004:                     if ((*s_etat_processus).nombre_instructions_externes != 0)
 6005:                     {
 6006:                         free((*s_etat_processus).s_instructions_externes);
 6007:                     }
 6008: 
 6009:                     l_element_courant = (void *) (*s_etat_processus)
 6010:                             .s_bibliotheques;
 6011:                     
 6012:                     while(l_element_courant != NULL)
 6013:                     {
 6014:                         l_element_suivant = (*((struct_liste_chainee *)
 6015:                                 l_element_courant)).suivant;
 6016: 
 6017:                         free((*((struct_bibliotheque *)
 6018:                                 (*((struct_liste_chainee *)
 6019:                                 l_element_courant)).donnee)).nom);
 6020:                         dlclose((*((struct_bibliotheque *)
 6021:                                 (*((struct_liste_chainee *)
 6022:                                 l_element_courant)).donnee)).descripteur);
 6023:                         free((*((struct_liste_chainee *) l_element_courant))
 6024:                                 .donnee);
 6025:                         free(l_element_courant);
 6026: 
 6027:                         l_element_courant = l_element_suivant;
 6028:                     }
 6029: 
 6030:                     l_element_courant = (void *) (*s_etat_processus)
 6031:                             .l_base_pile_last;
 6032:                     while(l_element_courant != NULL)
 6033:                     {
 6034:                         l_element_suivant = (*((struct_liste_chainee *)
 6035:                                 l_element_courant)).suivant;
 6036: 
 6037:                         liberation(s_etat_processus,
 6038:                                 (*((struct_liste_chainee *)
 6039:                                 l_element_courant)).donnee);
 6040:                         free((struct_liste_chainee *) l_element_courant);
 6041: 
 6042:                         l_element_courant = l_element_suivant;
 6043:                     }
 6044: 
 6045:                     l_element_courant = (void *) (*s_etat_processus)
 6046:                             .l_base_pile_systeme;
 6047:                     while(l_element_courant != NULL)
 6048:                     {
 6049:                         l_element_suivant = (*((struct_liste_pile_systeme *)
 6050:                                 l_element_courant)).suivant;
 6051: 
 6052:                         liberation(s_etat_processus,
 6053:                                 (*((struct_liste_pile_systeme *)
 6054:                                 l_element_courant)).indice_boucle);
 6055:                         liberation(s_etat_processus,
 6056:                                 (*((struct_liste_pile_systeme *)
 6057:                                 l_element_courant)).limite_indice_boucle);
 6058:                         liberation(s_etat_processus,
 6059:                                 (*((struct_liste_pile_systeme *)
 6060:                                 l_element_courant)).objet_de_test);
 6061: 
 6062:                         if ((*((struct_liste_pile_systeme *)
 6063:                                 l_element_courant)).nom_variable != NULL)
 6064:                         {
 6065:                             free((*((struct_liste_pile_systeme *)
 6066:                                     l_element_courant)).nom_variable);
 6067:                         }
 6068: 
 6069:                         free((struct_liste_pile_systeme *)
 6070:                                 l_element_courant);
 6071: 
 6072:                         l_element_courant = l_element_suivant;
 6073:                     }
 6074: 
 6075:                     l_element_courant = (void *)
 6076:                             (*s_etat_processus).s_fichiers;
 6077:                     while(l_element_courant != NULL)
 6078:                     {
 6079:                         l_element_suivant = (*((struct_liste_chainee *)
 6080:                                 l_element_courant)).suivant;
 6081: 
 6082:                         fclose((*((struct_descripteur_fichier *)
 6083:                                 (*((struct_liste_chainee *)
 6084:                                 l_element_courant)).donnee))
 6085:                                 .descripteur_c);
 6086: 
 6087:                         if ((*((struct_descripteur_fichier *)
 6088:                                 (*((struct_liste_chainee *)
 6089:                                 l_element_courant)).donnee)).type != 'C')
 6090:                         {
 6091:                             sqlite3_close((*((struct_descripteur_fichier *)
 6092:                                     (*((struct_liste_chainee *)
 6093:                                     l_element_courant)).donnee))
 6094:                                     .descripteur_sqlite);
 6095:                         }
 6096: 
 6097:                         if ((*((struct_descripteur_fichier *)
 6098:                                 (*((struct_liste_chainee *)
 6099:                                 l_element_courant)).donnee))
 6100:                                 .effacement == 'Y')
 6101:                         {
 6102:                             unlink((*((struct_descripteur_fichier *)
 6103:                                     (*((struct_liste_chainee *)
 6104:                                     l_element_courant)).donnee))
 6105:                                     .nom);
 6106:                         }
 6107: 
 6108:                         free((*((struct_descripteur_fichier *)
 6109:                                 (*((struct_liste_chainee *)
 6110:                                 l_element_courant)).donnee)).nom);
 6111:                         free((struct_descripteur_fichier *)
 6112:                                 (*((struct_liste_chainee *)
 6113:                                 l_element_courant)).donnee);
 6114:                         free(l_element_courant);
 6115: 
 6116:                         l_element_courant = l_element_suivant;
 6117:                     }
 6118: 
 6119:                     l_element_courant = (void *)
 6120:                             (*s_etat_processus).s_sockets;
 6121:                     while(l_element_courant != NULL)
 6122:                     {
 6123:                         l_element_suivant = (*((struct_liste_chainee *)
 6124:                                 l_element_courant)).suivant;
 6125: 
 6126:                         if ((*((struct_socket *)
 6127:                                 (*(*((struct_liste_chainee *)
 6128:                                 l_element_courant)).donnee).objet))
 6129:                                 .socket_connectee == d_vrai)
 6130:                         {
 6131:                             shutdown((*((struct_socket *)
 6132:                                     (*(*((struct_liste_chainee *)
 6133:                                     l_element_courant)).donnee).objet))
 6134:                                     .socket, SHUT_RDWR);
 6135:                         }
 6136: 
 6137:                         close((*((struct_socket *)
 6138:                                 (*(*((struct_liste_chainee *)
 6139:                                 l_element_courant)).donnee).objet)).socket);
 6140: 
 6141:                         if ((*((struct_socket *) (*(*((struct_liste_chainee *)
 6142:                                 l_element_courant)).donnee).objet)).effacement
 6143:                                 == 'Y')
 6144:                         {
 6145:                             unlink((*((struct_socket *)
 6146:                                     (*(*((struct_liste_chainee *)
 6147:                                     l_element_courant)).donnee).objet))
 6148:                                     .adresse);
 6149:                         }
 6150: 
 6151:                         liberation(s_etat_processus,
 6152:                                 (*((struct_liste_chainee *)
 6153:                                 l_element_courant)).donnee);
 6154:                         free(l_element_courant);
 6155: 
 6156:                         l_element_courant = l_element_suivant;
 6157:                     }
 6158: 
 6159:                     l_element_courant = (void *)
 6160:                             (*s_etat_processus).s_connecteurs_sql;
 6161:                     while(l_element_courant != NULL)
 6162:                     {
 6163:                         l_element_suivant = (*((struct_liste_chainee *)
 6164:                                 l_element_courant)).suivant;
 6165: 
 6166:                         sqlclose((*((struct_liste_chainee *)
 6167:                                 l_element_courant)).donnee);
 6168:                         liberation(s_etat_processus,
 6169:                                 (*((struct_liste_chainee *)
 6170:                                 l_element_courant)).donnee);
 6171:                         free(l_element_courant);
 6172: 
 6173:                         l_element_courant = l_element_suivant;
 6174:                     }
 6175: 
 6176:                     l_element_courant = (*s_etat_processus).s_marques;
 6177:                     while(l_element_courant != NULL)
 6178:                     {
 6179:                         free((*((struct_marque *) l_element_courant)).label);
 6180:                         free((*((struct_marque *) l_element_courant)).position);
 6181:                         l_element_suivant = (*((struct_marque *)
 6182:                                 l_element_courant)).suivant;
 6183:                         free(l_element_courant);
 6184:                         l_element_courant = l_element_suivant;
 6185:                     }
 6186:                 }
 6187:                 else
 6188:                 {
 6189:                     erreur = d_es_allocation_memoire;
 6190: 
 6191:                     if (test_cfsf(s_etat_processus, 51) == d_faux)
 6192:                     {
 6193:                         printf("%s", ds_beep);
 6194:                     }
 6195: 
 6196:                     if ((*s_etat_processus).langue == 'F')
 6197:                     {
 6198:                         printf("+++Système : Mémoire insuffisante\n");
 6199:                     }
 6200:                     else
 6201:                     {
 6202:                         printf("+++System : Not enough memory\n");
 6203:                     }
 6204:                 }
 6205:             }
 6206: 
 6207:             liberation_allocateur(s_etat_processus);
 6208:         }
 6209: 
 6210:         if (traitement_fichier_temporaire == 'Y')
 6211:         {
 6212:             destruction_fichier(nom_fichier_temporaire);
 6213:             free(nom_fichier_temporaire);
 6214:         }
 6215: 
 6216:         if ((*s_etat_processus).profilage == d_vrai)
 6217:         {
 6218:             ecriture_profil(s_etat_processus);
 6219:             liberation_profil(s_etat_processus);
 6220:         }
 6221:     }
 6222: 
 6223:     closelog();
 6224: 
 6225:     pthread_mutex_destroy(&((*s_etat_processus).protection_liste_mutexes));
 6226: 
 6227:     retrait_thread(s_etat_processus);
 6228: 
 6229:     pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus));
 6230:     pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation));
 6231:     pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions));
 6232:     pthread_mutex_destroy(&((*s_etat_processus).mutex_signaux));
 6233:     pthread_mutex_destroy(&mutex_sections_critiques);
 6234:     pthread_mutex_destroy(&mutex_liste_variables_partagees);
 6235: 
 6236: #   ifndef SEMAPHORES_NOMMES
 6237:     sem_post(&((*s_etat_processus).semaphore_fork));
 6238:     sem_destroy(&((*s_etat_processus).semaphore_fork));
 6239: #   else
 6240:     sem_post((*s_etat_processus).semaphore_fork);
 6241:     sem_destroy3((*s_etat_processus).semaphore_fork, getpid(), pthread_self(),
 6242:             SEM_FORK);
 6243: #   endif
 6244: 
 6245:     free((*s_etat_processus).localisation);
 6246: 
 6247: #   ifndef SEMAPHORES_NOMMES
 6248:     sem_post(&semaphore_gestionnaires_signaux);
 6249:     sem_destroy(&semaphore_gestionnaires_signaux);
 6250: #   else
 6251:     sem_post(semaphore_gestionnaires_signaux);
 6252:     sem_destroy2(semaphore_gestionnaires_signaux, getpid(), SEM_SIGNAUX);
 6253: #   endif
 6254: 
 6255:     destruction_queue_signaux(s_etat_processus);
 6256:     liberation_contexte_cas(s_etat_processus);
 6257: 
 6258:     free((*s_etat_processus).chemin_fichiers_temporaires);
 6259: 
 6260:     if ((*s_etat_processus).requete_redemarrage == d_vrai)
 6261:     {
 6262:         chdir(repertoire_initial);
 6263:         execvp(arg_exec[0], &(arg_exec[0]));
 6264:         erreur = d_erreur;
 6265:     }
 6266: 
 6267:     free(arg_exec);
 6268:     arret_thread_signaux(s_etat_processus);
 6269:     free(s_etat_processus);
 6270: 
 6271: #   ifdef DEBUG_MEMOIRE
 6272:     debug_memoire_verification();
 6273:     analyse_post_mortem();
 6274: #   endif
 6275: 
 6276: #   ifdef HAVE_STACK_OVERFLOW_RECOVERY
 6277:     stackoverflow_deinstall_handler();
 6278: #   endif
 6279: 
 6280: #   ifdef HAVE_SIGSEGV_RECOVERY
 6281:     if (debug == d_faux)
 6282:     {
 6283:         sigsegv_deinstall_handler();
 6284:     }
 6285: #   endif
 6286: 
 6287:     return((erreur == d_absence_erreur) ? EXIT_SUCCESS : EXIT_FAILURE);
 6288: }
 6289: 
 6290: 
 6291: void
 6292: informations(struct_processus *s_etat_processus)
 6293: {
 6294:     printf("\n");
 6295: 
 6296:     if ((*s_etat_processus).langue == 'F')
 6297:     {
 6298:         printf("  rpl [-options] [programme]\n");
 6299:         printf("      -a : analyse du code\n");
 6300:         printf("      -A : paramètres passés au programme principal\n");
 6301:         printf("      -c : génération de fichier de débogage (rpl-core)\n");
 6302:         printf("      -d : option de déverminage interne\n");
 6303:         printf("      -D : lancement d'un daemon\n");
 6304:         printf("      -h : aide sur la ligne de commande\n");
 6305:         printf("      -i : fonctionnement interactif\n");
 6306:         printf("      -l : licence d'utilisation\n");
 6307:         printf("      -n : ignorance du signal HUP\n");
 6308:         printf("      -p : précompilation du script avant exécution\n");
 6309:         printf("      -P : profilage (-P ou -PP)\n");
 6310:         printf("      -s : empêchement de l'ouverture de l'écran initial\n");
 6311:         printf("      -S : exécution du script passé en ligne de commande\n");
 6312:         printf("      -t : trace\n");
 6313:         printf("      -v : version\n");
 6314:     }
 6315:     else
 6316:     {
 6317:         printf("  rpl [-options] [program]\n");
 6318:         printf("      -a : analyzes program\n");
 6319:         printf("      -A : sends parameters to main program\n");
 6320:         printf("      -c : allows creation of a rpl-core file, providing a way"
 6321:                 "\n"
 6322:                 "           to debug a program\n");
 6323:         printf("      -d : internal debug process\n");
 6324:         printf("      -D : starts in daemon mode\n");
 6325:         printf("      -h : shows a summary of available options\n");
 6326:         printf("      -i : runs the RPL/2 sequencer in interactive mode\n");
 6327:         printf("      -l : prints the user licence of the software\n");
 6328:         printf("      -n : ignores HUP signal\n");
 6329:         printf("      -p : precompiles script\n");
 6330:         printf("      -P : computes profile data (-P or -PP)\n");
 6331:         printf("      -s : disables splash screen\n");
 6332:         printf("      -S : executes script written in command line\n");
 6333:         printf("      -t : enables tracing mode\n");
 6334:         printf("      -v : prints the version number\n");
 6335:     }
 6336: 
 6337:     printf("\n");
 6338: 
 6339:     return;
 6340: }
 6341: 
 6342: 
 6343: logical1
 6344: controle_integrite(struct_processus *s_etat_processus,
 6345:         unsigned char *executable_candidat, unsigned char *executable)
 6346: {
 6347:     unsigned char       *md5;
 6348:     unsigned char       *sha1;
 6349: 
 6350:     if (strcmp(executable, "rplpp") == 0)
 6351:     {
 6352:         md5 = rplpp_md5;
 6353:         sha1 = rplpp_sha1;
 6354:     }
 6355:     else if (strcmp(executable, "rplfile") == 0)
 6356:     {
 6357:         md5 = rplfile_md5;
 6358:         sha1 = rplfile_sha1;
 6359:     }
 6360:     else if (strcmp(executable, "rpliconv") == 0)
 6361:     {
 6362:         md5 = rpliconv_md5;
 6363:         sha1 = rpliconv_sha1;
 6364:     }
 6365:     else if (strcmp(executable, "rplawk") == 0)
 6366:     {
 6367:         md5 = rplawk_md5;
 6368:         sha1 = rplawk_sha1;
 6369:     }
 6370:     else if (strcmp(executable, "rplconvert") == 0)
 6371:     {
 6372:         md5 = rplconvert_md5;
 6373:         sha1 = rplconvert_sha1;
 6374:     }
 6375:     else
 6376:     {
 6377:         return(d_faux);
 6378:     }
 6379: 
 6380:     if (controle(s_etat_processus, executable_candidat, "md5", md5) != d_vrai)
 6381:     {
 6382:         return(d_faux);
 6383:     }
 6384: 
 6385:     if (controle(s_etat_processus, executable_candidat, "sha1", sha1) != d_vrai)
 6386:     {
 6387:         return(d_faux);
 6388:     }
 6389: 
 6390:     return(d_vrai);
 6391: }
 6392: 
 6393: 
 6394: unsigned char *
 6395: date_compilation()
 6396: {
 6397:     unsigned char       *date;
 6398: 
 6399:     if ((date = malloc((strlen(d_date_en_rpl) + 1) * sizeof(unsigned char)))
 6400:             == NULL)
 6401:     {
 6402:         return(NULL);
 6403:     }
 6404: 
 6405:     strcpy(date, d_date_en_rpl);
 6406: 
 6407:     return(date);
 6408: }
 6409: 
 6410: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>