Annotation of rpl/src/instructions_n1.c, revision 1.5

1.1       bertrand    1: /*
                      2: ================================================================================
1.5     ! bertrand    3:   RPL/2 (R) version 4.0.13
1.1       bertrand    4:   Copyright (C) 1989-2010 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 'neg'
                     29: ================================================================================
                     30:   Entrées :
                     31: --------------------------------------------------------------------------------
                     32:   Sorties :
                     33: --------------------------------------------------------------------------------
                     34:   Effets de bord : néant
                     35: ================================================================================
                     36: */
                     37: 
                     38: void
                     39: instruction_neg(struct_processus *s_etat_processus)
                     40: {
                     41:    logical1                    drapeau;
                     42: 
                     43:    struct_liste_chainee        *l_element_courant;
                     44:    struct_liste_chainee        *l_element_precedent;
                     45:    struct_liste_chainee        *l_element_tampon;
                     46: 
                     47:    struct_objet                *s_copie_argument;
                     48:    struct_objet                *s_objet_argument;
                     49:    struct_objet                *s_objet_resultat;
                     50: 
                     51:    unsigned long               i;
                     52:    unsigned long               j;
                     53: 
                     54:    (*s_etat_processus).erreur_execution = d_ex;
                     55: 
                     56:    if ((*s_etat_processus).affichage_arguments == 'Y')
                     57:    {
                     58:        printf("\n  NEG ");
                     59: 
                     60:        if ((*s_etat_processus).langue == 'F')
                     61:        {
                     62:            printf("(opposition)\n\n");
                     63:        }
                     64:        else
                     65:        {
                     66:            printf("(opposition)\n\n");
                     67:        }
                     68: 
                     69:        printf("    1: %s, %s, %s\n", d_INT, d_REL, d_CPL);
                     70:        printf("->  1: %s, %s, %s\n\n", d_INT, d_REL, d_CPL);
                     71: 
                     72:        printf("    1: %s, %s, %s\n", d_VIN, d_VRL, d_VCX);
                     73:        printf("->  1: %s, %s, %s\n\n", d_VIN, d_VRL, d_VCX);
                     74: 
                     75:        printf("    1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                     76:        printf("->  1: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
                     77: 
                     78:        printf("    1: %s, %s\n", d_NOM, d_ALG);
                     79:        printf("->  1: %s\n\n", d_ALG);
                     80: 
                     81:        printf("    1: %s\n", d_RPN);
                     82:        printf("->  1: %s\n", d_RPN);
                     83: 
                     84:        return;
                     85:    }
                     86:    else if ((*s_etat_processus).test_instruction == 'Y')
                     87:    {
                     88:        (*s_etat_processus).nombre_arguments = 1;
                     89:        return;
                     90:    }
                     91:    
                     92:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                     93:    {
                     94:        if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
                     95:        {
                     96:            return;
                     97:        }
                     98:    }
                     99: 
                    100:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    101:            &s_objet_argument) == d_erreur)
                    102:    {
                    103:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    104:        return;
                    105:    }
                    106: 
                    107: /*
                    108: --------------------------------------------------------------------------------
                    109:   Opposition d'un entier
                    110: --------------------------------------------------------------------------------
                    111: */
                    112: 
                    113:    if ((*s_objet_argument).type == INT)
                    114:    {
                    115:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    116:                s_objet_argument, 'Q')) == NULL)
                    117:        {
                    118:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    119:            return;
                    120:        }
                    121: 
                    122:        /*
                    123:         * Permet d'éviter les résultats du type -0. Valable pour tous
                    124:         * les types...
                    125:         */
                    126: 
                    127:        if ((*((integer8 *) (*s_objet_argument).objet)) != 0)
                    128:        {
                    129:            (*((integer8 *) (*s_objet_resultat).objet)) =
                    130:                    -(*((integer8 *) (*s_objet_argument).objet));
                    131:        }
                    132:    }
                    133: 
                    134: /*
                    135: --------------------------------------------------------------------------------
                    136:   Opposition d'un réel
                    137: --------------------------------------------------------------------------------
                    138: */
                    139: 
                    140:    else if ((*s_objet_argument).type == REL)
                    141:    {
                    142:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    143:                s_objet_argument, 'Q')) == NULL)
                    144:        {
                    145:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    146:            return;
                    147:        }
                    148: 
                    149:        if ((*((real8 *) (*s_objet_argument).objet)) != 0)
                    150:        {
                    151:            (*((real8 *) (*s_objet_resultat).objet)) =
                    152:                    -(*((real8 *) (*s_objet_argument).objet));
                    153:        }
                    154:    }
                    155: 
                    156: /*
                    157: --------------------------------------------------------------------------------
                    158:   Opposition d'un complexe
                    159: --------------------------------------------------------------------------------
                    160: */
                    161: 
                    162:    else if ((*s_objet_argument).type == CPL)
                    163:    {
                    164:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    165:                s_objet_argument, 'Q')) == NULL)
                    166:        {
                    167:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    168:            return;
                    169:        }
                    170: 
                    171:        if ((*((struct_complexe16 *) (*s_objet_argument).objet)).partie_reelle
                    172:                != 0)
                    173:        {
                    174:            (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle =
                    175:                    -(*((struct_complexe16 *) (*s_objet_argument).objet))
                    176:                    .partie_reelle;
                    177:        }
                    178: 
                    179:        if ((*((struct_complexe16 *) (*s_objet_argument).objet))
                    180:                .partie_imaginaire != 0)
                    181:        {
                    182:            (*((struct_complexe16 *) (*s_objet_resultat).objet))
                    183:                    .partie_imaginaire =
                    184:                    -(*((struct_complexe16 *) (*s_objet_argument).objet))
                    185:                    .partie_imaginaire;
                    186:        }
                    187:    }
                    188: 
                    189: /*
                    190: --------------------------------------------------------------------------------
                    191:   Opposition d'un vecteur d'entiers
                    192: --------------------------------------------------------------------------------
                    193: */
                    194: 
                    195:    else if ((*s_objet_argument).type == VIN)
                    196:    {
                    197:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    198:                s_objet_argument, 'Q')) == NULL)
                    199:        {
                    200:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    201:            return;
                    202:        }
                    203: 
                    204:        for(i = 0; i < (*(((struct_vecteur *) (*s_objet_argument).objet)))
                    205:                .taille; i++)
                    206:        {
                    207:            if (((integer8 *) (*(((struct_vecteur *)
                    208:                    (*s_objet_argument).objet))).tableau)[i] != 0)
                    209:            {
                    210:                ((integer8 *) (*(((struct_vecteur *) (*s_objet_resultat)
                    211:                        .objet))).tableau)[i] = -((integer8 *)
                    212:                        (*(((struct_vecteur *)
                    213:                        (*s_objet_argument).objet))).tableau)[i];
                    214:            }
                    215:        }
                    216:    }
                    217: 
                    218: /*
                    219: --------------------------------------------------------------------------------
                    220:   Opposition d'un vecteur de réels
                    221: --------------------------------------------------------------------------------
                    222: */
                    223: 
                    224:    else if ((*s_objet_argument).type == VRL)
                    225:    {
                    226:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    227:                s_objet_argument, 'Q')) == NULL)
                    228:        {
                    229:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    230:            return;
                    231:        }
                    232: 
                    233:        for(i = 0; i < (*(((struct_vecteur *) (*s_objet_argument).objet)))
                    234:                .taille; i++)
                    235:        {
                    236:            if (((real8 *) (*(((struct_vecteur *) (*s_objet_argument).objet)))
                    237:                    .tableau)[i] != 0)
                    238:            {
                    239:                ((real8 *) (*(((struct_vecteur *) (*s_objet_resultat)
                    240:                        .objet))).tableau)[i] = -((real8 *)
                    241:                        (*(((struct_vecteur *)
                    242:                        (*s_objet_argument).objet))).tableau)[i];
                    243:            }
                    244:        }
                    245:    }
                    246: 
                    247: /*
                    248: --------------------------------------------------------------------------------
                    249:   Opposition d'un vecteur de complexes
                    250: --------------------------------------------------------------------------------
                    251: */
                    252: 
                    253:    else if ((*s_objet_argument).type == VCX)
                    254:    {
                    255:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    256:                s_objet_argument, 'Q')) == NULL)
                    257:        {
                    258:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    259:            return;
                    260:        }
                    261: 
                    262:        for(i = 0; i < (*(((struct_vecteur *) (*s_objet_argument).objet)))
                    263:                .taille; i++)
                    264:        {
                    265:            if (((struct_complexe16 *) (*(((struct_vecteur *)
                    266:                    (*s_objet_argument).objet))).tableau)[i].partie_reelle != 0)
                    267:            {
                    268:                ((struct_complexe16 *) (*(((struct_vecteur *)
                    269:                        (*s_objet_resultat)
                    270:                        .objet))).tableau)[i].partie_reelle =
                    271:                        -((struct_complexe16 *) (*(((struct_vecteur *)
                    272:                        (*s_objet_argument).objet))).tableau)[i].partie_reelle;
                    273:            }
                    274: 
                    275:            if (((struct_complexe16 *) (*(((struct_vecteur *)
                    276:                    (*s_objet_argument).objet))).tableau)[i].partie_imaginaire
                    277:                    != 0)
                    278:            {
                    279:                ((struct_complexe16 *) (*(((struct_vecteur *)
                    280:                        (*s_objet_resultat).objet))).tableau)[i]
                    281:                        .partie_imaginaire = -((struct_complexe16 *)
                    282:                        (*(((struct_vecteur *) (*s_objet_argument).objet)))
                    283:                        .tableau)[i].partie_imaginaire;
                    284:            }
                    285:        }
                    286:    }
                    287: 
                    288: /*
                    289: --------------------------------------------------------------------------------
                    290:   Opposition d'une matrice d'entiers
                    291: --------------------------------------------------------------------------------
                    292: */
                    293: 
                    294:    else if ((*s_objet_argument).type == MIN)
                    295:    {
                    296:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    297:                s_objet_argument, 'Q')) == NULL)
                    298:        {
                    299:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    300:            return;
                    301:        }
                    302: 
                    303:        for(i = 0; i < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    304:                .nombre_lignes; i++)
                    305:        {
                    306:            for(j = 0; j < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    307:                    .nombre_colonnes; j++)
                    308:            {
                    309:                if (((integer8 **) (*(((struct_matrice *) (*s_objet_argument)
                    310:                        .objet))).tableau)[i][j] != 0)
                    311:                {
                    312:                    ((integer8 **) (*(((struct_matrice *) (*s_objet_resultat)
                    313:                            .objet))).tableau)[i][j] = -((integer8 **)
                    314:                            (*(((struct_matrice *)
                    315:                            (*s_objet_argument).objet))).tableau)[i][j];
                    316:                }
                    317:            }
                    318:        }
                    319:    }
                    320: 
                    321: /*
                    322: --------------------------------------------------------------------------------
                    323:   Opposition d'une matrice de réels
                    324: --------------------------------------------------------------------------------
                    325: */
                    326: 
                    327:    else if ((*s_objet_argument).type == MRL)
                    328:    {
                    329:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    330:                s_objet_argument, 'Q')) == NULL)
                    331:        {
                    332:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    333:            return;
                    334:        }
                    335: 
                    336:        for(i = 0; i < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    337:                .nombre_lignes; i++)
                    338:        {
                    339:            for(j = 0; j < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    340:                    .nombre_colonnes; j++)
                    341:            {
                    342:                if (((real8 **) (*(((struct_matrice *) (*s_objet_argument)
                    343:                        .objet))).tableau)[i][j] != 0)
                    344:                {
                    345:                    ((real8 **) (*(((struct_matrice *) (*s_objet_resultat)
                    346:                            .objet))).tableau)[i][j] = -((real8 **)
                    347:                            (*(((struct_matrice *)
                    348:                            (*s_objet_argument).objet))).tableau)[i][j];
                    349:                }
                    350:            }
                    351:        }
                    352:    }
                    353: 
                    354: /*
                    355: --------------------------------------------------------------------------------
                    356:   Opposition d'une matrice de complexes
                    357: --------------------------------------------------------------------------------
                    358: */
                    359: 
                    360:    else if ((*s_objet_argument).type == MCX)
                    361:    {
                    362:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                    363:                s_objet_argument, 'Q')) == NULL)
                    364:        {
                    365:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    366:            return;
                    367:        }
                    368: 
                    369:        for(i = 0; i < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    370:                .nombre_lignes; i++)
                    371:        {
                    372:            for(j = 0; j < (*(((struct_matrice *) (*s_objet_argument).objet)))
                    373:                    .nombre_colonnes; j++)
                    374:            {
                    375:                if (((struct_complexe16 **) (*(((struct_matrice *)
                    376:                        (*s_objet_argument).objet))).tableau)[i][j]
                    377:                        .partie_reelle != 0)
                    378:                {
                    379:                    ((struct_complexe16 **) (*(((struct_matrice *)
                    380:                            (*s_objet_resultat).objet))).tableau)[i][j]
                    381:                            .partie_reelle = -((struct_complexe16 **)
                    382:                            (*(((struct_matrice *) (*s_objet_argument).objet)))
                    383:                            .tableau)[i][j].partie_reelle;
                    384:                }
                    385: 
                    386:                if (((struct_complexe16 **) (*(((struct_matrice *)
                    387:                        (*s_objet_argument).objet))).tableau)[i][j]
                    388:                        .partie_imaginaire != 0)
                    389:                {
                    390:                    ((struct_complexe16 **) (*(((struct_matrice *)
                    391:                            (*s_objet_resultat).objet))).tableau)[i][j]
                    392:                            .partie_imaginaire = -((struct_complexe16 **)
                    393:                            (*(((struct_matrice *) (*s_objet_argument).objet)))
                    394:                            .tableau)[i][j].partie_imaginaire;
                    395:                }
                    396:            }
                    397:        }
                    398:    }
                    399: 
                    400: /*
                    401: --------------------------------------------------------------------------------
                    402:   Opposition d'un nom
                    403: --------------------------------------------------------------------------------
                    404: */
                    405: 
                    406:    else if ((*s_objet_argument).type == NOM)
                    407:    {
                    408:        if ((s_objet_resultat = allocation(s_etat_processus, ALG)) == NULL)
                    409:        {
                    410:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    411:            return;
                    412:        }
                    413: 
                    414:        if (((*s_objet_resultat).objet =
                    415:                allocation_maillon(s_etat_processus)) == NULL)
                    416:        {
                    417:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    418:            return;
                    419:        }
                    420: 
                    421:        l_element_courant = (*s_objet_resultat).objet;
                    422: 
                    423:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    424:                == NULL)
                    425:        {
                    426:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    427:            return;
                    428:        }
                    429: 
                    430:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    431:                .nombre_arguments = 0;
                    432:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    433:                .fonction = instruction_vers_niveau_superieur;
                    434: 
                    435:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    436:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                    437:        {
                    438:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    439:            return;
                    440:        }
                    441: 
                    442:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    443:                .nom_fonction, "<<");
                    444: 
                    445:        if (((*l_element_courant).suivant =
                    446:                allocation_maillon(s_etat_processus)) == NULL)
                    447:        {
                    448:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    449:            return;
                    450:        }
                    451: 
                    452:        l_element_courant = (*l_element_courant).suivant;
                    453:        (*l_element_courant).donnee = s_objet_argument;
                    454: 
                    455:        if (((*l_element_courant).suivant =
                    456:                allocation_maillon(s_etat_processus)) == NULL)
                    457:        {
                    458:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    459:            return;
                    460:        }
                    461: 
                    462:        l_element_courant = (*l_element_courant).suivant;
                    463: 
                    464:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    465:                == NULL)
                    466:        {
                    467:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    468:            return;
                    469:        }
                    470: 
                    471:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    472:                .nombre_arguments = 1;
                    473:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    474:                .fonction = instruction_neg;
                    475: 
                    476:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    477:                .nom_fonction = malloc(4 * sizeof(unsigned char))) == NULL)
                    478:        {
                    479:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    480:            return;
                    481:        }
                    482: 
                    483:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    484:                .nom_fonction, "NEG");
                    485: 
                    486:        if (((*l_element_courant).suivant =
                    487:                allocation_maillon(s_etat_processus)) == NULL)
                    488:        {
                    489:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    490:            return;
                    491:        }
                    492: 
                    493:        l_element_courant = (*l_element_courant).suivant;
                    494: 
                    495:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    496:                == NULL)
                    497:        {
                    498:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    499:            return;
                    500:        }
                    501: 
                    502:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    503:                .nombre_arguments = 0;
                    504:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    505:                .fonction = instruction_vers_niveau_inferieur;
                    506: 
                    507:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    508:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                    509:        {
                    510:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    511:            return;
                    512:        }
                    513: 
                    514:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    515:                .nom_fonction, ">>");
                    516: 
                    517:        (*l_element_courant).suivant = NULL;
                    518:        s_objet_argument = NULL;
                    519:    }
                    520: 
                    521: /*
                    522: --------------------------------------------------------------------------------
                    523:   Opposition d'une expression
                    524: --------------------------------------------------------------------------------
                    525: */
                    526: 
                    527:    else if (((*s_objet_argument).type == ALG) ||
                    528:            ((*s_objet_argument).type == RPN))
                    529:    {
                    530:        if ((s_copie_argument = copie_objet(s_etat_processus,
                    531:                s_objet_argument, 'N')) == NULL)
                    532:        {
                    533:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    534:            return;
                    535:        }
                    536: 
                    537:        liberation(s_etat_processus, s_objet_argument);
                    538:        s_objet_argument = s_copie_argument;
                    539: 
                    540:        l_element_courant = (struct_liste_chainee *)
                    541:                (*s_objet_argument).objet;
                    542:        l_element_precedent = l_element_courant;
                    543: 
                    544:        while((*l_element_courant).suivant != NULL)
                    545:        {
                    546:            l_element_precedent = l_element_courant;
                    547:            l_element_courant = (*l_element_courant).suivant;
                    548:        }
                    549: 
                    550:        drapeau = d_vrai;
                    551: 
                    552:        if ((*(*l_element_precedent).donnee).type == FCT)
                    553:        {
                    554:            if (strcmp((*((struct_fonction *) (*(*l_element_precedent).donnee)
                    555:                    .objet)).nom_fonction, "NEG") == 0)
                    556:            {
                    557:                drapeau = d_faux;
                    558: 
                    559:                l_element_courant = (struct_liste_chainee *)
                    560:                        (*s_objet_argument).objet;
                    561: 
                    562:                while((*l_element_courant).suivant != l_element_precedent)
                    563:                {
                    564:                    l_element_courant = (*l_element_courant).suivant;
                    565:                }
                    566: 
                    567:                l_element_tampon = (*l_element_courant).suivant;
                    568:                (*l_element_courant).suivant = (*l_element_precedent).suivant;
                    569: 
                    570:                liberation(s_etat_processus, (*l_element_tampon).donnee);
                    571:                free(l_element_tampon);
                    572:            }
                    573:        }
                    574: 
                    575:        if (drapeau == d_vrai)
                    576:        {
                    577:            if (((*l_element_precedent).suivant =
                    578:                    allocation_maillon(s_etat_processus)) == NULL)
                    579:            {
                    580:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    581:                return;
                    582:            }
                    583: 
                    584:            if (((*(*l_element_precedent).suivant).donnee =
                    585:                    allocation(s_etat_processus, FCT)) == NULL)
                    586:            {
                    587:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    588:                return;
                    589:            }
                    590: 
                    591:            (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                    592:                    .donnee).objet)).nombre_arguments = 1;
                    593:            (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                    594:                    .donnee).objet)).fonction = instruction_neg;
                    595: 
                    596:            if (((*((struct_fonction *) (*(*(*l_element_precedent)
                    597:                    .suivant).donnee).objet)).nom_fonction =
                    598:                    malloc(4 * sizeof(unsigned char))) == NULL)
                    599:            {
                    600:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    601:                return;
                    602:            }
                    603: 
                    604:            strcpy((*((struct_fonction *) (*(*(*l_element_precedent)
                    605:                    .suivant).donnee).objet)).nom_fonction, "NEG");
                    606: 
                    607:            (*(*l_element_precedent).suivant).suivant = l_element_courant;
                    608:        }
                    609: 
                    610:        s_objet_resultat = s_objet_argument;
                    611:        s_objet_argument = NULL;
                    612:    }
                    613: 
                    614: /*
                    615: --------------------------------------------------------------------------------
                    616:   Opposition impossible
                    617: --------------------------------------------------------------------------------
                    618: */
                    619: 
                    620:    else
                    621:    {
                    622:        liberation(s_etat_processus, s_objet_argument);
                    623: 
                    624:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    625:        return;
                    626:    }
                    627: 
                    628:    liberation(s_etat_processus, s_objet_argument);
                    629: 
                    630:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    631:            s_objet_resultat) == d_erreur)
                    632:    {
                    633:        return;
                    634:    }
                    635: 
                    636:    return;
                    637: }
                    638: 
                    639: 
                    640: /*
                    641: ================================================================================
                    642:   Fonction 'not'
                    643: ================================================================================
                    644:   Entrées : pointeur sur une struct_processus
                    645: --------------------------------------------------------------------------------
                    646:   Sorties :
                    647: --------------------------------------------------------------------------------
                    648:   Effets de bord : néant
                    649: ================================================================================
                    650: */
                    651: 
                    652: void
                    653: instruction_not(struct_processus *s_etat_processus)
                    654: {
                    655:    struct_liste_chainee            *l_element_courant;
                    656:    struct_liste_chainee            *l_element_precedent;
                    657: 
                    658:    struct_objet                    *s_copie_argument;
                    659:    struct_objet                    *s_objet_argument;
                    660:    struct_objet                    *s_objet_resultat;
                    661: 
                    662:    (*s_etat_processus).erreur_execution = d_ex;
                    663: 
                    664:    if ((*s_etat_processus).affichage_arguments == 'Y')
                    665:    {
                    666:        printf("\n  NOT ");
                    667: 
                    668:        if ((*s_etat_processus).langue == 'F')
                    669:        {
                    670:            printf("(complément)\n\n");
                    671:        }
                    672:        else
                    673:        {
                    674:            printf("(complement)\n\n");
                    675:        }
                    676: 
                    677:        printf("    1: %s, %s\n", d_INT, d_REL);
                    678:        printf("->  1: %s\n\n", d_INT);
                    679: 
                    680:        printf("    1: %s\n", d_BIN);
                    681:        printf("->  1: %s\n\n", d_BIN);
                    682: 
                    683:        printf("    1: %s, %s\n", d_NOM, d_ALG);
                    684:        printf("->  1: %s\n\n", d_ALG);
                    685: 
                    686:        printf("    1: %s\n", d_RPN);
                    687:        printf("->  1: %s\n", d_RPN);
                    688: 
                    689:        return;
                    690:    }
                    691:    else if ((*s_etat_processus).test_instruction == 'Y')
                    692:    {
                    693:        (*s_etat_processus).nombre_arguments = 1;
                    694:        return;
                    695:    }
                    696:    
                    697:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    698:    {
                    699:        if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
                    700:        {
                    701:            return;
                    702:        }
                    703:    }
                    704: 
                    705:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    706:            &s_objet_argument) == d_erreur)
                    707:    {
                    708:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    709:        return;
                    710:    }
                    711: 
                    712: /*
                    713: --------------------------------------------------------------------------------
                    714:   NOT logique
                    715: --------------------------------------------------------------------------------
                    716: */
                    717: 
                    718:    if (((*s_objet_argument).type == INT) ||
                    719:            ((*s_objet_argument).type == REL))
                    720:    {
                    721:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                    722:        {
                    723:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    724:            return;
                    725:        }
                    726: 
                    727:        if ((*s_objet_argument).type == INT)
                    728:        {
                    729:            if ((*((integer8 *) (*s_objet_argument).objet)) == 0)
                    730:            {
                    731:                (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                    732:            }
                    733:            else
                    734:            {
                    735:                (*((integer8 *) (*s_objet_resultat).objet)) = 0;
                    736:            }
                    737:        }
                    738:        else
                    739:        {
                    740:            if ((*((real8 *) (*s_objet_argument).objet)) == 0)
                    741:            {
                    742:                (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                    743:            }
                    744:            else
                    745:            {
                    746:                (*((integer8 *) (*s_objet_resultat).objet)) = 0;
                    747:            }
                    748:        }
                    749:    }
                    750: 
                    751: /*
                    752: --------------------------------------------------------------------------------
                    753:   NOT binaire
                    754: --------------------------------------------------------------------------------
                    755: */
                    756: 
                    757:    else if ((*s_objet_argument).type == BIN)
                    758:    {
                    759:        (*((logical8 *) (*s_objet_argument).objet)) =
                    760:                ~(*((logical8 *) (*s_objet_argument).objet));
                    761: 
                    762:        s_objet_resultat = s_objet_argument;
                    763:        s_objet_argument = NULL;
                    764:    }
                    765: 
                    766: /*
                    767: --------------------------------------------------------------------------------
                    768:   NOT d'un nom
                    769: --------------------------------------------------------------------------------
                    770: */
                    771: 
                    772:    else if ((*s_objet_argument).type == NOM)
                    773:    {
                    774:        if ((s_objet_resultat = allocation(s_etat_processus, ALG)) == NULL)
                    775:        {
                    776:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    777:            return;
                    778:        }
                    779: 
                    780:        if (((*s_objet_resultat).objet =
                    781:                allocation_maillon(s_etat_processus)) == NULL)
                    782:        {
                    783:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    784:            return;
                    785:        }
                    786: 
                    787:        l_element_courant = (*s_objet_resultat).objet;
                    788: 
                    789:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    790:                == NULL)
                    791:        {
                    792:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    793:            return;
                    794:        }
                    795: 
                    796:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    797:                .nombre_arguments = 0;
                    798:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    799:                .fonction = instruction_vers_niveau_superieur;
                    800: 
                    801:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    802:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                    803:        {
                    804:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    805:            return;
                    806:        }
                    807: 
                    808:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    809:                .nom_fonction, "<<");
                    810: 
                    811:        if (((*l_element_courant).suivant =
                    812:                allocation_maillon(s_etat_processus)) == NULL)
                    813:        {
                    814:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    815:            return;
                    816:        }
                    817: 
                    818:        l_element_courant = (*l_element_courant).suivant;
                    819:        (*l_element_courant).donnee = s_objet_argument;
                    820: 
                    821:        if (((*l_element_courant).suivant =
                    822:                allocation_maillon(s_etat_processus)) == NULL)
                    823:        {
                    824:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    825:            return;
                    826:        }
                    827: 
                    828:        l_element_courant = (*l_element_courant).suivant;
                    829: 
                    830:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    831:                == NULL)
                    832:        {
                    833:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    834:            return;
                    835:        }
                    836: 
                    837:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    838:                .nombre_arguments = 1;
                    839:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    840:                .fonction = instruction_not;
                    841: 
                    842:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    843:                .nom_fonction = malloc(4 * sizeof(unsigned char))) == NULL)
                    844:        {
                    845:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    846:            return;
                    847:        }
                    848:            
                    849:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    850:                .nom_fonction, "NOT");
                    851: 
                    852:        if (((*l_element_courant).suivant =
                    853:                allocation_maillon(s_etat_processus)) == NULL)
                    854:        {
                    855:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    856:            return;
                    857:        }
                    858: 
                    859:        l_element_courant = (*l_element_courant).suivant;
                    860: 
                    861:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                    862:                == NULL)
                    863:        {
                    864:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    865:            return;
                    866:        }
                    867: 
                    868:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    869:                .nombre_arguments = 0;
                    870:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    871:                .fonction = instruction_vers_niveau_inferieur;
                    872: 
                    873:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    874:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                    875:        {
                    876:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    877:            return;
                    878:        }
                    879: 
                    880:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                    881:                .nom_fonction, ">>");
                    882: 
                    883:        (*l_element_courant).suivant = NULL;
                    884:        s_objet_argument = NULL;
                    885:    }
                    886: 
                    887: /*
                    888: --------------------------------------------------------------------------------
                    889:   NOT d'une expression
                    890: --------------------------------------------------------------------------------
                    891: */
                    892: 
                    893:    else if (((*s_objet_argument).type == ALG) ||
                    894:            ((*s_objet_argument).type == RPN))
                    895:    {
                    896:        if ((s_copie_argument = copie_objet(s_etat_processus,
                    897:                s_objet_argument, 'N')) == NULL)
                    898:        {
                    899:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    900:            return;
                    901:        }
                    902: 
                    903:        l_element_courant = (struct_liste_chainee *)
                    904:                (*s_copie_argument).objet;
                    905:        l_element_precedent = l_element_courant;
                    906: 
                    907:        while((*l_element_courant).suivant != NULL)
                    908:        {
                    909:            l_element_precedent = l_element_courant;
                    910:            l_element_courant = (*l_element_courant).suivant;
                    911:        }
                    912: 
                    913:        if (((*l_element_precedent).suivant =
                    914:                allocation_maillon(s_etat_processus)) == NULL)
                    915:        {
                    916:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    917:            return;
                    918:        }
                    919: 
                    920:        if (((*(*l_element_precedent).suivant).donnee =
                    921:                allocation(s_etat_processus, FCT)) == NULL)
                    922:        {
                    923:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    924:            return;
                    925:        }
                    926: 
                    927:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                    928:                .donnee).objet)).nombre_arguments = 1;
                    929:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                    930:                .donnee).objet)).fonction = instruction_not;
                    931: 
                    932:        if (((*((struct_fonction *) (*(*(*l_element_precedent)
                    933:                .suivant).donnee).objet)).nom_fonction =
                    934:                malloc(4 * sizeof(unsigned char))) == NULL)
                    935:        {
                    936:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    937:            return;
                    938:        }
                    939: 
                    940:        strcpy((*((struct_fonction *) (*(*(*l_element_precedent)
                    941:                .suivant).donnee).objet)).nom_fonction, "NOT");
                    942: 
                    943:        (*(*l_element_precedent).suivant).suivant = l_element_courant;
                    944: 
                    945:        s_objet_resultat = s_copie_argument;
                    946:    }
                    947: 
                    948: /*
                    949: --------------------------------------------------------------------------------
                    950:   NOT impossible
                    951: --------------------------------------------------------------------------------
                    952: */
                    953: 
                    954:    else
                    955:    {
                    956:        liberation(s_etat_processus, s_objet_argument);
                    957: 
                    958:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    959:        return;
                    960:    }
                    961: 
                    962:    liberation(s_etat_processus, s_objet_argument);
                    963: 
                    964:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    965:            s_objet_resultat) == d_erreur)
                    966:    {
                    967:        return;
                    968:    }
                    969: 
                    970:    return;
                    971: }
                    972: 
                    973: 
                    974: /*
                    975: ================================================================================
                    976:   Fonction '<>'
                    977: ================================================================================
                    978:   Entrées :
                    979: --------------------------------------------------------------------------------
                    980:   Sorties :
                    981: --------------------------------------------------------------------------------
                    982:   Effets de bord : néant
                    983: ================================================================================
                    984: */
                    985: 
                    986: void
                    987: instruction_ne(struct_processus *s_etat_processus)
                    988: {
                    989:    struct_liste_chainee        *l_element_courant;
                    990:    struct_liste_chainee        *l_element_courant_1;
                    991:    struct_liste_chainee        *l_element_courant_2;
                    992:    struct_liste_chainee        *l_element_precedent;
                    993: 
                    994:    struct_objet                *s_copie_argument_1;
                    995:    struct_objet                *s_copie_argument_2;
                    996:    struct_objet                *s_objet_argument_1;
                    997:    struct_objet                *s_objet_argument_2;
                    998:    struct_objet                *s_objet_resultat;
                    999:    struct_objet                *s_objet_resultat_intermediaire;
                   1000: 
                   1001:    logical1                    difference;
                   1002: 
                   1003:    unsigned long               i;
                   1004:    unsigned long               j;
                   1005:    unsigned long               nombre_elements;
                   1006: 
                   1007:    (*s_etat_processus).erreur_execution = d_ex;
                   1008: 
                   1009:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   1010:    {
                   1011:        printf("\n  <> ");
                   1012: 
                   1013:        if ((*s_etat_processus).langue == 'F')
                   1014:        {
                   1015:            printf("(opérateur différence)\n\n");
                   1016:        }
                   1017:        else
                   1018:        {
                   1019:            printf("(different)\n\n");
                   1020:        }
                   1021: 
                   1022:        printf("    2: %s, %s\n", d_INT, d_REL);
                   1023:        printf("    1: %s, %s\n", d_INT, d_REL);
                   1024:        printf("->  1: %s\n\n", d_INT);
                   1025: 
                   1026:        printf("    2: %s\n", d_BIN);
                   1027:        printf("    1: %s\n", d_BIN);
                   1028:        printf("->  1: %s\n\n", d_INT);
                   1029: 
                   1030:        printf("    2: %s\n", d_CHN);
                   1031:        printf("    1: %s\n", d_CHN);
                   1032:        printf("->  1: %s\n\n", d_INT);
                   1033: 
                   1034:        printf("    2: %s\n", d_NOM);
                   1035:        printf("    1: %s, %s, %s, %s\n", d_NOM, d_ALG, d_INT, d_REL);
                   1036:        printf("->  1: %s\n\n", d_ALG);
                   1037: 
                   1038:        printf("    2: %s, %s, %s, %s\n", d_NOM, d_ALG, d_INT, d_REL);
                   1039:        printf("    1: %s\n", d_NOM);
                   1040:        printf("->  1: %s\n\n", d_ALG);
                   1041: 
                   1042:        printf("    2: %s\n", d_ALG);
                   1043:        printf("    1: %s\n", d_ALG);
                   1044:        printf("->  1: %s\n\n", d_ALG);
                   1045: 
                   1046:        printf("    2: %s\n", d_RPN);
                   1047:        printf("    1: %s\n", d_RPN);
                   1048:        printf("->  1: %s\n", d_RPN);
                   1049: 
                   1050:        return;
                   1051:    }
                   1052:    else if ((*s_etat_processus).test_instruction == 'Y')
                   1053:    {
                   1054:        (*s_etat_processus).nombre_arguments = 0;
                   1055:        return;
                   1056:    }
                   1057:    
                   1058:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1059:    {
                   1060:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                   1061:        {
                   1062:            return;
                   1063:        }
                   1064:    }
                   1065: 
                   1066:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1067:            &s_objet_argument_1) == d_erreur)
                   1068:    {
                   1069:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1070:        return;
                   1071:    }
                   1072: 
                   1073:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1074:            &s_objet_argument_2) == d_erreur)
                   1075:    {
                   1076:        liberation(s_etat_processus, s_objet_argument_1);
                   1077: 
                   1078:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1079:        return;
                   1080:    }
                   1081: 
                   1082: /*
                   1083: --------------------------------------------------------------------------------
                   1084:   SAME NOT sur des valeurs numériques
                   1085: --------------------------------------------------------------------------------
                   1086: */
                   1087: 
                   1088:    if ((((*s_objet_argument_1).type == INT) ||
                   1089:            ((*s_objet_argument_1).type == REL)) &&
                   1090:            (((*s_objet_argument_2).type == INT) ||
                   1091:            ((*s_objet_argument_2).type == REL)))
                   1092:    {
                   1093:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1094:        {
                   1095:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1096:            return;
                   1097:        }
                   1098: 
                   1099:        if ((*s_objet_argument_1).type == INT)
                   1100:        {
                   1101:            if ((*s_objet_argument_2).type == INT)
                   1102:            {
                   1103:                (*((integer8 *) (*s_objet_resultat).objet)) =
                   1104:                        ((*((integer8 *) (*s_objet_argument_1).objet)) !=
                   1105:                        (*((integer8 *) (*s_objet_argument_2).objet)))
                   1106:                        ? -1 : 0;
                   1107:            }
                   1108:            else
                   1109:            {
                   1110:                (*((integer8 *) (*s_objet_resultat).objet)) =
                   1111:                        ((*((integer8 *) (*s_objet_argument_1).objet)) !=
                   1112:                        (*((real8 *) (*s_objet_argument_2).objet)))
                   1113:                        ? -1 : 0;
                   1114:            }
                   1115:        }
                   1116:        else
                   1117:        {
                   1118:            if ((*s_objet_argument_2).type == INT)
                   1119:            {
                   1120:                (*((integer8 *) (*s_objet_resultat).objet)) =
                   1121:                        ((*((real8 *) (*s_objet_argument_1).objet)) !=
                   1122:                        (*((integer8 *) (*s_objet_argument_2).objet)))
                   1123:                        ? -1 : 0;
                   1124:            }
                   1125:            else
                   1126:            {
                   1127:                (*((integer8 *) (*s_objet_resultat).objet)) =
                   1128:                        ((*((real8 *) (*s_objet_argument_1).objet)) !=
                   1129:                        (*((real8 *) (*s_objet_argument_2).objet)))
                   1130:                        ? -1 : 0;
                   1131:            }
                   1132:        }
                   1133:    }
                   1134: 
                   1135: /*
                   1136: --------------------------------------------------------------------------------
                   1137:   SAME NOT complexe
                   1138: --------------------------------------------------------------------------------
                   1139: */
                   1140: 
                   1141:    else if (((*s_objet_argument_1).type == CPL) &&
                   1142:            ((*s_objet_argument_2).type == CPL))
                   1143:    {
                   1144:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1145:        {
                   1146:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1147:            return;
                   1148:        }
                   1149: 
                   1150:        (*((integer8 *) (*s_objet_resultat).objet)) =
                   1151:                (((*((struct_complexe16 *) (*s_objet_argument_1).objet))
                   1152:                .partie_reelle != (*((struct_complexe16 *) (*s_objet_argument_2)
                   1153:                .objet)).partie_reelle) || ((*((struct_complexe16 *)
                   1154:                (*s_objet_argument_1).objet)).partie_imaginaire !=
                   1155:                ((*((struct_complexe16 *) (*s_objet_argument_1).objet))
                   1156:                .partie_imaginaire))) ? -1 : 0;
                   1157:    }
                   1158: 
                   1159: /*
                   1160: --------------------------------------------------------------------------------
                   1161:   SAME NOT binaire
                   1162: --------------------------------------------------------------------------------
                   1163: */
                   1164: 
                   1165:    else if (((*s_objet_argument_1).type == BIN) &&
                   1166:            ((*s_objet_argument_2).type == BIN))
                   1167:    {
                   1168:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1169:        {
                   1170:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1171:            return;
                   1172:        }
                   1173: 
                   1174:        (*((integer8 *) (*s_objet_resultat).objet)) = 
                   1175:                ((*((logical8 *) (*s_objet_argument_1).objet)) !=
                   1176:                (*((logical8 *) (*s_objet_argument_2).objet)))
                   1177:                ? -1 : 0;
                   1178:    }
                   1179: 
                   1180: /*
                   1181: --------------------------------------------------------------------------------
                   1182:   SAME NOT portant sur des chaînes de caractères
                   1183: --------------------------------------------------------------------------------
                   1184: */
                   1185: 
                   1186:    else if (((*s_objet_argument_1).type == CHN) &&
                   1187:            ((*s_objet_argument_2).type == CHN))
                   1188:    {
                   1189:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1190:        {
                   1191:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1192:            return;
                   1193:        }
                   1194: 
                   1195:        (*((integer8 *) (*s_objet_resultat).objet)) =
                   1196:                (strcmp((unsigned char *) (*s_objet_argument_1).objet,
                   1197:                (unsigned char *) (*s_objet_argument_2).objet) != 0) ? -1 : 0;
                   1198:    }
                   1199: 
                   1200: /*
                   1201: --------------------------------------------------------------------------------
                   1202:   SAME NOT portant sur des listes
                   1203: --------------------------------------------------------------------------------
                   1204: */
                   1205:    /*
                   1206:     * Il y a de la récursivité dans l'air...
                   1207:     */
                   1208: 
                   1209:    else if ((((*s_objet_argument_1).type == LST) &&
                   1210:            ((*s_objet_argument_2).type == LST)) ||
                   1211:            (((*s_objet_argument_1).type == ALG) &&
                   1212:            ((*s_objet_argument_2).type == ALG)) ||
                   1213:            (((*s_objet_argument_1).type == RPN) &&
                   1214:            ((*s_objet_argument_2).type == RPN)))
                   1215:    {
                   1216:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1217:        {
                   1218:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1219:            return;
                   1220:        }
                   1221: 
                   1222:        l_element_courant_1 = (struct_liste_chainee *)
                   1223:                (*s_objet_argument_1).objet;
                   1224:        l_element_courant_2 = (struct_liste_chainee *)
                   1225:                (*s_objet_argument_2).objet;
                   1226: 
                   1227:        difference = d_faux;
                   1228: 
                   1229:        while((l_element_courant_1 != NULL) && (l_element_courant_2 != NULL)
                   1230:                && (difference == d_faux))
                   1231:        {
                   1232:            if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1233:                    (*l_element_courant_1).donnee) == d_erreur)
                   1234:            {
                   1235:                return;
                   1236:            }
                   1237: 
                   1238:            if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1239:                    (*l_element_courant_2).donnee) == d_erreur)
                   1240:            {
                   1241:                return;
                   1242:            }
                   1243: 
                   1244:            instruction_same(s_etat_processus);
                   1245: 
                   1246:            (*l_element_courant_1).donnee = NULL;
                   1247:            (*l_element_courant_2).donnee = NULL;
                   1248: 
                   1249:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1250:                    &s_objet_resultat_intermediaire) == d_erreur)
                   1251:            {
                   1252:                liberation(s_etat_processus, s_objet_argument_1);
                   1253:                liberation(s_etat_processus, s_objet_argument_2);
                   1254:                liberation(s_etat_processus, s_objet_resultat);
                   1255: 
                   1256:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1257:                return;
                   1258:            }
                   1259: 
                   1260:            if ((*s_objet_resultat_intermediaire).type != INT)
                   1261:            {
                   1262:                liberation(s_etat_processus, s_objet_argument_1);
                   1263:                liberation(s_etat_processus, s_objet_argument_2);
                   1264:                liberation(s_etat_processus, s_objet_resultat);
                   1265: 
                   1266:                return;
                   1267:            }
                   1268: 
                   1269:            difference = (*(((integer8 *) (*s_objet_resultat_intermediaire)
                   1270:                    .objet)) == 0) ? d_vrai : d_faux;
                   1271: 
                   1272:            liberation(s_etat_processus, s_objet_resultat_intermediaire);
                   1273: 
                   1274:            l_element_courant_1 = (*l_element_courant_1).suivant;
                   1275:            l_element_courant_2 = (*l_element_courant_2).suivant;
                   1276:        }
                   1277: 
                   1278:        if (((l_element_courant_1 != NULL) && (l_element_courant_2 == NULL)) ||
                   1279:                ((l_element_courant_1 == NULL) &&
                   1280:                (l_element_courant_2 != NULL)))
                   1281:        {
                   1282:            (*((integer8 *) (*s_objet_resultat).objet)) = 0;
                   1283:        }
                   1284:        else
                   1285:        {
                   1286:            (*((integer8 *) (*s_objet_resultat).objet)) =
                   1287:                    (difference == d_vrai) ? -1 : 0;
                   1288:        }
                   1289:    }
                   1290: 
                   1291: /*
                   1292: --------------------------------------------------------------------------------
                   1293:   SAME NOT portant sur des vecteurs
                   1294: --------------------------------------------------------------------------------
                   1295: */
                   1296:    /*
                   1297:     * Vecteurs d'entiers
                   1298:     */
                   1299: 
                   1300:    else if (((*s_objet_argument_1).type == VIN) &&
                   1301:            ((*s_objet_argument_2).type == VIN))
                   1302:    {
                   1303:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1304:        {
                   1305:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1306:            return;
                   1307:        }
                   1308: 
                   1309:        if ((*((struct_vecteur *) (*s_objet_argument_1).objet)).taille !=
                   1310:                (*((struct_vecteur *) (*s_objet_argument_2).objet)).taille)
                   1311:        {
                   1312:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1313:        }
                   1314:        else
                   1315:        {
                   1316:            difference = d_faux;
                   1317: 
                   1318:            for(i = 0; (i < (*((struct_vecteur *) (*s_objet_argument_1).objet))
                   1319:                    .taille) && (difference == d_faux); i++)
                   1320:            {
                   1321:                difference = (((integer8 *) (*((struct_vecteur *)
                   1322:                        (*s_objet_argument_1).objet)).tableau)[i] ==
                   1323:                        ((integer8 *) (*((struct_vecteur *)
                   1324:                        (*s_objet_argument_2).objet)).tableau)[i])
                   1325:                        ? d_faux : d_vrai;
                   1326:            }
                   1327: 
                   1328:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1329:                        d_vrai) ? -1 : 0;
                   1330:        }
                   1331:    }
                   1332: 
                   1333:    /*
                   1334:     * Vecteurs de réels
                   1335:     */
                   1336: 
                   1337:    else if (((*s_objet_argument_1).type == VRL) &&
                   1338:            ((*s_objet_argument_2).type == VRL))
                   1339:    {
                   1340:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1341:        {
                   1342:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1343:            return;
                   1344:        }
                   1345: 
                   1346:        if ((*((struct_vecteur *) (*s_objet_argument_1).objet)).taille !=
                   1347:                (*((struct_vecteur *) (*s_objet_argument_2).objet)).taille)
                   1348:        {
                   1349:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1350:        }
                   1351:        else
                   1352:        {
                   1353:            difference = d_faux;
                   1354: 
                   1355:            for(i = 0; (i < (*((struct_vecteur *) (*s_objet_argument_1).objet))
                   1356:                    .taille) && (difference == d_faux); i++)
                   1357:            {
                   1358:                difference = (((real8 *) (*((struct_vecteur *)
                   1359:                        (*s_objet_argument_1).objet)).tableau)[i] ==
                   1360:                        ((real8 *) (*((struct_vecteur *)
                   1361:                        (*s_objet_argument_2).objet)).tableau)[i])
                   1362:                        ? d_faux : d_vrai;
                   1363:            }
                   1364: 
                   1365:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1366:                        d_vrai) ? -1 : 0;
                   1367:        }
                   1368:    }
                   1369: 
                   1370:    /*
                   1371:     * Vecteurs de complexes
                   1372:     */
                   1373: 
                   1374:    else if (((*s_objet_argument_1).type == VCX) &&
                   1375:            ((*s_objet_argument_2).type == VCX))
                   1376:    {
                   1377:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1378:        {
                   1379:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1380:            return;
                   1381:        }
                   1382: 
                   1383:        if ((*((struct_vecteur *) (*s_objet_argument_1).objet)).taille !=
                   1384:                (*((struct_vecteur *) (*s_objet_argument_2).objet)).taille)
                   1385:        {
                   1386:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1387:        }
                   1388:        else
                   1389:        {
                   1390:            difference = d_faux;
                   1391: 
                   1392:            for(i = 0; (i < (*((struct_vecteur *) (*s_objet_argument_1).objet))
                   1393:                    .taille) && (difference == d_faux); i++)
                   1394:            {
                   1395:                difference = ((((struct_complexe16 *) (*((struct_vecteur *)
                   1396:                        (*s_objet_argument_1).objet)).tableau)[i].partie_reelle
                   1397:                        == ((struct_complexe16 *) (*((struct_vecteur *)
                   1398:                        (*s_objet_argument_2).objet)).tableau)[i].partie_reelle)
                   1399:                        && (((struct_complexe16 *) (*((struct_vecteur *)
                   1400:                        (*s_objet_argument_1).objet)).tableau)[i]
                   1401:                        .partie_imaginaire == ((struct_complexe16 *)
                   1402:                        (*((struct_vecteur *) (*s_objet_argument_2).objet))
                   1403:                        .tableau)[i].partie_imaginaire)) ? d_faux : d_vrai;
                   1404:            }
                   1405: 
                   1406:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1407:                        d_vrai) ? -1 : 0;
                   1408:        }
                   1409:    }
                   1410: 
                   1411: /*
                   1412: --------------------------------------------------------------------------------
                   1413:   SAME NOT portant sur des matrices
                   1414: --------------------------------------------------------------------------------
                   1415: */
                   1416:    /*
                   1417:     * Matrice d'entiers
                   1418:     */
                   1419: 
                   1420:    else if (((*s_objet_argument_1).type == MIN) &&
                   1421:            ((*s_objet_argument_2).type == MIN))
                   1422:    {
                   1423:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1424:        {
                   1425:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1426:            return;
                   1427:        }
                   1428: 
                   1429:        if (((*((struct_matrice *) (*s_objet_argument_1).objet)).nombre_lignes
                   1430:                != (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1431:                .nombre_lignes) || ((*((struct_matrice *) (*s_objet_argument_1)
                   1432:                .objet)).nombre_colonnes != (*((struct_matrice *)
                   1433:                (*s_objet_argument_2).objet)).nombre_colonnes))
                   1434:        {
                   1435:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1436:        }
                   1437:        else
                   1438:        {
                   1439:            difference = d_faux;
                   1440: 
                   1441:            for(i = 0; (i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                   1442:                    .nombre_lignes) && (difference == d_faux); i++)
                   1443:            {
                   1444:                for(j = 0; (j < (*((struct_matrice *) (*s_objet_argument_1)
                   1445:                        .objet)).nombre_colonnes) && (difference == d_faux);
                   1446:                        j++)
                   1447:                {
                   1448:                    difference = (((integer8 **) (*((struct_matrice *)
                   1449:                            (*s_objet_argument_1).objet)).tableau)[i][j] ==
                   1450:                            ((integer8 **) (*((struct_matrice *)
                   1451:                            (*s_objet_argument_2).objet)).tableau)[i][j])
                   1452:                            ? d_faux : d_vrai;
                   1453:                }
                   1454:            }
                   1455: 
                   1456:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1457:                        d_vrai) ? -1 : 0;
                   1458:        }
                   1459:    }
                   1460: 
                   1461:    /*
                   1462:     * Matrice de réels
                   1463:     */
                   1464: 
                   1465:    else if (((*s_objet_argument_1).type == MRL) &&
                   1466:            ((*s_objet_argument_2).type == MRL))
                   1467:    {
                   1468:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1469:        {
                   1470:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1471:            return;
                   1472:        }
                   1473: 
                   1474:        if (((*((struct_matrice *) (*s_objet_argument_1).objet)).nombre_lignes
                   1475:                != (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1476:                .nombre_lignes) || ((*((struct_matrice *) (*s_objet_argument_1)
                   1477:                .objet)).nombre_colonnes != (*((struct_matrice *)
                   1478:                (*s_objet_argument_2).objet)).nombre_colonnes))
                   1479:        {
                   1480:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1481:        }
                   1482:        else
                   1483:        {
                   1484:            difference = d_faux;
                   1485: 
                   1486:            for(i = 0; (i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                   1487:                    .nombre_lignes) && (difference == d_faux); i++)
                   1488:            {
                   1489:                for(j = 0; (j < (*((struct_matrice *) (*s_objet_argument_1)
                   1490:                        .objet)).nombre_colonnes) && (difference == d_faux);
                   1491:                        j++)
                   1492:                {
                   1493:                    difference = (((real8 **) (*((struct_matrice *)
                   1494:                            (*s_objet_argument_1).objet)).tableau)[i][j] ==
                   1495:                            ((real8 **) (*((struct_matrice *)
                   1496:                            (*s_objet_argument_2).objet)).tableau)[i][j])
                   1497:                            ? d_faux : d_vrai;
                   1498:                }
                   1499:            }
                   1500: 
                   1501:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1502:                        d_vrai) ? -1 : 0;
                   1503:        }
                   1504:    }
                   1505: 
                   1506:    /*
                   1507:     * Matrice de complexes
                   1508:     */
                   1509: 
                   1510:    else if (((*s_objet_argument_1).type == MCX) &&
                   1511:            ((*s_objet_argument_2).type == MCX))
                   1512:    {
                   1513:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   1514:        {
                   1515:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1516:            return;
                   1517:        }
                   1518: 
                   1519:        if (((*((struct_matrice *) (*s_objet_argument_1).objet)).nombre_lignes
                   1520:                != (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1521:                .nombre_lignes) || ((*((struct_matrice *) (*s_objet_argument_1)
                   1522:                .objet)).nombre_colonnes != (*((struct_matrice *)
                   1523:                (*s_objet_argument_2).objet)).nombre_colonnes))
                   1524:        {
                   1525:            (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   1526:        }
                   1527:        else
                   1528:        {
                   1529:            difference = d_faux;
                   1530: 
                   1531:            for(i = 0; (i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                   1532:                    .nombre_lignes) && (difference == d_faux); i++)
                   1533:            {
                   1534:                for(j = 0; (j < (*((struct_matrice *) (*s_objet_argument_1)
                   1535:                        .objet)).nombre_colonnes) && (difference == d_faux);
                   1536:                        j++)
                   1537:                {
                   1538:                    difference = ((((struct_complexe16 **) (*((struct_matrice *)
                   1539:                            (*s_objet_argument_1).objet)).tableau)[i][j]
                   1540:                            .partie_reelle == ((struct_complexe16 **)
                   1541:                            (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1542:                            .tableau)[i][j].partie_reelle) &&
                   1543:                            (((struct_complexe16 **) (*((struct_matrice *)
                   1544:                            (*s_objet_argument_1).objet)).tableau)[i][j]
                   1545:                            .partie_imaginaire == ((struct_complexe16 **)
                   1546:                            (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1547:                            .tableau)[i][j].partie_imaginaire))
                   1548:                            ? d_faux : d_vrai;
                   1549:                }
                   1550:            }
                   1551: 
                   1552:            (*((integer8 *) (*s_objet_resultat).objet)) = (difference ==
                   1553:                        d_vrai) ? -1 : 0;
                   1554:        }
                   1555:    }
                   1556: 
                   1557: /*
                   1558: --------------------------------------------------------------------------------
                   1559:   SAME NOT entre des arguments complexes
                   1560: --------------------------------------------------------------------------------
                   1561: */
                   1562: 
                   1563:    /*
                   1564:     * Nom ou valeur numérique / Nom ou valeur numérique
                   1565:     */
                   1566: 
                   1567:    else if ((((*s_objet_argument_1).type == NOM) &&
                   1568:            (((*s_objet_argument_2).type == NOM) ||
                   1569:            ((*s_objet_argument_2).type == INT) ||
                   1570:            ((*s_objet_argument_2).type == REL))) ||
                   1571:            (((*s_objet_argument_2).type == NOM) &&
                   1572:            (((*s_objet_argument_1).type == INT) ||
                   1573:            ((*s_objet_argument_1).type == REL))))
                   1574:    {
                   1575:        if ((s_objet_resultat = allocation(s_etat_processus, ALG)) == NULL)
                   1576:        {
                   1577:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1578:            return;
                   1579:        }
                   1580: 
                   1581:        if (((*s_objet_resultat).objet =
                   1582:                allocation_maillon(s_etat_processus)) == NULL)
                   1583:        {
                   1584:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1585:            return;
                   1586:        }
                   1587: 
                   1588:        l_element_courant = (*s_objet_resultat).objet;
                   1589: 
                   1590:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                   1591:                == NULL)
                   1592:        {
                   1593:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1594:            return;
                   1595:        }
                   1596: 
                   1597:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1598:                .nombre_arguments = 0;
                   1599:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1600:                .fonction = instruction_vers_niveau_superieur;
                   1601: 
                   1602:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1603:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                   1604:        {
                   1605:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1606:            return;
                   1607:        }
                   1608: 
                   1609:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1610:                .nom_fonction, "<<");
                   1611: 
                   1612:        if (((*l_element_courant).suivant =
                   1613:                allocation_maillon(s_etat_processus)) == NULL)
                   1614:        {
                   1615:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1616:            return;
                   1617:        }
                   1618: 
                   1619:        l_element_courant = (*l_element_courant).suivant;
                   1620:        (*l_element_courant).donnee = s_objet_argument_2;
                   1621: 
                   1622:        if (((*l_element_courant).suivant =
                   1623:                allocation_maillon(s_etat_processus)) == NULL)
                   1624:        {
                   1625:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1626:            return;
                   1627:        }
                   1628: 
                   1629:        l_element_courant = (*l_element_courant).suivant;
                   1630:        (*l_element_courant).donnee = s_objet_argument_1;
                   1631: 
                   1632:        if (((*l_element_courant).suivant =
                   1633:                allocation_maillon(s_etat_processus)) == NULL)
                   1634:        {
                   1635:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1636:            return;
                   1637:        }
                   1638: 
                   1639:        l_element_courant = (*l_element_courant).suivant;
                   1640: 
                   1641:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                   1642:                == NULL)
                   1643:        {
                   1644:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1645:            return;
                   1646:        }
                   1647: 
                   1648:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1649:                .nombre_arguments = 0;
                   1650:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1651:                .fonction = instruction_ne;
                   1652: 
                   1653:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1654:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                   1655:        {
                   1656:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1657:            return;
                   1658:        }
                   1659: 
                   1660:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1661:                .nom_fonction, "<>");
                   1662: 
                   1663:        if (((*l_element_courant).suivant =
                   1664:                allocation_maillon(s_etat_processus)) == NULL)
                   1665:        {
                   1666:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1667:            return;
                   1668:        }
                   1669: 
                   1670:        l_element_courant = (*l_element_courant).suivant;
                   1671: 
                   1672:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                   1673:                == NULL)
                   1674:        {
                   1675:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1676:            return;
                   1677:        }
                   1678: 
                   1679:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1680:                .nombre_arguments = 0;
                   1681:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1682:                .fonction = instruction_ne;
                   1683: 
                   1684:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1685:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                   1686:        {
                   1687:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1688:            return;
                   1689:        }
                   1690: 
                   1691:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1692:                .nom_fonction, ">>");
                   1693: 
                   1694:        (*l_element_courant).suivant = NULL;
                   1695: 
                   1696:        s_objet_argument_1 = NULL;
                   1697:        s_objet_argument_2 = NULL;
                   1698:    }
                   1699: 
                   1700:    /*
                   1701:     * Nom ou valeur numérique / Expression
                   1702:     */
                   1703: 
                   1704:    else if (((((*s_objet_argument_1).type == ALG) ||
                   1705:            ((*s_objet_argument_1).type == RPN))) &&
                   1706:            (((*s_objet_argument_2).type == NOM) ||
                   1707:            ((*s_objet_argument_2).type == INT) ||
                   1708:            ((*s_objet_argument_2).type == REL)))
                   1709:    {
                   1710:        nombre_elements = 0;
                   1711:        l_element_courant = (struct_liste_chainee *)
                   1712:                (*s_objet_argument_1).objet;
                   1713: 
                   1714:        while(l_element_courant != NULL)
                   1715:        {
                   1716:            nombre_elements++;
                   1717:            l_element_courant = (*l_element_courant).suivant;
                   1718:        }
                   1719: 
                   1720:        if (nombre_elements == 2)
                   1721:        {
                   1722:            liberation(s_etat_processus, s_objet_argument_1);
                   1723:            liberation(s_etat_processus, s_objet_argument_2);
                   1724: 
                   1725:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                   1726:            return;
                   1727:        }
                   1728: 
                   1729:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                   1730:                s_objet_argument_1, 'N')) == NULL)
                   1731:        {
                   1732:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1733:            return;
                   1734:        }
                   1735: 
                   1736:        l_element_courant = (struct_liste_chainee *)
                   1737:                (*s_objet_resultat).objet;
                   1738:        l_element_precedent = l_element_courant;
                   1739:        l_element_courant = (*l_element_courant).suivant;
                   1740: 
                   1741:        if (((*l_element_precedent).suivant =
                   1742:                allocation_maillon(s_etat_processus)) == NULL)
                   1743:        {
                   1744:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1745:            return;
                   1746:        }
                   1747: 
                   1748:        (*(*l_element_precedent).suivant).donnee = s_objet_argument_2;
                   1749:        (*(*l_element_precedent).suivant).suivant = l_element_courant;
                   1750: 
                   1751:        while((*l_element_courant).suivant != NULL)
                   1752:        {
                   1753:            l_element_precedent = l_element_courant;
                   1754:            l_element_courant = (*l_element_courant).suivant;
                   1755:        }
                   1756: 
                   1757:        if (((*l_element_precedent).suivant =
                   1758:                allocation_maillon(s_etat_processus)) == NULL)
                   1759:        {
                   1760:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1761:            return;
                   1762:        }
                   1763: 
                   1764:        if (((*(*l_element_precedent).suivant).donnee =
                   1765:                allocation(s_etat_processus, FCT)) == NULL)
                   1766:        {
                   1767:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1768:            return;
                   1769:        }
                   1770: 
                   1771:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                   1772:                .donnee).objet)).nombre_arguments = 0;
                   1773:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                   1774:                .donnee).objet)).fonction = instruction_ne;
                   1775: 
                   1776:        if (((*((struct_fonction *) (*(*(*l_element_precedent)
                   1777:                .suivant).donnee).objet)).nom_fonction =
                   1778:                malloc(3 * sizeof(unsigned char))) == NULL)
                   1779:        {
                   1780:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1781:            return;
                   1782:        }
                   1783: 
                   1784:        strcpy((*((struct_fonction *) (*(*(*l_element_precedent)
                   1785:                .suivant).donnee).objet)).nom_fonction, "<>");
                   1786: 
                   1787:        (*(*l_element_precedent).suivant).suivant = l_element_courant;
                   1788: 
                   1789:        s_objet_argument_2 = NULL;
                   1790:    }
                   1791: 
                   1792:    /*
                   1793:     * Expression / Nom ou valeur numérique
                   1794:     */
                   1795: 
                   1796:    else if ((((*s_objet_argument_1).type == NOM) ||
                   1797:            ((*s_objet_argument_1).type == INT) ||
                   1798:            ((*s_objet_argument_1).type == REL)) &&
                   1799:            ((((*s_objet_argument_2).type == ALG) ||
                   1800:            ((*s_objet_argument_2).type == RPN))))
                   1801:    {
                   1802:        nombre_elements = 0;
                   1803:        l_element_courant = (struct_liste_chainee *)
                   1804:                (*s_objet_argument_2).objet;
                   1805: 
                   1806:        while(l_element_courant != NULL)
                   1807:        {
                   1808:            nombre_elements++;
                   1809:            l_element_courant = (*l_element_courant).suivant;
                   1810:        }
                   1811: 
                   1812:        if (nombre_elements == 2)
                   1813:        {
                   1814:            liberation(s_etat_processus, s_objet_argument_1);
                   1815:            liberation(s_etat_processus, s_objet_argument_2);
                   1816: 
                   1817:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                   1818:            return;
                   1819:        }
                   1820: 
                   1821:        if ((s_objet_resultat = copie_objet(s_etat_processus,
                   1822:                s_objet_argument_2, 'N')) == NULL)
                   1823:        {
                   1824:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1825:            return;
                   1826:        }
                   1827: 
                   1828:        l_element_courant = (struct_liste_chainee *)
                   1829:                (*s_objet_resultat).objet;
                   1830:        l_element_precedent = l_element_courant;
                   1831: 
                   1832:        while((*l_element_courant).suivant != NULL)
                   1833:        {
                   1834:            l_element_precedent = l_element_courant;
                   1835:            l_element_courant = (*l_element_courant).suivant;
                   1836:        }
                   1837: 
                   1838:        if (((*l_element_precedent).suivant =
                   1839:                allocation_maillon(s_etat_processus)) == NULL)
                   1840:        {
                   1841:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1842:            return;
                   1843:        }
                   1844: 
                   1845:        (*(*l_element_precedent).suivant).donnee = s_objet_argument_1;
                   1846:        l_element_precedent = (*l_element_precedent).suivant;
                   1847: 
                   1848:        if (((*l_element_precedent).suivant =
                   1849:                allocation_maillon(s_etat_processus)) == NULL)
                   1850:        {
                   1851:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1852:            return;
                   1853:        }
                   1854: 
                   1855:        if (((*(*l_element_precedent).suivant).donnee =
                   1856:                allocation(s_etat_processus, FCT)) == NULL)
                   1857:        {
                   1858:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1859:            return;
                   1860:        }
                   1861: 
                   1862:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                   1863:                .donnee).objet)).nombre_arguments = 0;
                   1864:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                   1865:                .donnee).objet)).fonction = instruction_ne;
                   1866: 
                   1867:        if (((*((struct_fonction *) (*(*(*l_element_precedent)
                   1868:                .suivant).donnee).objet)).nom_fonction =
                   1869:                malloc(3 * sizeof(unsigned char))) == NULL)
                   1870:        {
                   1871:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1872:            return;
                   1873:        }
                   1874: 
                   1875:        strcpy((*((struct_fonction *) (*(*(*l_element_precedent)
                   1876:                .suivant).donnee).objet)).nom_fonction, "<>");
                   1877: 
                   1878:        (*(*l_element_precedent).suivant).suivant = l_element_courant;
                   1879: 
                   1880:        s_objet_argument_1 = NULL;
                   1881:    }
                   1882: 
                   1883:    /*
                   1884:     * Expression / Expression
                   1885:     */
                   1886: 
                   1887:    else if ((((*s_objet_argument_1).type == ALG) &&
                   1888:            ((*s_objet_argument_2).type == ALG)) ||
                   1889:            (((*s_objet_argument_1).type == RPN) &&
                   1890:            ((*s_objet_argument_2).type == RPN)))
                   1891:    {
                   1892:        nombre_elements = 0;
                   1893:        l_element_courant = (struct_liste_chainee *)
                   1894:                (*s_objet_argument_1).objet;
                   1895: 
                   1896:        while(l_element_courant != NULL)
                   1897:        {
                   1898:            nombre_elements++;
                   1899:            l_element_courant = (*l_element_courant).suivant;
                   1900:        }
                   1901: 
                   1902:        if (nombre_elements == 2)
                   1903:        {
                   1904:            liberation(s_etat_processus, s_objet_argument_1);
                   1905:            liberation(s_etat_processus, s_objet_argument_2);
                   1906: 
                   1907:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                   1908:            return;
                   1909:        }
                   1910: 
                   1911:        nombre_elements = 0;
                   1912:        l_element_courant = (struct_liste_chainee *)
                   1913:                (*s_objet_argument_2).objet;
                   1914: 
                   1915:        while(l_element_courant != NULL)
                   1916:        {
                   1917:            nombre_elements++;
                   1918:            l_element_courant = (*l_element_courant).suivant;
                   1919:        }
                   1920: 
                   1921:        if (nombre_elements == 2)
                   1922:        {
                   1923:            liberation(s_etat_processus, s_objet_argument_1);
                   1924:            liberation(s_etat_processus, s_objet_argument_2);
                   1925: 
                   1926:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                   1927:            return;
                   1928:        }
                   1929: 
                   1930:        if ((s_copie_argument_1 = copie_objet(s_etat_processus,
                   1931:                s_objet_argument_1, 'N')) == NULL)
                   1932:        {
                   1933:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1934:            return;
                   1935:        }
                   1936: 
                   1937:        if ((s_copie_argument_2 = copie_objet(s_etat_processus,
                   1938:                s_objet_argument_2, 'N')) == NULL)
                   1939:        {
                   1940:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1941:            return;
                   1942:        }
                   1943: 
                   1944:        l_element_courant = (struct_liste_chainee *)
                   1945:                (*s_copie_argument_1).objet;
                   1946:        (*s_copie_argument_1).objet = (void *) (*((struct_liste_chainee *)
                   1947:                (*s_copie_argument_1).objet)).suivant;
                   1948: 
                   1949:        liberation(s_etat_processus, (*l_element_courant).donnee);
                   1950:        free(l_element_courant);
                   1951: 
                   1952:        l_element_courant = (struct_liste_chainee *)
                   1953:                (*s_copie_argument_2).objet;
                   1954:        l_element_precedent = l_element_courant;
                   1955:        s_objet_resultat = s_copie_argument_2;
                   1956: 
                   1957:        while((*l_element_courant).suivant != NULL)
                   1958:        {
                   1959:            l_element_precedent = l_element_courant;
                   1960:            l_element_courant = (*l_element_courant).suivant;
                   1961:        }
                   1962: 
                   1963:        liberation(s_etat_processus, (*l_element_courant).donnee);
                   1964:        free(l_element_courant);
                   1965: 
                   1966:        (*l_element_precedent).suivant = (struct_liste_chainee *)
                   1967:                (*s_copie_argument_1).objet;
                   1968:        free(s_copie_argument_1);
                   1969: 
                   1970:        l_element_courant = (*l_element_precedent).suivant;
                   1971:        while((*l_element_courant).suivant != NULL)
                   1972:        {
                   1973:            l_element_precedent = l_element_courant;
                   1974:            l_element_courant = (*l_element_courant).suivant;
                   1975:        }
                   1976: 
                   1977:        if (((*l_element_precedent).suivant =
                   1978:                allocation_maillon(s_etat_processus)) == NULL)
                   1979:        {
                   1980:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1981:            return;
                   1982:        }
                   1983: 
                   1984:        (*(*l_element_precedent).suivant).suivant = l_element_courant;
                   1985:        l_element_courant = (*l_element_precedent).suivant;
                   1986: 
                   1987:        if (((*l_element_courant).donnee = allocation(s_etat_processus, FCT))
                   1988:                == NULL)
                   1989:        {
                   1990:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1991:            return;
                   1992:        }
                   1993: 
                   1994:        (*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   1995:                .nombre_arguments = 0;
                   1996:        (*((struct_fonction *) (*(*(*l_element_precedent).suivant)
                   1997:                .donnee).objet)).fonction = instruction_ne;
                   1998: 
                   1999:        if (((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   2000:                .nom_fonction = malloc(3 * sizeof(unsigned char))) == NULL)
                   2001:        {
                   2002:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2003:            return;
                   2004:        }
                   2005: 
                   2006:        strcpy((*((struct_fonction *) (*(*l_element_courant).donnee).objet))
                   2007:                .nom_fonction, "<>");
                   2008:    }
                   2009: 
                   2010: /*
                   2011: --------------------------------------------------------------------------------
                   2012:   SAME NOT nul
                   2013: --------------------------------------------------------------------------------
                   2014: */
                   2015: 
                   2016:    else
                   2017:    {
                   2018:        if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL)
                   2019:        {
                   2020:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2021:            return;
                   2022:        }
                   2023: 
                   2024:        (*((integer8 *) (*s_objet_resultat).objet)) = -1;
                   2025:    }
                   2026: 
                   2027:    liberation(s_etat_processus, s_objet_argument_1);
                   2028:    liberation(s_etat_processus, s_objet_argument_2);
                   2029: 
                   2030:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2031:            s_objet_resultat) == d_erreur)
                   2032:    {
                   2033:        return;
                   2034:    }
                   2035: 
                   2036:    return;
                   2037: }
                   2038: 
                   2039: 
                   2040: /*
                   2041: ================================================================================
                   2042:   Fonction 'next'
                   2043: ================================================================================
                   2044:   Entrées :
                   2045: --------------------------------------------------------------------------------
                   2046:   Sorties :
                   2047: --------------------------------------------------------------------------------
                   2048:   Effets de bord : néant
                   2049: ================================================================================
                   2050: */
                   2051: 
                   2052: void
                   2053: instruction_next(struct_processus *s_etat_processus)
                   2054: {
                   2055:    struct_objet                *s_objet;
                   2056:    struct_objet                *s_copie_objet;
                   2057: 
                   2058:    logical1                    presence_compteur;
                   2059: 
                   2060:    (*s_etat_processus).erreur_execution = d_ex;
                   2061: 
                   2062:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   2063:    {
                   2064:        printf("\n  NEXT ");
                   2065: 
                   2066:        if ((*s_etat_processus).langue == 'F')
                   2067:        {
                   2068:            printf("(fin d'une boucle définie)\n\n");
                   2069:        }
                   2070:        else
                   2071:        {
                   2072:            printf("(end of defined loop)\n\n");
                   2073:        }
                   2074: 
                   2075:        if ((*s_etat_processus).langue == 'F')
                   2076:        {
                   2077:            printf("  Utilisation :\n\n");
                   2078:        }
                   2079:        else
                   2080:        {
                   2081:            printf("  Usage:\n\n");
                   2082:        }
                   2083: 
                   2084:        printf("    %s/%s %s/%s START\n", d_INT, d_REL,
                   2085:                d_INT, d_REL);
                   2086:        printf("        (expression)\n");
                   2087:        printf("        [EXIT]/[CYCLE]\n");
                   2088:        printf("        ...\n");
                   2089:        printf("    NEXT\n\n");
                   2090: 
                   2091:        printf("    %s/%s %s/%s FOR (variable)\n", d_INT, d_REL,
                   2092:                d_INT, d_REL);
                   2093:        printf("        (expression)\n");
                   2094:        printf("        [EXIT]/[CYCLE]\n");
                   2095:        printf("        ...\n");
                   2096:        printf("    NEXT\n");
                   2097: 
                   2098:        return;
                   2099:    }
                   2100:    else if ((*s_etat_processus).test_instruction == 'Y')
                   2101:    {
                   2102:        (*s_etat_processus).nombre_arguments = -1;
                   2103:        return;
                   2104:    }
                   2105: 
                   2106:    presence_compteur = ((*(*s_etat_processus).l_base_pile_systeme)
                   2107:            .type_cloture == 'F') ? d_vrai : d_faux;
                   2108: 
                   2109:    if (((*(*s_etat_processus).l_base_pile_systeme).type_cloture != 'S')
                   2110:            && (presence_compteur == d_faux))
                   2111:    {
                   2112:        (*s_etat_processus).erreur_execution = d_ex_erreur_traitement_boucle;
                   2113:        return;
                   2114:    }
                   2115: 
                   2116:    /*
                   2117:     * Pour une boucle avec indice, on fait pointer 
                   2118:     * (*(*s_etat_processus).l_base_pile_systeme).indice_boucle sur
                   2119:     * la variable correspondante. Remarque, le contenu de la variable
                   2120:     * est détruit au courant de l'opération.
                   2121:     */
                   2122: 
                   2123:    if (presence_compteur == d_vrai)
                   2124:    {
                   2125:        if (recherche_variable(s_etat_processus, (*(*s_etat_processus)
                   2126:                .l_base_pile_systeme).nom_variable) == d_faux)
                   2127:        {
                   2128:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   2129:            return;
                   2130:        }
                   2131: 
                   2132:        if (((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   2133:                .position_variable_courante]).variable_verrouillee == d_vrai)
                   2134:        {
                   2135:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   2136:            return;
                   2137:        }
                   2138: 
                   2139:        if (((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   2140:                .position_variable_courante]).objet == NULL)
                   2141:        {
                   2142:            (*s_etat_processus).erreur_execution = d_ex_variable_partagee;
                   2143:            return;
                   2144:        }
                   2145: 
                   2146:        (*(*s_etat_processus).l_base_pile_systeme).indice_boucle =
                   2147:                ((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   2148:                .position_variable_courante]).objet;
                   2149:    }
                   2150: 
                   2151:    /*
                   2152:     * Empilement pour calculer le nouvel indice. Au passage, la
                   2153:     * variable (*(*s_etat_processus).l_base_pile_systeme).indice_boucle
                   2154:     * est libérée.
                   2155:     */
                   2156: 
                   2157:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2158:            (*(*s_etat_processus).l_base_pile_systeme).indice_boucle)
                   2159:            == d_erreur)
                   2160:    {
                   2161:        return;
                   2162:    }
                   2163: 
                   2164:    if ((s_objet = allocation(s_etat_processus, INT)) == NULL)
                   2165:    {
                   2166:        (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2167:        return;
                   2168:    }
                   2169: 
                   2170:    (*((integer8 *) (*s_objet).objet)) = 1;
                   2171: 
                   2172:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2173:            s_objet) == d_erreur)
                   2174:    {
                   2175:        return;
                   2176:    }
                   2177: 
                   2178:    instruction_plus(s_etat_processus);
                   2179: 
                   2180:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2181:            &s_objet) == d_erreur)
                   2182:    {
                   2183:        liberation(s_etat_processus, s_objet);
                   2184: 
                   2185:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2186:        return;
                   2187:    }
                   2188: 
                   2189:    if (((*s_objet).type != INT) &&
                   2190:            ((*s_objet).type != REL))
                   2191:    {
                   2192:        liberation(s_etat_processus, s_objet);
                   2193: 
                   2194:        (*s_etat_processus).erreur_execution = d_ex_erreur_traitement_boucle;
                   2195:        return;
                   2196:    }
                   2197: 
                   2198:    if (presence_compteur == d_vrai)
                   2199:    {
                   2200:        /*
                   2201:         * L'addition crée si besoin une copie de l'objet
                   2202:         */
                   2203: 
                   2204:        (*(*s_etat_processus).l_base_pile_systeme).indice_boucle = NULL;
                   2205:        ((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   2206:                .position_variable_courante]).objet = s_objet;
                   2207:    }
                   2208:    else
                   2209:    {
                   2210:        (*(*s_etat_processus).l_base_pile_systeme).indice_boucle = s_objet;
                   2211:    }
                   2212: 
                   2213:    if ((s_copie_objet = copie_objet(s_etat_processus, s_objet, 'P')) == NULL)
                   2214:    {
                   2215:        (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2216:        return;
                   2217:    }
                   2218: 
                   2219:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2220:            s_copie_objet) == d_erreur)
                   2221:    {
                   2222:        return;
                   2223:    }
                   2224: 
                   2225:    if ((s_copie_objet = copie_objet(s_etat_processus,
                   2226:            (*(*s_etat_processus).l_base_pile_systeme)
                   2227:            .limite_indice_boucle, 'P')) == NULL)
                   2228:    {
                   2229:        (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2230:        return;
                   2231:    }
                   2232: 
                   2233:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2234:            s_copie_objet) == d_erreur)
                   2235:    {
                   2236:        return;
                   2237:    }
                   2238: 
                   2239:    instruction_le(s_etat_processus);
                   2240: 
                   2241:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2242:            &s_objet) == d_erreur)
                   2243:    {
                   2244:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2245:        return;
                   2246:    }
                   2247: 
                   2248:    if ((*s_objet).type != INT)
                   2249:    {
                   2250:        liberation(s_etat_processus, s_objet);
                   2251: 
                   2252:        (*s_etat_processus).erreur_execution = d_ex_erreur_traitement_boucle;
                   2253:        return;
                   2254:    }
                   2255: 
                   2256:    if ((*((integer8 *) (*s_objet).objet)) != 0)
                   2257:    {
                   2258:        if ((*(*s_etat_processus).l_base_pile_systeme)
                   2259:                .origine_routine_evaluation == 'N')
                   2260:        {
                   2261:            (*s_etat_processus).position_courante = (*(*s_etat_processus)
                   2262:                    .l_base_pile_systeme).adresse_retour;
                   2263:        }
                   2264:        else
                   2265:        {
                   2266:            (*s_etat_processus).expression_courante = (*(*s_etat_processus)
                   2267:                    .l_base_pile_systeme).pointeur_objet_retour;
                   2268:        }
                   2269:    }
                   2270:    else
                   2271:    {
                   2272:        depilement_pile_systeme(s_etat_processus);
                   2273: 
                   2274:        if ((*s_etat_processus).erreur_systeme != d_es)
                   2275:        {
                   2276:            return;
                   2277:        }
                   2278: 
                   2279:        if (presence_compteur == d_vrai)
                   2280:        {
                   2281:            (*s_etat_processus).niveau_courant--;
                   2282: 
                   2283:            if (retrait_variable_par_niveau(s_etat_processus) == d_erreur)
                   2284:            {
                   2285:                return;
                   2286:            }
                   2287:        }
                   2288:    }
                   2289: 
                   2290:    liberation(s_etat_processus, s_objet);
                   2291: 
                   2292:    return;
                   2293: }
                   2294: 
                   2295: 
                   2296: /*
                   2297: ================================================================================
                   2298:   Fonction 'nrand'
                   2299: ================================================================================
                   2300:   Entrées : structure processus
                   2301: -------------------------------------------------------------------------------
                   2302:   Sorties :
                   2303: --------------------------------------------------------------------------------
                   2304:   Effets de bord : néant
                   2305: ================================================================================
                   2306: */
                   2307: 
                   2308: void
                   2309: instruction_nrand(struct_processus *s_etat_processus)
                   2310: {
                   2311:    struct_objet                *s_objet;
                   2312: 
                   2313:    (*s_etat_processus).erreur_execution = d_ex;
                   2314: 
                   2315:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   2316:    {
                   2317:        printf("\n  NRAND ");
                   2318: 
                   2319:        if ((*s_etat_processus).langue == 'F')
                   2320:        {
                   2321:            printf("(valeur aléatoire gaussienne)\n\n");
                   2322:        }
                   2323:        else
                   2324:        {
                   2325:            printf("(normal random number)\n\n");
                   2326:        }
                   2327: 
                   2328:        printf("->  1: %s\n", d_REL);
                   2329: 
                   2330:        return;
                   2331:    }
                   2332:    else if ((*s_etat_processus).test_instruction == 'Y')
                   2333:    {
                   2334:        (*s_etat_processus).nombre_arguments = -1;
                   2335:        return;
                   2336:    }
                   2337: 
                   2338:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2339:    {
                   2340:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2341:        {
                   2342:            return;
                   2343:        }
                   2344:    }
                   2345: 
                   2346:    if ((*s_etat_processus).generateur_aleatoire == NULL)
                   2347:    {
                   2348:        initialisation_generateur_aleatoire(s_etat_processus, d_vrai, 0);
                   2349:    }
                   2350: 
                   2351:    if ((s_objet = allocation(s_etat_processus, REL)) == NULL)
                   2352:    {
                   2353:        (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2354:        return;
                   2355:    }
                   2356: 
                   2357:    (*((real8 *) (*s_objet).objet)) = gsl_ran_gaussian_ratio_method(
                   2358:            (*s_etat_processus).generateur_aleatoire, 1.0);
                   2359: 
                   2360:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2361:            s_objet) == d_erreur)
                   2362:    {
                   2363:        return;
                   2364:    }
                   2365: 
                   2366:    return;
                   2367: }
                   2368: 
                   2369: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>