File:  [local] / rpl / src / instructions_p2.c
Revision 1.48: download - view: text, annotated - select for diffs - revision graph
Fri Sep 6 10:30:54 2013 UTC (10 years, 8 months ago) by bertrand
Branches: MAIN
CVS tags: rpl-4_1_16, HEAD
En route pour la 4.1.16.

    1: /*
    2: ================================================================================
    3:   RPL/2 (R) version 4.1.16
    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: #include "rpl-conv.h"
   24: 
   25: 
   26: /*
   27: ================================================================================
   28:   Fonction 'p->r'
   29: ================================================================================
   30:   Entrées : pointeur sur une structure struct_processus
   31: --------------------------------------------------------------------------------
   32:   Sorties :
   33: --------------------------------------------------------------------------------
   34:   Effets de bord : néant
   35: ================================================================================
   36: */
   37: 
   38: void
   39: instruction_p_vers_r(struct_processus *s_etat_processus)
   40: {
   41:     double                          angle;
   42: 
   43:     struct_liste_chainee            *l_element_courant;
   44:     struct_liste_chainee            *l_element_precedent;
   45: 
   46:     struct_objet                    *s_copie_argument;
   47:     struct_objet                    *s_objet_argument;
   48:     struct_objet                    *s_objet_resultat;
   49: 
   50:     (*s_etat_processus).erreur_execution = d_ex;
   51: 
   52:     if ((*s_etat_processus).affichage_arguments == 'Y')
   53:     {
   54:         printf("\n  P->R ");
   55: 
   56:         if ((*s_etat_processus).langue == 'F')
   57:         {
   58:             printf("(coordonnées polaires vers cartésiennes)\n\n");
   59:         }
   60:         else
   61:         {
   62:             printf("(polar to cartesian coordinates)\n\n");
   63:         }
   64: 
   65:         printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
   66:         printf("->  1: %s\n\n", d_CPL);
   67: 
   68:         printf("    1: %s, %s\n", d_NOM, d_ALG);
   69:         printf("->  1: %s\n\n", d_ALG);
   70: 
   71:         printf("    1: %s\n", d_RPN);
   72:         printf("->  1: %s\n", d_RPN);
   73: 
   74:         return;
   75:     }
   76:     else if ((*s_etat_processus).test_instruction == 'Y')
   77:     {
   78:         (*s_etat_processus).nombre_arguments = -1;
   79:         return;
   80:     }
   81: 
   82:     if (test_cfsf(s_etat_processus, 31) == d_vrai)
   83:     {
   84:         if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
   85:         {
   86:             return;
   87:         }
   88:     }
   89: 
   90:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
   91:             &s_objet_argument) == d_erreur)
   92:     {
   93:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
   94:         return;
   95:     }
   96: 
   97: /*
   98: --------------------------------------------------------------------------------
   99:   Conversion d'un entier ou d'un réel
  100: --------------------------------------------------------------------------------
  101: */
  102: 
  103:     if (((*s_objet_argument).type == INT) ||
  104:             ((*s_objet_argument).type == REL))
  105:     {
  106:         if ((s_objet_resultat = allocation(s_etat_processus, CPL)) == NULL)
  107:         {
  108:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  109:             return;
  110:         }
  111: 
  112:         if ((*s_objet_argument).type == INT)
  113:         {
  114:             (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle
  115:                     = (real8) (*((integer8 *) (*s_objet_argument).objet));
  116:         }
  117:         else
  118:         {
  119:             (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle
  120:                     = (*((real8 *) (*s_objet_argument).objet));
  121:         }
  122: 
  123:         (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_imaginaire
  124:                 = 0;
  125:     }
  126: 
  127: /*
  128: --------------------------------------------------------------------------------
  129:   Conversion d'un complexe
  130: --------------------------------------------------------------------------------
  131: */
  132: 
  133:     else if ((*s_objet_argument).type == CPL)
  134:     {
  135:         if ((s_objet_resultat = allocation(s_etat_processus, CPL)) == NULL)
  136:         {
  137:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  138:             return;
  139:         }
  140: 
  141:         angle = (*((struct_complexe16 *) (*s_objet_argument).objet))
  142:                 .partie_imaginaire;
  143: 
  144:         if (test_cfsf(s_etat_processus, 60) == d_faux)
  145:         {
  146:             conversion_degres_vers_radians(&angle);
  147:         }
  148: 
  149:         (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle =
  150:                 (*((struct_complexe16 *) (*s_objet_argument).objet))
  151:                 .partie_reelle * cos(angle);
  152:         (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_imaginaire =
  153:                 (*((struct_complexe16 *) (*s_objet_argument).objet))
  154:                 .partie_reelle * sin(angle);
  155:     }
  156: 
  157: /*
  158: --------------------------------------------------------------------------------
  159:   Conversion d'un nom
  160: --------------------------------------------------------------------------------
  161: */
  162: 
  163:     else if ((*s_objet_argument).type == NOM)
  164:     {
  165:         if ((s_objet_resultat = allocation(s_etat_processus, ALG)) == NULL)
  166:         {
  167:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  168:             return;
  169:         }
  170: 
  171:         if (((*s_objet_resultat).objet =
  172:                 allocation_maillon(s_etat_processus)) == NULL)
  173:         {
  174:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  175:             return;
  176:         }
  177: 
  178:         l_element_courant = (*s_objet_resultat).objet;
  179: 
  180:         if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
  181:                 == NULL)
  182:         {
  183:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  184:             return;
  185:         }
  186: 
  187:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  188:                 .nombre_arguments = 0;
  189:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  190:                 .fonction = instruction_vers_niveau_superieur;
  191: 
  192:         if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  193:                 .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
  194:         {
  195:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  196:             return;
  197:         }
  198: 
  199:         strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  200:                 .nom_fonction, "<<");
  201: 
  202:         if (((*l_element_courant).suivant =
  203:                 allocation_maillon(s_etat_processus)) == NULL)
  204:         {
  205:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  206:             return;
  207:         }
  208: 
  209:         l_element_courant = (*l_element_courant).suivant;
  210:         (*l_element_courant).donnee = s_objet_argument;
  211: 
  212:         if (((*l_element_courant).suivant =
  213:                 allocation_maillon(s_etat_processus)) == NULL)
  214:         {
  215:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  216:             return;
  217:         }
  218: 
  219:         l_element_courant = (*l_element_courant).suivant;
  220: 
  221:         if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
  222:                 == NULL)
  223:         {
  224:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  225:             return;
  226:         }
  227: 
  228:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  229:                 .nombre_arguments = 1;
  230:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  231:                 .fonction = instruction_p_vers_r;
  232: 
  233:         if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  234:                 .nom_fonction = malloc(5 * sizeof(unsigned char))) == NULL)
  235:         {
  236:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  237:             return;
  238:         }
  239: 
  240:         strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  241:                 .nom_fonction, "P->R");
  242: 
  243:         if (((*l_element_courant).suivant =
  244:                 allocation_maillon(s_etat_processus)) == NULL)
  245:         {
  246:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  247:             return;
  248:         }
  249: 
  250:         l_element_courant = (*l_element_courant).suivant;
  251: 
  252:         if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
  253:                 == NULL)
  254:         {
  255:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  256:             return;
  257:         }
  258: 
  259:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  260:                 .nombre_arguments = 0;
  261:         (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  262:                 .fonction = instruction_vers_niveau_inferieur;
  263: 
  264:         if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  265:                 .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
  266:         {
  267:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  268:             return;
  269:         }
  270: 
  271:         strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
  272:                 .nom_fonction, ">>");
  273: 
  274:         (*l_element_courant).suivant = NULL;
  275:         s_objet_argument = NULL;
  276:     }
  277: 
  278: /*
  279: --------------------------------------------------------------------------------
  280:   Conversion d'une expression
  281: --------------------------------------------------------------------------------
  282: */
  283: 
  284:     else if (((*s_objet_argument).type == ALG) ||
  285:             ((*s_objet_argument).type == RPN))
  286:     {
  287:         if ((s_copie_argument = copie_objet(s_etat_processus, s_objet_argument,
  288:                 'N')) == NULL)
  289:         {
  290:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  291:             return;
  292:         }
  293: 
  294:         l_element_courant = (struct_liste_chainee *)
  295:                 (*s_copie_argument).objet;
  296:         l_element_precedent = l_element_courant;
  297: 
  298:         while((*l_element_courant).suivant != NULL)
  299:         {
  300:             l_element_precedent = l_element_courant;
  301:             l_element_courant = (*l_element_courant).suivant;
  302:         }
  303: 
  304:         if (((*l_element_precedent).suivant =
  305:                 allocation_maillon(s_etat_processus)) == NULL)
  306:         {
  307:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  308:             return;
  309:         }
  310: 
  311:         if (((*(*l_element_precedent).suivant).donnee =
  312:                 allocation(s_etat_processus, FCT)) == NULL)
  313:         {
  314:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  315:             return;
  316:         }
  317: 
  318:         (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
  319:                 .donnee).objet)).nombre_arguments = 1;
  320:         (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
  321:                 .donnee).objet)).fonction = instruction_p_vers_r;
  322: 
  323:         if (((*((struct_fonction *) (*(*(*l_element_precedent)
  324:                 .suivant).donnee).objet)).nom_fonction =
  325:                 malloc(5 * sizeof(unsigned char))) == NULL)
  326:         {
  327:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  328:             return;
  329:         }
  330: 
  331:         strcpy((*((struct_fonction *) (*(*(*l_element_precedent)
  332:                 .suivant).donnee).objet)).nom_fonction, "P->R");
  333: 
  334:         (*(*l_element_precedent).suivant).suivant = l_element_courant;
  335: 
  336:         s_objet_resultat = s_copie_argument;
  337:     }
  338: 
  339: /*
  340: --------------------------------------------------------------------------------
  341:   Réalisation impossible de la fonction P->R
  342: --------------------------------------------------------------------------------
  343: */
  344: 
  345:     else
  346:     {
  347:         liberation(s_etat_processus, s_objet_argument);
  348: 
  349:         (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
  350:         return;
  351:     }
  352: 
  353:     liberation(s_etat_processus, s_objet_argument);
  354: 
  355:     if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
  356:             s_objet_resultat) == d_erreur)
  357:     {
  358:         return;
  359:     }
  360: 
  361:     return;
  362: }
  363: 
  364: 
  365: /*
  366: ================================================================================
  367:   Fonction 'put'
  368: ================================================================================
  369:   Entrées : pointeur sur une structure struct_processus
  370: --------------------------------------------------------------------------------
  371:   Sorties :
  372: --------------------------------------------------------------------------------
  373:   Effets de bord : néant
  374: ================================================================================
  375: */
  376: 
  377: void
  378: instruction_put(struct_processus *s_etat_processus)
  379: {
  380:     logical1                            variable_partagee;
  381: 
  382:     struct_liste_chainee                *l_element_courant;
  383: 
  384:     struct_objet                        *s_copie_3;
  385:     struct_objet                        *s_copie_4;
  386:     struct_objet                        *s_objet_1;
  387:     struct_objet                        *s_objet_2;
  388:     struct_objet                        *s_objet_3;
  389:     struct_objet                        *s_objet_4;
  390:     struct_objet                        *s_objet_element;
  391: 
  392:     integer8                            i;
  393:     integer8                            indice_i;
  394:     integer8                            indice_j;
  395:     integer8                            j;
  396:     integer8                            nombre_dimensions;
  397: 
  398:     void                                *tampon;
  399: 
  400:     (*s_etat_processus).erreur_execution = d_ex;
  401: 
  402:     if ((*s_etat_processus).affichage_arguments == 'Y')
  403:     {
  404:         printf("\n  PUT ");
  405: 
  406:         if ((*s_etat_processus).langue == 'F')
  407:         {
  408:             printf("(change un élément)\n\n");
  409:         }
  410:         else
  411:         {
  412:             printf("(change element)\n\n");
  413:         }
  414: 
  415:         printf("    3: %s, %s, %s\n", d_VIN, d_VRL, d_VCX);
  416:         printf("    2: %s\n", d_LST);
  417:         printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
  418:         printf("->  1: %s, %s, %s\n\n", d_VIN, d_VRL, d_VCX);
  419: 
  420:         printf("    3: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
  421:         printf("    2: %s\n", d_LST);
  422:         printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
  423:         printf("->  1: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
  424: 
  425:         printf("    3: %s\n", d_LST);
  426:         printf("    2: %s\n", d_INT);
  427:         printf("    1: %s, %s, %s, %s, %s, %s,\n"
  428:                 "       %s, %s, %s, %s, %s,\n"
  429:                 "       %s, %s, %s, %s, %s,\n"
  430:                 "       %s, %s, %s, %s,\n"
  431:                 "       %s, %s\n",
  432:                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
  433:                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
  434:                 d_SQL, d_SLB, d_PRC, d_MTX);
  435:         printf("->  1: %s\n\n", d_LST);
  436: 
  437:         printf("    3: %s\n", d_TAB);
  438:         printf("    2: %s\n", d_LST);
  439:         printf("    1: %s, %s, %s, %s, %s, %s,\n"
  440:                 "       %s, %s, %s, %s, %s,\n"
  441:                 "       %s, %s, %s, %s, %s,\n"
  442:                 "       %s, %s, %s, %s,\n"
  443:                 "       %s, %s\n",
  444:                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
  445:                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
  446:                 d_SQL, d_SLB, d_PRC, d_MTX);
  447:         printf("->  1: %s\n\n", d_TAB);
  448: 
  449:         printf("    3: %s\n", d_NOM);
  450:         printf("    2: %s, %s\n", d_LST, d_INT);
  451:         printf("    1: %s, %s, %s, %s, %s, %s,\n"
  452:                 "       %s, %s, %s, %s, %s,\n"
  453:                 "       %s, %s, %s, %s, %s,\n"
  454:                 "       %s, %s, %s, %s,\n"
  455:                 "       %s, %s\n",
  456:                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
  457:                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
  458:                 d_SQL, d_SLB, d_PRC, d_MTX);
  459: 
  460:         return;
  461:     }
  462:     else if ((*s_etat_processus).test_instruction == 'Y')
  463:     {
  464:         (*s_etat_processus).nombre_arguments = -1;
  465:         return;
  466:     }
  467: 
  468:     if (test_cfsf(s_etat_processus, 31) == d_vrai)
  469:     {
  470:         if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
  471:         {
  472:             return;
  473:         }
  474:     }
  475: 
  476:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
  477:             &s_objet_1) == d_erreur)
  478:     {
  479:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
  480:         return;
  481:     }
  482: 
  483:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
  484:             &s_objet_2) == d_erreur)
  485:     {
  486:         liberation(s_etat_processus, s_objet_1);
  487: 
  488:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
  489:         return;
  490:     }
  491: 
  492:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
  493:             &s_objet_3) == d_erreur)
  494:     {
  495:         liberation(s_etat_processus, s_objet_1);
  496:         liberation(s_etat_processus, s_objet_2);
  497: 
  498:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
  499:         return;
  500:     }
  501: 
  502: /*
  503: --------------------------------------------------------------------------------
  504:   Traitement des éléments des vecteurs
  505: --------------------------------------------------------------------------------
  506: */
  507: 
  508:     if (((*s_objet_3).type == VIN) ||
  509:             ((*s_objet_3).type == VRL) ||
  510:             ((*s_objet_3).type == VCX))
  511:     {
  512:         if ((*s_objet_2).type != LST)
  513:         {
  514:             liberation(s_etat_processus, s_objet_1);
  515:             liberation(s_etat_processus, s_objet_2);
  516:             liberation(s_etat_processus, s_objet_3);
  517: 
  518:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
  519:             return;
  520:         }
  521: 
  522:         l_element_courant = (*s_objet_2).objet;
  523:         nombre_dimensions = 0;
  524: 
  525:         while(l_element_courant != NULL)
  526:         {
  527:             nombre_dimensions++;
  528:             l_element_courant = (*l_element_courant).suivant;
  529:         }
  530: 
  531:         if (nombre_dimensions != 1)
  532:         {
  533:             liberation(s_etat_processus, s_objet_1);
  534:             liberation(s_etat_processus, s_objet_2);
  535:             liberation(s_etat_processus, s_objet_3);
  536: 
  537:             (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
  538:             return;
  539:         }
  540: 
  541:         l_element_courant = (*s_objet_2).objet;
  542: 
  543:         if ((*(*l_element_courant).donnee).type != INT)
  544:         {
  545:             liberation(s_etat_processus, s_objet_1);
  546:             liberation(s_etat_processus, s_objet_2);
  547:             liberation(s_etat_processus, s_objet_3);
  548: 
  549:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
  550:             return;
  551:         }
  552: 
  553:         if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
  554:         {
  555:             liberation(s_etat_processus, s_objet_1);
  556:             liberation(s_etat_processus, s_objet_2);
  557:             liberation(s_etat_processus, s_objet_3);
  558: 
  559:             (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
  560:             return;
  561:         }
  562:         else if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) >
  563:                 (integer8) (*((struct_vecteur *) (*s_objet_3).objet)).taille)
  564:         {
  565:             liberation(s_etat_processus, s_objet_1);
  566:             liberation(s_etat_processus, s_objet_2);
  567:             liberation(s_etat_processus, s_objet_3);
  568: 
  569:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
  570:             return;
  571:         }
  572: 
  573:         indice_i = (*((integer8 *) (*(*l_element_courant).donnee).objet));
  574: 
  575:         if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'Q')) == NULL)
  576:         {
  577:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  578:             return;
  579:         }
  580: 
  581:         liberation(s_etat_processus, s_objet_3);
  582:         s_objet_3 = s_copie_3;
  583: 
  584:         if ((*s_objet_3).type == VIN)
  585:         {
  586:             /*
  587:              * Vecteur d'entiers
  588:              */
  589: 
  590:             if ((*s_objet_1).type == INT)
  591:             {
  592:                 /*
  593:                  * Aucune conversion de type
  594:                  */
  595: 
  596:                 ((integer8 *) (*((struct_vecteur *) (*s_objet_3).objet))
  597:                         .tableau)[indice_i - 1] = (*((integer8 *)
  598:                         (*s_objet_1).objet));
  599:             }
  600:             else if ((*s_objet_1).type == REL)
  601:             {
  602:                 /*
  603:                  * Conversion du vecteur en vecteur réel
  604:                  */
  605: 
  606:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
  607:                         (*s_objet_3).objet)).tableau);
  608: 
  609:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'R';
  610:                 (*s_objet_3).type = VRL;
  611: 
  612:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
  613:                         = malloc(((size_t) (*((struct_vecteur *)
  614:                         (*s_objet_3).objet)).taille) * sizeof(real8)))
  615:                         == NULL)
  616:                 {
  617:                     (*s_etat_processus).erreur_systeme =
  618:                             d_es_allocation_memoire;
  619:                     return;
  620:                 }
  621: 
  622:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
  623:                         .taille; i++)
  624:                 {
  625:                     ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
  626:                             .tableau)[i] = (real8) (((integer8 *) tampon)[i]);
  627:                 }
  628: 
  629:                 free((integer8 *) tampon);
  630: 
  631:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
  632:                         .tableau)[indice_i - 1] = (*((real8 *)
  633:                         (*s_objet_1).objet));
  634:             }
  635:             else if ((*s_objet_1).type == CPL)
  636:             {
  637:                 /*
  638:                  * Conversion du vecteur en vecteur complexe
  639:                  */
  640: 
  641:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
  642:                         (*s_objet_3).objet)).tableau);
  643: 
  644:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'C';
  645:                 (*s_objet_3).type = VCX;
  646: 
  647:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
  648:                         = malloc(((size_t) (*((struct_vecteur *)
  649:                         (*s_objet_3).objet)).taille) *
  650:                         sizeof(struct_complexe16))) == NULL)
  651:                 {
  652:                     (*s_etat_processus).erreur_systeme =
  653:                             d_es_allocation_memoire;
  654:                     return;
  655:                 }
  656: 
  657:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
  658:                         .taille; i++)
  659:                 {
  660:                     ((struct_complexe16 *) (*((struct_vecteur *)
  661:                             (*s_objet_3).objet)).tableau)[i].partie_reelle =
  662:                             (real8) (((integer8 *) tampon)[i]);
  663:                     ((struct_complexe16 *) (*((struct_vecteur *)
  664:                             (*s_objet_3).objet)).tableau)[i]
  665:                             .partie_imaginaire = (real8) 0;
  666:                 }
  667: 
  668:                 free((integer8 *) tampon);
  669: 
  670:                 ((struct_complexe16 *) (*((struct_vecteur *)
  671:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  672:                         .partie_reelle = (*((struct_complexe16 *)
  673:                         (*s_objet_1).objet)).partie_reelle;
  674:                 ((struct_complexe16 *) (*((struct_vecteur *)
  675:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  676:                         .partie_imaginaire = (*((struct_complexe16 *)
  677:                         (*s_objet_1).objet)).partie_imaginaire;
  678:             }
  679:             else
  680:             {
  681:                 liberation(s_etat_processus, s_objet_1);
  682:                 liberation(s_etat_processus, s_objet_2);
  683:                 liberation(s_etat_processus, s_objet_3);
  684: 
  685:                 (*s_etat_processus).erreur_execution =
  686:                         d_ex_erreur_type_argument;
  687:                 return;
  688:             }
  689:         }
  690:         else if ((*s_objet_3).type == VRL)
  691:         {
  692:             /*
  693:              * Vecteur de réels
  694:              */
  695: 
  696:             if ((*s_objet_1).type == INT)
  697:             {
  698:                 /*
  699:                  * Conversion de l'élément à insérer en réel
  700:                  */
  701: 
  702:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
  703:                         .tableau)[indice_i - 1] = (real8) (*((integer8 *)
  704:                         (*s_objet_1).objet));
  705:             }
  706:             else if ((*s_objet_1).type == REL)
  707:             {
  708:                 /*
  709:                  * Aucune conversion de type
  710:                  */
  711: 
  712:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
  713:                         .tableau)[indice_i - 1] = (*((real8 *)
  714:                         (*s_objet_1).objet));
  715:             }
  716:             else if ((*s_objet_1).type == CPL)
  717:             {
  718:                 /*
  719:                  * Conversion du vecteur en vecteur complexe
  720:                  */
  721: 
  722:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
  723:                         (*s_objet_3).objet)).tableau);
  724: 
  725:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'C';
  726:                 (*s_objet_3).type = VCX;
  727: 
  728:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
  729:                         = malloc(((size_t) (*((struct_vecteur *)
  730:                         (*s_objet_3).objet)).taille) *
  731:                         sizeof(struct_complexe16))) == NULL)
  732:                 {
  733:                     (*s_etat_processus).erreur_systeme =
  734:                             d_es_allocation_memoire;
  735:                     return;
  736:                 }
  737: 
  738:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
  739:                         .taille; i++)
  740:                 {
  741:                     ((struct_complexe16 *) (*((struct_vecteur *)
  742:                             (*s_objet_3).objet)).tableau)[i].partie_reelle =
  743:                             ((real8 *) tampon)[i];
  744:                     ((struct_complexe16 *) (*((struct_vecteur *)
  745:                             (*s_objet_3).objet)).tableau)[i]
  746:                             .partie_imaginaire = (real8) 0;
  747:                 }
  748: 
  749:                 free((real8 *) tampon);
  750: 
  751:                 ((struct_complexe16 *) (*((struct_vecteur *)
  752:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  753:                         .partie_reelle = (*((struct_complexe16 *)
  754:                         (*s_objet_1).objet)).partie_reelle;
  755:                 ((struct_complexe16 *) (*((struct_vecteur *)
  756:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  757:                         .partie_imaginaire = (*((struct_complexe16 *)
  758:                         (*s_objet_1).objet)).partie_imaginaire;
  759:             }
  760:             else
  761:             {
  762:                 liberation(s_etat_processus, s_objet_1);
  763:                 liberation(s_etat_processus, s_objet_2);
  764:                 liberation(s_etat_processus, s_objet_3);
  765: 
  766:                 (*s_etat_processus).erreur_execution =
  767:                         d_ex_erreur_type_argument;
  768:                 return;
  769:             }
  770:         }
  771:         else
  772:         {
  773:             /*
  774:              * Vecteur de complexes
  775:              */
  776: 
  777:             if ((*s_objet_1).type == INT)
  778:             {
  779:                 /*
  780:                  * Conversion de l'élément à insérer en complexe
  781:                  */
  782: 
  783:                 ((struct_complexe16 *) (*((struct_vecteur *)
  784:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  785:                         .partie_reelle = (real8) (*((integer8 *)
  786:                         (*s_objet_1).objet));
  787:                 ((struct_complexe16 *) (*((struct_vecteur *)
  788:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
  789:                         .partie_imaginaire = (real8) 0;
  790:             }
  791:             else if ((*s_objet_1).type == REL)
  792:             {
  793:                 /*
  794:                  * Conversion de l'élément à insérer en complexe
  795:                  */
  796: 
  797:                 ((struct_complexe16 *) (*((struct_vecteur *)
  798:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  799:                         .partie_reelle = (*((real8 *) (*s_objet_1).objet));
  800:                 ((struct_complexe16 *) (*((struct_vecteur *)
  801:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
  802:                         .partie_imaginaire = (real8) 0;
  803:             }
  804:             else if ((*s_objet_1).type == CPL)
  805:             {
  806:                 /*
  807:                  * Aucune conversion de type
  808:                  */
  809: 
  810:                 ((struct_complexe16 *) (*((struct_vecteur *)
  811:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  812:                         .partie_reelle = (*((struct_complexe16 *)
  813:                         (*s_objet_1).objet)).partie_reelle;
  814:                 ((struct_complexe16 *) (*((struct_vecteur *)
  815:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
  816:                         .partie_imaginaire = (*((struct_complexe16 *)
  817:                         (*s_objet_1).objet)).partie_imaginaire;
  818:             }
  819:             else
  820:             {
  821:                 liberation(s_etat_processus, s_objet_1);
  822:                 liberation(s_etat_processus, s_objet_2);
  823:                 liberation(s_etat_processus, s_objet_3);
  824: 
  825:                 (*s_etat_processus).erreur_execution =
  826:                         d_ex_erreur_type_argument;
  827:                 return;
  828:             }
  829:         }
  830: 
  831:         liberation(s_etat_processus, s_objet_1);
  832:         liberation(s_etat_processus, s_objet_2);
  833: 
  834:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
  835:                 s_objet_3) == d_erreur)
  836:         {
  837:             return;
  838:         }
  839:     }
  840: 
  841: /*
  842: --------------------------------------------------------------------------------
  843:   Traitement des éléments des matrices
  844: --------------------------------------------------------------------------------
  845: */
  846: 
  847:     else if (((*s_objet_3).type == MIN) ||
  848:             ((*s_objet_3).type == MRL) ||
  849:             ((*s_objet_3).type == MCX))
  850:     {
  851:         if ((*s_objet_2).type != LST)
  852:         {
  853:             liberation(s_etat_processus, s_objet_1);
  854:             liberation(s_etat_processus, s_objet_2);
  855:             liberation(s_etat_processus, s_objet_3);
  856: 
  857:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
  858:             return;
  859:         }
  860: 
  861:         l_element_courant = (*s_objet_2).objet;
  862:         nombre_dimensions = 0;
  863: 
  864:         while(l_element_courant != NULL)
  865:         {
  866:             nombre_dimensions++;
  867:             l_element_courant = (*l_element_courant).suivant;
  868:         }
  869: 
  870:         if (nombre_dimensions != 2)
  871:         {
  872:             liberation(s_etat_processus, s_objet_1);
  873:             liberation(s_etat_processus, s_objet_2);
  874:             liberation(s_etat_processus, s_objet_3);
  875: 
  876:             (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
  877:             return;
  878:         }
  879: 
  880:         l_element_courant = (*s_objet_2).objet;
  881: 
  882:         indice_i = 0;
  883:         indice_j = 0;
  884: 
  885:         while(l_element_courant != NULL)
  886:         {
  887:             if ((*(*l_element_courant).donnee).type != INT)
  888:             {
  889:                 liberation(s_etat_processus, s_objet_1);
  890:                 liberation(s_etat_processus, s_objet_2);
  891:                 liberation(s_etat_processus, s_objet_3);
  892: 
  893:                 (*s_etat_processus).erreur_execution =
  894:                         d_ex_erreur_type_argument;
  895:                 return;
  896:             }
  897: 
  898:             if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
  899:             {
  900:                 liberation(s_etat_processus, s_objet_1);
  901:                 liberation(s_etat_processus, s_objet_2);
  902:                 liberation(s_etat_processus, s_objet_3);
  903: 
  904:                 (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
  905:                 return;
  906:             }
  907: 
  908:             if (indice_i == 0)
  909:             {
  910:                 indice_i = (*((integer8 *)
  911:                         (*(*l_element_courant).donnee).objet));
  912:             }
  913:             else
  914:             {
  915:                 indice_j = (*((integer8 *)
  916:                         (*(*l_element_courant).donnee).objet));
  917:             }
  918: 
  919:             l_element_courant = (*l_element_courant).suivant;
  920:         }
  921: 
  922:         if ((indice_i > (*((struct_matrice *) (*s_objet_3).objet))
  923:                 .nombre_lignes) || (indice_j > (*((struct_matrice *)
  924:                 (*s_objet_3).objet)).nombre_colonnes))
  925:         {
  926:             liberation(s_etat_processus, s_objet_1);
  927:             liberation(s_etat_processus, s_objet_2);
  928:             liberation(s_etat_processus, s_objet_3);
  929: 
  930:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
  931:             return;
  932:         }
  933: 
  934:         if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'Q')) == NULL)
  935:         {
  936:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
  937:             return;
  938:         }
  939: 
  940:         liberation(s_etat_processus, s_objet_3);
  941:         s_objet_3 = s_copie_3;
  942: 
  943:         if ((*s_objet_3).type == MIN)
  944:         {
  945:             /*
  946:              * Matrice d'entiers
  947:              */
  948: 
  949:             if ((*s_objet_1).type == INT)
  950:             {
  951:                 /*
  952:                  * Aucune conversion de type
  953:                  */
  954: 
  955:                 ((integer8 **) (*((struct_matrice *) (*s_objet_3).objet))
  956:                         .tableau)[indice_i - 1][indice_j - 1] =
  957:                         (*((integer8 *) (*s_objet_1).objet));
  958:             }
  959:             else if ((*s_objet_1).type == REL)
  960:             {
  961:                 /*
  962:                  * Conversion de la matrice en matrice réelle
  963:                  */
  964: 
  965:                 tampon = (void *) ((integer8 **) (*((struct_matrice *)
  966:                         (*s_objet_3).objet)).tableau);
  967: 
  968:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'R';
  969:                 (*s_objet_3).type = MRL;
  970: 
  971:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
  972:                         = malloc(((size_t) (*((struct_matrice *)
  973:                         (*s_objet_3).objet)).nombre_lignes) * sizeof(real8 *)))
  974:                         == NULL)
  975:                 {
  976:                     (*s_etat_processus).erreur_systeme =
  977:                             d_es_allocation_memoire;
  978:                     return;
  979:                 }
  980: 
  981:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
  982:                         .nombre_lignes; i++)
  983:                 {
  984:                     if ((((real8 **) (*((struct_matrice *)
  985:                             (*s_objet_3).objet)).tableau)[i]
  986:                             = malloc(((size_t) (*((struct_matrice *)
  987:                             (*s_objet_3).objet)).nombre_colonnes) *
  988:                             sizeof(real8))) == NULL)
  989:                     {
  990:                         (*s_etat_processus).erreur_systeme =
  991:                                 d_es_allocation_memoire;
  992:                         return;
  993:                     }
  994: 
  995:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
  996:                             .nombre_colonnes; j++)
  997:                     {
  998:                         ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
  999:                                 .tableau)[i][j] = (real8) (((integer8 **)
 1000:                                 tampon)[i][j]);
 1001:                     }
 1002: 
 1003:                     free(((integer8 **) tampon)[i]);
 1004:                 }
 1005: 
 1006:                 free((integer8 **) tampon);
 1007: 
 1008:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 1009:                         .tableau)[indice_i - 1][indice_j - 1] = (*((real8 *)
 1010:                         (*s_objet_1).objet));
 1011:             }
 1012:             else if ((*s_objet_1).type == CPL)
 1013:             {
 1014:                 /*
 1015:                  * Conversion de la matrice en matrice complexe
 1016:                  */
 1017: 
 1018:                 tampon = (void *) ((integer8 **) (*((struct_matrice *)
 1019:                         (*s_objet_3).objet)).tableau);
 1020: 
 1021:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'C';
 1022:                 (*s_objet_3).type = MCX;
 1023: 
 1024:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
 1025:                         = malloc(((size_t) (*((struct_matrice *)
 1026:                         (*s_objet_3).objet)).nombre_lignes) *
 1027:                         sizeof(struct_complexe16 *))) == NULL)
 1028:                 {
 1029:                     (*s_etat_processus).erreur_systeme =
 1030:                             d_es_allocation_memoire;
 1031:                     return;
 1032:                 }
 1033: 
 1034:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
 1035:                         .nombre_lignes; i++)
 1036:                 {
 1037:                     if ((((struct_complexe16 **) (*((struct_matrice *)
 1038:                             (*s_objet_3).objet)).tableau)[i]
 1039:                             = malloc(((size_t) (*((struct_matrice *)
 1040:                             (*s_objet_3).objet)).nombre_colonnes) *
 1041:                             sizeof(struct_complexe16))) == NULL)
 1042:                     {
 1043:                         (*s_etat_processus).erreur_systeme =
 1044:                                 d_es_allocation_memoire;
 1045:                         return;
 1046:                     }
 1047: 
 1048:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
 1049:                             .nombre_colonnes; j++)
 1050:                     {
 1051:                         ((struct_complexe16 **) (*((struct_matrice *)
 1052:                                 (*s_objet_3).objet)).tableau)[i][j]
 1053:                                 .partie_reelle = (real8) (((integer8 **)
 1054:                                 tampon)[i][j]);
 1055:                         ((struct_complexe16 **) (*((struct_matrice *)
 1056:                                 (*s_objet_3).objet)).tableau)[i][j]
 1057:                                 .partie_imaginaire = (real8) 0;
 1058:                     }
 1059: 
 1060:                     free(((integer8 **) tampon)[i]);
 1061:                 }
 1062: 
 1063:                 free((integer8 **) tampon);
 1064: 
 1065:                 ((struct_complexe16 **) (*((struct_matrice *)
 1066:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1067:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 1068:                         (*s_objet_1).objet)).partie_reelle;
 1069:                 ((struct_complexe16 **) (*((struct_matrice *)
 1070:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1071:                         [indice_j - 1].partie_imaginaire =
 1072:                         (*((struct_complexe16 *)
 1073:                         (*s_objet_1).objet)).partie_imaginaire;
 1074:             }
 1075:             else
 1076:             {
 1077:                 liberation(s_etat_processus, s_objet_1);
 1078:                 liberation(s_etat_processus, s_objet_2);
 1079:                 liberation(s_etat_processus, s_objet_3);
 1080: 
 1081:                 (*s_etat_processus).erreur_execution =
 1082:                         d_ex_erreur_type_argument;
 1083:                 return;
 1084:             }
 1085:         }
 1086:         else if ((*s_objet_3).type == MRL)
 1087:         {
 1088:             /*
 1089:              * Matrice de réels
 1090:              */
 1091: 
 1092:             if ((*s_objet_1).type == INT)
 1093:             {
 1094:                 /*
 1095:                  * Conversion de l'élément à insérer en réel
 1096:                  */
 1097: 
 1098:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 1099:                         .tableau)[indice_i - 1][indice_j - 1] =
 1100:                         (real8) (*((integer8 *) (*s_objet_1).objet));
 1101:             }
 1102:             else if ((*s_objet_1).type == REL)
 1103:             {
 1104:                 /*
 1105:                  * Aucune conversion de type
 1106:                  */
 1107: 
 1108:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 1109:                         .tableau)[indice_i - 1][indice_j - 1] = (*((real8 *)
 1110:                         (*s_objet_1).objet));
 1111:             }
 1112:             else if ((*s_objet_1).type == CPL)
 1113:             {
 1114:                 /*
 1115:                  * Conversion de la matrice en matrice complexe
 1116:                  */
 1117: 
 1118:                 tampon = (void *) ((real8 **) (*((struct_matrice *)
 1119:                         (*s_objet_3).objet)).tableau);
 1120: 
 1121:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'C';
 1122:                 (*s_objet_3).type = MCX;
 1123: 
 1124:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
 1125:                         = malloc(((size_t) (*((struct_matrice *)
 1126:                         (*s_objet_3).objet)).nombre_lignes) *
 1127:                         sizeof(struct_complexe16 *))) == NULL)
 1128:                 {
 1129:                     (*s_etat_processus).erreur_systeme =
 1130:                             d_es_allocation_memoire;
 1131:                     return;
 1132:                 }
 1133: 
 1134:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
 1135:                         .nombre_lignes; i++)
 1136:                 {
 1137:                     if ((((struct_complexe16 **) (*((struct_matrice *)
 1138:                             (*s_objet_3).objet)).tableau)[i]
 1139:                             = malloc(((size_t) (*((struct_matrice *)
 1140:                             (*s_objet_3).objet)).nombre_colonnes) *
 1141:                             sizeof(struct_complexe16))) == NULL)
 1142:                     {
 1143:                         (*s_etat_processus).erreur_systeme =
 1144:                                 d_es_allocation_memoire;
 1145:                         return;
 1146:                     }
 1147: 
 1148:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
 1149:                             .nombre_colonnes; j++)
 1150:                     {
 1151:                         ((struct_complexe16 **) (*((struct_matrice *)
 1152:                                 (*s_objet_3).objet)).tableau)[i][j]
 1153:                                 .partie_reelle = (((real8 **)
 1154:                                 tampon)[i][j]);
 1155:                         ((struct_complexe16 **) (*((struct_matrice *)
 1156:                                 (*s_objet_3).objet)).tableau)[i][j]
 1157:                                 .partie_imaginaire = (real8) 0;
 1158:                     }
 1159: 
 1160:                     free(((integer8 **) tampon)[i]);
 1161:                 }
 1162: 
 1163:                 free((integer8 **) tampon);
 1164: 
 1165:                 ((struct_complexe16 **) (*((struct_matrice *)
 1166:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1167:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 1168:                         (*s_objet_1).objet)).partie_reelle;
 1169:                 ((struct_complexe16 **) (*((struct_matrice *)
 1170:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1171:                         [indice_j - 1].partie_imaginaire =
 1172:                         (*((struct_complexe16 *)
 1173:                         (*s_objet_1).objet)).partie_imaginaire;
 1174:             }
 1175:             else
 1176:             {
 1177:                 liberation(s_etat_processus, s_objet_1);
 1178:                 liberation(s_etat_processus, s_objet_2);
 1179:                 liberation(s_etat_processus, s_objet_3);
 1180: 
 1181:                 (*s_etat_processus).erreur_execution =
 1182:                         d_ex_erreur_type_argument;
 1183:                 return;
 1184:             }
 1185:         }
 1186:         else
 1187:         {
 1188:             /*
 1189:              * Matrice de complexes
 1190:              */
 1191: 
 1192:             if ((*s_objet_1).type == INT)
 1193:             {
 1194:                 /*
 1195:                  * Conversion de l'élément à insérer en complexe
 1196:                  */
 1197: 
 1198:                 ((struct_complexe16 **) (*((struct_matrice *)
 1199:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1200:                         [indice_j - 1].partie_reelle = (real8) (*((integer8 *)
 1201:                         (*s_objet_1).objet));
 1202:                 ((struct_complexe16 **) (*((struct_matrice *)
 1203:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 1204:                         [indice_j - 1].partie_imaginaire = (real8) 0;
 1205:             }
 1206:             else if ((*s_objet_1).type == REL)
 1207:             {
 1208:                 /*
 1209:                  * Conversion de l'élément à insérer en complexe
 1210:                  */
 1211: 
 1212:                 ((struct_complexe16 **) (*((struct_matrice *)
 1213:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1214:                         [indice_j - 1].partie_reelle =
 1215:                         (*((real8 *) (*s_objet_1).objet));
 1216:                 ((struct_complexe16 **) (*((struct_matrice *)
 1217:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 1218:                         [indice_j - 1].partie_imaginaire = (real8) 0;
 1219:             }
 1220:             else if ((*s_objet_1).type == CPL)
 1221:             {
 1222:                 /*
 1223:                  * Aucune conversion de type
 1224:                  */
 1225: 
 1226:                 ((struct_complexe16 **) (*((struct_matrice *)
 1227:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1228:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 1229:                         (*s_objet_1).objet)).partie_reelle;
 1230:                 ((struct_complexe16 **) (*((struct_matrice *)
 1231:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 1232:                         [indice_j - 1].partie_imaginaire =
 1233:                         (*((struct_complexe16 *)
 1234:                         (*s_objet_1).objet)).partie_imaginaire;
 1235:             }
 1236:             else
 1237:             {
 1238:                 liberation(s_etat_processus, s_objet_1);
 1239:                 liberation(s_etat_processus, s_objet_2);
 1240:                 liberation(s_etat_processus, s_objet_3);
 1241: 
 1242:                 (*s_etat_processus).erreur_execution =
 1243:                         d_ex_erreur_type_argument;
 1244:                 return;
 1245:             }
 1246:         }
 1247: 
 1248:         liberation(s_etat_processus, s_objet_1);
 1249:         liberation(s_etat_processus, s_objet_2);
 1250: 
 1251:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 1252:                 s_objet_3) == d_erreur)
 1253:         {
 1254:             return;
 1255:         }
 1256:     }
 1257: 
 1258: /*
 1259: --------------------------------------------------------------------------------
 1260:   Traitement des éléments des listes
 1261: --------------------------------------------------------------------------------
 1262: */
 1263: 
 1264:     else if ((*s_objet_3).type == LST)
 1265:     {
 1266:         if ((*s_objet_2).type != INT)
 1267:         {
 1268:             liberation(s_etat_processus, s_objet_1);
 1269:             liberation(s_etat_processus, s_objet_2);
 1270:             liberation(s_etat_processus, s_objet_3);
 1271: 
 1272:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 1273:             return;
 1274:         }
 1275: 
 1276:         indice_i = (*((integer8 *) (*s_objet_2).objet));
 1277:         indice_j = 1;
 1278: 
 1279:         if ((*s_objet_3).nombre_occurrences > 1)
 1280:         {
 1281:             if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'N'))
 1282:                     == NULL)
 1283:             {
 1284:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 1285:                 return;
 1286:             }
 1287: 
 1288:             liberation(s_etat_processus, s_objet_3);
 1289:             s_objet_3 = s_copie_3;
 1290:         }
 1291: 
 1292:         l_element_courant = (*s_objet_3).objet;
 1293: 
 1294:         while((l_element_courant != NULL) && (indice_j != indice_i))
 1295:         {
 1296:             l_element_courant = (*l_element_courant).suivant;
 1297:             indice_j++;
 1298:         }
 1299: 
 1300:         if (l_element_courant != NULL)
 1301:         {
 1302:             liberation(s_etat_processus, (*l_element_courant).donnee);
 1303:             (*l_element_courant).donnee = s_objet_1;
 1304:         }
 1305:         else
 1306:         {
 1307:             liberation(s_etat_processus, s_objet_1);
 1308:             liberation(s_etat_processus, s_objet_2);
 1309:             liberation(s_etat_processus, s_objet_3);
 1310: 
 1311:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 1312:             return;
 1313:         }
 1314: 
 1315:         liberation(s_etat_processus, s_objet_2);
 1316: 
 1317:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 1318:                 s_objet_3) == d_erreur)
 1319:         {
 1320:             return;
 1321:         }
 1322:     }
 1323: 
 1324: /*
 1325: --------------------------------------------------------------------------------
 1326:   Traitement des éléments des tables
 1327: --------------------------------------------------------------------------------
 1328: */
 1329: 
 1330:     else if ((*s_objet_3).type == TBL)
 1331:     {
 1332:         if ((*s_objet_2).type != LST)
 1333:         {
 1334:             liberation(s_etat_processus, s_objet_1);
 1335:             liberation(s_etat_processus, s_objet_2);
 1336:             liberation(s_etat_processus, s_objet_3);
 1337: 
 1338:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 1339:             return;
 1340:         }
 1341: 
 1342:         if ((*s_objet_3).nombre_occurrences > 1)
 1343:         {
 1344:             if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'N'))
 1345:                     == NULL)
 1346:             {
 1347:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 1348:                 return;
 1349:             }
 1350: 
 1351:             liberation(s_etat_processus, s_objet_3);
 1352:             s_objet_3 = s_copie_3;
 1353:         }
 1354: 
 1355:         s_objet_element = s_objet_3;
 1356:         l_element_courant = (*s_objet_2).objet;
 1357:         indice_i = 0;
 1358: 
 1359:         while(l_element_courant != NULL)
 1360:         {
 1361:             if ((*(*l_element_courant).donnee).type != INT)
 1362:             {
 1363:                 liberation(s_etat_processus, s_objet_1);
 1364:                 liberation(s_etat_processus, s_objet_2);
 1365:                 liberation(s_etat_processus, s_objet_3);
 1366: 
 1367:                 (*s_etat_processus).erreur_execution =
 1368:                         d_ex_erreur_type_argument;
 1369:                 return;
 1370:             }
 1371: 
 1372:             if ((*s_objet_element).type != TBL)
 1373:             {
 1374:                 liberation(s_etat_processus, s_objet_1);
 1375:                 liberation(s_etat_processus, s_objet_2);
 1376:                 liberation(s_etat_processus, s_objet_3);
 1377: 
 1378:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 1379:                 return;
 1380:             }
 1381: 
 1382:             indice_i = (*((integer8 *) (*(*l_element_courant).donnee).objet));
 1383: 
 1384:             if ((indice_i < 1) || (indice_i > (*((struct_tableau *)
 1385:                     (*s_objet_element).objet)).nombre_elements))
 1386:             {
 1387:                 liberation(s_etat_processus, s_objet_1);
 1388:                 liberation(s_etat_processus, s_objet_2);
 1389:                 liberation(s_etat_processus, s_objet_3);
 1390: 
 1391:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 1392:                 return;
 1393:             }
 1394: 
 1395:             if ((*l_element_courant).suivant != NULL)
 1396:             {
 1397:                 s_objet_element = (*((struct_tableau *) (*s_objet_element)
 1398:                         .objet)).elements[indice_i - 1];
 1399:             }
 1400: 
 1401:             l_element_courant = (*l_element_courant).suivant;
 1402:         }
 1403: 
 1404:         liberation(s_etat_processus, (*((struct_tableau *)
 1405:                 (*s_objet_element).objet)).elements[indice_i - 1]);
 1406:         (*((struct_tableau *) (*s_objet_element).objet)).elements[indice_i - 1]
 1407:                 = s_objet_1;
 1408: 
 1409:         liberation(s_etat_processus, s_objet_2);
 1410: 
 1411:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 1412:                 s_objet_3) == d_erreur)
 1413:         {
 1414:             return;
 1415:         }
 1416:     }
 1417: 
 1418: /*
 1419: --------------------------------------------------------------------------------
 1420:   Traitement des noms
 1421: --------------------------------------------------------------------------------
 1422: */
 1423: 
 1424:     else if ((*s_objet_3).type == NOM)
 1425:     {
 1426:         variable_partagee = d_faux;
 1427: 
 1428:         if (recherche_variable(s_etat_processus, (*((struct_nom *)
 1429:                 (*s_objet_3).objet)).nom) == d_faux)
 1430:         {
 1431:             (*s_etat_processus).erreur_systeme = d_es;
 1432:             (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
 1433: 
 1434:             liberation(s_etat_processus, s_objet_1);
 1435:             liberation(s_etat_processus, s_objet_2);
 1436:             liberation(s_etat_processus, s_objet_3);
 1437: 
 1438:             return;
 1439:         }
 1440: 
 1441:         if ((*(*s_etat_processus).pointeur_variable_courante)
 1442:                 .variable_verrouillee == d_vrai)
 1443:         {
 1444:             (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
 1445: 
 1446:             liberation(s_etat_processus, s_objet_1);
 1447:             liberation(s_etat_processus, s_objet_2);
 1448:             liberation(s_etat_processus, s_objet_3);
 1449: 
 1450:             return;
 1451:         }
 1452: 
 1453:         s_objet_4 = (*(*s_etat_processus).pointeur_variable_courante).objet;
 1454: 
 1455:         if (s_objet_4 == NULL)
 1456:         {
 1457:             if (recherche_variable_partagee(s_etat_processus,
 1458:                     (*(*s_etat_processus).pointeur_variable_courante).nom,
 1459:                     (*(*s_etat_processus).pointeur_variable_courante)
 1460:                     .variable_partagee, (*(*s_etat_processus)
 1461:                     .pointeur_variable_courante).origine) == NULL)
 1462:             {
 1463:                 (*s_etat_processus).erreur_systeme = d_es;
 1464:                 (*s_etat_processus).erreur_execution =
 1465:                         d_ex_variable_non_definie;
 1466: 
 1467:                 liberation(s_etat_processus, s_objet_1);
 1468:                 liberation(s_etat_processus, s_objet_2);
 1469:                 liberation(s_etat_processus, s_objet_3);
 1470: 
 1471:                 return;
 1472:             }
 1473: 
 1474:             s_objet_4 = (*(*s_etat_processus)
 1475:                     .pointeur_variable_partagee_courante).objet;
 1476:             variable_partagee = d_vrai;
 1477:         }
 1478: 
 1479:         if (((*s_objet_4).type == VIN) ||
 1480:                 ((*s_objet_4).type == VRL) ||
 1481:                 ((*s_objet_4).type == VCX))
 1482:         {
 1483:             if ((*s_objet_2).type != LST)
 1484:             {
 1485:                 if (variable_partagee == d_vrai)
 1486:                 {
 1487:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1488:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1489:                     {
 1490:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1491:                         return;
 1492:                     }
 1493:                 }
 1494: 
 1495:                 liberation(s_etat_processus, s_objet_1);
 1496:                 liberation(s_etat_processus, s_objet_2);
 1497:                 liberation(s_etat_processus, s_objet_3);
 1498: 
 1499:                 (*s_etat_processus).erreur_execution =
 1500:                         d_ex_erreur_type_argument;
 1501:                 return;
 1502:             }
 1503: 
 1504:             l_element_courant = (*s_objet_2).objet;
 1505:             nombre_dimensions = 0;
 1506: 
 1507:             while(l_element_courant != NULL)
 1508:             {
 1509:                 nombre_dimensions++;
 1510:                 l_element_courant = (*l_element_courant).suivant;
 1511:             }
 1512: 
 1513:             if (nombre_dimensions != 1)
 1514:             {
 1515:                 if (variable_partagee == d_vrai)
 1516:                 {
 1517:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1518:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1519:                     {
 1520:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1521:                         return;
 1522:                     }
 1523:                 }
 1524: 
 1525:                 liberation(s_etat_processus, s_objet_1);
 1526:                 liberation(s_etat_processus, s_objet_2);
 1527:                 liberation(s_etat_processus, s_objet_3);
 1528: 
 1529:                 (*s_etat_processus).erreur_execution =
 1530:                         d_ex_dimensions_invalides;
 1531:                 return;
 1532:             }
 1533: 
 1534:             l_element_courant = (*s_objet_2).objet;
 1535: 
 1536:             if ((*(*l_element_courant).donnee).type != INT)
 1537:             {
 1538:                 if (variable_partagee == d_vrai)
 1539:                 {
 1540:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1541:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1542:                     {
 1543:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1544:                         return;
 1545:                     }
 1546:                 }
 1547: 
 1548:                 liberation(s_etat_processus, s_objet_1);
 1549:                 liberation(s_etat_processus, s_objet_2);
 1550:                 liberation(s_etat_processus, s_objet_3);
 1551: 
 1552:                 (*s_etat_processus).erreur_execution =
 1553:                         d_ex_erreur_type_argument;
 1554:                 return;
 1555:             }
 1556: 
 1557:             if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
 1558:             {
 1559:                 if (variable_partagee == d_vrai)
 1560:                 {
 1561:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1562:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1563:                     {
 1564:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1565:                         return;
 1566:                     }
 1567:                 }
 1568: 
 1569:                 liberation(s_etat_processus, s_objet_1);
 1570:                 liberation(s_etat_processus, s_objet_2);
 1571:                 liberation(s_etat_processus, s_objet_3);
 1572: 
 1573:                 (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
 1574:                 return;
 1575:             }
 1576:             else if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) >
 1577:                     (integer8) (*((struct_vecteur *) (*s_objet_4).objet))
 1578:                     .taille)
 1579:             {
 1580:                 if (variable_partagee == d_vrai)
 1581:                 {
 1582:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1583:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1584:                     {
 1585:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1586:                         return;
 1587:                     }
 1588:                 }
 1589: 
 1590:                 liberation(s_etat_processus, s_objet_1);
 1591:                 liberation(s_etat_processus, s_objet_2);
 1592:                 liberation(s_etat_processus, s_objet_3);
 1593: 
 1594:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 1595:                 return;
 1596:             }
 1597: 
 1598:             indice_i = (*((integer8 *) (*(*l_element_courant).donnee).objet));
 1599: 
 1600:             if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'Q'))
 1601:                     == NULL)
 1602:             {
 1603:                 if (variable_partagee == d_vrai)
 1604:                 {
 1605:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1606:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1607:                     {
 1608:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1609:                         return;
 1610:                     }
 1611:                 }
 1612: 
 1613:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 1614:                 return;
 1615:             }
 1616: 
 1617:             liberation(s_etat_processus, s_objet_4);
 1618:             s_objet_4 = s_copie_4;
 1619: 
 1620:             if ((*s_objet_4).type == VIN)
 1621:             {
 1622:                 /*
 1623:                  * Vecteur d'entiers
 1624:                  */
 1625: 
 1626:                 if ((*s_objet_1).type == INT)
 1627:                 {
 1628:                     /*
 1629:                      * Aucune conversion de type
 1630:                      */
 1631: 
 1632:                     ((integer8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 1633:                             .tableau)[indice_i - 1] = (*((integer8 *)
 1634:                             (*s_objet_1).objet));
 1635:                 }
 1636:                 else if ((*s_objet_1).type == REL)
 1637:                 {
 1638:                     /*
 1639:                      * Conversion du vecteur en vecteur réel
 1640:                      */
 1641: 
 1642:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 1643:                             (*s_objet_4).objet)).tableau);
 1644: 
 1645:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'R';
 1646:                     (*s_objet_4).type = VRL;
 1647: 
 1648:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 1649:                             = malloc(((size_t) (*((struct_vecteur *)
 1650:                             (*s_objet_4).objet)).taille) * sizeof(real8)))
 1651:                             == NULL)
 1652:                     {
 1653:                         if (variable_partagee == d_vrai)
 1654:                         {
 1655:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1656:                                     .pointeur_variable_partagee_courante)
 1657:                                     .mutex)) != 0)
 1658:                             {
 1659:                                 (*s_etat_processus).erreur_systeme =
 1660:                                         d_es_processus;
 1661:                                 return;
 1662:                             }
 1663:                         }
 1664: 
 1665:                         (*s_etat_processus).erreur_systeme =
 1666:                                 d_es_allocation_memoire;
 1667:                         return;
 1668:                     }
 1669: 
 1670:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 1671:                             .taille; i++)
 1672:                     {
 1673:                         ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 1674:                                 .tableau)[i] = (real8) (((integer8 *)
 1675:                                 tampon)[i]);
 1676:                     }
 1677: 
 1678:                     free((integer8 *) tampon);
 1679: 
 1680:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 1681:                             .tableau)[indice_i - 1] = (*((real8 *)
 1682:                             (*s_objet_1).objet));
 1683:                 }
 1684:                 else if ((*s_objet_1).type == CPL)
 1685:                 {
 1686:                     /*
 1687:                      * Conversion du vecteur en vecteur complexe
 1688:                      */
 1689: 
 1690:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 1691:                             (*s_objet_4).objet)).tableau);
 1692: 
 1693:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'C';
 1694:                     (*s_objet_4).type = VCX;
 1695: 
 1696:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 1697:                             = malloc(((size_t) (*((struct_vecteur *)
 1698:                             (*s_objet_4).objet)).taille) *
 1699:                             sizeof(struct_complexe16))) == NULL)
 1700:                     {
 1701:                         if (variable_partagee == d_vrai)
 1702:                         {
 1703:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1704:                                     .pointeur_variable_partagee_courante)
 1705:                                     .mutex)) != 0)
 1706:                             {
 1707:                                 (*s_etat_processus).erreur_systeme =
 1708:                                         d_es_processus;
 1709:                                 return;
 1710:                             }
 1711:                         }
 1712: 
 1713:                         (*s_etat_processus).erreur_systeme =
 1714:                                 d_es_allocation_memoire;
 1715:                         return;
 1716:                     }
 1717: 
 1718:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 1719:                             .taille; i++)
 1720:                     {
 1721:                         ((struct_complexe16 *) (*((struct_vecteur *)
 1722:                                 (*s_objet_4).objet)).tableau)[i].partie_reelle =
 1723:                                 (real8) (((integer8 *) tampon)[i]);
 1724:                         ((struct_complexe16 *) (*((struct_vecteur *)
 1725:                                 (*s_objet_4).objet)).tableau)[i]
 1726:                                 .partie_imaginaire = (real8) 0;
 1727:                     }
 1728: 
 1729:                     free((integer8 *) tampon);
 1730: 
 1731:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1732:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1733:                             .partie_reelle = (*((struct_complexe16 *)
 1734:                             (*s_objet_1).objet)).partie_reelle;
 1735:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1736:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1737:                             .partie_imaginaire = (*((struct_complexe16 *)
 1738:                             (*s_objet_1).objet)).partie_imaginaire;
 1739:                 }
 1740:                 else
 1741:                 {
 1742:                     if (variable_partagee == d_vrai)
 1743:                     {
 1744:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1745:                                 .pointeur_variable_partagee_courante).mutex))
 1746:                                 != 0)
 1747:                         {
 1748:                             (*s_etat_processus).erreur_systeme =
 1749:                                     d_es_processus;
 1750:                             return;
 1751:                         }
 1752:                     }
 1753: 
 1754:                     liberation(s_etat_processus, s_objet_1);
 1755:                     liberation(s_etat_processus, s_objet_2);
 1756:                     liberation(s_etat_processus, s_objet_3);
 1757: 
 1758:                     (*s_etat_processus).erreur_execution =
 1759:                             d_ex_erreur_type_argument;
 1760:                     return;
 1761:                 }
 1762:             }
 1763:             else if ((*s_objet_4).type == VRL)
 1764:             {
 1765:                 /*
 1766:                  * Vecteur de réels
 1767:                  */
 1768: 
 1769:                 if ((*s_objet_1).type == INT)
 1770:                 {
 1771:                     /*
 1772:                      * Conversion de l'élément à insérer en réel
 1773:                      */
 1774: 
 1775:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 1776:                             .tableau)[indice_i - 1] = (real8) (*((integer8 *)
 1777:                             (*s_objet_1).objet));
 1778:                 }
 1779:                 else if ((*s_objet_1).type == REL)
 1780:                 {
 1781:                     /*
 1782:                      * Aucune conversion de type
 1783:                      */
 1784: 
 1785:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 1786:                             .tableau)[indice_i - 1] = (*((real8 *)
 1787:                             (*s_objet_1).objet));
 1788:                 }
 1789:                 else if ((*s_objet_1).type == CPL)
 1790:                 {
 1791:                     /*
 1792:                      * Conversion du vecteur en vecteur complexe
 1793:                      */
 1794: 
 1795:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 1796:                             (*s_objet_4).objet)).tableau);
 1797: 
 1798:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'C';
 1799:                     (*s_objet_4).type = VCX;
 1800: 
 1801:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 1802:                             = malloc(((size_t) (*((struct_vecteur *)
 1803:                             (*s_objet_4).objet)).taille) *
 1804:                             sizeof(struct_complexe16))) == NULL)
 1805:                     {
 1806:                         if (variable_partagee == d_vrai)
 1807:                         {
 1808:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1809:                                     .pointeur_variable_partagee_courante)
 1810:                                     .mutex)) != 0)
 1811:                             {
 1812:                                 (*s_etat_processus).erreur_systeme =
 1813:                                         d_es_processus;
 1814:                                 return;
 1815:                             }
 1816:                         }
 1817: 
 1818:                         (*s_etat_processus).erreur_systeme =
 1819:                                 d_es_allocation_memoire;
 1820:                         return;
 1821:                     }
 1822: 
 1823:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 1824:                             .taille; i++)
 1825:                     {
 1826:                         ((struct_complexe16 *) (*((struct_vecteur *)
 1827:                                 (*s_objet_4).objet)).tableau)[i].partie_reelle =
 1828:                                 ((real8 *) tampon)[i];
 1829:                         ((struct_complexe16 *) (*((struct_vecteur *)
 1830:                                 (*s_objet_4).objet)).tableau)[i]
 1831:                                 .partie_imaginaire = (real8) 0;
 1832:                     }
 1833: 
 1834:                     free((real8 *) tampon);
 1835: 
 1836:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1837:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1838:                             .partie_reelle = (*((struct_complexe16 *)
 1839:                             (*s_objet_1).objet)).partie_reelle;
 1840:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1841:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1842:                             .partie_imaginaire = (*((struct_complexe16 *)
 1843:                             (*s_objet_1).objet)).partie_imaginaire;
 1844:                 }
 1845:                 else
 1846:                 {
 1847:                     if (variable_partagee == d_vrai)
 1848:                     {
 1849:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1850:                                 .pointeur_variable_partagee_courante).mutex))
 1851:                                 != 0)
 1852:                         {
 1853:                             (*s_etat_processus).erreur_systeme =
 1854:                                     d_es_processus;
 1855:                             return;
 1856:                         }
 1857:                     }
 1858: 
 1859:                     liberation(s_etat_processus, s_objet_1);
 1860:                     liberation(s_etat_processus, s_objet_2);
 1861:                     liberation(s_etat_processus, s_objet_3);
 1862: 
 1863:                     (*s_etat_processus).erreur_execution =
 1864:                             d_ex_erreur_type_argument;
 1865:                     return;
 1866:                 }
 1867:             }
 1868:             else
 1869:             {
 1870:                 /*
 1871:                  * Vecteur de complexes
 1872:                  */
 1873: 
 1874:                 if ((*s_objet_1).type == INT)
 1875:                 {
 1876:                     /*
 1877:                      * Conversion de l'élément à insérer en complexe
 1878:                      */
 1879: 
 1880:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1881:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1882:                             .partie_reelle = (real8) (*((integer8 *)
 1883:                             (*s_objet_1).objet));
 1884:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1885:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 1886:                             .partie_imaginaire = (real8) 0;
 1887:                 }
 1888:                 else if ((*s_objet_1).type == REL)
 1889:                 {
 1890:                     /*
 1891:                      * Conversion de l'élément à insérer en complexe
 1892:                      */
 1893: 
 1894:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1895:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1896:                             .partie_reelle = (*((real8 *) (*s_objet_1).objet));
 1897:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1898:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 1899:                             .partie_imaginaire = (real8) 0;
 1900:                 }
 1901:                 else if ((*s_objet_1).type == CPL)
 1902:                 {
 1903:                     /*
 1904:                      * Aucune conversion de type
 1905:                      */
 1906: 
 1907:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1908:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1909:                             .partie_reelle = (*((struct_complexe16 *)
 1910:                             (*s_objet_1).objet)).partie_reelle;
 1911:                     ((struct_complexe16 *) (*((struct_vecteur *)
 1912:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 1913:                             .partie_imaginaire = (*((struct_complexe16 *)
 1914:                             (*s_objet_1).objet)).partie_imaginaire;
 1915:                 }
 1916:                 else
 1917:                 {
 1918:                     if (variable_partagee == d_vrai)
 1919:                     {
 1920:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1921:                                 .pointeur_variable_partagee_courante).mutex))
 1922:                                 != 0)
 1923:                         {
 1924:                             (*s_etat_processus).erreur_systeme =
 1925:                                     d_es_processus;
 1926:                             return;
 1927:                         }
 1928:                     }
 1929: 
 1930:                     liberation(s_etat_processus, s_objet_1);
 1931:                     liberation(s_etat_processus, s_objet_2);
 1932:                     liberation(s_etat_processus, s_objet_3);
 1933: 
 1934:                     (*s_etat_processus).erreur_execution =
 1935:                             d_ex_erreur_type_argument;
 1936:                     return;
 1937:                 }
 1938:             }
 1939: 
 1940:             if (variable_partagee == d_faux)
 1941:             {
 1942:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 1943:                         s_objet_4;
 1944:             }
 1945:             else
 1946:             {
 1947:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 1948:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 1949:                         .objet = s_objet_4;
 1950: 
 1951:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1952:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 1953:                 {
 1954:                     (*s_etat_processus).erreur_systeme = d_es_processus;
 1955:                     return;
 1956:                 }
 1957:             }
 1958: 
 1959:             liberation(s_etat_processus, s_objet_1);
 1960:             liberation(s_etat_processus, s_objet_2);
 1961:             liberation(s_etat_processus, s_objet_3);
 1962:         }
 1963:         else if (((*s_objet_4).type == MIN) ||
 1964:                 ((*s_objet_4).type == MRL) ||
 1965:                 ((*s_objet_4).type == MCX))
 1966:         {
 1967:             if ((*s_objet_2).type != LST)
 1968:             {
 1969:                 if (variable_partagee == d_vrai)
 1970:                 {
 1971:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 1972:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 1973:                     {
 1974:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 1975:                         return;
 1976:                     }
 1977:                 }
 1978: 
 1979:                 liberation(s_etat_processus, s_objet_1);
 1980:                 liberation(s_etat_processus, s_objet_2);
 1981:                 liberation(s_etat_processus, s_objet_3);
 1982: 
 1983:                 (*s_etat_processus).erreur_execution =
 1984:                         d_ex_erreur_type_argument;
 1985:                 return;
 1986:             }
 1987: 
 1988:             l_element_courant = (*s_objet_2).objet;
 1989:             nombre_dimensions = 0;
 1990: 
 1991:             while(l_element_courant != NULL)
 1992:             {
 1993:                 nombre_dimensions++;
 1994:                 l_element_courant = (*l_element_courant).suivant;
 1995:             }
 1996: 
 1997:             if (nombre_dimensions != 2)
 1998:             {
 1999:                 if (variable_partagee == d_vrai)
 2000:                 {
 2001:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2002:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2003:                     {
 2004:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 2005:                         return;
 2006:                     }
 2007:                 }
 2008: 
 2009:                 liberation(s_etat_processus, s_objet_1);
 2010:                 liberation(s_etat_processus, s_objet_2);
 2011:                 liberation(s_etat_processus, s_objet_3);
 2012: 
 2013:                 (*s_etat_processus).erreur_execution =
 2014:                         d_ex_dimensions_invalides;
 2015:                 return;
 2016:             }
 2017: 
 2018:             l_element_courant = (*s_objet_2).objet;
 2019: 
 2020:             indice_i = 0;
 2021:             indice_j = 0;
 2022: 
 2023:             while(l_element_courant != NULL)
 2024:             {
 2025:                 if ((*(*l_element_courant).donnee).type != INT)
 2026:                 {
 2027:                     if (variable_partagee == d_vrai)
 2028:                     {
 2029:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2030:                                 .pointeur_variable_partagee_courante).mutex))
 2031:                                 != 0)
 2032:                         {
 2033:                             (*s_etat_processus).erreur_systeme = d_es_processus;
 2034:                             return;
 2035:                         }
 2036:                     }
 2037: 
 2038:                     liberation(s_etat_processus, s_objet_1);
 2039:                     liberation(s_etat_processus, s_objet_2);
 2040:                     liberation(s_etat_processus, s_objet_3);
 2041: 
 2042:                     (*s_etat_processus).erreur_execution =
 2043:                             d_ex_erreur_type_argument;
 2044:                     return;
 2045:                 }
 2046: 
 2047:                 if ((*((integer8 *) (*(*l_element_courant).donnee).objet))
 2048:                         <= 0)
 2049:                 {
 2050:                     if (variable_partagee == d_vrai)
 2051:                     {
 2052:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2053:                                 .pointeur_variable_partagee_courante).mutex))
 2054:                                 != 0)
 2055:                         {
 2056:                             (*s_etat_processus).erreur_systeme = d_es_processus;
 2057:                             return;
 2058:                         }
 2059:                     }
 2060: 
 2061:                     liberation(s_etat_processus, s_objet_1);
 2062:                     liberation(s_etat_processus, s_objet_2);
 2063:                     liberation(s_etat_processus, s_objet_3);
 2064: 
 2065:                     (*s_etat_processus).erreur_execution =
 2066:                             d_ex_argument_invalide;
 2067:                     return;
 2068:                 }
 2069: 
 2070:                 if (indice_i == 0)
 2071:                 {
 2072:                     indice_i = (*((integer8 *)
 2073:                             (*(*l_element_courant).donnee).objet));
 2074:                 }
 2075:                 else
 2076:                 {
 2077:                     indice_j = (*((integer8 *)
 2078:                             (*(*l_element_courant).donnee).objet));
 2079:                 }
 2080: 
 2081:                 l_element_courant = (*l_element_courant).suivant;
 2082:             }
 2083: 
 2084:             if ((indice_i > (*((struct_matrice *) (*s_objet_4).objet))
 2085:                     .nombre_lignes) || (indice_j > (*((struct_matrice *)
 2086:                     (*s_objet_4).objet)).nombre_colonnes))
 2087:             {
 2088:                 if (variable_partagee == d_vrai)
 2089:                 {
 2090:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2091:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2092:                     {
 2093:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 2094:                         return;
 2095:                     }
 2096:                 }
 2097: 
 2098:                 liberation(s_etat_processus, s_objet_1);
 2099:                 liberation(s_etat_processus, s_objet_2);
 2100:                 liberation(s_etat_processus, s_objet_3);
 2101: 
 2102:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 2103:                 return;
 2104:             }
 2105: 
 2106:             if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'Q'))
 2107:                     == NULL)
 2108:             {
 2109:                 if (variable_partagee == d_vrai)
 2110:                 {
 2111:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2112:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2113:                     {
 2114:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 2115:                         return;
 2116:                     }
 2117:                 }
 2118: 
 2119:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 2120:                 return;
 2121:             }
 2122: 
 2123:             liberation(s_etat_processus, s_objet_4);
 2124:             s_objet_4 = s_copie_4;
 2125: 
 2126:             if ((*s_objet_4).type == MIN)
 2127:             {
 2128:                 /*
 2129:                  * Matrice d'entiers
 2130:                  */
 2131: 
 2132:                 if ((*s_objet_1).type == INT)
 2133:                 {
 2134:                     /*
 2135:                      * Aucune conversion de type
 2136:                      */
 2137: 
 2138:                     ((integer8 **) (*((struct_matrice *) (*s_objet_4).objet))
 2139:                             .tableau)[indice_i - 1][indice_j - 1] =
 2140:                             (*((integer8 *) (*s_objet_1).objet));
 2141:                 }
 2142:                 else if ((*s_objet_1).type == REL)
 2143:                 {
 2144:                     /*
 2145:                      * Conversion de la matrice en matrice réelle
 2146:                      */
 2147: 
 2148:                     tampon = (void *) ((integer8 **) (*((struct_matrice *)
 2149:                             (*s_objet_4).objet)).tableau);
 2150: 
 2151:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'R';
 2152:                     (*s_objet_4).type = MRL;
 2153: 
 2154:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 2155:                             = malloc(((size_t) (*((struct_matrice *)
 2156:                             (*s_objet_4).objet)).nombre_lignes) *
 2157:                             sizeof(real8 *))) == NULL)
 2158:                     {
 2159:                         if (variable_partagee == d_vrai)
 2160:                         {
 2161:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2162:                                     .pointeur_variable_partagee_courante)
 2163:                                     .mutex)) != 0)
 2164:                             {
 2165:                                 (*s_etat_processus).erreur_systeme =
 2166:                                         d_es_processus;
 2167:                                 return;
 2168:                             }
 2169:                         }
 2170: 
 2171:                         (*s_etat_processus).erreur_systeme =
 2172:                                 d_es_allocation_memoire;
 2173:                         return;
 2174:                     }
 2175: 
 2176:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 2177:                             .nombre_lignes; i++)
 2178:                     {
 2179:                         if ((((real8 **) (*((struct_matrice *)
 2180:                                 (*s_objet_4).objet)).tableau)[i]
 2181:                                 = malloc(((size_t) (*((struct_matrice *)
 2182:                                 (*s_objet_4).objet)).nombre_colonnes) *
 2183:                                 sizeof(real8))) == NULL)
 2184:                         {
 2185:                             if (variable_partagee == d_vrai)
 2186:                             {
 2187:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2188:                                         .pointeur_variable_partagee_courante)
 2189:                                         .mutex)) != 0)
 2190:                                 {
 2191:                                     (*s_etat_processus).erreur_systeme =
 2192:                                             d_es_processus;
 2193:                                     return;
 2194:                                 }
 2195:                             }
 2196: 
 2197:                             (*s_etat_processus).erreur_systeme =
 2198:                                     d_es_allocation_memoire;
 2199:                             return;
 2200:                         }
 2201: 
 2202:                         for(j = 0; j < (*((struct_matrice *)
 2203:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 2204:                         {
 2205:                             ((real8 **) (*((struct_matrice *) (*s_objet_4)
 2206:                                     .objet)).tableau)[i][j] = (real8)
 2207:                                     (((integer8 **) tampon)[i][j]);
 2208:                         }
 2209: 
 2210:                         free(((integer8 **) tampon)[i]);
 2211:                     }
 2212: 
 2213:                     free((integer8 **) tampon);
 2214: 
 2215:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 2216:                             .tableau)[indice_i - 1][indice_j - 1] =
 2217:                             (*((real8 *) (*s_objet_1).objet));
 2218:                 }
 2219:                 else if ((*s_objet_1).type == CPL)
 2220:                 {
 2221:                     /*
 2222:                      * Conversion de la matrice en matrice complexe
 2223:                      */
 2224: 
 2225:                     tampon = (void *) ((integer8 **) (*((struct_matrice *)
 2226:                             (*s_objet_4).objet)).tableau);
 2227: 
 2228:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'C';
 2229:                     (*s_objet_4).type = MCX;
 2230: 
 2231:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 2232:                             = malloc(((size_t) (*((struct_matrice *)
 2233:                             (*s_objet_4).objet)).nombre_lignes) *
 2234:                             sizeof(struct_complexe16 *))) == NULL)
 2235:                     {
 2236:                         if (variable_partagee == d_vrai)
 2237:                         {
 2238:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2239:                                     .pointeur_variable_partagee_courante)
 2240:                                     .mutex)) != 0)
 2241:                             {
 2242:                                 (*s_etat_processus).erreur_systeme =
 2243:                                         d_es_processus;
 2244:                                 return;
 2245:                             }
 2246:                         }
 2247: 
 2248:                         (*s_etat_processus).erreur_systeme =
 2249:                                 d_es_allocation_memoire;
 2250:                         return;
 2251:                     }
 2252: 
 2253:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 2254:                             .nombre_lignes; i++)
 2255:                     {
 2256:                         if ((((struct_complexe16 **) (*((struct_matrice *)
 2257:                                 (*s_objet_4).objet)).tableau)[i]
 2258:                                 = malloc(((size_t) (*((struct_matrice *)
 2259:                                 (*s_objet_4).objet)).nombre_colonnes) *
 2260:                                 sizeof(struct_complexe16))) == NULL)
 2261:                         {
 2262:                             if (variable_partagee == d_vrai)
 2263:                             {
 2264:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2265:                                         .pointeur_variable_partagee_courante)
 2266:                                         .mutex)) != 0)
 2267:                                 {
 2268:                                     (*s_etat_processus).erreur_systeme =
 2269:                                             d_es_processus;
 2270:                                     return;
 2271:                                 }
 2272:                             }
 2273: 
 2274:                             (*s_etat_processus).erreur_systeme =
 2275:                                     d_es_allocation_memoire;
 2276:                             return;
 2277:                         }
 2278: 
 2279:                         for(j = 0; j < (*((struct_matrice *)
 2280:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 2281:                         {
 2282:                             ((struct_complexe16 **) (*((struct_matrice *)
 2283:                                     (*s_objet_4).objet)).tableau)[i][j]
 2284:                                     .partie_reelle = (real8) (((integer8 **)
 2285:                                     tampon)[i][j]);
 2286:                             ((struct_complexe16 **) (*((struct_matrice *)
 2287:                                     (*s_objet_4).objet)).tableau)[i][j]
 2288:                                     .partie_imaginaire = (real8) 0;
 2289:                         }
 2290: 
 2291:                         free(((integer8 **) tampon)[i]);
 2292:                     }
 2293: 
 2294:                     free((integer8 **) tampon);
 2295: 
 2296:                     ((struct_complexe16 **) (*((struct_matrice *)
 2297:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2298:                             [indice_j - 1].partie_reelle =
 2299:                             (*((struct_complexe16 *)
 2300:                             (*s_objet_1).objet)).partie_reelle;
 2301:                     ((struct_complexe16 **) (*((struct_matrice *)
 2302:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2303:                             [indice_j - 1].partie_imaginaire =
 2304:                             (*((struct_complexe16 *)
 2305:                             (*s_objet_1).objet)).partie_imaginaire;
 2306:                 }
 2307:                 else
 2308:                 {
 2309:                     if (variable_partagee == d_vrai)
 2310:                     {
 2311:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2312:                                 .pointeur_variable_partagee_courante).mutex))
 2313:                                 != 0)
 2314:                         {
 2315:                             (*s_etat_processus).erreur_systeme =
 2316:                                     d_es_processus;
 2317:                             return;
 2318:                         }
 2319:                     }
 2320: 
 2321:                     liberation(s_etat_processus, s_objet_1);
 2322:                     liberation(s_etat_processus, s_objet_2);
 2323:                     liberation(s_etat_processus, s_objet_3);
 2324: 
 2325:                     (*s_etat_processus).erreur_execution =
 2326:                             d_ex_erreur_type_argument;
 2327:                     return;
 2328:                 }
 2329:             }
 2330:             else if ((*s_objet_4).type == MRL)
 2331:             {
 2332:                 /*
 2333:                  * Matrice de réels
 2334:                  */
 2335: 
 2336:                 if ((*s_objet_1).type == INT)
 2337:                 {
 2338:                     /*
 2339:                      * Conversion de l'élément à insérer en réel
 2340:                      */
 2341: 
 2342:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 2343:                             .tableau)[indice_i - 1][indice_j - 1] =
 2344:                             (real8) (*((integer8 *) (*s_objet_1).objet));
 2345:                 }
 2346:                 else if ((*s_objet_1).type == REL)
 2347:                 {
 2348:                     /*
 2349:                      * Aucune conversion de type
 2350:                      */
 2351: 
 2352:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 2353:                             .tableau)[indice_i - 1][indice_j - 1] =
 2354:                             (*((real8 *) (*s_objet_1).objet));
 2355:                 }
 2356:                 else if ((*s_objet_1).type == CPL)
 2357:                 {
 2358:                     /*
 2359:                      * Conversion de la matrice en matrice complexe
 2360:                      */
 2361: 
 2362:                     tampon = (void *) ((real8 **) (*((struct_matrice *)
 2363:                             (*s_objet_4).objet)).tableau);
 2364: 
 2365:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'C';
 2366:                     (*s_objet_4).type = MCX;
 2367: 
 2368:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 2369:                             = malloc(((size_t) (*((struct_matrice *)
 2370:                             (*s_objet_4).objet)).nombre_lignes) *
 2371:                             sizeof(struct_complexe16 *))) == NULL)
 2372:                     {
 2373:                         if (variable_partagee == d_vrai)
 2374:                         {
 2375:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2376:                                     .pointeur_variable_partagee_courante)
 2377:                                     .mutex)) != 0)
 2378:                             {
 2379:                                 (*s_etat_processus).erreur_systeme =
 2380:                                         d_es_processus;
 2381:                                 return;
 2382:                             }
 2383:                         }
 2384: 
 2385:                         (*s_etat_processus).erreur_systeme =
 2386:                                 d_es_allocation_memoire;
 2387:                         return;
 2388:                     }
 2389: 
 2390:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 2391:                             .nombre_lignes; i++)
 2392:                     {
 2393:                         if ((((struct_complexe16 **) (*((struct_matrice *)
 2394:                                 (*s_objet_4).objet)).tableau)[i]
 2395:                                 = malloc(((size_t) (*((struct_matrice *)
 2396:                                 (*s_objet_4).objet)).nombre_colonnes) *
 2397:                                 sizeof(struct_complexe16))) == NULL)
 2398:                         {
 2399:                             if (variable_partagee == d_vrai)
 2400:                             {
 2401:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2402:                                         .pointeur_variable_partagee_courante)
 2403:                                         .mutex)) != 0)
 2404:                                 {
 2405:                                     (*s_etat_processus).erreur_systeme =
 2406:                                             d_es_processus;
 2407:                                     return;
 2408:                                 }
 2409:                             }
 2410: 
 2411:                             (*s_etat_processus).erreur_systeme =
 2412:                                     d_es_allocation_memoire;
 2413:                             return;
 2414:                         }
 2415: 
 2416:                         for(j = 0; j < (*((struct_matrice *)
 2417:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 2418:                         {
 2419:                             ((struct_complexe16 **) (*((struct_matrice *)
 2420:                                     (*s_objet_4).objet)).tableau)[i][j]
 2421:                                     .partie_reelle = (((real8 **)
 2422:                                     tampon)[i][j]);
 2423:                             ((struct_complexe16 **) (*((struct_matrice *)
 2424:                                     (*s_objet_4).objet)).tableau)[i][j]
 2425:                                     .partie_imaginaire = (real8) 0;
 2426:                         }
 2427: 
 2428:                         free(((integer8 **) tampon)[i]);
 2429:                     }
 2430: 
 2431:                     free((integer8 **) tampon);
 2432: 
 2433:                     ((struct_complexe16 **) (*((struct_matrice *)
 2434:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2435:                             [indice_j - 1].partie_reelle =
 2436:                             (*((struct_complexe16 *)
 2437:                             (*s_objet_1).objet)).partie_reelle;
 2438:                     ((struct_complexe16 **) (*((struct_matrice *)
 2439:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2440:                             [indice_j - 1].partie_imaginaire =
 2441:                             (*((struct_complexe16 *)
 2442:                             (*s_objet_1).objet)).partie_imaginaire;
 2443:                 }
 2444:                 else
 2445:                 {
 2446:                     if (variable_partagee == d_vrai)
 2447:                     {
 2448:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2449:                                 .pointeur_variable_partagee_courante).mutex))
 2450:                                 != 0)
 2451:                         {
 2452:                             (*s_etat_processus).erreur_systeme =
 2453:                                     d_es_processus;
 2454:                             return;
 2455:                         }
 2456:                     }
 2457: 
 2458:                     liberation(s_etat_processus, s_objet_1);
 2459:                     liberation(s_etat_processus, s_objet_2);
 2460:                     liberation(s_etat_processus, s_objet_3);
 2461: 
 2462:                     (*s_etat_processus).erreur_execution =
 2463:                             d_ex_erreur_type_argument;
 2464:                     return;
 2465:                 }
 2466:             }
 2467:             else
 2468:             {
 2469:                 /*
 2470:                  * Matrice de complexes
 2471:                  */
 2472: 
 2473:                 if ((*s_objet_1).type == INT)
 2474:                 {
 2475:                     /*
 2476:                      * Conversion de l'élément à insérer en complexe
 2477:                      */
 2478: 
 2479:                     ((struct_complexe16 **) (*((struct_matrice *)
 2480:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2481:                             [indice_j - 1].partie_reelle = (real8)
 2482:                             (*((integer8 *) (*s_objet_1).objet));
 2483:                     ((struct_complexe16 **) (*((struct_matrice *)
 2484:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 2485:                             [indice_j - 1].partie_imaginaire = (real8) 0;
 2486:                 }
 2487:                 else if ((*s_objet_1).type == REL)
 2488:                 {
 2489:                     /*
 2490:                      * Conversion de l'élément à insérer en complexe
 2491:                      */
 2492: 
 2493:                     ((struct_complexe16 **) (*((struct_matrice *)
 2494:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2495:                             [indice_j - 1].partie_reelle =
 2496:                             (*((real8 *) (*s_objet_1).objet));
 2497:                     ((struct_complexe16 **) (*((struct_matrice *)
 2498:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 2499:                             [indice_j - 1].partie_imaginaire = (real8) 0;
 2500:                 }
 2501:                 else if ((*s_objet_1).type == CPL)
 2502:                 {
 2503:                     /*
 2504:                      * Aucune conversion de type
 2505:                      */
 2506: 
 2507:                     ((struct_complexe16 **) (*((struct_matrice *)
 2508:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2509:                             [indice_j - 1].partie_reelle =
 2510:                             (*((struct_complexe16 *)
 2511:                             (*s_objet_1).objet)).partie_reelle;
 2512:                     ((struct_complexe16 **) (*((struct_matrice *)
 2513:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 2514:                             [indice_j - 1].partie_imaginaire =
 2515:                             (*((struct_complexe16 *)
 2516:                             (*s_objet_1).objet)).partie_imaginaire;
 2517:                 }
 2518:                 else
 2519:                 {
 2520:                     if (variable_partagee == d_vrai)
 2521:                     {
 2522:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2523:                                 .pointeur_variable_partagee_courante).mutex))
 2524:                                 != 0)
 2525:                         {
 2526:                             (*s_etat_processus).erreur_systeme =
 2527:                                     d_es_processus;
 2528:                             return;
 2529:                         }
 2530:                     }
 2531: 
 2532:                     liberation(s_etat_processus, s_objet_1);
 2533:                     liberation(s_etat_processus, s_objet_2);
 2534:                     liberation(s_etat_processus, s_objet_3);
 2535: 
 2536:                     (*s_etat_processus).erreur_execution =
 2537:                             d_ex_erreur_type_argument;
 2538:                     return;
 2539:                 }
 2540:             }
 2541: 
 2542:             if (variable_partagee == d_faux)
 2543:             {
 2544:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 2545:                         s_objet_4;
 2546:             }
 2547:             else
 2548:             {
 2549:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 2550:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 2551:                         .objet = s_objet_4;
 2552: 
 2553:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2554:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 2555:                 {
 2556:                     (*s_etat_processus).erreur_systeme =
 2557:                             d_es_processus;
 2558:                     return;
 2559:                 }
 2560:             }
 2561: 
 2562:             liberation(s_etat_processus, s_objet_1);
 2563:             liberation(s_etat_processus, s_objet_2);
 2564:             liberation(s_etat_processus, s_objet_3);
 2565:         }
 2566:         else if ((*s_objet_4).type == LST)
 2567:         {
 2568:             if ((*s_objet_2).type != INT)
 2569:             {
 2570:                 if (variable_partagee == d_vrai)
 2571:                 {
 2572:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2573:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2574:                     {
 2575:                         (*s_etat_processus).erreur_systeme =
 2576:                                 d_es_processus;
 2577:                         return;
 2578:                     }
 2579:                 }
 2580: 
 2581:                 liberation(s_etat_processus, s_objet_1);
 2582:                 liberation(s_etat_processus, s_objet_2);
 2583:                 liberation(s_etat_processus, s_objet_3);
 2584: 
 2585:                 (*s_etat_processus).erreur_execution =
 2586:                         d_ex_erreur_type_argument;
 2587:                 return;
 2588:             }
 2589: 
 2590:             indice_i = (*((integer8 *) (*s_objet_2).objet));
 2591:             indice_j = 1;
 2592: 
 2593:             if ((*s_objet_4).nombre_occurrences > 1)
 2594:             {
 2595:                 if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'N'))
 2596:                         == NULL)
 2597:                 {
 2598:                     if (variable_partagee == d_vrai)
 2599:                     {
 2600:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2601:                                 .pointeur_variable_partagee_courante).mutex))
 2602:                                 != 0)
 2603:                         {
 2604:                             (*s_etat_processus).erreur_systeme =
 2605:                                     d_es_processus;
 2606:                             return;
 2607:                         }
 2608:                     }
 2609: 
 2610:                     (*s_etat_processus).erreur_systeme =
 2611:                             d_es_allocation_memoire;
 2612:                     return;
 2613:                 }
 2614: 
 2615:                 liberation(s_etat_processus, s_objet_4);
 2616:                 s_objet_4 = s_copie_4;
 2617:             }
 2618: 
 2619:             l_element_courant = (*s_objet_4).objet;
 2620: 
 2621:             while((l_element_courant != NULL) && (indice_j != indice_i))
 2622:             {
 2623:                 l_element_courant = (*l_element_courant).suivant;
 2624:                 indice_j++;
 2625:             }
 2626: 
 2627:             if (l_element_courant != NULL)
 2628:             {
 2629:                 liberation(s_etat_processus, (*l_element_courant).donnee);
 2630:                 (*l_element_courant).donnee = s_objet_1;
 2631:             }
 2632:             else
 2633:             {
 2634:                 if (variable_partagee == d_vrai)
 2635:                 {
 2636:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2637:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2638:                     {
 2639:                         (*s_etat_processus).erreur_systeme =
 2640:                                 d_es_processus;
 2641:                         return;
 2642:                     }
 2643:                 }
 2644: 
 2645:                 liberation(s_etat_processus, s_objet_1);
 2646:                 liberation(s_etat_processus, s_objet_2);
 2647:                 liberation(s_etat_processus, s_objet_3);
 2648: 
 2649:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 2650:                 return;
 2651:             }
 2652: 
 2653:             if (variable_partagee == d_faux)
 2654:             {
 2655:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 2656:                         s_objet_4;
 2657:             }
 2658:             else
 2659:             {
 2660:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 2661:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 2662:                         .objet = s_objet_4;
 2663: 
 2664:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2665:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 2666:                 {
 2667:                     (*s_etat_processus).erreur_systeme =
 2668:                             d_es_processus;
 2669:                     return;
 2670:                 }
 2671:             }
 2672: 
 2673:             liberation(s_etat_processus, s_objet_2);
 2674:             liberation(s_etat_processus, s_objet_3);
 2675:         }
 2676:         else if ((*s_objet_4).type == TBL)
 2677:         {
 2678:             if ((*s_objet_2).type != LST)
 2679:             {
 2680:                 if (variable_partagee == d_vrai)
 2681:                 {
 2682:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2683:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 2684:                     {
 2685:                         (*s_etat_processus).erreur_systeme =
 2686:                                 d_es_processus;
 2687:                         return;
 2688:                     }
 2689:                 }
 2690: 
 2691:                 liberation(s_etat_processus, s_objet_1);
 2692:                 liberation(s_etat_processus, s_objet_2);
 2693:                 liberation(s_etat_processus, s_objet_3);
 2694: 
 2695:                 (*s_etat_processus).erreur_execution =
 2696:                         d_ex_erreur_type_argument;
 2697:                 return;
 2698:             }
 2699: 
 2700:             if ((*s_objet_4).nombre_occurrences > 1)
 2701:             {
 2702:                 if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'N'))
 2703:                         == NULL)
 2704:                 {
 2705:                     if (variable_partagee == d_vrai)
 2706:                     {
 2707:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2708:                                 .pointeur_variable_partagee_courante).mutex))
 2709:                                 != 0)
 2710:                         {
 2711:                             (*s_etat_processus).erreur_systeme =
 2712:                                     d_es_processus;
 2713:                             return;
 2714:                         }
 2715:                     }
 2716: 
 2717:                     (*s_etat_processus).erreur_systeme =
 2718:                             d_es_allocation_memoire;
 2719:                     return;
 2720:                 }
 2721: 
 2722:                 liberation(s_etat_processus, s_objet_4);
 2723:                 s_objet_4 = s_copie_4;
 2724:             }
 2725: 
 2726:             s_objet_element = s_objet_4;
 2727:             l_element_courant = (*s_objet_2).objet;
 2728:             indice_i = 0;
 2729: 
 2730:             while(l_element_courant != NULL)
 2731:             {
 2732:                 if ((*(*l_element_courant).donnee).type != INT)
 2733:                 {
 2734:                     if (variable_partagee == d_vrai)
 2735:                     {
 2736:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2737:                                 .pointeur_variable_partagee_courante).mutex))
 2738:                                 != 0)
 2739:                         {
 2740:                             (*s_etat_processus).erreur_systeme =
 2741:                                     d_es_processus;
 2742:                             return;
 2743:                         }
 2744:                     }
 2745: 
 2746:                     liberation(s_etat_processus, s_objet_1);
 2747:                     liberation(s_etat_processus, s_objet_2);
 2748:                     liberation(s_etat_processus, s_objet_3);
 2749: 
 2750:                     (*s_etat_processus).erreur_execution =
 2751:                             d_ex_erreur_type_argument;
 2752:                     return;
 2753:                 }
 2754: 
 2755:                 if ((*s_objet_element).type != TBL)
 2756:                 {
 2757:                     if (variable_partagee == d_vrai)
 2758:                     {
 2759:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2760:                                 .pointeur_variable_partagee_courante).mutex))
 2761:                                 != 0)
 2762:                         {
 2763:                             (*s_etat_processus).erreur_systeme =
 2764:                                     d_es_processus;
 2765:                             return;
 2766:                         }
 2767:                     }
 2768: 
 2769:                     liberation(s_etat_processus, s_objet_1);
 2770:                     liberation(s_etat_processus, s_objet_2);
 2771:                     liberation(s_etat_processus, s_objet_3);
 2772: 
 2773:                     (*s_etat_processus).erreur_execution =
 2774:                             d_ex_element_inexistant;
 2775:                     return;
 2776:                 }
 2777: 
 2778:                 indice_i = (*((integer8 *) (*(*l_element_courant)
 2779:                         .donnee).objet));
 2780: 
 2781:                 if ((indice_i < 1) || (indice_i > (*((struct_tableau *)
 2782:                         (*s_objet_element).objet)).nombre_elements))
 2783:                 {
 2784:                     if (variable_partagee == d_vrai)
 2785:                     {
 2786:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2787:                                 .pointeur_variable_partagee_courante).mutex))
 2788:                                 != 0)
 2789:                         {
 2790:                             (*s_etat_processus).erreur_systeme =
 2791:                                     d_es_processus;
 2792:                             return;
 2793:                         }
 2794:                     }
 2795: 
 2796:                     liberation(s_etat_processus, s_objet_1);
 2797:                     liberation(s_etat_processus, s_objet_2);
 2798:                     liberation(s_etat_processus, s_objet_3);
 2799: 
 2800:                     (*s_etat_processus).erreur_execution =
 2801:                             d_ex_element_inexistant;
 2802:                     return;
 2803:                 }
 2804: 
 2805:                 if ((*l_element_courant).suivant != NULL)
 2806:                 {
 2807:                     s_objet_element = (*((struct_tableau *) (*s_objet_element)
 2808:                             .objet)).elements[indice_i - 1];
 2809:                 }
 2810: 
 2811:                 l_element_courant = (*l_element_courant).suivant;
 2812:             }
 2813: 
 2814:             liberation(s_etat_processus, (*((struct_tableau *)
 2815:                     (*s_objet_element).objet)).elements[indice_i - 1]);
 2816:             (*((struct_tableau *) (*s_objet_element).objet)).elements
 2817:                     [indice_i - 1] = s_objet_1;
 2818: 
 2819:             if (variable_partagee == d_faux)
 2820:             {
 2821:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 2822:                         s_objet_4;
 2823:             }
 2824:             else
 2825:             {
 2826:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 2827:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 2828:                         .objet = s_objet_4;
 2829: 
 2830:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2831:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 2832:                 {
 2833:                     (*s_etat_processus).erreur_systeme =
 2834:                             d_es_processus;
 2835:                     return;
 2836:                 }
 2837:             }
 2838: 
 2839:             liberation(s_etat_processus, s_objet_2);
 2840:         }
 2841:         else
 2842:         {
 2843:             if (variable_partagee == d_vrai)
 2844:             {
 2845:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 2846:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 2847:                 {
 2848:                     (*s_etat_processus).erreur_systeme =
 2849:                             d_es_processus;
 2850:                     return;
 2851:                 }
 2852:             }
 2853: 
 2854:             liberation(s_etat_processus, s_objet_1);
 2855:             liberation(s_etat_processus, s_objet_2);
 2856:             liberation(s_etat_processus, s_objet_3);
 2857: 
 2858:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 2859:             return;
 2860:         }
 2861:     }
 2862: 
 2863: /*
 2864: --------------------------------------------------------------------------------
 2865:   Arguments incompatibles
 2866: --------------------------------------------------------------------------------
 2867: */
 2868: 
 2869:     else
 2870:     {
 2871:         liberation(s_etat_processus, s_objet_1);
 2872:         liberation(s_etat_processus, s_objet_2);
 2873:         liberation(s_etat_processus, s_objet_3);
 2874: 
 2875:         (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 2876:         return;
 2877:     }
 2878: 
 2879:     return;
 2880: }
 2881: 
 2882: 
 2883: /*
 2884: ================================================================================
 2885:   Fonction 'puti'
 2886: ================================================================================
 2887:   Entrées : pointeur sur une structure struct_processus
 2888: --------------------------------------------------------------------------------
 2889:   Sorties :
 2890: --------------------------------------------------------------------------------
 2891:   Effets de bord : néant
 2892: ================================================================================
 2893: */
 2894: 
 2895: void
 2896: instruction_puti(struct_processus *s_etat_processus)
 2897: {
 2898:     logical1                            variable_partagee;
 2899: 
 2900:     struct_liste_chainee                *l_element_courant;
 2901: 
 2902:     struct_objet                        *s_copie_2;
 2903:     struct_objet                        *s_copie_3;
 2904:     struct_objet                        *s_copie_4;
 2905:     struct_objet                        *s_objet_1;
 2906:     struct_objet                        *s_objet_2;
 2907:     struct_objet                        *s_objet_3;
 2908:     struct_objet                        *s_objet_4;
 2909: 
 2910:     integer8                            i;
 2911:     integer8                            indice_i;
 2912:     integer8                            indice_j;
 2913:     integer8                            j;
 2914:     integer8                            nombre_dimensions;
 2915:     integer8                            nombre_elements;
 2916: 
 2917:     void                                *tampon;
 2918: 
 2919:     (*s_etat_processus).erreur_execution = d_ex;
 2920: 
 2921:     if ((*s_etat_processus).affichage_arguments == 'Y')
 2922:     {
 2923:         printf("\n  PUTI ");
 2924: 
 2925:         if ((*s_etat_processus).langue == 'F')
 2926:         {
 2927:             printf("(change un élément)\n\n");
 2928:         }
 2929:         else
 2930:         {
 2931:             printf("(change element)\n\n");
 2932:         }
 2933: 
 2934:         printf("    3: %s, %s, %s, %s\n", d_VIN, d_VRL, d_VCX, d_NOM);
 2935:         printf("    2: %s\n", d_LST);
 2936:         printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
 2937:         printf("->  2: %s, %s, %s, %s\n", d_VIN, d_VRL, d_VCX, d_NOM);
 2938:         printf("    1: %s\n\n", d_LST);
 2939: 
 2940:         printf("    3: %s, %s, %s, %s\n", d_MIN, d_MRL, d_MCX, d_NOM);
 2941:         printf("    2: %s\n", d_LST);
 2942:         printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
 2943:         printf("->  2: %s, %s, %s, %s\n", d_MIN, d_MRL, d_MCX, d_NOM);
 2944:         printf("    1: %s\n\n", d_LST);
 2945: 
 2946:         printf("    3: %s, %s\n", d_LST, d_NOM);
 2947:         printf("    2: %s\n", d_INT);
 2948:         printf("    1: %s, %s, %s, %s, %s, %s,\n"
 2949:                 "       %s, %s, %s, %s, %s,\n"
 2950:                 "       %s, %s, %s, %s, %s,\n"
 2951:                 "       %s, %s, %s, %s,\n"
 2952:                 "       %s, %s\n",
 2953:                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
 2954:                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
 2955:                 d_SQL, d_SLB, d_PRC, d_MTX);
 2956:         printf("->  2: %s, %s\n", d_LST, d_NOM);
 2957:         printf("    1: %s\n", d_INT);
 2958: 
 2959:         return;
 2960:     }
 2961:     else if ((*s_etat_processus).test_instruction == 'Y')
 2962:     {
 2963:         (*s_etat_processus).nombre_arguments = -1;
 2964:         return;
 2965:     }
 2966: 
 2967:     if (test_cfsf(s_etat_processus, 31) == d_vrai)
 2968:     {
 2969:         if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
 2970:         {
 2971:             return;
 2972:         }
 2973:     }
 2974: 
 2975:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 2976:             &s_objet_1) == d_erreur)
 2977:     {
 2978:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
 2979:         return;
 2980:     }
 2981: 
 2982:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 2983:             &s_objet_2) == d_erreur)
 2984:     {
 2985:         liberation(s_etat_processus, s_objet_1);
 2986: 
 2987:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
 2988:         return;
 2989:     }
 2990: 
 2991:     if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 2992:             &s_objet_3) == d_erreur)
 2993:     {
 2994:         liberation(s_etat_processus, s_objet_1);
 2995:         liberation(s_etat_processus, s_objet_2);
 2996: 
 2997:         (*s_etat_processus).erreur_execution = d_ex_manque_argument;
 2998:         return;
 2999:     }
 3000: 
 3001:     if ((s_copie_2 = copie_objet(s_etat_processus, s_objet_2, 'O')) == NULL)
 3002:     {
 3003:         (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 3004:         return;
 3005:     }
 3006: 
 3007:     liberation(s_etat_processus, s_objet_2);
 3008:     s_objet_2 = s_copie_2;
 3009: 
 3010: /*
 3011: --------------------------------------------------------------------------------
 3012:   Traitement des éléments des vecteurs
 3013: --------------------------------------------------------------------------------
 3014: */
 3015: 
 3016:     if (((*s_objet_3).type == VIN) ||
 3017:             ((*s_objet_3).type == VRL) ||
 3018:             ((*s_objet_3).type == VCX))
 3019:     {
 3020:         if ((*s_objet_2).type != LST)
 3021:         {
 3022:             liberation(s_etat_processus, s_objet_1);
 3023:             liberation(s_etat_processus, s_objet_2);
 3024:             liberation(s_etat_processus, s_objet_3);
 3025: 
 3026:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 3027:             return;
 3028:         }
 3029: 
 3030:         l_element_courant = (*s_objet_2).objet;
 3031:         nombre_dimensions = 0;
 3032: 
 3033:         while(l_element_courant != NULL)
 3034:         {
 3035:             nombre_dimensions++;
 3036:             l_element_courant = (*l_element_courant).suivant;
 3037:         }
 3038: 
 3039:         if (nombre_dimensions != 1)
 3040:         {
 3041:             liberation(s_etat_processus, s_objet_1);
 3042:             liberation(s_etat_processus, s_objet_2);
 3043:             liberation(s_etat_processus, s_objet_3);
 3044: 
 3045:             (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
 3046:             return;
 3047:         }
 3048: 
 3049:         l_element_courant = (*s_objet_2).objet;
 3050: 
 3051:         if ((*(*l_element_courant).donnee).type != INT)
 3052:         {
 3053:             liberation(s_etat_processus, s_objet_1);
 3054:             liberation(s_etat_processus, s_objet_2);
 3055:             liberation(s_etat_processus, s_objet_3);
 3056: 
 3057:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 3058:             return;
 3059:         }
 3060: 
 3061:         if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
 3062:         {
 3063:             liberation(s_etat_processus, s_objet_1);
 3064:             liberation(s_etat_processus, s_objet_2);
 3065:             liberation(s_etat_processus, s_objet_3);
 3066: 
 3067:             (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
 3068:             return;
 3069:         }
 3070:         else if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) >
 3071:                 (integer8) (*((struct_vecteur *) (*s_objet_3).objet)).taille)
 3072:         {
 3073:             liberation(s_etat_processus, s_objet_1);
 3074:             liberation(s_etat_processus, s_objet_2);
 3075:             liberation(s_etat_processus, s_objet_3);
 3076: 
 3077:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 3078:             return;
 3079:         }
 3080: 
 3081:         indice_i = (*((integer8 *) (*(*l_element_courant).donnee).objet));
 3082: 
 3083:         if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'Q')) == NULL)
 3084:         {
 3085:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 3086:             return;
 3087:         }
 3088: 
 3089:         liberation(s_etat_processus, s_objet_3);
 3090:         s_objet_3 = s_copie_3;
 3091: 
 3092:         if ((*s_objet_3).type == VIN)
 3093:         {
 3094:             /*
 3095:              * Vecteur d'entiers
 3096:              */
 3097: 
 3098:             if ((*s_objet_1).type == INT)
 3099:             {
 3100:                 /*
 3101:                  * Aucune conversion de type
 3102:                  */
 3103: 
 3104:                 ((integer8 *) (*((struct_vecteur *) (*s_objet_3).objet))
 3105:                         .tableau)[indice_i - 1] = (*((integer8 *)
 3106:                         (*s_objet_1).objet));
 3107:             }
 3108:             else if ((*s_objet_1).type == REL)
 3109:             {
 3110:                 /*
 3111:                  * Conversion du vecteur en vecteur réel
 3112:                  */
 3113: 
 3114:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 3115:                         (*s_objet_3).objet)).tableau);
 3116: 
 3117:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'R';
 3118:                 (*s_objet_3).type = VRL;
 3119: 
 3120:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
 3121:                         = malloc(((size_t) (*((struct_vecteur *)
 3122:                         (*s_objet_3).objet)).taille) * sizeof(real8)))
 3123:                         == NULL)
 3124:                 {
 3125:                     (*s_etat_processus).erreur_systeme =
 3126:                             d_es_allocation_memoire;
 3127:                     return;
 3128:                 }
 3129: 
 3130:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
 3131:                         .taille; i++)
 3132:                 {
 3133:                     ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
 3134:                             .tableau)[i] = (real8) (((integer8 *) tampon)[i]);
 3135:                 }
 3136: 
 3137:                 free((integer8 *) tampon);
 3138: 
 3139:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
 3140:                         .tableau)[indice_i - 1] = (*((real8 *)
 3141:                         (*s_objet_1).objet));
 3142:             }
 3143:             else if ((*s_objet_1).type == CPL)
 3144:             {
 3145:                 /*
 3146:                  * Conversion du vecteur en vecteur complexe
 3147:                  */
 3148: 
 3149:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 3150:                         (*s_objet_3).objet)).tableau);
 3151: 
 3152:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'C';
 3153:                 (*s_objet_3).type = VCX;
 3154: 
 3155:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
 3156:                         = malloc(((size_t) (*((struct_vecteur *)
 3157:                         (*s_objet_3).objet)).taille) *
 3158:                         sizeof(struct_complexe16))) == NULL)
 3159:                 {
 3160:                     (*s_etat_processus).erreur_systeme =
 3161:                             d_es_allocation_memoire;
 3162:                     return;
 3163:                 }
 3164: 
 3165:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
 3166:                         .taille; i++)
 3167:                 {
 3168:                     ((struct_complexe16 *) (*((struct_vecteur *)
 3169:                             (*s_objet_3).objet)).tableau)[i].partie_reelle =
 3170:                             (real8) (((integer8 *) tampon)[i]);
 3171:                     ((struct_complexe16 *) (*((struct_vecteur *)
 3172:                             (*s_objet_3).objet)).tableau)[i]
 3173:                             .partie_imaginaire = (real8) 0;
 3174:                 }
 3175: 
 3176:                 free((integer8 *) tampon);
 3177: 
 3178:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3179:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3180:                         .partie_reelle = (*((struct_complexe16 *)
 3181:                         (*s_objet_1).objet)).partie_reelle;
 3182:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3183:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3184:                         .partie_imaginaire = (*((struct_complexe16 *)
 3185:                         (*s_objet_1).objet)).partie_imaginaire;
 3186:             }
 3187:             else
 3188:             {
 3189:                 liberation(s_etat_processus, s_objet_1);
 3190:                 liberation(s_etat_processus, s_objet_2);
 3191:                 liberation(s_etat_processus, s_objet_3);
 3192: 
 3193:                 (*s_etat_processus).erreur_execution =
 3194:                         d_ex_erreur_type_argument;
 3195:                 return;
 3196:             }
 3197:         }
 3198:         else if ((*s_objet_3).type == VRL)
 3199:         {
 3200:             /*
 3201:              * Vecteur de réels
 3202:              */
 3203: 
 3204:             if ((*s_objet_1).type == INT)
 3205:             {
 3206:                 /*
 3207:                  * Conversion de l'élément à insérer en réel
 3208:                  */
 3209: 
 3210:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
 3211:                         .tableau)[indice_i - 1] = (real8) (*((integer8 *)
 3212:                         (*s_objet_1).objet));
 3213:             }
 3214:             else if ((*s_objet_1).type == REL)
 3215:             {
 3216:                 /*
 3217:                  * Aucune conversion de type
 3218:                  */
 3219: 
 3220:                 ((real8 *) (*((struct_vecteur *) (*s_objet_3).objet))
 3221:                         .tableau)[indice_i - 1] = (*((real8 *)
 3222:                         (*s_objet_1).objet));
 3223:             }
 3224:             else if ((*s_objet_1).type == CPL)
 3225:             {
 3226:                 /*
 3227:                  * Conversion du vecteur en vecteur complexe
 3228:                  */
 3229: 
 3230:                 tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 3231:                         (*s_objet_3).objet)).tableau);
 3232: 
 3233:                 (*((struct_vecteur *) (*s_objet_3).objet)).type = 'C';
 3234:                 (*s_objet_3).type = VCX;
 3235: 
 3236:                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
 3237:                         = malloc(((size_t) (*((struct_vecteur *)
 3238:                         (*s_objet_3).objet)).taille) *
 3239:                         sizeof(struct_complexe16))) == NULL)
 3240:                 {
 3241:                     (*s_etat_processus).erreur_systeme =
 3242:                             d_es_allocation_memoire;
 3243:                     return;
 3244:                 }
 3245: 
 3246:                 for(i = 0; i < (*((struct_vecteur *) (*s_objet_3).objet))
 3247:                         .taille; i++)
 3248:                 {
 3249:                     ((struct_complexe16 *) (*((struct_vecteur *)
 3250:                             (*s_objet_3).objet)).tableau)[i].partie_reelle =
 3251:                             ((real8 *) tampon)[i];
 3252:                     ((struct_complexe16 *) (*((struct_vecteur *)
 3253:                             (*s_objet_3).objet)).tableau)[i]
 3254:                             .partie_imaginaire = (real8) 0;
 3255:                 }
 3256: 
 3257:                 free((real8 *) tampon);
 3258: 
 3259:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3260:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3261:                         .partie_reelle = (*((struct_complexe16 *)
 3262:                         (*s_objet_1).objet)).partie_reelle;
 3263:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3264:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3265:                         .partie_imaginaire = (*((struct_complexe16 *)
 3266:                         (*s_objet_1).objet)).partie_imaginaire;
 3267:             }
 3268:             else
 3269:             {
 3270:                 liberation(s_etat_processus, s_objet_1);
 3271:                 liberation(s_etat_processus, s_objet_2);
 3272:                 liberation(s_etat_processus, s_objet_3);
 3273: 
 3274:                 (*s_etat_processus).erreur_execution =
 3275:                         d_ex_erreur_type_argument;
 3276:                 return;
 3277:             }
 3278:         }
 3279:         else
 3280:         {
 3281:             /*
 3282:              * Vecteur de complexes
 3283:              */
 3284: 
 3285:             if ((*s_objet_1).type == INT)
 3286:             {
 3287:                 /*
 3288:                  * Conversion de l'élément à insérer en complexe
 3289:                  */
 3290: 
 3291:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3292:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3293:                         .partie_reelle = (real8) (*((integer8 *)
 3294:                         (*s_objet_1).objet));
 3295:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3296:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 3297:                         .partie_imaginaire = (real8) 0;
 3298:             }
 3299:             else if ((*s_objet_1).type == REL)
 3300:             {
 3301:                 /*
 3302:                  * Conversion de l'élément à insérer en complexe
 3303:                  */
 3304: 
 3305:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3306:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3307:                         .partie_reelle = (*((real8 *) (*s_objet_1).objet));
 3308:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3309:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 3310:                         .partie_imaginaire = (real8) 0;
 3311:             }
 3312:             else if ((*s_objet_1).type == CPL)
 3313:             {
 3314:                 /*
 3315:                  * Aucune conversion de type
 3316:                  */
 3317: 
 3318:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3319:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3320:                         .partie_reelle = (*((struct_complexe16 *)
 3321:                         (*s_objet_1).objet)).partie_reelle;
 3322:                 ((struct_complexe16 *) (*((struct_vecteur *)
 3323:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3324:                         .partie_imaginaire = (*((struct_complexe16 *)
 3325:                         (*s_objet_1).objet)).partie_imaginaire;
 3326:             }
 3327:             else
 3328:             {
 3329:                 liberation(s_etat_processus, s_objet_1);
 3330:                 liberation(s_etat_processus, s_objet_2);
 3331:                 liberation(s_etat_processus, s_objet_3);
 3332: 
 3333:                 (*s_etat_processus).erreur_execution =
 3334:                         d_ex_erreur_type_argument;
 3335:                 return;
 3336:             }
 3337:         }
 3338: 
 3339:         liberation(s_etat_processus, s_objet_1);
 3340: 
 3341:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3342:                 s_objet_3) == d_erreur)
 3343:         {
 3344:             return;
 3345:         }
 3346: 
 3347:         (*((integer8 *) (*(*l_element_courant).donnee).objet)) =
 3348:                 (indice_i % (*((struct_vecteur *) (*s_objet_3).objet))
 3349:                 .taille) + 1;
 3350: 
 3351:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3352:                 s_objet_2) == d_erreur)
 3353:         {
 3354:             return;
 3355:         }
 3356:     }
 3357: 
 3358: /*
 3359: --------------------------------------------------------------------------------
 3360:   Traitement des éléments des matrices
 3361: --------------------------------------------------------------------------------
 3362: */
 3363: 
 3364:     else if (((*s_objet_3).type == MIN) ||
 3365:             ((*s_objet_3).type == MRL) ||
 3366:             ((*s_objet_3).type == MCX))
 3367:     {
 3368:         if ((*s_objet_2).type != LST)
 3369:         {
 3370:             liberation(s_etat_processus, s_objet_1);
 3371:             liberation(s_etat_processus, s_objet_2);
 3372:             liberation(s_etat_processus, s_objet_3);
 3373: 
 3374:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 3375:             return;
 3376:         }
 3377: 
 3378:         l_element_courant = (*s_objet_2).objet;
 3379:         nombre_dimensions = 0;
 3380: 
 3381:         while(l_element_courant != NULL)
 3382:         {
 3383:             nombre_dimensions++;
 3384:             l_element_courant = (*l_element_courant).suivant;
 3385:         }
 3386: 
 3387:         if (nombre_dimensions != 2)
 3388:         {
 3389:             liberation(s_etat_processus, s_objet_1);
 3390:             liberation(s_etat_processus, s_objet_2);
 3391:             liberation(s_etat_processus, s_objet_3);
 3392: 
 3393:             (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
 3394:             return;
 3395:         }
 3396: 
 3397:         l_element_courant = (*s_objet_2).objet;
 3398: 
 3399:         indice_i = 0;
 3400:         indice_j = 0;
 3401: 
 3402:         while(l_element_courant != NULL)
 3403:         {
 3404:             if ((*(*l_element_courant).donnee).type != INT)
 3405:             {
 3406:                 liberation(s_etat_processus, s_objet_1);
 3407:                 liberation(s_etat_processus, s_objet_2);
 3408:                 liberation(s_etat_processus, s_objet_3);
 3409: 
 3410:                 (*s_etat_processus).erreur_execution =
 3411:                         d_ex_erreur_type_argument;
 3412:                 return;
 3413:             }
 3414: 
 3415:             if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
 3416:             {
 3417:                 liberation(s_etat_processus, s_objet_1);
 3418:                 liberation(s_etat_processus, s_objet_2);
 3419:                 liberation(s_etat_processus, s_objet_3);
 3420: 
 3421:                 (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
 3422:                 return;
 3423:             }
 3424: 
 3425:             if (indice_i == 0)
 3426:             {
 3427:                 indice_i = (*((integer8 *)
 3428:                         (*(*l_element_courant).donnee).objet));
 3429:             }
 3430:             else
 3431:             {
 3432:                 indice_j = (*((integer8 *)
 3433:                         (*(*l_element_courant).donnee).objet));
 3434:             }
 3435: 
 3436:             l_element_courant = (*l_element_courant).suivant;
 3437:         }
 3438: 
 3439:         if ((indice_i > (*((struct_matrice *) (*s_objet_3).objet))
 3440:                 .nombre_lignes) || (indice_j > (*((struct_matrice *)
 3441:                 (*s_objet_3).objet)).nombre_colonnes))
 3442:         {
 3443:             liberation(s_etat_processus, s_objet_1);
 3444:             liberation(s_etat_processus, s_objet_2);
 3445:             liberation(s_etat_processus, s_objet_3);
 3446: 
 3447:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 3448:             return;
 3449:         }
 3450: 
 3451:         if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'Q')) == NULL)
 3452:         {
 3453:             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 3454:             return;
 3455:         }
 3456: 
 3457:         liberation(s_etat_processus, s_objet_3);
 3458:         s_objet_3 = s_copie_3;
 3459: 
 3460:         if ((*s_objet_3).type == MIN)
 3461:         {
 3462:             /*
 3463:              * Matrice d'entiers
 3464:              */
 3465: 
 3466:             if ((*s_objet_1).type == INT)
 3467:             {
 3468:                 /*
 3469:                  * Aucune conversion de type
 3470:                  */
 3471: 
 3472:                 ((integer8 **) (*((struct_matrice *) (*s_objet_3).objet))
 3473:                         .tableau)[indice_i - 1][indice_j - 1] =
 3474:                         (*((integer8 *) (*s_objet_1).objet));
 3475:             }
 3476:             else if ((*s_objet_1).type == REL)
 3477:             {
 3478:                 /*
 3479:                  * Conversion de la matrice en matrice réelle
 3480:                  */
 3481: 
 3482:                 tampon = (void *) ((integer8 **) (*((struct_matrice *)
 3483:                         (*s_objet_3).objet)).tableau);
 3484: 
 3485:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'R';
 3486:                 (*s_objet_3).type = MRL;
 3487: 
 3488:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
 3489:                         = malloc(((size_t) (*((struct_matrice *)
 3490:                         (*s_objet_3).objet)).nombre_lignes) * sizeof(real8 *)))
 3491:                         == NULL)
 3492:                 {
 3493:                     (*s_etat_processus).erreur_systeme =
 3494:                             d_es_allocation_memoire;
 3495:                     return;
 3496:                 }
 3497: 
 3498:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
 3499:                         .nombre_lignes; i++)
 3500:                 {
 3501:                     if ((((real8 **) (*((struct_matrice *)
 3502:                             (*s_objet_3).objet)).tableau)[i]
 3503:                             = malloc(((size_t) (*((struct_matrice *)
 3504:                             (*s_objet_3).objet)).nombre_colonnes) *
 3505:                             sizeof(real8))) == NULL)
 3506:                     {
 3507:                         (*s_etat_processus).erreur_systeme =
 3508:                                 d_es_allocation_memoire;
 3509:                         return;
 3510:                     }
 3511: 
 3512:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
 3513:                             .nombre_colonnes; j++)
 3514:                     {
 3515:                         ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 3516:                                 .tableau)[i][j] = (real8) (((integer8 **)
 3517:                                 tampon)[i][j]);
 3518:                     }
 3519: 
 3520:                     free(((integer8 **) tampon)[i]);
 3521:                 }
 3522: 
 3523:                 free((integer8 **) tampon);
 3524: 
 3525:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 3526:                         .tableau)[indice_i - 1][indice_j - 1] = (*((real8 *)
 3527:                         (*s_objet_1).objet));
 3528:             }
 3529:             else if ((*s_objet_1).type == CPL)
 3530:             {
 3531:                 /*
 3532:                  * Conversion de la matrice en matrice complexe
 3533:                  */
 3534: 
 3535:                 tampon = (void *) ((integer8 **) (*((struct_matrice *)
 3536:                         (*s_objet_3).objet)).tableau);
 3537: 
 3538:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'C';
 3539:                 (*s_objet_3).type = MCX;
 3540: 
 3541:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
 3542:                         = malloc(((size_t) (*((struct_matrice *)
 3543:                         (*s_objet_3).objet)).nombre_lignes) *
 3544:                         sizeof(struct_complexe16 *))) == NULL)
 3545:                 {
 3546:                     (*s_etat_processus).erreur_systeme =
 3547:                             d_es_allocation_memoire;
 3548:                     return;
 3549:                 }
 3550: 
 3551:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
 3552:                         .nombre_lignes; i++)
 3553:                 {
 3554:                     if ((((struct_complexe16 **) (*((struct_matrice *)
 3555:                             (*s_objet_3).objet)).tableau)[i]
 3556:                             = malloc(((size_t) (*((struct_matrice *)
 3557:                             (*s_objet_3).objet)).nombre_colonnes) *
 3558:                             sizeof(struct_complexe16))) == NULL)
 3559:                     {
 3560:                         (*s_etat_processus).erreur_systeme =
 3561:                                 d_es_allocation_memoire;
 3562:                         return;
 3563:                     }
 3564: 
 3565:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
 3566:                             .nombre_colonnes; j++)
 3567:                     {
 3568:                         ((struct_complexe16 **) (*((struct_matrice *)
 3569:                                 (*s_objet_3).objet)).tableau)[i][j]
 3570:                                 .partie_reelle = (real8) (((integer8 **)
 3571:                                 tampon)[i][j]);
 3572:                         ((struct_complexe16 **) (*((struct_matrice *)
 3573:                                 (*s_objet_3).objet)).tableau)[i][j]
 3574:                                 .partie_imaginaire = (real8) 0;
 3575:                     }
 3576: 
 3577:                     free(((integer8 **) tampon)[i]);
 3578:                 }
 3579: 
 3580:                 free((integer8 **) tampon);
 3581: 
 3582:                 ((struct_complexe16 **) (*((struct_matrice *)
 3583:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3584:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 3585:                         (*s_objet_1).objet)).partie_reelle;
 3586:                 ((struct_complexe16 **) (*((struct_matrice *)
 3587:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3588:                         [indice_j - 1].partie_imaginaire =
 3589:                         (*((struct_complexe16 *)
 3590:                         (*s_objet_1).objet)).partie_imaginaire;
 3591:             }
 3592:             else
 3593:             {
 3594:                 liberation(s_etat_processus, s_objet_1);
 3595:                 liberation(s_etat_processus, s_objet_2);
 3596:                 liberation(s_etat_processus, s_objet_3);
 3597: 
 3598:                 (*s_etat_processus).erreur_execution =
 3599:                         d_ex_erreur_type_argument;
 3600:                 return;
 3601:             }
 3602:         }
 3603:         else if ((*s_objet_3).type == MRL)
 3604:         {
 3605:             /*
 3606:              * Matrice de réels
 3607:              */
 3608: 
 3609:             if ((*s_objet_1).type == INT)
 3610:             {
 3611:                 /*
 3612:                  * Conversion de l'élément à insérer en réel
 3613:                  */
 3614: 
 3615:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 3616:                         .tableau)[indice_i - 1][indice_j - 1] =
 3617:                         (real8) (*((integer8 *) (*s_objet_1).objet));
 3618:             }
 3619:             else if ((*s_objet_1).type == REL)
 3620:             {
 3621:                 /*
 3622:                  * Aucune conversion de type
 3623:                  */
 3624: 
 3625:                 ((real8 **) (*((struct_matrice *) (*s_objet_3).objet))
 3626:                         .tableau)[indice_i - 1][indice_j - 1] = (*((real8 *)
 3627:                         (*s_objet_1).objet));
 3628:             }
 3629:             else if ((*s_objet_1).type == CPL)
 3630:             {
 3631:                 /*
 3632:                  * Conversion de la matrice en matrice complexe
 3633:                  */
 3634: 
 3635:                 tampon = (void *) ((real8 **) (*((struct_matrice *)
 3636:                         (*s_objet_3).objet)).tableau);
 3637: 
 3638:                 (*((struct_matrice *) (*s_objet_3).objet)).type = 'C';
 3639:                 (*s_objet_3).type = MCX;
 3640: 
 3641:                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
 3642:                         = malloc(((size_t) (*((struct_matrice *)
 3643:                         (*s_objet_3).objet)).nombre_lignes) *
 3644:                         sizeof(struct_complexe16 *))) == NULL)
 3645:                 {
 3646:                     (*s_etat_processus).erreur_systeme =
 3647:                             d_es_allocation_memoire;
 3648:                     return;
 3649:                 }
 3650: 
 3651:                 for(i = 0; i < (*((struct_matrice *) (*s_objet_3).objet))
 3652:                         .nombre_lignes; i++)
 3653:                 {
 3654:                     if ((((struct_complexe16 **) (*((struct_matrice *)
 3655:                             (*s_objet_3).objet)).tableau)[i]
 3656:                             = malloc(((size_t) (*((struct_matrice *)
 3657:                             (*s_objet_3).objet)).nombre_colonnes) *
 3658:                             sizeof(struct_complexe16))) == NULL)
 3659:                     {
 3660:                         (*s_etat_processus).erreur_systeme =
 3661:                                 d_es_allocation_memoire;
 3662:                         return;
 3663:                     }
 3664: 
 3665:                     for(j = 0; j < (*((struct_matrice *) (*s_objet_3).objet))
 3666:                             .nombre_colonnes; j++)
 3667:                     {
 3668:                         ((struct_complexe16 **) (*((struct_matrice *)
 3669:                                 (*s_objet_3).objet)).tableau)[i][j]
 3670:                                 .partie_reelle = (((real8 **)
 3671:                                 tampon)[i][j]);
 3672:                         ((struct_complexe16 **) (*((struct_matrice *)
 3673:                                 (*s_objet_3).objet)).tableau)[i][j]
 3674:                                 .partie_imaginaire = (real8) 0;
 3675:                     }
 3676: 
 3677:                     free(((integer8 **) tampon)[i]);
 3678:                 }
 3679: 
 3680:                 free((integer8 **) tampon);
 3681: 
 3682:                 ((struct_complexe16 **) (*((struct_matrice *)
 3683:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3684:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 3685:                         (*s_objet_1).objet)).partie_reelle;
 3686:                 ((struct_complexe16 **) (*((struct_matrice *)
 3687:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3688:                         [indice_j - 1].partie_imaginaire =
 3689:                         (*((struct_complexe16 *)
 3690:                         (*s_objet_1).objet)).partie_imaginaire;
 3691:             }
 3692:             else
 3693:             {
 3694:                 liberation(s_etat_processus, s_objet_1);
 3695:                 liberation(s_etat_processus, s_objet_2);
 3696:                 liberation(s_etat_processus, s_objet_3);
 3697: 
 3698:                 (*s_etat_processus).erreur_execution =
 3699:                         d_ex_erreur_type_argument;
 3700:                 return;
 3701:             }
 3702:         }
 3703:         else
 3704:         {
 3705:             /*
 3706:              * Matrice de complexes
 3707:              */
 3708: 
 3709:             if ((*s_objet_1).type == INT)
 3710:             {
 3711:                 /*
 3712:                  * Conversion de l'élément à insérer en complexe
 3713:                  */
 3714: 
 3715:                 ((struct_complexe16 **) (*((struct_matrice *)
 3716:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3717:                         [indice_j - 1].partie_reelle = (real8) (*((integer8 *)
 3718:                         (*s_objet_1).objet));
 3719:                 ((struct_complexe16 **) (*((struct_matrice *)
 3720:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 3721:                         [indice_j - 1].partie_imaginaire = (real8) 0;
 3722:             }
 3723:             else if ((*s_objet_1).type == REL)
 3724:             {
 3725:                 /*
 3726:                  * Conversion de l'élément à insérer en complexe
 3727:                  */
 3728: 
 3729:                 ((struct_complexe16 **) (*((struct_matrice *)
 3730:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3731:                         [indice_j - 1].partie_reelle =
 3732:                         (*((real8 *) (*s_objet_1).objet));
 3733:                 ((struct_complexe16 **) (*((struct_matrice *)
 3734:                         (*s_objet_3).objet)).tableau)[indice_i - 1] 
 3735:                         [indice_j - 1].partie_imaginaire = (real8) 0;
 3736:             }
 3737:             else if ((*s_objet_1).type == CPL)
 3738:             {
 3739:                 /*
 3740:                  * Aucune conversion de type
 3741:                  */
 3742: 
 3743:                 ((struct_complexe16 **) (*((struct_matrice *)
 3744:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3745:                         [indice_j - 1].partie_reelle = (*((struct_complexe16 *)
 3746:                         (*s_objet_1).objet)).partie_reelle;
 3747:                 ((struct_complexe16 **) (*((struct_matrice *)
 3748:                         (*s_objet_3).objet)).tableau)[indice_i - 1]
 3749:                         [indice_j - 1].partie_imaginaire =
 3750:                         (*((struct_complexe16 *)
 3751:                         (*s_objet_1).objet)).partie_imaginaire;
 3752:             }
 3753:             else
 3754:             {
 3755:                 liberation(s_etat_processus, s_objet_1);
 3756:                 liberation(s_etat_processus, s_objet_2);
 3757:                 liberation(s_etat_processus, s_objet_3);
 3758: 
 3759:                 (*s_etat_processus).erreur_execution =
 3760:                         d_ex_erreur_type_argument;
 3761:                 return;
 3762:             }
 3763:         }
 3764: 
 3765:         liberation(s_etat_processus, s_objet_1);
 3766: 
 3767:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3768:                 s_objet_3) == d_erreur)
 3769:         {
 3770:             return;
 3771:         }
 3772: 
 3773:         if ((++(*((integer8 *) (*(*(*((struct_liste_chainee *)
 3774:                 (*s_objet_2).objet)).suivant).donnee).objet))) > (integer8)
 3775:                 (*((struct_matrice *) (*s_objet_3).objet)).nombre_colonnes)
 3776:         {
 3777:             (*((integer8 *) (*(*(*((struct_liste_chainee *) (*s_objet_2)
 3778:                     .objet)).suivant).donnee).objet)) = 1;
 3779: 
 3780:             if ((++(*((integer8 *) (*(*((struct_liste_chainee *)
 3781:                     (*s_objet_2).objet)).donnee).objet))) > (integer8)
 3782:                     (*((struct_matrice *) (*s_objet_3).objet)).nombre_lignes)
 3783:             {
 3784:                 (*((integer8 *) (*(*((struct_liste_chainee *)
 3785:                         (*s_objet_2).objet)).donnee).objet)) = 1;
 3786:             }
 3787:         }
 3788: 
 3789:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3790:                 s_objet_2) == d_erreur)
 3791:         {
 3792:             return;
 3793:         }
 3794:     }
 3795: 
 3796: /*
 3797: --------------------------------------------------------------------------------
 3798:   Traitement des éléments des listes
 3799: --------------------------------------------------------------------------------
 3800: */
 3801: 
 3802:     else if ((*s_objet_3).type == LST)
 3803:     {
 3804:         if ((*s_objet_2).type != INT)
 3805:         {
 3806:             liberation(s_etat_processus, s_objet_1);
 3807:             liberation(s_etat_processus, s_objet_2);
 3808:             liberation(s_etat_processus, s_objet_3);
 3809: 
 3810:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 3811:             return;
 3812:         }
 3813: 
 3814:         indice_i = (*((integer8 *) (*s_objet_2).objet));
 3815:         indice_j = 1;
 3816: 
 3817:         if ((*s_objet_3).nombre_occurrences > 1)
 3818:         {
 3819:             if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'N'))
 3820:                     == NULL)
 3821:             {
 3822:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 3823:                 return;
 3824:             }
 3825: 
 3826:             liberation(s_etat_processus, s_objet_3);
 3827:             s_objet_3 = s_copie_3;
 3828:         }
 3829: 
 3830:         l_element_courant = (*s_objet_3).objet;
 3831:         nombre_elements = 0;
 3832: 
 3833:         while(l_element_courant != NULL)
 3834:         {
 3835:             l_element_courant = (*l_element_courant).suivant;
 3836:             nombre_elements++;
 3837:         }
 3838: 
 3839:         l_element_courant = (*s_objet_3).objet;
 3840: 
 3841:         while((l_element_courant != NULL) && (indice_j != indice_i))
 3842:         {
 3843:             l_element_courant = (*l_element_courant).suivant;
 3844:             indice_j++;
 3845:         }
 3846: 
 3847:         if (l_element_courant != NULL)
 3848:         {
 3849:             liberation(s_etat_processus, (*l_element_courant).donnee);
 3850:             (*l_element_courant).donnee = s_objet_1;
 3851:         }
 3852:         else
 3853:         {
 3854:             liberation(s_etat_processus, s_objet_1);
 3855:             liberation(s_etat_processus, s_objet_2);
 3856:             liberation(s_etat_processus, s_objet_3);
 3857: 
 3858:             (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 3859:             return;
 3860:         }
 3861: 
 3862:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3863:                 s_objet_3) == d_erreur)
 3864:         {
 3865:             return;
 3866:         }
 3867: 
 3868:         (*((integer8 *) (*s_objet_2).objet)) =
 3869:                 (indice_i % nombre_elements) + 1;
 3870: 
 3871:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 3872:                 s_objet_2) == d_erreur)
 3873:         {
 3874:             return;
 3875:         }
 3876:     }
 3877: 
 3878: /*
 3879: --------------------------------------------------------------------------------
 3880:   Traitement des noms
 3881: --------------------------------------------------------------------------------
 3882: */
 3883: 
 3884:     else if ((*s_objet_3).type == NOM)
 3885:     {
 3886:         variable_partagee = d_faux;
 3887: 
 3888:         if (recherche_variable(s_etat_processus, (*((struct_nom *)
 3889:                 (*s_objet_3).objet)).nom) == d_faux)
 3890:         {
 3891:             (*s_etat_processus).erreur_systeme = d_es;
 3892:             (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
 3893: 
 3894:             liberation(s_etat_processus, s_objet_1);
 3895:             liberation(s_etat_processus, s_objet_2);
 3896:             liberation(s_etat_processus, s_objet_3);
 3897: 
 3898:             return;
 3899:         }
 3900: 
 3901:         if ((*(*s_etat_processus).pointeur_variable_courante)
 3902:                 .variable_verrouillee == d_vrai)
 3903:         {
 3904:             (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
 3905: 
 3906:             liberation(s_etat_processus, s_objet_1);
 3907:             liberation(s_etat_processus, s_objet_2);
 3908:             liberation(s_etat_processus, s_objet_3);
 3909: 
 3910:             return;
 3911:         }
 3912: 
 3913:         s_objet_4 = (*(*s_etat_processus).pointeur_variable_courante).objet;
 3914: 
 3915:         if (s_objet_4 == NULL)
 3916:         {
 3917:             if (recherche_variable_partagee(s_etat_processus,
 3918:                     (*(*s_etat_processus).pointeur_variable_courante).nom,
 3919:                     (*(*s_etat_processus).pointeur_variable_courante)
 3920:                     .variable_partagee, (*(*s_etat_processus)
 3921:                     .pointeur_variable_courante).origine) == NULL)
 3922:             {
 3923:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 3924:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 3925:                 {
 3926:                     (*s_etat_processus).erreur_systeme = d_es_processus;
 3927:                     return;
 3928:                 }
 3929: 
 3930:                 (*s_etat_processus).erreur_systeme = d_es;
 3931:                 (*s_etat_processus).erreur_execution =
 3932:                         d_ex_variable_non_definie;
 3933: 
 3934:                 liberation(s_etat_processus, s_objet_1);
 3935:                 liberation(s_etat_processus, s_objet_2);
 3936:                 liberation(s_etat_processus, s_objet_3);
 3937: 
 3938:                 return;
 3939:             }
 3940: 
 3941:             s_objet_4 = (*(*s_etat_processus)
 3942:                     .pointeur_variable_partagee_courante).objet;
 3943:             variable_partagee = d_vrai;
 3944:         }
 3945: 
 3946:         if (((*s_objet_4).type == VIN) ||
 3947:                 ((*s_objet_4).type == VRL) ||
 3948:                 ((*s_objet_4).type == VCX))
 3949:         {
 3950:             if ((*s_objet_2).type != LST)
 3951:             {
 3952:                 if (variable_partagee == d_vrai)
 3953:                 {
 3954:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 3955:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 3956:                     {
 3957:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 3958:                         return;
 3959:                     }
 3960:                 }
 3961: 
 3962:                 liberation(s_etat_processus, s_objet_1);
 3963:                 liberation(s_etat_processus, s_objet_2);
 3964:                 liberation(s_etat_processus, s_objet_3);
 3965: 
 3966:                 (*s_etat_processus).erreur_execution =
 3967:                         d_ex_erreur_type_argument;
 3968:                 return;
 3969:             }
 3970: 
 3971:             l_element_courant = (*s_objet_2).objet;
 3972:             nombre_dimensions = 0;
 3973: 
 3974:             while(l_element_courant != NULL)
 3975:             {
 3976:                 nombre_dimensions++;
 3977:                 l_element_courant = (*l_element_courant).suivant;
 3978:             }
 3979: 
 3980:             if (nombre_dimensions != 1)
 3981:             {
 3982:                 if (variable_partagee == d_vrai)
 3983:                 {
 3984:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 3985:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 3986:                     {
 3987:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 3988:                         return;
 3989:                     }
 3990:                 }
 3991: 
 3992:                 liberation(s_etat_processus, s_objet_1);
 3993:                 liberation(s_etat_processus, s_objet_2);
 3994:                 liberation(s_etat_processus, s_objet_3);
 3995: 
 3996:                 (*s_etat_processus).erreur_execution =
 3997:                         d_ex_dimensions_invalides;
 3998:                 return;
 3999:             }
 4000: 
 4001:             l_element_courant = (*s_objet_2).objet;
 4002: 
 4003:             if ((*(*l_element_courant).donnee).type != INT)
 4004:             {
 4005:                 if (variable_partagee == d_vrai)
 4006:                 {
 4007:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4008:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4009:                     {
 4010:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4011:                         return;
 4012:                     }
 4013:                 }
 4014: 
 4015:                 liberation(s_etat_processus, s_objet_1);
 4016:                 liberation(s_etat_processus, s_objet_2);
 4017:                 liberation(s_etat_processus, s_objet_3);
 4018: 
 4019:                 (*s_etat_processus).erreur_execution =
 4020:                         d_ex_erreur_type_argument;
 4021:                 return;
 4022:             }
 4023: 
 4024:             if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) <= 0)
 4025:             {
 4026:                 if (variable_partagee == d_vrai)
 4027:                 {
 4028:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4029:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4030:                     {
 4031:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4032:                         return;
 4033:                     }
 4034:                 }
 4035: 
 4036:                 liberation(s_etat_processus, s_objet_1);
 4037:                 liberation(s_etat_processus, s_objet_2);
 4038:                 liberation(s_etat_processus, s_objet_3);
 4039: 
 4040:                 (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
 4041:                 return;
 4042:             }
 4043:             else if ((*((integer8 *) (*(*l_element_courant).donnee).objet)) >
 4044:                     (integer8) (*((struct_vecteur *) (*s_objet_4).objet))
 4045:                     .taille)
 4046:             {
 4047:                 if (variable_partagee == d_vrai)
 4048:                 {
 4049:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4050:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4051:                     {
 4052:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4053:                         return;
 4054:                     }
 4055:                 }
 4056: 
 4057:                 liberation(s_etat_processus, s_objet_1);
 4058:                 liberation(s_etat_processus, s_objet_2);
 4059:                 liberation(s_etat_processus, s_objet_3);
 4060: 
 4061:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 4062:                 return;
 4063:             }
 4064: 
 4065:             indice_i = (*((integer8 *) (*(*l_element_courant).donnee).objet));
 4066: 
 4067:             if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'Q'))
 4068:                     == NULL)
 4069:             {
 4070:                 if (variable_partagee == d_vrai)
 4071:                 {
 4072:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4073:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4074:                     {
 4075:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4076:                         return;
 4077:                     }
 4078:                 }
 4079: 
 4080:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 4081:                 return;
 4082:             }
 4083: 
 4084:             liberation(s_etat_processus, s_objet_4);
 4085:             s_objet_4 = s_copie_4;
 4086: 
 4087:             if ((*s_objet_4).type == VIN)
 4088:             {
 4089:                 /*
 4090:                  * Vecteur d'entiers
 4091:                  */
 4092: 
 4093:                 if ((*s_objet_1).type == INT)
 4094:                 {
 4095:                     /*
 4096:                      * Aucune conversion de type
 4097:                      */
 4098: 
 4099:                     ((integer8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 4100:                             .tableau)[indice_i - 1] = (*((integer8 *)
 4101:                             (*s_objet_1).objet));
 4102:                 }
 4103:                 else if ((*s_objet_1).type == REL)
 4104:                 {
 4105:                     /*
 4106:                      * Conversion du vecteur en vecteur réel
 4107:                      */
 4108: 
 4109:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 4110:                             (*s_objet_4).objet)).tableau);
 4111: 
 4112:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'R';
 4113:                     (*s_objet_4).type = VRL;
 4114: 
 4115:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 4116:                             = malloc(((size_t) (*((struct_vecteur *)
 4117:                             (*s_objet_4).objet)).taille) * sizeof(real8)))
 4118:                             == NULL)
 4119:                     {
 4120:                         if (variable_partagee == d_vrai)
 4121:                         {
 4122:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4123:                                     .pointeur_variable_partagee_courante)
 4124:                                     .mutex)) != 0)
 4125:                             {
 4126:                                 (*s_etat_processus).erreur_systeme =
 4127:                                         d_es_processus;
 4128:                                 return;
 4129:                             }
 4130:                         }
 4131: 
 4132:                         (*s_etat_processus).erreur_systeme =
 4133:                                 d_es_allocation_memoire;
 4134:                         return;
 4135:                     }
 4136: 
 4137:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 4138:                             .taille; i++)
 4139:                     {
 4140:                         ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 4141:                                 .tableau)[i] = (real8) (((integer8 *)
 4142:                                 tampon)[i]);
 4143:                     }
 4144: 
 4145:                     free((integer8 *) tampon);
 4146: 
 4147:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 4148:                             .tableau)[indice_i - 1] = (*((real8 *)
 4149:                             (*s_objet_1).objet));
 4150:                 }
 4151:                 else if ((*s_objet_1).type == CPL)
 4152:                 {
 4153:                     /*
 4154:                      * Conversion du vecteur en vecteur complexe
 4155:                      */
 4156: 
 4157:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 4158:                             (*s_objet_4).objet)).tableau);
 4159: 
 4160:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'C';
 4161:                     (*s_objet_4).type = VCX;
 4162: 
 4163:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 4164:                             = malloc(((size_t) (*((struct_vecteur *)
 4165:                             (*s_objet_4).objet)).taille) *
 4166:                             sizeof(struct_complexe16))) == NULL)
 4167:                     {
 4168:                         if (variable_partagee == d_vrai)
 4169:                         {
 4170:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4171:                                     .pointeur_variable_partagee_courante)
 4172:                                     .mutex)) != 0)
 4173:                             {
 4174:                                 (*s_etat_processus).erreur_systeme =
 4175:                                         d_es_processus;
 4176:                                 return;
 4177:                             }
 4178:                         }
 4179: 
 4180:                         (*s_etat_processus).erreur_systeme =
 4181:                                 d_es_allocation_memoire;
 4182:                         return;
 4183:                     }
 4184: 
 4185:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 4186:                             .taille; i++)
 4187:                     {
 4188:                         ((struct_complexe16 *) (*((struct_vecteur *)
 4189:                                 (*s_objet_4).objet)).tableau)[i].partie_reelle =
 4190:                                 (real8) (((integer8 *) tampon)[i]);
 4191:                         ((struct_complexe16 *) (*((struct_vecteur *)
 4192:                                 (*s_objet_4).objet)).tableau)[i]
 4193:                                 .partie_imaginaire = (real8) 0;
 4194:                     }
 4195: 
 4196:                     free((integer8 *) tampon);
 4197: 
 4198:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4199:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4200:                             .partie_reelle = (*((struct_complexe16 *)
 4201:                             (*s_objet_1).objet)).partie_reelle;
 4202:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4203:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4204:                             .partie_imaginaire = (*((struct_complexe16 *)
 4205:                             (*s_objet_1).objet)).partie_imaginaire;
 4206:                 }
 4207:                 else
 4208:                 {
 4209:                     if (variable_partagee == d_vrai)
 4210:                     {
 4211:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4212:                                 .pointeur_variable_partagee_courante).mutex))
 4213:                                 != 0)
 4214:                         {
 4215:                             (*s_etat_processus).erreur_systeme =
 4216:                                     d_es_processus;
 4217:                             return;
 4218:                         }
 4219:                     }
 4220: 
 4221:                     liberation(s_etat_processus, s_objet_1);
 4222:                     liberation(s_etat_processus, s_objet_2);
 4223:                     liberation(s_etat_processus, s_objet_3);
 4224: 
 4225:                     (*s_etat_processus).erreur_execution =
 4226:                             d_ex_erreur_type_argument;
 4227:                     return;
 4228:                 }
 4229:             }
 4230:             else if ((*s_objet_4).type == VRL)
 4231:             {
 4232:                 /*
 4233:                  * Vecteur de réels
 4234:                  */
 4235: 
 4236:                 if ((*s_objet_1).type == INT)
 4237:                 {
 4238:                     /*
 4239:                      * Conversion de l'élément à insérer en réel
 4240:                      */
 4241: 
 4242:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 4243:                             .tableau)[indice_i - 1] = (real8) (*((integer8 *)
 4244:                             (*s_objet_1).objet));
 4245:                 }
 4246:                 else if ((*s_objet_1).type == REL)
 4247:                 {
 4248:                     /*
 4249:                      * Aucune conversion de type
 4250:                      */
 4251: 
 4252:                     ((real8 *) (*((struct_vecteur *) (*s_objet_4).objet))
 4253:                             .tableau)[indice_i - 1] = (*((real8 *)
 4254:                             (*s_objet_1).objet));
 4255:                 }
 4256:                 else if ((*s_objet_1).type == CPL)
 4257:                 {
 4258:                     /*
 4259:                      * Conversion du vecteur en vecteur complexe
 4260:                      */
 4261: 
 4262:                     tampon = (void *) ((integer8 *) (*((struct_vecteur *)
 4263:                             (*s_objet_4).objet)).tableau);
 4264: 
 4265:                     (*((struct_vecteur *) (*s_objet_4).objet)).type = 'C';
 4266:                     (*s_objet_4).type = VCX;
 4267: 
 4268:                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
 4269:                             = malloc(((size_t) (*((struct_vecteur *)
 4270:                             (*s_objet_4).objet)).taille) *
 4271:                             sizeof(struct_complexe16))) == NULL)
 4272:                     {
 4273:                         if (variable_partagee == d_vrai)
 4274:                         {
 4275:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4276:                                     .pointeur_variable_partagee_courante)
 4277:                                     .mutex)) != 0)
 4278:                             {
 4279:                                 (*s_etat_processus).erreur_systeme =
 4280:                                         d_es_processus;
 4281:                                 return;
 4282:                             }
 4283:                         }
 4284: 
 4285:                         (*s_etat_processus).erreur_systeme =
 4286:                                 d_es_allocation_memoire;
 4287:                         return;
 4288:                     }
 4289: 
 4290:                     for(i = 0; i < (*((struct_vecteur *) (*s_objet_4).objet))
 4291:                             .taille; i++)
 4292:                     {
 4293:                         ((struct_complexe16 *) (*((struct_vecteur *)
 4294:                                 (*s_objet_4).objet)).tableau)[i].partie_reelle =
 4295:                                 ((real8 *) tampon)[i];
 4296:                         ((struct_complexe16 *) (*((struct_vecteur *)
 4297:                                 (*s_objet_4).objet)).tableau)[i]
 4298:                                 .partie_imaginaire = (real8) 0;
 4299:                     }
 4300: 
 4301:                     free((real8 *) tampon);
 4302: 
 4303:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4304:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4305:                             .partie_reelle = (*((struct_complexe16 *)
 4306:                             (*s_objet_1).objet)).partie_reelle;
 4307:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4308:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4309:                             .partie_imaginaire = (*((struct_complexe16 *)
 4310:                             (*s_objet_1).objet)).partie_imaginaire;
 4311:                 }
 4312:                 else
 4313:                 {
 4314:                     if (variable_partagee == d_vrai)
 4315:                     {
 4316:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4317:                                 .pointeur_variable_partagee_courante)
 4318:                                 .mutex)) != 0)
 4319:                         {
 4320:                             (*s_etat_processus).erreur_systeme =
 4321:                                     d_es_processus;
 4322:                             return;
 4323:                         }
 4324:                     }
 4325: 
 4326:                     liberation(s_etat_processus, s_objet_1);
 4327:                     liberation(s_etat_processus, s_objet_2);
 4328:                     liberation(s_etat_processus, s_objet_3);
 4329: 
 4330:                     (*s_etat_processus).erreur_execution =
 4331:                             d_ex_erreur_type_argument;
 4332:                     return;
 4333:                 }
 4334:             }
 4335:             else
 4336:             {
 4337:                 /*
 4338:                  * Vecteur de complexes
 4339:                  */
 4340: 
 4341:                 if ((*s_objet_1).type == INT)
 4342:                 {
 4343:                     /*
 4344:                      * Conversion de l'élément à insérer en complexe
 4345:                      */
 4346: 
 4347:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4348:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4349:                             .partie_reelle = (real8) (*((integer8 *)
 4350:                             (*s_objet_1).objet));
 4351:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4352:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 4353:                             .partie_imaginaire = (real8) 0;
 4354:                 }
 4355:                 else if ((*s_objet_1).type == REL)
 4356:                 {
 4357:                     /*
 4358:                      * Conversion de l'élément à insérer en complexe
 4359:                      */
 4360: 
 4361:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4362:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4363:                             .partie_reelle = (*((real8 *) (*s_objet_1).objet));
 4364:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4365:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 4366:                             .partie_imaginaire = (real8) 0;
 4367:                 }
 4368:                 else if ((*s_objet_1).type == CPL)
 4369:                 {
 4370:                     /*
 4371:                      * Aucune conversion de type
 4372:                      */
 4373: 
 4374:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4375:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4376:                             .partie_reelle = (*((struct_complexe16 *)
 4377:                             (*s_objet_1).objet)).partie_reelle;
 4378:                     ((struct_complexe16 *) (*((struct_vecteur *)
 4379:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4380:                             .partie_imaginaire = (*((struct_complexe16 *)
 4381:                             (*s_objet_1).objet)).partie_imaginaire;
 4382:                 }
 4383:                 else
 4384:                 {
 4385:                     if (variable_partagee == d_vrai)
 4386:                     {
 4387:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4388:                                 .pointeur_variable_partagee_courante)
 4389:                                 .mutex)) != 0)
 4390:                         {
 4391:                             (*s_etat_processus).erreur_systeme =
 4392:                                     d_es_processus;
 4393:                             return;
 4394:                         }
 4395:                     }
 4396: 
 4397:                     liberation(s_etat_processus, s_objet_1);
 4398:                     liberation(s_etat_processus, s_objet_2);
 4399:                     liberation(s_etat_processus, s_objet_3);
 4400: 
 4401:                     (*s_etat_processus).erreur_execution =
 4402:                             d_ex_erreur_type_argument;
 4403:                     return;
 4404:                 }
 4405:             }
 4406: 
 4407:             (*((integer8 *) (*(*l_element_courant).donnee).objet)) =
 4408:                     (indice_i % (*((struct_vecteur *) (*s_objet_4).objet))
 4409:                     .taille) + 1;
 4410: 
 4411:             if (variable_partagee == d_faux)
 4412:             {
 4413:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 4414:                         s_objet_4;
 4415:             }
 4416:             else
 4417:             {
 4418:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 4419:                 (*(*s_etat_processus)
 4420:                         .pointeur_variable_partagee_courante).objet = s_objet_4;
 4421: 
 4422:                 if (variable_partagee == d_vrai)
 4423:                 {
 4424:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4425:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4426:                     {
 4427:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4428:                         return;
 4429:                     }
 4430:                 }
 4431:             }
 4432: 
 4433:             liberation(s_etat_processus, s_objet_1);
 4434:         }
 4435:         else if (((*s_objet_4).type == MIN) ||
 4436:                 ((*s_objet_4).type == MRL) ||
 4437:                 ((*s_objet_4).type == MCX))
 4438:         {
 4439:             if ((*s_objet_2).type != LST)
 4440:             {
 4441:                 if (variable_partagee == d_vrai)
 4442:                 {
 4443:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4444:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4445:                     {
 4446:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4447:                         return;
 4448:                     }
 4449:                 }
 4450: 
 4451:                 liberation(s_etat_processus, s_objet_1);
 4452:                 liberation(s_etat_processus, s_objet_2);
 4453:                 liberation(s_etat_processus, s_objet_3);
 4454: 
 4455:                 (*s_etat_processus).erreur_execution =
 4456:                         d_ex_erreur_type_argument;
 4457:                 return;
 4458:             }
 4459: 
 4460:             l_element_courant = (*s_objet_2).objet;
 4461:             nombre_dimensions = 0;
 4462: 
 4463:             while(l_element_courant != NULL)
 4464:             {
 4465:                 nombre_dimensions++;
 4466:                 l_element_courant = (*l_element_courant).suivant;
 4467:             }
 4468: 
 4469:             if (nombre_dimensions != 2)
 4470:             {
 4471:                 if (variable_partagee == d_vrai)
 4472:                 {
 4473:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4474:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4475:                     {
 4476:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4477:                         return;
 4478:                     }
 4479:                 }
 4480: 
 4481:                 liberation(s_etat_processus, s_objet_1);
 4482:                 liberation(s_etat_processus, s_objet_2);
 4483:                 liberation(s_etat_processus, s_objet_3);
 4484: 
 4485:                 (*s_etat_processus).erreur_execution =
 4486:                         d_ex_dimensions_invalides;
 4487:                 return;
 4488:             }
 4489: 
 4490:             l_element_courant = (*s_objet_2).objet;
 4491: 
 4492:             indice_i = 0;
 4493:             indice_j = 0;
 4494: 
 4495:             while(l_element_courant != NULL)
 4496:             {
 4497:                 if ((*(*l_element_courant).donnee).type != INT)
 4498:                 {
 4499:                     if (variable_partagee == d_vrai)
 4500:                     {
 4501:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4502:                                 .pointeur_variable_partagee_courante).mutex))
 4503:                                 != 0)
 4504:                         {
 4505:                             (*s_etat_processus).erreur_systeme = d_es_processus;
 4506:                             return;
 4507:                         }
 4508:                     }
 4509: 
 4510:                     liberation(s_etat_processus, s_objet_1);
 4511:                     liberation(s_etat_processus, s_objet_2);
 4512:                     liberation(s_etat_processus, s_objet_3);
 4513: 
 4514:                     (*s_etat_processus).erreur_execution =
 4515:                             d_ex_erreur_type_argument;
 4516:                     return;
 4517:                 }
 4518: 
 4519:                 if ((*((integer8 *) (*(*l_element_courant).donnee).objet))
 4520:                         <= 0)
 4521:                 {
 4522:                     if (variable_partagee == d_vrai)
 4523:                     {
 4524:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4525:                                 .pointeur_variable_partagee_courante).mutex))
 4526:                                 != 0)
 4527:                         {
 4528:                             (*s_etat_processus).erreur_systeme = d_es_processus;
 4529:                             return;
 4530:                         }
 4531:                     }
 4532: 
 4533:                     liberation(s_etat_processus, s_objet_1);
 4534:                     liberation(s_etat_processus, s_objet_2);
 4535:                     liberation(s_etat_processus, s_objet_3);
 4536: 
 4537:                     (*s_etat_processus).erreur_execution =
 4538:                             d_ex_argument_invalide;
 4539:                     return;
 4540:                 }
 4541: 
 4542:                 if (indice_i == 0)
 4543:                 {
 4544:                     indice_i = (*((integer8 *)
 4545:                             (*(*l_element_courant).donnee).objet));
 4546:                 }
 4547:                 else
 4548:                 {
 4549:                     indice_j = (*((integer8 *)
 4550:                             (*(*l_element_courant).donnee).objet));
 4551:                 }
 4552: 
 4553:                 l_element_courant = (*l_element_courant).suivant;
 4554:             }
 4555: 
 4556:             if ((indice_i > (*((struct_matrice *) (*s_objet_4).objet))
 4557:                     .nombre_lignes) || (indice_j > (*((struct_matrice *)
 4558:                     (*s_objet_4).objet)).nombre_colonnes))
 4559:             {
 4560:                 if (variable_partagee == d_vrai)
 4561:                 {
 4562:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4563:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4564:                     {
 4565:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4566:                         return;
 4567:                     }
 4568:                 }
 4569: 
 4570:                 liberation(s_etat_processus, s_objet_1);
 4571:                 liberation(s_etat_processus, s_objet_2);
 4572:                 liberation(s_etat_processus, s_objet_3);
 4573: 
 4574:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 4575:                 return;
 4576:             }
 4577: 
 4578:             if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'Q'))
 4579:                     == NULL)
 4580:             {
 4581:                 if (variable_partagee == d_vrai)
 4582:                 {
 4583:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4584:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 4585:                     {
 4586:                         (*s_etat_processus).erreur_systeme = d_es_processus;
 4587:                         return;
 4588:                     }
 4589:                 }
 4590: 
 4591:                 (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
 4592:                 return;
 4593:             }
 4594: 
 4595:             liberation(s_etat_processus, s_objet_4);
 4596:             s_objet_4 = s_copie_4;
 4597: 
 4598:             if ((*s_objet_4).type == MIN)
 4599:             {
 4600:                 /*
 4601:                  * Matrice d'entiers
 4602:                  */
 4603: 
 4604:                 if ((*s_objet_1).type == INT)
 4605:                 {
 4606:                     /*
 4607:                      * Aucune conversion de type
 4608:                      */
 4609: 
 4610:                     ((integer8 **) (*((struct_matrice *) (*s_objet_4).objet))
 4611:                             .tableau)[indice_i - 1][indice_j - 1] =
 4612:                             (*((integer8 *) (*s_objet_1).objet));
 4613:                 }
 4614:                 else if ((*s_objet_1).type == REL)
 4615:                 {
 4616:                     /*
 4617:                      * Conversion de la matrice en matrice réelle
 4618:                      */
 4619: 
 4620:                     tampon = (void *) ((integer8 **) (*((struct_matrice *)
 4621:                             (*s_objet_4).objet)).tableau);
 4622: 
 4623:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'R';
 4624:                     (*s_objet_4).type = MRL;
 4625: 
 4626:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 4627:                             = malloc(((size_t) (*((struct_matrice *)
 4628:                             (*s_objet_4).objet)).nombre_lignes) *
 4629:                             sizeof(real8 *))) == NULL)
 4630:                     {
 4631:                         if (variable_partagee == d_vrai)
 4632:                         {
 4633:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4634:                                     .pointeur_variable_partagee_courante)
 4635:                                     .mutex)) != 0)
 4636:                             {
 4637:                                 (*s_etat_processus).erreur_systeme =
 4638:                                         d_es_processus;
 4639:                                 return;
 4640:                             }
 4641:                         }
 4642: 
 4643:                         (*s_etat_processus).erreur_systeme =
 4644:                                 d_es_allocation_memoire;
 4645:                         return;
 4646:                     }
 4647: 
 4648:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 4649:                             .nombre_lignes; i++)
 4650:                     {
 4651:                         if ((((real8 **) (*((struct_matrice *)
 4652:                                 (*s_objet_4).objet)).tableau)[i]
 4653:                                 = malloc(((size_t) (*((struct_matrice *)
 4654:                                 (*s_objet_4).objet)).nombre_colonnes) *
 4655:                                 sizeof(real8))) == NULL)
 4656:                         {
 4657:                             if (variable_partagee == d_vrai)
 4658:                             {
 4659:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4660:                                         .pointeur_variable_partagee_courante)
 4661:                                         .mutex)) != 0)
 4662:                                 {
 4663:                                     (*s_etat_processus).erreur_systeme =
 4664:                                             d_es_processus;
 4665:                                     return;
 4666:                                 }
 4667:                             }
 4668: 
 4669:                             (*s_etat_processus).erreur_systeme =
 4670:                                     d_es_allocation_memoire;
 4671:                             return;
 4672:                         }
 4673: 
 4674:                         for(j = 0; j < (*((struct_matrice *)
 4675:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 4676:                         {
 4677:                             ((real8 **) (*((struct_matrice *) (*s_objet_4)
 4678:                                     .objet)).tableau)[i][j] = (real8)
 4679:                                     (((integer8 **) tampon)[i][j]);
 4680:                         }
 4681: 
 4682:                         free(((integer8 **) tampon)[i]);
 4683:                     }
 4684: 
 4685:                     free((integer8 **) tampon);
 4686: 
 4687:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 4688:                             .tableau)[indice_i - 1][indice_j - 1] =
 4689:                             (*((real8 *) (*s_objet_1).objet));
 4690:                 }
 4691:                 else if ((*s_objet_1).type == CPL)
 4692:                 {
 4693:                     /*
 4694:                      * Conversion de la matrice en matrice complexe
 4695:                      */
 4696: 
 4697:                     tampon = (void *) ((integer8 **) (*((struct_matrice *)
 4698:                             (*s_objet_4).objet)).tableau);
 4699: 
 4700:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'C';
 4701:                     (*s_objet_4).type = MCX;
 4702: 
 4703:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 4704:                             = malloc(((size_t) (*((struct_matrice *)
 4705:                             (*s_objet_4).objet)).nombre_lignes) *
 4706:                             sizeof(struct_complexe16 *))) == NULL)
 4707:                     {
 4708:                         if (variable_partagee == d_vrai)
 4709:                         {
 4710:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4711:                                     .pointeur_variable_partagee_courante)
 4712:                                     .mutex)) != 0)
 4713:                             {
 4714:                                 (*s_etat_processus).erreur_systeme =
 4715:                                         d_es_processus;
 4716:                                 return;
 4717:                             }
 4718:                         }
 4719: 
 4720:                         (*s_etat_processus).erreur_systeme =
 4721:                                 d_es_allocation_memoire;
 4722:                         return;
 4723:                     }
 4724: 
 4725:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 4726:                             .nombre_lignes; i++)
 4727:                     {
 4728:                         if ((((struct_complexe16 **) (*((struct_matrice *)
 4729:                                 (*s_objet_4).objet)).tableau)[i]
 4730:                                 = malloc(((size_t) (*((struct_matrice *)
 4731:                                 (*s_objet_4).objet)).nombre_colonnes) *
 4732:                                 sizeof(struct_complexe16))) == NULL)
 4733:                         {
 4734:                             if (variable_partagee == d_vrai)
 4735:                             {
 4736:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4737:                                         .pointeur_variable_partagee_courante)
 4738:                                         .mutex)) != 0)
 4739:                                 {
 4740:                                     (*s_etat_processus).erreur_systeme =
 4741:                                             d_es_processus;
 4742:                                     return;
 4743:                                 }
 4744:                             }
 4745: 
 4746:                             (*s_etat_processus).erreur_systeme =
 4747:                                     d_es_allocation_memoire;
 4748:                             return;
 4749:                         }
 4750: 
 4751:                         for(j = 0; j < (*((struct_matrice *)
 4752:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 4753:                         {
 4754:                             ((struct_complexe16 **) (*((struct_matrice *)
 4755:                                     (*s_objet_4).objet)).tableau)[i][j]
 4756:                                     .partie_reelle = (real8) (((integer8 **)
 4757:                                     tampon)[i][j]);
 4758:                             ((struct_complexe16 **) (*((struct_matrice *)
 4759:                                     (*s_objet_4).objet)).tableau)[i][j]
 4760:                                     .partie_imaginaire = (real8) 0;
 4761:                         }
 4762: 
 4763:                         free(((integer8 **) tampon)[i]);
 4764:                     }
 4765: 
 4766:                     free((integer8 **) tampon);
 4767: 
 4768:                     ((struct_complexe16 **) (*((struct_matrice *)
 4769:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4770:                             [indice_j - 1].partie_reelle =
 4771:                             (*((struct_complexe16 *)
 4772:                             (*s_objet_1).objet)).partie_reelle;
 4773:                     ((struct_complexe16 **) (*((struct_matrice *)
 4774:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4775:                             [indice_j - 1].partie_imaginaire =
 4776:                             (*((struct_complexe16 *)
 4777:                             (*s_objet_1).objet)).partie_imaginaire;
 4778:                 }
 4779:                 else
 4780:                 {
 4781:                     if (variable_partagee == d_vrai)
 4782:                     {
 4783:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4784:                                 .pointeur_variable_partagee_courante).mutex))
 4785:                                 != 0)
 4786:                         {
 4787:                             (*s_etat_processus).erreur_systeme =
 4788:                                     d_es_processus;
 4789:                             return;
 4790:                         }
 4791:                     }
 4792: 
 4793:                     liberation(s_etat_processus, s_objet_1);
 4794:                     liberation(s_etat_processus, s_objet_2);
 4795:                     liberation(s_etat_processus, s_objet_3);
 4796: 
 4797:                     (*s_etat_processus).erreur_execution =
 4798:                             d_ex_erreur_type_argument;
 4799:                     return;
 4800:                 }
 4801:             }
 4802:             else if ((*s_objet_4).type == MRL)
 4803:             {
 4804:                 /*
 4805:                  * Matrice de réels
 4806:                  */
 4807: 
 4808:                 if ((*s_objet_1).type == INT)
 4809:                 {
 4810:                     /*
 4811:                      * Conversion de l'élément à insérer en réel
 4812:                      */
 4813: 
 4814:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 4815:                             .tableau)[indice_i - 1][indice_j - 1] =
 4816:                             (real8) (*((integer8 *) (*s_objet_1).objet));
 4817:                 }
 4818:                 else if ((*s_objet_1).type == REL)
 4819:                 {
 4820:                     /*
 4821:                      * Aucune conversion de type
 4822:                      */
 4823: 
 4824:                     ((real8 **) (*((struct_matrice *) (*s_objet_4).objet))
 4825:                             .tableau)[indice_i - 1][indice_j - 1] =
 4826:                             (*((real8 *) (*s_objet_1).objet));
 4827:                 }
 4828:                 else if ((*s_objet_1).type == CPL)
 4829:                 {
 4830:                     /*
 4831:                      * Conversion de la matrice en matrice complexe
 4832:                      */
 4833: 
 4834:                     tampon = (void *) ((real8 **) (*((struct_matrice *)
 4835:                             (*s_objet_4).objet)).tableau);
 4836: 
 4837:                     (*((struct_matrice *) (*s_objet_4).objet)).type = 'C';
 4838:                     (*s_objet_4).type = MCX;
 4839: 
 4840:                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
 4841:                             = malloc(((size_t) (*((struct_matrice *)
 4842:                             (*s_objet_4).objet)).nombre_lignes) *
 4843:                             sizeof(struct_complexe16 *))) == NULL)
 4844:                     {
 4845:                         if (variable_partagee == d_vrai)
 4846:                         {
 4847:                             if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4848:                                     .pointeur_variable_partagee_courante)
 4849:                                     .mutex)) != 0)
 4850:                             {
 4851:                                 (*s_etat_processus).erreur_systeme =
 4852:                                         d_es_processus;
 4853:                                 return;
 4854:                             }
 4855:                         }
 4856: 
 4857:                         (*s_etat_processus).erreur_systeme =
 4858:                                 d_es_allocation_memoire;
 4859:                         return;
 4860:                     }
 4861: 
 4862:                     for(i = 0; i < (*((struct_matrice *) (*s_objet_4).objet))
 4863:                             .nombre_lignes; i++)
 4864:                     {
 4865:                         if ((((struct_complexe16 **) (*((struct_matrice *)
 4866:                                 (*s_objet_4).objet)).tableau)[i]
 4867:                                 = malloc(((size_t) (*((struct_matrice *)
 4868:                                 (*s_objet_4).objet)).nombre_colonnes) *
 4869:                                 sizeof(struct_complexe16))) == NULL)
 4870:                         {
 4871:                             if (variable_partagee == d_vrai)
 4872:                             {
 4873:                                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4874:                                         .pointeur_variable_partagee_courante)
 4875:                                         .mutex)) != 0)
 4876:                                 {
 4877:                                     (*s_etat_processus).erreur_systeme =
 4878:                                             d_es_processus;
 4879:                                     return;
 4880:                                 }
 4881:                             }
 4882: 
 4883:                             (*s_etat_processus).erreur_systeme =
 4884:                                     d_es_allocation_memoire;
 4885:                             return;
 4886:                         }
 4887: 
 4888:                         for(j = 0; j < (*((struct_matrice *)
 4889:                                 (*s_objet_4).objet)).nombre_colonnes; j++)
 4890:                         {
 4891:                             ((struct_complexe16 **) (*((struct_matrice *)
 4892:                                     (*s_objet_4).objet)).tableau)[i][j]
 4893:                                     .partie_reelle = (((real8 **)
 4894:                                     tampon)[i][j]);
 4895:                             ((struct_complexe16 **) (*((struct_matrice *)
 4896:                                     (*s_objet_4).objet)).tableau)[i][j]
 4897:                                     .partie_imaginaire = (real8) 0;
 4898:                         }
 4899: 
 4900:                         free(((integer8 **) tampon)[i]);
 4901:                     }
 4902: 
 4903:                     free((integer8 **) tampon);
 4904: 
 4905:                     ((struct_complexe16 **) (*((struct_matrice *)
 4906:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4907:                             [indice_j - 1].partie_reelle =
 4908:                             (*((struct_complexe16 *)
 4909:                             (*s_objet_1).objet)).partie_reelle;
 4910:                     ((struct_complexe16 **) (*((struct_matrice *)
 4911:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4912:                             [indice_j - 1].partie_imaginaire =
 4913:                             (*((struct_complexe16 *)
 4914:                             (*s_objet_1).objet)).partie_imaginaire;
 4915:                 }
 4916:                 else
 4917:                 { 
 4918:                     if (variable_partagee == d_vrai)
 4919:                     {
 4920:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4921:                                 .pointeur_variable_partagee_courante).mutex))
 4922:                                 != 0)
 4923:                         {
 4924:                             (*s_etat_processus).erreur_systeme =
 4925:                                     d_es_processus;
 4926:                             return;
 4927:                         }
 4928:                     }
 4929: 
 4930:                     liberation(s_etat_processus, s_objet_1);
 4931:                     liberation(s_etat_processus, s_objet_2);
 4932:                     liberation(s_etat_processus, s_objet_3);
 4933: 
 4934:                     (*s_etat_processus).erreur_execution =
 4935:                             d_ex_erreur_type_argument;
 4936:                     return;
 4937:                 }
 4938:             }
 4939:             else
 4940:             {
 4941:                 /*
 4942:                  * Matrice de complexes
 4943:                  */
 4944: 
 4945:                 if ((*s_objet_1).type == INT)
 4946:                 {
 4947:                     /*
 4948:                      * Conversion de l'élément à insérer en complexe
 4949:                      */
 4950: 
 4951:                     ((struct_complexe16 **) (*((struct_matrice *)
 4952:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4953:                             [indice_j - 1].partie_reelle = (real8)
 4954:                             (*((integer8 *) (*s_objet_1).objet));
 4955:                     ((struct_complexe16 **) (*((struct_matrice *)
 4956:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 4957:                             [indice_j - 1].partie_imaginaire = (real8) 0;
 4958:                 }
 4959:                 else if ((*s_objet_1).type == REL)
 4960:                 {
 4961:                     /*
 4962:                      * Conversion de l'élément à insérer en complexe
 4963:                      */
 4964: 
 4965:                     ((struct_complexe16 **) (*((struct_matrice *)
 4966:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4967:                             [indice_j - 1].partie_reelle =
 4968:                             (*((real8 *) (*s_objet_1).objet));
 4969:                     ((struct_complexe16 **) (*((struct_matrice *)
 4970:                             (*s_objet_4).objet)).tableau)[indice_i - 1] 
 4971:                             [indice_j - 1].partie_imaginaire = (real8) 0;
 4972:                 }
 4973:                 else if ((*s_objet_1).type == CPL)
 4974:                 {
 4975:                     /*
 4976:                      * Aucune conversion de type
 4977:                      */
 4978: 
 4979:                     ((struct_complexe16 **) (*((struct_matrice *)
 4980:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4981:                             [indice_j - 1].partie_reelle =
 4982:                             (*((struct_complexe16 *)
 4983:                             (*s_objet_1).objet)).partie_reelle;
 4984:                     ((struct_complexe16 **) (*((struct_matrice *)
 4985:                             (*s_objet_4).objet)).tableau)[indice_i - 1]
 4986:                             [indice_j - 1].partie_imaginaire =
 4987:                             (*((struct_complexe16 *)
 4988:                             (*s_objet_1).objet)).partie_imaginaire;
 4989:                 }
 4990:                 else
 4991:                 {
 4992:                     if (variable_partagee == d_vrai)
 4993:                     {
 4994:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 4995:                                 .pointeur_variable_partagee_courante).mutex))
 4996:                                 != 0)
 4997:                         {
 4998:                             (*s_etat_processus).erreur_systeme =
 4999:                                     d_es_processus;
 5000:                             return;
 5001:                         }
 5002:                     }
 5003: 
 5004:                     liberation(s_etat_processus, s_objet_1);
 5005:                     liberation(s_etat_processus, s_objet_2);
 5006:                     liberation(s_etat_processus, s_objet_3);
 5007: 
 5008:                     (*s_etat_processus).erreur_execution =
 5009:                             d_ex_erreur_type_argument;
 5010:                     return;
 5011:                 }
 5012:             }
 5013: 
 5014:             if ((++(*((integer8 *) (*(*(*((struct_liste_chainee *)
 5015:                     (*s_objet_2).objet)).suivant).donnee).objet))) > (integer8)
 5016:                     (*((struct_matrice *) (*s_objet_4).objet)).nombre_colonnes)
 5017:             {
 5018:                 (*((integer8 *) (*(*(*((struct_liste_chainee *) (*s_objet_2)
 5019:                         .objet)).suivant).donnee).objet)) = 1;
 5020: 
 5021:                 if ((++(*((integer8 *) (*(*((struct_liste_chainee *)
 5022:                         (*s_objet_2).objet)).donnee).objet))) > (integer8)
 5023:                         (*((struct_matrice *) (*s_objet_4).objet))
 5024:                         .nombre_lignes)
 5025:                 {
 5026:                     (*((integer8 *) (*(*((struct_liste_chainee *)
 5027:                             (*s_objet_2).objet)).donnee).objet)) = 1;
 5028:                 }
 5029:             }
 5030: 
 5031:             if (variable_partagee == d_faux)
 5032:             {
 5033:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 5034:                         s_objet_4;
 5035:             }
 5036:             else
 5037:             {
 5038:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 5039:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 5040:                         .objet = s_objet_4;
 5041: 
 5042:                 if (variable_partagee == d_vrai)
 5043:                 {
 5044:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5045:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 5046:                     {
 5047:                         (*s_etat_processus).erreur_systeme =
 5048:                                 d_es_processus;
 5049:                         return;
 5050:                     }
 5051:                 }
 5052:             }
 5053: 
 5054:             liberation(s_etat_processus, s_objet_1);
 5055:         }
 5056:         else if ((*s_objet_4).type == LST)
 5057:         {
 5058:             if ((*s_objet_2).type != INT)
 5059:             {
 5060:                 if (variable_partagee == d_vrai)
 5061:                 {
 5062:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5063:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 5064:                     {
 5065:                         (*s_etat_processus).erreur_systeme =
 5066:                                 d_es_processus;
 5067:                         return;
 5068:                     }
 5069:                 }
 5070: 
 5071:                 liberation(s_etat_processus, s_objet_1);
 5072:                 liberation(s_etat_processus, s_objet_2);
 5073:                 liberation(s_etat_processus, s_objet_3);
 5074: 
 5075:                 (*s_etat_processus).erreur_execution =
 5076:                         d_ex_erreur_type_argument;
 5077:                 return;
 5078:             }
 5079: 
 5080:             indice_i = (*((integer8 *) (*s_objet_2).objet));
 5081:             indice_j = 1;
 5082: 
 5083:             if ((*s_objet_4).nombre_occurrences > 1)
 5084:             {
 5085:                 if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_4, 'N'))
 5086:                         == NULL)
 5087:                 {
 5088:                     if (variable_partagee == d_vrai)
 5089:                     {
 5090:                         if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5091:                                 .pointeur_variable_partagee_courante).mutex))
 5092:                                 != 0)
 5093:                         {
 5094:                             (*s_etat_processus).erreur_systeme =
 5095:                                     d_es_processus;
 5096:                             return;
 5097:                         }
 5098:                     }
 5099: 
 5100:                     (*s_etat_processus).erreur_systeme =
 5101:                             d_es_allocation_memoire;
 5102:                     return;
 5103:                 }
 5104: 
 5105:                 liberation(s_etat_processus, s_objet_4);
 5106:                 s_objet_4 = s_copie_4;
 5107:             }
 5108: 
 5109:             l_element_courant = (*s_objet_4).objet;
 5110:             nombre_elements = 0;
 5111: 
 5112:             while(l_element_courant != NULL)
 5113:             {
 5114:                 l_element_courant = (*l_element_courant).suivant;
 5115:                 nombre_elements++;
 5116:             }
 5117: 
 5118:             l_element_courant = (*s_objet_4).objet;
 5119: 
 5120:             while((l_element_courant != NULL) && (indice_j != indice_i))
 5121:             {
 5122:                 l_element_courant = (*l_element_courant).suivant;
 5123:                 indice_j++;
 5124:             }
 5125: 
 5126:             if (l_element_courant != NULL)
 5127:             {
 5128:                 liberation(s_etat_processus, (*l_element_courant).donnee);
 5129:                 (*l_element_courant).donnee = s_objet_1;
 5130:             }
 5131:             else
 5132:             {
 5133:                 if (variable_partagee == d_vrai)
 5134:                 {
 5135:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5136:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 5137:                     {
 5138:                         (*s_etat_processus).erreur_systeme =
 5139:                                 d_es_processus;
 5140:                         return;
 5141:                     }
 5142:                 }
 5143: 
 5144:                 liberation(s_etat_processus, s_objet_1);
 5145:                 liberation(s_etat_processus, s_objet_2);
 5146:                 liberation(s_etat_processus, s_objet_3);
 5147: 
 5148:                 (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
 5149:                 return;
 5150:             }
 5151: 
 5152:             (*((integer8 *) (*s_objet_2).objet)) =
 5153:                     (indice_i % nombre_elements) + 1;
 5154: 
 5155:             if (variable_partagee == d_faux)
 5156:             {
 5157:                 (*(*s_etat_processus).pointeur_variable_courante).objet =
 5158:                         s_objet_4;
 5159:             }
 5160:             else
 5161:             {
 5162:                 (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
 5163:                 (*(*s_etat_processus).pointeur_variable_partagee_courante)
 5164:                         .objet = s_objet_4;
 5165: 
 5166:                 if (variable_partagee == d_vrai)
 5167:                 {
 5168:                     if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5169:                             .pointeur_variable_partagee_courante).mutex)) != 0)
 5170:                     {
 5171:                         (*s_etat_processus).erreur_systeme =
 5172:                                 d_es_processus;
 5173:                         return;
 5174:                     }
 5175:                 }
 5176:             }
 5177:         }
 5178:         else
 5179:         {
 5180:             if (variable_partagee == d_vrai)
 5181:             {
 5182:                 if (pthread_mutex_unlock(&((*(*s_etat_processus)
 5183:                         .pointeur_variable_partagee_courante).mutex)) != 0)
 5184:                 {
 5185:                     (*s_etat_processus).erreur_systeme =
 5186:                             d_es_processus;
 5187:                     return;
 5188:                 }
 5189:             }
 5190: 
 5191:             liberation(s_etat_processus, s_objet_1);
 5192:             liberation(s_etat_processus, s_objet_2);
 5193:             liberation(s_etat_processus, s_objet_3);
 5194: 
 5195:             (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 5196:             return;
 5197:         }
 5198: 
 5199:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 5200:                 s_objet_3) == d_erreur)
 5201:         {
 5202:             return;
 5203:         }
 5204: 
 5205:         if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
 5206:                 s_objet_2) == d_erreur)
 5207:         {
 5208:             return;
 5209:         }
 5210:     }
 5211: 
 5212: /*
 5213: --------------------------------------------------------------------------------
 5214:   Arguments incompatibles
 5215: --------------------------------------------------------------------------------
 5216: */
 5217: 
 5218:     else
 5219:     {
 5220:         liberation(s_etat_processus, s_objet_1);
 5221:         liberation(s_etat_processus, s_objet_2);
 5222:         liberation(s_etat_processus, s_objet_3);
 5223: 
 5224:         (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
 5225:         return;
 5226:     }
 5227: 
 5228:     return;
 5229: }
 5230: 
 5231: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>