Annotation of rpl/src/instructions_r5.c, revision 1.9

1.1       bertrand    1: /*
                      2: ================================================================================
1.9     ! bertrand    3:   RPL/2 (R) version 4.0.16
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 'rswp'
                     29: ================================================================================
                     30:   Entrées : pointeur sur une structure struct_processus
                     31: --------------------------------------------------------------------------------
                     32:   Sorties :
                     33: --------------------------------------------------------------------------------
                     34:   Effets de bord : néant
                     35: ================================================================================
                     36: */
                     37: 
                     38: void
                     39: instruction_rswp(struct_processus *s_etat_processus)
                     40: {
                     41:    struct_objet                *s_copie_argument_3;
                     42:    struct_objet                *s_objet_argument_1;
                     43:    struct_objet                *s_objet_argument_2;
                     44:    struct_objet                *s_objet_argument_3;
                     45: 
                     46:    signed long                 ligne_1;
                     47:    signed long                 ligne_2;
                     48: 
                     49:    void                        *tampon;
                     50: 
                     51:    (*s_etat_processus).erreur_execution = d_ex;
                     52: 
                     53:    if ((*s_etat_processus).affichage_arguments == 'Y')
                     54:    {
                     55:        printf("\n  RSWP ");
                     56: 
                     57:        if ((*s_etat_processus).langue == 'F')
                     58:        {
                     59:            printf("(échange de deux lignes d'une matrice)\n\n");
                     60:        }
                     61:        else
                     62:        {
                     63:            printf("(swap two rows of a matrix)\n\n");
                     64:        }
                     65: 
                     66:        printf("    3: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                     67:        printf("    2: %s\n", d_INT);
                     68:        printf("    1: %s\n", d_INT);
                     69:        printf("->  1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                     70: 
                     71:        return;
                     72:    }
                     73:    else if ((*s_etat_processus).test_instruction == 'Y')
                     74:    {
                     75:        (*s_etat_processus).nombre_arguments = -1;
                     76:        return;
                     77:    }
                     78: 
                     79:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                     80:    {
                     81:        if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
                     82:        {
                     83:            return;
                     84:        }
                     85:    }
                     86: 
                     87:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                     88:            &s_objet_argument_1) == d_erreur)
                     89:    {
                     90:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                     91:        return;
                     92:    }
                     93: 
                     94:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                     95:            &s_objet_argument_2) == d_erreur)
                     96:    {
                     97:        liberation(s_etat_processus, s_objet_argument_1);
                     98: 
                     99:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    100:        return;
                    101:    }
                    102: 
                    103:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    104:            &s_objet_argument_3) == d_erreur)
                    105:    {
                    106:        liberation(s_etat_processus, s_objet_argument_1);
                    107:        liberation(s_etat_processus, s_objet_argument_2);
                    108: 
                    109:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    110:        return;
                    111:    }
                    112: 
                    113:    if (((*s_objet_argument_1).type == INT) &&
                    114:            ((*s_objet_argument_2).type == INT))
                    115:    {
                    116:        if (((*s_objet_argument_3).type == MIN) ||
                    117:                ((*s_objet_argument_3).type == MRL) ||
                    118:                ((*s_objet_argument_3).type == MCX))
                    119:        {
                    120:            ligne_1 = (*((integer8 *) (*s_objet_argument_1).objet)) - 1;
                    121:            ligne_2 = (*((integer8 *) (*s_objet_argument_2).objet)) - 1;
                    122: 
                    123:            if ((ligne_1 < 0) || (ligne_1 >= (long) (*((struct_matrice *)
                    124:                    (*s_objet_argument_3).objet)).nombre_lignes) ||
                    125:                    (ligne_2 < 0) || (ligne_2 >= (long) (*((struct_matrice *)
                    126:                    (*s_objet_argument_3).objet)).nombre_lignes))
                    127:            {
                    128:                liberation(s_etat_processus, s_objet_argument_1);
                    129:                liberation(s_etat_processus, s_objet_argument_2);
                    130:                liberation(s_etat_processus, s_objet_argument_3);
                    131: 
                    132:                (*s_etat_processus).erreur_execution =
                    133:                        d_ex_dimensions_invalides;
                    134:                return;
                    135:            }
                    136: 
                    137:            if ((s_copie_argument_3 = copie_objet(s_etat_processus,
                    138:                    s_objet_argument_3, 'Q')) == NULL)
                    139:            {
                    140:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    141:                return;
                    142:            }
                    143: 
                    144:            liberation(s_etat_processus, s_objet_argument_3);
                    145:            s_objet_argument_3 = s_copie_argument_3;
                    146: 
                    147:            tampon = (*((struct_matrice *) (*s_objet_argument_3).objet))
                    148:                    .tableau[ligne_1];
                    149:            (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau[ligne_1]
                    150:                    = (*((struct_matrice *) (*s_objet_argument_3).objet))
                    151:                    .tableau[ligne_2];
                    152:            (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau[ligne_2]
                    153:                    = tampon;
                    154:        }
                    155:        else
                    156:        {
                    157:            liberation(s_etat_processus, s_objet_argument_1);
                    158:            liberation(s_etat_processus, s_objet_argument_2);
                    159:            liberation(s_etat_processus, s_objet_argument_3);
                    160: 
                    161:            (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    162:            return;
                    163:        }
                    164:    }
                    165:    else
                    166:    {
                    167:        liberation(s_etat_processus, s_objet_argument_1);
                    168:        liberation(s_etat_processus, s_objet_argument_2);
                    169:        liberation(s_etat_processus, s_objet_argument_3);
                    170: 
                    171:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    172:        return;
                    173:    }
                    174: 
                    175:    liberation(s_etat_processus, s_objet_argument_1);
                    176:    liberation(s_etat_processus, s_objet_argument_2);
                    177: 
                    178:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    179:            s_objet_argument_3) == d_erreur)
                    180:    {
                    181:        return;
                    182:    }
                    183: 
                    184:    return;
                    185: }
                    186: 
                    187: 
                    188: /*
                    189: ================================================================================
                    190:   Fonction 'row+'
                    191: ================================================================================
                    192:   Entrées :
                    193: --------------------------------------------------------------------------------
                    194:   Sorties :
                    195: --------------------------------------------------------------------------------
                    196:   Effets de bord : néant
                    197: ================================================================================
                    198: */
                    199: 
                    200: void
                    201: instruction_row_plus(struct_processus *s_etat_processus)
                    202: {
                    203:    integer8                        position;
                    204: 
                    205:    logical1                        matrice_vide;
                    206:    logical1                        presence_nom;
                    207:    logical1                        variable_partagee;
                    208: 
                    209:    struct_objet                    *s_copie_argument_1;
                    210:    struct_objet                    *s_copie_argument_3;
                    211:    struct_objet                    *s_objet_argument_1;
                    212:    struct_objet                    *s_objet_argument_2;
                    213:    struct_objet                    *s_objet_argument_3;
                    214: 
                    215:    unsigned long                   i;
                    216:    unsigned long                   j;
                    217: 
                    218:    void                            **tableau;
                    219:    void                            *tampon;
                    220: 
                    221:    (*s_etat_processus).erreur_execution = d_ex;
                    222: 
                    223:    if ((*s_etat_processus).affichage_arguments == 'Y')
                    224:    {
                    225:        printf("\n  ROW+ ");
                    226: 
                    227:        if ((*s_etat_processus).langue == 'F')
                    228:        {
                    229:            printf("(ajout d'une ligne dans une matrice)\n\n");
                    230:        }
                    231:        else
                    232:        {
                    233:            printf("(add a row in a matrix)\n\n");
                    234:        }
                    235: 
                    236:        printf("    3: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                    237:        printf("    2: %s\n", d_INT);
                    238:        printf("    1: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
                    239:        printf("->  1: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
                    240: 
                    241:        printf("    3: %s\n", d_NOM);
                    242:        printf("    2: %s\n", d_INT);
                    243:        printf("    1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                    244: 
                    245:        return;
                    246:    }
                    247:    else if ((*s_etat_processus).test_instruction == 'Y')
                    248:    {
                    249:        (*s_etat_processus).nombre_arguments = -1;
                    250:        return;
                    251:    }
                    252: 
                    253:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    254:    {
                    255:        if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
                    256:        {
                    257:            return;
                    258:        }
                    259:    }
                    260: 
                    261:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    262:            &s_objet_argument_1) == d_erreur)
                    263:    {
                    264:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    265:        return;
                    266:    }
                    267: 
                    268:    if ((s_copie_argument_1 = copie_objet(s_etat_processus, s_objet_argument_1,
                    269:            'O')) == NULL)
                    270:    {
                    271:        (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    272:        return;
                    273:    }
                    274: 
                    275:    liberation(s_etat_processus, s_objet_argument_1);
                    276:    s_objet_argument_1 = s_copie_argument_1;
                    277: 
                    278:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    279:            &s_objet_argument_2) == d_erreur)
                    280:    {
                    281:        liberation(s_etat_processus, s_objet_argument_1);
                    282: 
                    283:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    284:        return;
                    285:    }
                    286: 
                    287:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    288:            &s_objet_argument_3) == d_erreur)
                    289:    {
                    290:        liberation(s_etat_processus, s_objet_argument_1);
                    291:        liberation(s_etat_processus, s_objet_argument_2);
                    292: 
                    293:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    294:        return;
                    295:    }
                    296: 
                    297:    if (((*s_objet_argument_1).type != MIN) &&
                    298:            ((*s_objet_argument_1).type != MRL) &&
                    299:            ((*s_objet_argument_1).type != MCX))
                    300:    {
                    301:        liberation(s_etat_processus, s_objet_argument_1);
                    302:        liberation(s_etat_processus, s_objet_argument_2);
                    303:        liberation(s_etat_processus, s_objet_argument_3);
                    304: 
                    305:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    306:        return;
                    307:    }
                    308: 
                    309:    if ((*((struct_matrice *) (*s_objet_argument_1).objet)).nombre_lignes
                    310:            != 1)
                    311:    {
                    312:        liberation(s_etat_processus, s_objet_argument_1);
                    313:        liberation(s_etat_processus, s_objet_argument_2);
                    314:        liberation(s_etat_processus, s_objet_argument_3);
                    315: 
                    316:        (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
                    317:        return;
                    318:    }
                    319: 
                    320:    if ((*s_objet_argument_2).type != INT)
                    321:    {
                    322:        liberation(s_etat_processus, s_objet_argument_1);
                    323:        liberation(s_etat_processus, s_objet_argument_2);
                    324:        liberation(s_etat_processus, s_objet_argument_3);
                    325: 
                    326:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    327:        return;
                    328:    }
                    329: 
                    330:    variable_partagee = d_faux;
                    331: 
                    332:    if ((*s_objet_argument_3).type == NOM)
                    333:    {
                    334:        presence_nom = d_vrai;
                    335: 
                    336:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                    337:                (*s_objet_argument_3).objet)).nom) == d_faux)
                    338:        {
                    339:            (*s_etat_processus).erreur_systeme = d_es;
                    340:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                    341: 
                    342:            liberation(s_etat_processus, s_objet_argument_1);
                    343:            liberation(s_etat_processus, s_objet_argument_2);
                    344:            liberation(s_etat_processus, s_objet_argument_3);
                    345: 
                    346:            return;
                    347:        }
                    348: 
                    349:        liberation(s_etat_processus, s_objet_argument_3);
                    350: 
                    351:        if ((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                    352:                .position_variable_courante].variable_verrouillee == d_vrai)
                    353:        {
                    354:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                    355: 
                    356:            liberation(s_etat_processus, s_objet_argument_1);
                    357:            liberation(s_etat_processus, s_objet_argument_2);
                    358: 
                    359:            return;
                    360:        }
                    361: 
                    362:        s_objet_argument_3 = (*s_etat_processus).s_liste_variables
                    363:                [(*s_etat_processus).position_variable_courante].objet;
                    364: 
                    365:        if (s_objet_argument_3 == NULL)
                    366:        {
                    367:            if (pthread_mutex_lock(&((*(*s_etat_processus)
                    368:                    .s_liste_variables_partagees).mutex)) != 0)
                    369:            {
                    370:                (*s_etat_processus).erreur_systeme = d_es_processus;
                    371:                return;
                    372:            }
                    373: 
                    374:            if (recherche_variable_partagee(s_etat_processus,
                    375:                    (*s_etat_processus).s_liste_variables
                    376:                    [(*s_etat_processus).position_variable_courante].nom,
                    377:                    (*s_etat_processus).s_liste_variables
                    378:                    [(*s_etat_processus).position_variable_courante]
                    379:                    .variable_partagee, (*s_etat_processus).s_liste_variables
                    380:                    [(*s_etat_processus).position_variable_courante].origine)
                    381:                    == d_faux)
                    382:            {
                    383:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    384:                        .s_liste_variables_partagees).mutex)) != 0)
                    385:                {
                    386:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    387:                    return;
                    388:                }
                    389: 
                    390:                (*s_etat_processus).erreur_systeme = d_es;
                    391:                (*s_etat_processus).erreur_execution =
                    392:                        d_ex_variable_non_definie;
                    393: 
                    394:                liberation(s_etat_processus, s_objet_argument_1);
                    395:                liberation(s_etat_processus, s_objet_argument_2);
                    396: 
                    397:                return;
                    398:            }
                    399: 
                    400:            s_objet_argument_3 = (*(*s_etat_processus)
                    401:                    .s_liste_variables_partagees).table
                    402:                    [(*(*s_etat_processus).s_liste_variables_partagees)
                    403:                    .position_variable].objet;
                    404:            variable_partagee = d_vrai;
                    405:        }
                    406: 
                    407:        if ((s_copie_argument_3 = copie_objet(s_etat_processus,
                    408:                s_objet_argument_3, 'Q')) == NULL)
                    409:        {
                    410:            if (variable_partagee == d_vrai)
                    411:            {
                    412:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    413:                        .s_liste_variables_partagees).mutex)) != 0)
                    414:                {
                    415:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    416:                    return;
                    417:                }
                    418:            }
                    419: 
                    420:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    421:            return;
                    422:        }
                    423: 
                    424:        liberation(s_etat_processus, s_objet_argument_3);
                    425:        s_objet_argument_3 = s_copie_argument_3;
                    426: 
                    427:        (*s_etat_processus).s_liste_variables[(*s_etat_processus)
                    428:                .position_variable_courante].objet = s_objet_argument_3;
                    429:    }
                    430:    else
                    431:    {
                    432:        presence_nom = d_faux;
                    433: 
                    434:        if ((s_copie_argument_3 = copie_objet(s_etat_processus,
                    435:                s_objet_argument_3, 'Q')) == NULL)
                    436:        {
                    437:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    438:            return;
                    439:        }
                    440: 
                    441:        liberation(s_etat_processus, s_objet_argument_3);
                    442:        s_objet_argument_3 = s_copie_argument_3;
                    443:    }
                    444: 
                    445:    if (((*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_colonnes
                    446:            == 0) && ((*((struct_matrice *) (*s_objet_argument_3).objet))
                    447:            .nombre_lignes == 1))
                    448:    {
                    449:        matrice_vide = d_vrai;
                    450:    }
                    451:    else
                    452:    {
                    453:        matrice_vide = d_faux;
                    454: 
                    455:        if ((*((struct_matrice *) (*s_objet_argument_1).objet)).nombre_colonnes
                    456:                != (*((struct_matrice *) (*s_objet_argument_3).objet))
                    457:                .nombre_colonnes)
                    458:        {
                    459:            if (variable_partagee == d_vrai)
                    460:            {
                    461:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    462:                        .s_liste_variables_partagees).mutex)) != 0)
                    463:                {
                    464:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    465:                    return;
                    466:                }
                    467:            }
                    468: 
                    469:            liberation(s_etat_processus, s_objet_argument_1);
                    470:            liberation(s_etat_processus, s_objet_argument_2);
                    471: 
                    472:            if (presence_nom == d_faux)
                    473:            {
                    474:                liberation(s_etat_processus, s_objet_argument_3);
                    475:            }
                    476: 
                    477:            (*s_etat_processus).erreur_execution = d_ex_dimensions_invalides;
                    478:            return;
                    479:        }
                    480:    }
                    481: 
                    482:    if ((*s_objet_argument_1).type == MRL)
                    483:    {
                    484:        if ((*s_objet_argument_3).type == MIN)
                    485:        {
                    486:            // Conversion de la matrice entière en matrice réelle
                    487: 
                    488:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_3).objet))
                    489:                    .nombre_lignes; i++)
                    490:            {
                    491:                tampon = (*((struct_matrice *) (*s_objet_argument_3).objet))
                    492:                        .tableau[i];
                    493: 
                    494:                if (((*((struct_matrice *) (*s_objet_argument_3).objet))
                    495:                        .tableau[i] = malloc((*((struct_matrice *)
                    496:                        (*s_objet_argument_3).objet)).nombre_colonnes *
                    497:                        sizeof(real8))) == NULL)
                    498:                {
                    499:                    if (variable_partagee == d_vrai)
                    500:                    {
                    501:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    502:                                .s_liste_variables_partagees).mutex)) != 0)
                    503:                        {
                    504:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    505:                            return;
                    506:                        }
                    507:                    }
                    508: 
                    509:                    (*s_etat_processus).erreur_systeme =
                    510:                            d_es_allocation_memoire;
                    511:                    return;
                    512:                }
                    513: 
                    514:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_3)
                    515:                        .objet)).nombre_colonnes; j++)
                    516:                {
                    517:                    ((real8 **) (*((struct_matrice *) (*s_objet_argument_3)
                    518:                            .objet)).tableau)[i][j] = (real8) (((integer8 *)
                    519:                            tampon)[j]);
                    520:                }
                    521: 
                    522:                free(tampon);
                    523:            }
                    524: 
                    525:            (*((struct_matrice *) (*s_objet_argument_3).objet)).type = 'R';
                    526:            (*s_objet_argument_3).type = MRL;
                    527:        }
                    528:    }
                    529:    else if ((*s_objet_argument_1).type == MCX)
                    530:    {
                    531:        if ((*s_objet_argument_3).type == MIN)
                    532:        {
                    533:            // Conversion de la matrice entière en matrice complexe
                    534: 
                    535:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_3).objet))
                    536:                    .nombre_lignes; i++)
                    537:            {
                    538:                tampon = (*((struct_matrice *) (*s_objet_argument_3).objet))
                    539:                        .tableau[i];
                    540: 
                    541:                if (((*((struct_matrice *) (*s_objet_argument_3).objet))
                    542:                        .tableau[i] = malloc((*((struct_matrice *)
                    543:                        (*s_objet_argument_3).objet)).nombre_colonnes *
                    544:                        sizeof(complex16))) == NULL)
                    545:                {
                    546:                    if (variable_partagee == d_vrai)
                    547:                    {
                    548:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    549:                                .s_liste_variables_partagees).mutex)) != 0)
                    550:                        {
                    551:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    552:                            return;
                    553:                        }
                    554:                    }
                    555: 
                    556:                    (*s_etat_processus).erreur_systeme =
                    557:                            d_es_allocation_memoire;
                    558:                    return;
                    559:                }
                    560: 
                    561:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_3)
                    562:                        .objet)).nombre_colonnes; j++)
                    563:                {
                    564:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_3)
                    565:                            .objet)).tableau)[i][j].partie_reelle =
                    566:                            (real8) (((integer8 *) tampon)[j]);
                    567:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_3)
                    568:                            .objet)).tableau)[i][j].partie_imaginaire = 0;
                    569:                }
                    570: 
                    571:                free(tampon);
                    572:            }
                    573: 
                    574:            (*((struct_matrice *) (*s_objet_argument_3).objet)).type = 'C';
                    575:            (*s_objet_argument_3).type = MCX;
                    576:        }
                    577:        else if ((*s_objet_argument_3).type == MRL)
                    578:        {
                    579:            // Conversion de la matrice réelle en matrice complexe
                    580: 
                    581:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_3).objet))
                    582:                    .nombre_lignes; i++)
                    583:            {
                    584:                tampon = (*((struct_matrice *) (*s_objet_argument_3).objet))
                    585:                        .tableau[i];
                    586: 
                    587:                if (((*((struct_matrice *) (*s_objet_argument_3).objet))
                    588:                        .tableau[i] = malloc((*((struct_matrice *)
                    589:                        (*s_objet_argument_3).objet)).nombre_colonnes *
                    590:                        sizeof(complex16))) == NULL)
                    591:                {
                    592:                    if (variable_partagee == d_vrai)
                    593:                    {
                    594:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    595:                                .s_liste_variables_partagees).mutex)) != 0)
                    596:                        {
                    597:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    598:                            return;
                    599:                        }
                    600:                    }
                    601: 
                    602:                    (*s_etat_processus).erreur_systeme =
                    603:                            d_es_allocation_memoire;
                    604:                    return;
                    605:                }
                    606: 
                    607:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_3)
                    608:                        .objet)).nombre_colonnes; j++)
                    609:                {
                    610:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_3)
                    611:                            .objet)).tableau)[i][j].partie_reelle =
                    612:                            ((real8 *) tampon)[j];
                    613:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_3)
                    614:                            .objet)).tableau)[i][j].partie_imaginaire = 0;
                    615:                }
                    616: 
                    617:                free(tampon);
                    618:            }
                    619: 
                    620:            (*((struct_matrice *) (*s_objet_argument_3).objet)).type = 'C';
                    621:            (*s_objet_argument_3).type = MCX;
                    622:        }
                    623:    }   
                    624: 
                    625:    if ((*s_objet_argument_3).type == MRL)
                    626:    {
                    627:        if ((*s_objet_argument_1).type == MIN)
                    628:        {
                    629:            // Conversion de la matrice entière en matrice réelle
                    630: 
                    631:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                    632:                    .nombre_lignes; i++)
                    633:            {
                    634:                tampon = (*((struct_matrice *) (*s_objet_argument_1).objet))
                    635:                        .tableau[i];
                    636: 
                    637:                if (((*((struct_matrice *) (*s_objet_argument_1).objet))
                    638:                        .tableau[i] = malloc((*((struct_matrice *)
                    639:                        (*s_objet_argument_1).objet)).nombre_colonnes *
                    640:                        sizeof(real8))) == NULL)
                    641:                {
                    642:                    if (variable_partagee == d_vrai)
                    643:                    {
                    644:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    645:                                .s_liste_variables_partagees).mutex)) != 0)
                    646:                        {
                    647:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    648:                            return;
                    649:                        }
                    650:                    }
                    651: 
                    652:                    (*s_etat_processus).erreur_systeme =
                    653:                            d_es_allocation_memoire;
                    654:                    return;
                    655:                }
                    656: 
                    657:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_1)
                    658:                        .objet)).nombre_colonnes; j++)
                    659:                {
                    660:                    ((real8 **) (*((struct_matrice *) (*s_objet_argument_1)
                    661:                            .objet)).tableau)[i][j] = (real8) (((integer8 *)
                    662:                            tampon)[j]);
                    663:                }
                    664: 
                    665:                free(tampon);
                    666:            }
                    667: 
                    668:            (*((struct_matrice *) (*s_objet_argument_1).objet)).type = 'R';
                    669:            (*s_objet_argument_1).type = MRL;
                    670:        }
                    671:    }
                    672:    else if ((*s_objet_argument_3).type == MCX)
                    673:    {
                    674:        if ((*s_objet_argument_1).type == MIN)
                    675:        {
                    676:            // Conversion de la matrice entière en matrice complexe
                    677: 
                    678:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                    679:                    .nombre_lignes; i++)
                    680:            {
                    681:                tampon = (*((struct_matrice *) (*s_objet_argument_1).objet))
                    682:                        .tableau[i];
                    683: 
                    684:                if (((*((struct_matrice *) (*s_objet_argument_1).objet))
                    685:                        .tableau[i] = malloc((*((struct_matrice *)
                    686:                        (*s_objet_argument_1).objet)).nombre_colonnes *
                    687:                        sizeof(complex16))) == NULL)
                    688:                {
                    689:                    if (variable_partagee == d_vrai)
                    690:                    {
                    691:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    692:                                .s_liste_variables_partagees).mutex)) != 0)
                    693:                        {
                    694:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    695:                            return;
                    696:                        }
                    697:                    }
                    698: 
                    699:                    (*s_etat_processus).erreur_systeme =
                    700:                            d_es_allocation_memoire;
                    701:                    return;
                    702:                }
                    703: 
                    704:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_1)
                    705:                        .objet)).nombre_colonnes; j++)
                    706:                {
                    707:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_1)
                    708:                            .objet)).tableau)[i][j].partie_reelle =
                    709:                            (real8) (((integer8 *) tampon)[j]);
                    710:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_1)
                    711:                            .objet)).tableau)[i][j].partie_imaginaire = 0;
                    712:                }
                    713: 
                    714:                free(tampon);
                    715:            }
                    716: 
                    717:            (*((struct_matrice *) (*s_objet_argument_1).objet)).type = 'C';
                    718:            (*s_objet_argument_1).type = MCX;
                    719:        }
                    720:        else if ((*s_objet_argument_1).type == MRL)
                    721:        {
                    722:            // Conversion de la matrice réelle en matrice complexe
                    723: 
                    724:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_1).objet))
                    725:                    .nombre_lignes; i++)
                    726:            {
                    727:                tampon = (*((struct_matrice *) (*s_objet_argument_1).objet))
                    728:                        .tableau[i];
                    729: 
                    730:                if (((*((struct_matrice *) (*s_objet_argument_1).objet))
                    731:                        .tableau[i] = malloc((*((struct_matrice *)
                    732:                        (*s_objet_argument_1).objet)).nombre_colonnes *
                    733:                        sizeof(complex16))) == NULL)
                    734:                {
                    735:                    if (variable_partagee == d_vrai)
                    736:                    {
                    737:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    738:                                .s_liste_variables_partagees).mutex)) != 0)
                    739:                        {
                    740:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                    741:                            return;
                    742:                        }
                    743:                    }
                    744: 
                    745:                    (*s_etat_processus).erreur_systeme =
                    746:                            d_es_allocation_memoire;
                    747:                    return;
                    748:                }
                    749: 
                    750:                for(j = 0; j < (*((struct_matrice *) (*s_objet_argument_1)
                    751:                        .objet)).nombre_colonnes; j++)
                    752:                {
                    753:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_1)
                    754:                            .objet)).tableau)[i][j].partie_reelle =
                    755:                            ((real8 *) tampon)[j];
                    756:                    ((complex16 **) (*((struct_matrice *) (*s_objet_argument_1)
                    757:                            .objet)).tableau)[i][j].partie_imaginaire = 0;
                    758:                }
                    759: 
                    760:                free(tampon);
                    761:            }
                    762: 
                    763:            (*((struct_matrice *) (*s_objet_argument_1).objet)).type = 'C';
                    764:            (*s_objet_argument_1).type = MCX;
                    765:        }
                    766:    }
                    767: 
                    768:    position = (*((integer8 *) (*s_objet_argument_2).objet));
                    769: 
                    770:    if (((position < 1) || (position > (integer8) ((*((struct_matrice *)
                    771:            (*s_objet_argument_3).objet)).nombre_lignes + 1))) ||
                    772:            ((position != 1) && (matrice_vide == d_vrai)))
                    773:    {
                    774:        if (variable_partagee == d_vrai)
                    775:        {
                    776:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    777:                    .s_liste_variables_partagees).mutex)) != 0)
                    778:            {
                    779:                (*s_etat_processus).erreur_systeme = d_es_processus;
                    780:                return;
                    781:            }
                    782:        }
                    783: 
                    784:        liberation(s_etat_processus, s_objet_argument_1);
                    785:        liberation(s_etat_processus, s_objet_argument_2);
                    786: 
                    787:        if (presence_nom == d_faux)
                    788:        {
                    789:            liberation(s_etat_processus, s_objet_argument_3);
                    790:        }
                    791: 
                    792:        (*s_etat_processus).erreur_execution =
                    793:                d_ex_argument_invalide;
                    794:        return;
                    795:    }
                    796: 
                    797:    tableau = (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau;
                    798: 
                    799:    if (matrice_vide == d_faux)
                    800:    {
                    801:        if (((*((struct_matrice *) (*s_objet_argument_3).objet)).tableau
                    802:                = malloc(((*((struct_matrice *) (*s_objet_argument_3).objet))
                    803:                .nombre_lignes + 1) * sizeof(void *))) == NULL)
                    804:        {
                    805:            if (variable_partagee == d_vrai)
                    806:            {
                    807:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    808:                        .s_liste_variables_partagees).mutex)) != 0)
                    809:                {
                    810:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    811:                    return;
                    812:                }
                    813:            }
                    814: 
                    815:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    816:            return;
                    817:        }
                    818: 
1.8       bertrand  819:        if (position != ((integer8) (*((struct_matrice *)
                    820:                (*s_objet_argument_3).objet)).nombre_lignes + 1))
1.1       bertrand  821:        {
                    822:            for(j = i = 0; i < (*((struct_matrice *)
                    823:                    (*s_objet_argument_3).objet)).nombre_lignes; i++)
                    824:            {
                    825:                if (i == (unsigned long) (position - 1))
                    826:                {
                    827:                    (*((struct_matrice *) (*s_objet_argument_3).objet))
                    828:                            .tableau[i] = (*((struct_matrice *)
                    829:                            (*s_objet_argument_1).objet)).tableau[0];
                    830:                    j = 1;
                    831:                }
                    832: 
                    833:                (*((struct_matrice *) (*s_objet_argument_3).objet))
                    834:                        .tableau[i + j] = tableau[i];
                    835:            }
                    836:        }
                    837:        else
                    838:        {
                    839:            for(i = 0; i < (*((struct_matrice *) (*s_objet_argument_3).objet))
                    840:                    .nombre_lignes; i++)
                    841:            {
                    842:                (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau[i]
                    843:                        = tableau[i];
                    844:            }
                    845: 
                    846:            (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau
                    847:                    [(*((struct_matrice *) (*s_objet_argument_3).objet))
                    848:                    .nombre_lignes] = (*((struct_matrice *)
                    849:                    (*s_objet_argument_1).objet)).tableau[0];
                    850:        }
                    851: 
                    852:        (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_lignes++;
                    853:    }
                    854:    else
                    855:    {
                    856:        if (((*((struct_matrice *) (*s_objet_argument_3).objet)).tableau
                    857:                = malloc(sizeof(void *))) == NULL)
                    858:        {
                    859:            if (variable_partagee == d_vrai)
                    860:            {
                    861:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    862:                        .s_liste_variables_partagees).mutex)) != 0)
                    863:                {
                    864:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    865:                    return;
                    866:                }
                    867:            }
                    868: 
                    869:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    870:            return;
                    871:        }
                    872: 
                    873:        (*((struct_matrice *) (*s_objet_argument_3).objet)).tableau[0] =
                    874:                (*((struct_matrice *) (*s_objet_argument_1).objet)).tableau[0];
                    875:        (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_lignes =
                    876:                (*((struct_matrice *) (*s_objet_argument_1).objet))
                    877:                .nombre_lignes;
                    878:        (*((struct_matrice *) (*s_objet_argument_3).objet)).nombre_colonnes =
                    879:                (*((struct_matrice *) (*s_objet_argument_1).objet))
                    880:                .nombre_colonnes;
                    881:    }
                    882: 
                    883:    free(tableau);
                    884: 
                    885:    if (presence_nom == d_faux)
                    886:    {
                    887:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    888:                s_objet_argument_3) == d_erreur)
                    889:        {
                    890:            return;
                    891:        }
                    892:    }
                    893:    else
                    894:    {
                    895:        if (variable_partagee == d_vrai)
                    896:        {
                    897:            (*(*s_etat_processus).s_liste_variables_partagees).table
                    898:                    [(*(*s_etat_processus).s_liste_variables_partagees)
                    899:                    .position_variable].objet = s_objet_argument_3;
                    900: 
                    901:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
                    902:                    .s_liste_variables_partagees).mutex)) != 0)
                    903:            {
                    904:                (*s_etat_processus).erreur_systeme = d_es_processus;
                    905:                return;
                    906:            }
                    907:        }
                    908:    }
                    909: 
                    910:    free((*((struct_matrice *) (*s_objet_argument_1).objet)).tableau);
                    911:    free((*s_objet_argument_1).objet);
                    912:    free(s_objet_argument_1);
                    913: 
                    914:    liberation(s_etat_processus, s_objet_argument_2);
                    915: 
                    916:    return;
                    917: }
                    918: 
                    919: 
                    920: /*
                    921: ================================================================================
                    922:   Fonction 'row-'
                    923: ================================================================================
                    924:   Entrées : pointeur sur une structure struct_processus
                    925: --------------------------------------------------------------------------------
                    926:   Sorties :
                    927: --------------------------------------------------------------------------------
                    928:   Effets de bord : néant
                    929: ================================================================================
                    930: */
                    931: 
                    932: void
                    933: instruction_row_moins(struct_processus *s_etat_processus)
                    934: {
                    935:    integer8                    position;
                    936: 
                    937:    logical1                    presence_variable;
                    938:    logical1                    variable_partagee;
                    939: 
                    940:    struct_objet                *s_copie_argument_2;
                    941:    struct_objet                *s_objet_argument_1;
                    942:    struct_objet                *s_objet_argument_2;
                    943:    struct_objet                *s_objet_resultat;
                    944: 
                    945:    unsigned long               i;
                    946:    unsigned long               j;
                    947:    unsigned long               colonne;
                    948: 
                    949:    void                        **tableau;
                    950: 
                    951:    (*s_etat_processus).erreur_execution = d_ex;
                    952: 
                    953:    if ((*s_etat_processus).affichage_arguments == 'Y')
                    954:    {
                    955:        printf("\n  ROW- ");
                    956: 
                    957:        if ((*s_etat_processus).langue == 'F')
                    958:        {
                    959:            printf("(retrait d'une ligne dans une matrice)\n\n");
                    960:        }
                    961:        else
                    962:        {
                    963:            printf("(remove a row from a matrix)\n\n");
                    964:        }
                    965: 
                    966:        printf("    2: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                    967:        printf("    1: %s\n", d_INT);
                    968:        printf("->  2: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
                    969:        printf("    1: %s, %s, %s\n\n", d_MIN, d_MRL, d_MCX);
                    970: 
                    971:        printf("    2: %s\n", d_NOM);
                    972:        printf("    1: %s\n", d_INT);
                    973:        printf("->  1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                    974: 
                    975:        return;
                    976:    }
                    977:    else if ((*s_etat_processus).test_instruction == 'Y')
                    978:    {
                    979:        (*s_etat_processus).nombre_arguments = -1;
                    980:        return;
                    981:    }
                    982: 
                    983:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    984:    {
                    985:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                    986:        {
                    987:            return;
                    988:        }
                    989:    }
                    990: 
                    991:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    992:            &s_objet_argument_1) == d_erreur)
                    993:    {
                    994:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    995:        return;
                    996:    }
                    997: 
                    998:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    999:            &s_objet_argument_2) == d_erreur)
                   1000:    {
                   1001:        liberation(s_etat_processus, s_objet_argument_1);
                   1002: 
                   1003:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1004:        return;
                   1005:    }
                   1006: 
                   1007:    variable_partagee = d_faux;
                   1008: 
                   1009:    if ((*s_objet_argument_2).type == NOM)
                   1010:    {
                   1011:        presence_variable = d_vrai;
                   1012: 
                   1013:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   1014:                (*s_objet_argument_2).objet)).nom) == d_faux)
                   1015:        {
                   1016:            liberation(s_etat_processus, s_objet_argument_1);
                   1017:            liberation(s_etat_processus, s_objet_argument_2);
                   1018: 
                   1019:            (*s_etat_processus).erreur_systeme = d_es;
                   1020:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   1021: 
                   1022:            return;
                   1023:        }
                   1024: 
                   1025:        liberation(s_etat_processus, s_objet_argument_2);
                   1026: 
                   1027:        if ((*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   1028:                .position_variable_courante].variable_verrouillee == d_vrai)
                   1029:        {
                   1030:            liberation(s_etat_processus, s_objet_argument_1);
                   1031: 
                   1032:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   1033:            return;
                   1034:        }
                   1035: 
                   1036:        s_objet_argument_2 = (*s_etat_processus).s_liste_variables
                   1037:                [(*s_etat_processus).position_variable_courante].objet;
                   1038: 
                   1039:        if (s_objet_argument_2 == NULL)
                   1040:        {
                   1041:            if (pthread_mutex_lock(&((*(*s_etat_processus)
                   1042:                    .s_liste_variables_partagees).mutex)) != 0)
                   1043:            {
                   1044:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   1045:                return;
                   1046:            }
                   1047: 
                   1048:            if (recherche_variable_partagee(s_etat_processus,
                   1049:                    (*s_etat_processus).s_liste_variables
                   1050:                    [(*s_etat_processus).position_variable_courante].nom,
                   1051:                    (*s_etat_processus).s_liste_variables
                   1052:                    [(*s_etat_processus).position_variable_courante]
                   1053:                    .variable_partagee, (*s_etat_processus).s_liste_variables
                   1054:                    [(*s_etat_processus).position_variable_courante].origine)
                   1055:                    == d_faux)
                   1056:            {
                   1057:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1058:                        .s_liste_variables_partagees).mutex)) != 0)
                   1059:                {
                   1060:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1061:                    return;
                   1062:                }
                   1063: 
                   1064:                (*s_etat_processus).erreur_systeme = d_es;
                   1065:                (*s_etat_processus).erreur_execution =
                   1066:                        d_ex_variable_non_definie;
                   1067: 
                   1068:                liberation(s_etat_processus, s_objet_argument_1);
                   1069: 
                   1070:                return;
                   1071:            }
                   1072: 
                   1073:            s_objet_argument_2 = (*(*s_etat_processus)
                   1074:                    .s_liste_variables_partagees).table
                   1075:                    [(*(*s_etat_processus).s_liste_variables_partagees)
                   1076:                    .position_variable].objet;
                   1077:            variable_partagee = d_vrai;
                   1078:        }
                   1079: 
                   1080:        if ((s_copie_argument_2 = copie_objet(s_etat_processus,
                   1081:                s_objet_argument_2, 'Q')) == NULL)
                   1082:        {
                   1083:            if (variable_partagee == d_vrai)
                   1084:            {
                   1085:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1086:                        .s_liste_variables_partagees).mutex)) != 0)
                   1087:                {
                   1088:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1089:                    return;
                   1090:                }
                   1091:            }
                   1092: 
                   1093:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1094:            return;
                   1095:        }
                   1096: 
                   1097:        liberation(s_etat_processus, s_objet_argument_2);
                   1098:        s_objet_argument_2 = s_copie_argument_2;
                   1099: 
                   1100:        (*s_etat_processus).s_liste_variables[(*s_etat_processus)
                   1101:                .position_variable_courante].objet = s_objet_argument_2;
                   1102:    }
                   1103:    else
                   1104:    {
                   1105:        presence_variable = d_faux;
                   1106: 
                   1107:        if ((s_copie_argument_2 = copie_objet(s_etat_processus,
                   1108:                s_objet_argument_2, 'Q')) == NULL)
                   1109:        {
                   1110:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1111:            return;
                   1112:        }
                   1113: 
                   1114:        liberation(s_etat_processus, s_objet_argument_2);
                   1115:        s_objet_argument_2 = s_copie_argument_2;
                   1116:    }
                   1117: 
                   1118:    if (((*s_objet_argument_2).type == MIN) ||
                   1119:            ((*s_objet_argument_2).type == MRL) ||
                   1120:            ((*s_objet_argument_2).type == MCX))
                   1121:    {
                   1122:        if ((*s_objet_argument_1).type == INT)
                   1123:        {
                   1124:            position = (*((integer8 *) (*s_objet_argument_1).objet));
                   1125: 
                   1126:            if ((position <= 0) || (position > (integer8) (*((struct_matrice *)
                   1127:                    (*s_objet_argument_2).objet)).nombre_lignes))
                   1128:            {
                   1129:                if (variable_partagee == d_vrai)
                   1130:                {
                   1131:                    if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1132:                            .s_liste_variables_partagees).mutex)) != 0)
                   1133:                    {
                   1134:                        (*s_etat_processus).erreur_systeme = d_es_processus;
                   1135:                        return;
                   1136:                    }
                   1137:                }
                   1138: 
                   1139:                liberation(s_etat_processus, s_objet_argument_1);
                   1140: 
                   1141:                if (presence_variable == d_faux)
                   1142:                {
                   1143:                    liberation(s_etat_processus, s_objet_argument_2);
                   1144:                }
                   1145: 
                   1146:                (*s_etat_processus).erreur_execution =
                   1147:                        d_ex_argument_invalide;
                   1148:                return;
                   1149:            }
                   1150: 
                   1151:            if ((s_objet_resultat = allocation(s_etat_processus,
                   1152:                    (*s_objet_argument_2).type)) == NULL)
                   1153:            {
                   1154:                if (variable_partagee == d_vrai)
                   1155:                {
                   1156:                    if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1157:                            .s_liste_variables_partagees).mutex)) != 0)
                   1158:                    {
                   1159:                        (*s_etat_processus).erreur_systeme = d_es_processus;
                   1160:                        return;
                   1161:                    }
                   1162:                }
                   1163: 
                   1164:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1165:                return;
                   1166:            }
                   1167: 
                   1168:            (*((struct_matrice *) (*s_objet_resultat).objet)).nombre_lignes =
                   1169:                    1;
                   1170:            (*((struct_matrice *) (*s_objet_resultat).objet)).nombre_colonnes =
                   1171:                    (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1172:                    .nombre_colonnes;
                   1173: 
                   1174:            if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau =
                   1175:                    malloc(sizeof(void *))) == NULL)
                   1176:            {
                   1177:                if (variable_partagee == d_vrai)
                   1178:                {
                   1179:                    if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1180:                            .s_liste_variables_partagees).mutex)) != 0)
                   1181:                    {
                   1182:                        (*s_etat_processus).erreur_systeme = d_es_processus;
                   1183:                        return;
                   1184:                    }
                   1185:                }
                   1186: 
                   1187:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1188:                return;
                   1189:            }
                   1190: 
                   1191:            (*((struct_matrice *) (*s_objet_resultat).objet)).tableau[0] =
                   1192:                    (*((struct_matrice *) (*s_objet_argument_2).objet)).tableau
                   1193:                    [colonne = position - 1];
                   1194: 
                   1195:            if ((*((struct_matrice *) (*s_objet_argument_2).objet))
                   1196:                    .nombre_lignes > 1)
                   1197:            {
                   1198:                tableau = (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1199:                        .tableau;
                   1200: 
                   1201:                if (((*((struct_matrice *) (*s_objet_argument_2).objet)).tableau
                   1202:                        = malloc(((*((struct_matrice *) (*s_objet_argument_2)
                   1203:                        .objet)).nombre_lignes - 1) * sizeof(void *))) == NULL)
                   1204:                {
                   1205:                    if (variable_partagee == d_vrai)
                   1206:                    {
                   1207:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1208:                                .s_liste_variables_partagees).mutex)) != 0)
                   1209:                        {
                   1210:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                   1211:                            return;
                   1212:                        }
                   1213:                    }
                   1214: 
                   1215:                    (*s_etat_processus).erreur_systeme =
                   1216:                            d_es_allocation_memoire;
                   1217:                    return;
                   1218:                }
                   1219: 
                   1220:                (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1221:                        .nombre_lignes--;
                   1222: 
                   1223:                for(i = j = 0; i < (*((struct_matrice *) (*s_objet_argument_2)
                   1224:                        .objet)).nombre_lignes; i++)
                   1225:                {
                   1226:                    if (i == colonne)
                   1227:                    {
                   1228:                        j = 1;
                   1229:                    }
                   1230: 
                   1231:                    (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1232:                            .tableau[i] = tableau[i + j];
                   1233:                }
                   1234: 
                   1235:                free(tableau);
                   1236:            }
                   1237:            else
                   1238:            {
                   1239:                if (((*((struct_matrice *) (*s_objet_argument_2).objet))
                   1240:                        .tableau[0] = malloc(0)) == NULL)
                   1241:                {
                   1242:                    if (variable_partagee == d_vrai)
                   1243:                    {
                   1244:                        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1245:                                .s_liste_variables_partagees).mutex)) != 0)
                   1246:                        {
                   1247:                            (*s_etat_processus).erreur_systeme = d_es_processus;
                   1248:                            return;
                   1249:                        }
                   1250:                    }
                   1251: 
                   1252:                    (*s_etat_processus).erreur_systeme =
                   1253:                            d_es_allocation_memoire;
                   1254:                    return;
                   1255:                }
                   1256: 
                   1257:                (*((struct_matrice *) (*s_objet_argument_2).objet))
                   1258:                        .nombre_colonnes = 0;
                   1259:            }
                   1260:        }
                   1261:        else
                   1262:        {
                   1263:            if (variable_partagee == d_vrai)
                   1264:            {
                   1265:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1266:                        .s_liste_variables_partagees).mutex)) != 0)
                   1267:                {
                   1268:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1269:                    return;
                   1270:                }
                   1271:            }
                   1272: 
                   1273:            liberation(s_etat_processus, s_objet_argument_1);
                   1274: 
                   1275:            if (presence_variable == d_faux)
                   1276:            {
                   1277:                liberation(s_etat_processus, s_objet_argument_2);
                   1278:            }
                   1279: 
                   1280:            (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   1281:            return;
                   1282:        }
                   1283:    }
                   1284:    else
                   1285:    {
                   1286:        if (variable_partagee == d_vrai)
                   1287:        {
                   1288:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1289:                    .s_liste_variables_partagees).mutex)) != 0)
                   1290:            {
                   1291:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   1292:                return;
                   1293:            }
                   1294:        }
                   1295: 
                   1296:        liberation(s_etat_processus, s_objet_argument_1);
                   1297: 
                   1298:        if (presence_variable == d_faux)
                   1299:        {
                   1300:            liberation(s_etat_processus, s_objet_argument_2);
                   1301:        }
                   1302: 
                   1303:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   1304:        return;
                   1305:    }
                   1306: 
                   1307:    liberation(s_etat_processus, s_objet_argument_1);
                   1308: 
                   1309:    if (presence_variable == d_faux)
                   1310:    {
                   1311:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1312:                s_objet_argument_2) == d_erreur)
                   1313:        {
                   1314:            return;
                   1315:        }
                   1316:    }
                   1317:    else if (variable_partagee == d_vrai)
                   1318:    {
                   1319:        (*(*s_etat_processus).s_liste_variables_partagees).table
                   1320:                [(*(*s_etat_processus).s_liste_variables_partagees)
                   1321:                .position_variable].objet = s_objet_argument_2;
                   1322: 
                   1323:        if (pthread_mutex_unlock(&((*(*s_etat_processus)
                   1324:                .s_liste_variables_partagees).mutex)) != 0)
                   1325:        {
                   1326:            (*s_etat_processus).erreur_systeme = d_es_processus;
                   1327:            return;
                   1328:        }
                   1329:    }
                   1330: 
                   1331:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1332:            s_objet_resultat) == d_erreur)
                   1333:    {
                   1334:        return;
                   1335:    }
                   1336: 
                   1337:    return;
                   1338: }
                   1339: 
                   1340: 
                   1341: /*
                   1342: ================================================================================
                   1343:   Fonction 'rci'
                   1344: ================================================================================
                   1345:   Entrées : pointeur sur une structure struct_processus
                   1346: --------------------------------------------------------------------------------
                   1347:   Sorties :
                   1348: --------------------------------------------------------------------------------
                   1349:   Effets de bord : néant
                   1350: ================================================================================
                   1351: */
                   1352: 
                   1353: void
                   1354: instruction_rci(struct_processus *s_etat_processus)
                   1355: {
                   1356:    logical1                    last_valide;
                   1357: 
                   1358:    struct_objet                *s_objet_argument_1;
                   1359:    struct_objet                *s_objet_argument_2;
                   1360:    struct_objet                *s_objet_argument_3;
                   1361:    struct_objet                *tampon;
                   1362: 
                   1363:    (*s_etat_processus).erreur_execution = d_ex;
                   1364: 
                   1365:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   1366:    {
                   1367:        printf("\n  RCI ");
                   1368: 
                   1369:        if ((*s_etat_processus).langue == 'F')
                   1370:        {
                   1371:            printf("(multiplication d'une ligne d'une matrice)\n\n");
                   1372:        }
                   1373:        else
                   1374:        {
                   1375:            printf("(multiply a row in a matrix)\n\n");
                   1376:        }
                   1377: 
                   1378:        printf("    3: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                   1379:        printf("    2: %s, %s, %s\n", d_INT, d_REL, d_CPL);
                   1380:        printf("    1: %s\n", d_INT);
                   1381:        printf("->  1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                   1382: 
                   1383:        return;
                   1384:    }
                   1385:    else if ((*s_etat_processus).test_instruction == 'Y')
                   1386:    {
                   1387:        (*s_etat_processus).nombre_arguments = -1;
                   1388:        return;
                   1389:    }
                   1390: 
                   1391:    if ((last_valide = test_cfsf(s_etat_processus, 31)) == d_vrai)
                   1392:    {
                   1393:        if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
                   1394:        {
                   1395:            return;
                   1396:        }
                   1397: 
                   1398:        cf(s_etat_processus, 31);
                   1399:    }
                   1400: 
                   1401:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1402:            &s_objet_argument_1) == d_erreur)
                   1403:    {
                   1404:        if (last_valide == d_vrai)
                   1405:        {
                   1406:            sf(s_etat_processus, 31);
                   1407:        }
                   1408: 
                   1409:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1410:        return;
                   1411:    }
                   1412: 
                   1413:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1414:            &s_objet_argument_2) == d_erreur)
                   1415:    {
                   1416:        if (last_valide == d_vrai)
                   1417:        {
                   1418:            sf(s_etat_processus, 31);
                   1419:        }
                   1420: 
                   1421:        liberation(s_etat_processus, s_objet_argument_1);
                   1422: 
                   1423:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1424:        return;
                   1425:    }
                   1426: 
                   1427:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1428:            &s_objet_argument_3) == d_erreur)
                   1429:    {
                   1430:        if (last_valide == d_vrai)
                   1431:        {
                   1432:            sf(s_etat_processus, 31);
                   1433:        }
                   1434: 
                   1435:        liberation(s_etat_processus, s_objet_argument_1);
                   1436:        liberation(s_etat_processus, s_objet_argument_2);
                   1437: 
                   1438:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1439:        return;
                   1440:    }
                   1441: 
                   1442:    if ((((*s_objet_argument_3).type == MIN) ||
                   1443:            ((*s_objet_argument_3).type == MRL) ||
                   1444:            ((*s_objet_argument_3).type == MCX)) &&
                   1445:            (((*s_objet_argument_2).type == INT) ||
                   1446:            ((*s_objet_argument_2).type == REL) ||
                   1447:            ((*s_objet_argument_2).type == CPL)) &&
                   1448:            ((*s_objet_argument_1).type == INT))
                   1449:    {
                   1450:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1451:                s_objet_argument_3) == d_erreur)
                   1452:        {
                   1453:            if (last_valide == d_vrai)
                   1454:            {
                   1455:                sf(s_etat_processus, 31);
                   1456:            }
                   1457: 
                   1458:            return;
                   1459:        }
                   1460: 
                   1461:        tampon = s_objet_argument_1;
                   1462: 
                   1463:        if ((s_objet_argument_1 = allocation(s_etat_processus, LST)) == NULL)
                   1464:        {
                   1465:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1466:            return;
                   1467:        }
                   1468: 
                   1469:        if (((*s_objet_argument_1).objet =
                   1470:                allocation_maillon(s_etat_processus)) == NULL)
                   1471:        {
                   1472:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1473:            return;
                   1474:        }
                   1475: 
                   1476:        (*((struct_liste_chainee *) (*s_objet_argument_1).objet)).donnee =
                   1477:                tampon;
                   1478:        (*((struct_liste_chainee *) (*s_objet_argument_1).objet)).suivant =
                   1479:                NULL;
                   1480: 
                   1481:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1482:                s_objet_argument_1) == d_erreur)
                   1483:        {
                   1484:            if (last_valide == d_vrai)
                   1485:            {
                   1486:                sf(s_etat_processus, 31);
                   1487:            }
                   1488: 
                   1489:            return;
                   1490:        }
                   1491: 
                   1492:        instruction_dup2(s_etat_processus);
                   1493: 
                   1494:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1495:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1496:                ((*s_etat_processus).exception != d_ep))
                   1497:        {
                   1498:            liberation(s_etat_processus, s_objet_argument_1);
                   1499:            liberation(s_etat_processus, s_objet_argument_2);
                   1500:            liberation(s_etat_processus, s_objet_argument_3);
                   1501: 
                   1502:            if (last_valide == d_vrai)
                   1503:            {
                   1504:                sf(s_etat_processus, 31);
                   1505:            }
                   1506: 
                   1507:            return;
                   1508:        }
                   1509: 
                   1510:        instruction_getr(s_etat_processus);
                   1511: 
                   1512:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1513:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1514:                ((*s_etat_processus).exception != d_ep))
                   1515:        {
                   1516:            liberation(s_etat_processus, s_objet_argument_1);
                   1517:            liberation(s_etat_processus, s_objet_argument_2);
                   1518:            liberation(s_etat_processus, s_objet_argument_3);
                   1519: 
                   1520:            if (last_valide == d_vrai)
                   1521:            {
                   1522:                sf(s_etat_processus, 31);
                   1523:            }
                   1524: 
                   1525:            return;
                   1526:        }
                   1527: 
                   1528:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1529:                s_objet_argument_2) == d_erreur)
                   1530:        {
                   1531:            return;
                   1532:        }
                   1533: 
                   1534:        instruction_multiplication(s_etat_processus);
                   1535: 
                   1536:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1537:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1538:                ((*s_etat_processus).exception != d_ep))
                   1539:        {
                   1540:            liberation(s_etat_processus, s_objet_argument_1);
                   1541:            liberation(s_etat_processus, s_objet_argument_2);
                   1542:            liberation(s_etat_processus, s_objet_argument_3);
                   1543: 
                   1544:            if (last_valide == d_vrai)
                   1545:            {
                   1546:                sf(s_etat_processus, 31);
                   1547:            }
                   1548: 
                   1549:            return;
                   1550:        }
                   1551: 
                   1552:        instruction_putr(s_etat_processus);
                   1553: 
                   1554:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1555:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1556:                ((*s_etat_processus).exception != d_ep))
                   1557:        {
                   1558:            liberation(s_etat_processus, s_objet_argument_1);
                   1559:            liberation(s_etat_processus, s_objet_argument_2);
                   1560:            liberation(s_etat_processus, s_objet_argument_3);
                   1561: 
                   1562:            if (last_valide == d_vrai)
                   1563:            {
                   1564:                sf(s_etat_processus, 31);
                   1565:            }
                   1566: 
                   1567:            return;
                   1568:        }
                   1569:    }
                   1570:    else
                   1571:    {
                   1572:        liberation(s_etat_processus, s_objet_argument_1);
                   1573:        liberation(s_etat_processus, s_objet_argument_2);
                   1574:        liberation(s_etat_processus, s_objet_argument_3);
                   1575: 
                   1576:        if (last_valide == d_vrai)
                   1577:        {
                   1578:            sf(s_etat_processus, 31);
                   1579:        }
                   1580: 
                   1581:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   1582:        return;
                   1583:    }
                   1584: 
                   1585:    if (last_valide == d_vrai)
                   1586:    {
                   1587:        sf(s_etat_processus, 31);
                   1588:    }
                   1589: 
                   1590:    return;
                   1591: }
                   1592: 
                   1593: 
                   1594: /*
                   1595: ================================================================================
                   1596:   Fonction 'rcij'
                   1597: ================================================================================
                   1598:   Entrées : pointeur sur une structure struct_processus
                   1599: --------------------------------------------------------------------------------
                   1600:   Sorties :
                   1601: --------------------------------------------------------------------------------
                   1602:   Effets de bord : néant
                   1603: ================================================================================
                   1604: */
                   1605: 
                   1606: void
                   1607: instruction_rcij(struct_processus *s_etat_processus)
                   1608: {
                   1609:    logical1                    last_valide;
                   1610: 
                   1611:    struct_objet                *s_objet_argument_1;
                   1612:    struct_objet                *s_objet_argument_2;
                   1613:    struct_objet                *s_objet_argument_3;
                   1614:    struct_objet                *s_objet_argument_4;
                   1615:    struct_objet                *tampon;
                   1616: 
                   1617:    (*s_etat_processus).erreur_execution = d_ex;
                   1618: 
                   1619:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   1620:    {
                   1621:        printf("\n  RCIJ ");
                   1622: 
                   1623:        if ((*s_etat_processus).langue == 'F')
                   1624:        {
                   1625:            printf("(multiplication puis ajout d'une ligne d'une matrice)\n\n");
                   1626:        }
                   1627:        else
                   1628:        {
                   1629:            printf("(multiply and add a row in a matrix)\n\n");
                   1630:        }
                   1631: 
                   1632:        printf("    4: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                   1633:        printf("    3: %s, %s, %s\n", d_INT, d_REL, d_CPL);
                   1634:        printf("    2: %s\n", d_INT);
                   1635:        printf("    1: %s\n", d_INT);
                   1636:        printf("->  1: %s, %s, %s\n", d_MIN, d_MRL, d_MCX);
                   1637: 
                   1638:        return;
                   1639:    }
                   1640:    else if ((*s_etat_processus).test_instruction == 'Y')
                   1641:    {
                   1642:        (*s_etat_processus).nombre_arguments = -1;
                   1643:        return;
                   1644:    }
                   1645: 
                   1646:    if ((last_valide = test_cfsf(s_etat_processus, 31)) == d_vrai)
                   1647:    {
                   1648:        if (empilement_pile_last(s_etat_processus, 4) == d_erreur)
                   1649:        {
                   1650:            return;
                   1651:        }
                   1652: 
                   1653:        cf(s_etat_processus, 31);
                   1654:    }
                   1655: 
                   1656:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1657:            &s_objet_argument_1) == d_erreur)
                   1658:    {
                   1659:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1660:        return;
                   1661:    }
                   1662: 
                   1663:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1664:            &s_objet_argument_2) == d_erreur)
                   1665:    {
                   1666:        liberation(s_etat_processus, s_objet_argument_1);
                   1667: 
                   1668:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1669:        return;
                   1670:    }
                   1671: 
                   1672:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1673:            &s_objet_argument_3) == d_erreur)
                   1674:    {
                   1675:        liberation(s_etat_processus, s_objet_argument_1);
                   1676:        liberation(s_etat_processus, s_objet_argument_2);
                   1677: 
                   1678:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1679:        return;
                   1680:    }
                   1681: 
                   1682:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1683:            &s_objet_argument_4) == d_erreur)
                   1684:    {
                   1685:        liberation(s_etat_processus, s_objet_argument_1);
                   1686:        liberation(s_etat_processus, s_objet_argument_2);
                   1687:        liberation(s_etat_processus, s_objet_argument_3);
                   1688: 
                   1689:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1690:        return;
                   1691:    }
                   1692: 
                   1693:    if ((((*s_objet_argument_4).type == MIN) ||
                   1694:            ((*s_objet_argument_4).type == MRL) ||
                   1695:            ((*s_objet_argument_4).type == MCX)) &&
                   1696:            (((*s_objet_argument_3).type == INT) ||
                   1697:            ((*s_objet_argument_3).type == REL) ||
                   1698:            ((*s_objet_argument_3).type == CPL)) &&
                   1699:            ((*s_objet_argument_2).type == INT) &&
                   1700:            ((*s_objet_argument_1).type == INT))
                   1701:    {
                   1702:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1703:                s_objet_argument_4) == d_erreur)
                   1704:        {
                   1705:            return;
                   1706:        }
                   1707: 
                   1708:        tampon = s_objet_argument_1;
                   1709: 
                   1710:        if ((s_objet_argument_1 = allocation(s_etat_processus, LST)) == NULL)
                   1711:        {
                   1712:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1713:            return;
                   1714:        }
                   1715: 
                   1716:        if (((*s_objet_argument_1).objet =
                   1717:                allocation_maillon(s_etat_processus)) == NULL)
                   1718:        {
                   1719:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1720:            return;
                   1721:        }
                   1722: 
                   1723:        (*((struct_liste_chainee *) (*s_objet_argument_1).objet)).donnee =
                   1724:                tampon;
                   1725:        (*((struct_liste_chainee *) (*s_objet_argument_1).objet)).suivant =
                   1726:                NULL;
                   1727: 
                   1728:        tampon = s_objet_argument_2;
                   1729: 
                   1730:        if ((s_objet_argument_2 = allocation(s_etat_processus, LST)) == NULL)
                   1731:        {
                   1732:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1733:            return;
                   1734:        }
                   1735: 
                   1736:        if (((*s_objet_argument_2).objet =
                   1737:                allocation_maillon(s_etat_processus)) == NULL)
                   1738:        {
                   1739:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1740:            return;
                   1741:        }
                   1742: 
                   1743:        (*((struct_liste_chainee *) (*s_objet_argument_2).objet)).donnee =
                   1744:                tampon;
                   1745:        (*((struct_liste_chainee *) (*s_objet_argument_2).objet)).suivant =
                   1746:                NULL;
                   1747: 
                   1748:        instruction_dup(s_etat_processus);
                   1749: 
                   1750:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1751:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1752:                ((*s_etat_processus).exception != d_ep))
                   1753:        {
                   1754:            liberation(s_etat_processus, s_objet_argument_1);
                   1755:            liberation(s_etat_processus, s_objet_argument_2);
                   1756:            liberation(s_etat_processus, s_objet_argument_3);
                   1757:            liberation(s_etat_processus, s_objet_argument_4);
                   1758: 
                   1759:            if (last_valide == d_vrai)
                   1760:            {
                   1761:                sf(s_etat_processus, 31);
                   1762:            }
                   1763: 
                   1764:            return;
                   1765:        }
                   1766: 
                   1767:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1768:                s_objet_argument_2) == d_erreur)
                   1769:        {
                   1770:            return;
                   1771:        }
                   1772: 
                   1773:        instruction_getr(s_etat_processus);
                   1774: 
                   1775:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1776:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1777:                ((*s_etat_processus).exception != d_ep))
                   1778:        {
                   1779:            liberation(s_etat_processus, s_objet_argument_1);
                   1780:            liberation(s_etat_processus, s_objet_argument_2);
                   1781:            liberation(s_etat_processus, s_objet_argument_3);
                   1782:            liberation(s_etat_processus, s_objet_argument_4);
                   1783: 
                   1784:            if (last_valide == d_vrai)
                   1785:            {
                   1786:                sf(s_etat_processus, 31);
                   1787:            }
                   1788: 
                   1789:            return;
                   1790:        }
                   1791: 
                   1792:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1793:                s_objet_argument_3) == d_erreur)
                   1794:        {
                   1795:            return;
                   1796:        }
                   1797: 
                   1798:        instruction_multiplication(s_etat_processus);
                   1799: 
                   1800:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1801:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1802:                ((*s_etat_processus).exception != d_ep))
                   1803:        {
                   1804:            liberation(s_etat_processus, s_objet_argument_1);
                   1805:            liberation(s_etat_processus, s_objet_argument_2);
                   1806:            liberation(s_etat_processus, s_objet_argument_3);
                   1807:            liberation(s_etat_processus, s_objet_argument_4);
                   1808: 
                   1809:            if (last_valide == d_vrai)
                   1810:            {
                   1811:                sf(s_etat_processus, 31);
                   1812:            }
                   1813: 
                   1814:            return;
                   1815:        }
                   1816: 
                   1817:        instruction_over(s_etat_processus);
                   1818: 
                   1819:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1820:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1821:                ((*s_etat_processus).exception != d_ep))
                   1822:        {
                   1823:            liberation(s_etat_processus, s_objet_argument_1);
                   1824:            liberation(s_etat_processus, s_objet_argument_2);
                   1825:            liberation(s_etat_processus, s_objet_argument_3);
                   1826:            liberation(s_etat_processus, s_objet_argument_4);
                   1827: 
                   1828:            if (last_valide == d_vrai)
                   1829:            {
                   1830:                sf(s_etat_processus, 31);
                   1831:            }
                   1832: 
                   1833:            return;
                   1834:        }
                   1835: 
                   1836:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1837:                s_objet_argument_1) == d_erreur)
                   1838:        {
                   1839:            return;
                   1840:        }
                   1841: 
                   1842:        instruction_swap(s_etat_processus);
                   1843: 
                   1844:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1845:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1846:                ((*s_etat_processus).exception != d_ep))
                   1847:        {
                   1848:            liberation(s_etat_processus, s_objet_argument_1);
                   1849:            liberation(s_etat_processus, s_objet_argument_2);
                   1850:            liberation(s_etat_processus, s_objet_argument_3);
                   1851:            liberation(s_etat_processus, s_objet_argument_4);
                   1852: 
                   1853:            if (last_valide == d_vrai)
                   1854:            {
                   1855:                sf(s_etat_processus, 31);
                   1856:            }
                   1857: 
                   1858:            return;
                   1859:        }
                   1860: 
                   1861:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1862:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1863:                ((*s_etat_processus).exception != d_ep))
                   1864:        {
                   1865:            liberation(s_etat_processus, s_objet_argument_1);
                   1866:            liberation(s_etat_processus, s_objet_argument_2);
                   1867:            liberation(s_etat_processus, s_objet_argument_3);
                   1868:            liberation(s_etat_processus, s_objet_argument_4);
                   1869: 
                   1870:            if (last_valide == d_vrai)
                   1871:            {
                   1872:                sf(s_etat_processus, 31);
                   1873:            }
                   1874: 
                   1875:            return;
                   1876:        }
                   1877: 
                   1878:        instruction_over(s_etat_processus);
                   1879: 
                   1880:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1881:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1882:                ((*s_etat_processus).exception != d_ep))
                   1883:        {
                   1884:            liberation(s_etat_processus, s_objet_argument_1);
                   1885:            liberation(s_etat_processus, s_objet_argument_2);
                   1886:            liberation(s_etat_processus, s_objet_argument_3);
                   1887:            liberation(s_etat_processus, s_objet_argument_4);
                   1888: 
                   1889:            if (last_valide == d_vrai)
                   1890:            {
                   1891:                sf(s_etat_processus, 31);
                   1892:            }
                   1893: 
                   1894:            return;
                   1895:        }
                   1896: 
                   1897:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1898:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1899:                ((*s_etat_processus).exception != d_ep))
                   1900:        {
                   1901:            liberation(s_etat_processus, s_objet_argument_1);
                   1902:            liberation(s_etat_processus, s_objet_argument_2);
                   1903:            liberation(s_etat_processus, s_objet_argument_3);
                   1904:            liberation(s_etat_processus, s_objet_argument_4);
                   1905: 
                   1906:            if (last_valide == d_vrai)
                   1907:            {
                   1908:                sf(s_etat_processus, 31);
                   1909:            }
                   1910: 
                   1911:            return;
                   1912:        }
                   1913: 
                   1914:        instruction_getr(s_etat_processus);
                   1915: 
                   1916:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1917:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1918:                ((*s_etat_processus).exception != d_ep))
                   1919:        {
                   1920:            liberation(s_etat_processus, s_objet_argument_1);
                   1921:            liberation(s_etat_processus, s_objet_argument_2);
                   1922:            liberation(s_etat_processus, s_objet_argument_3);
                   1923:            liberation(s_etat_processus, s_objet_argument_4);
                   1924: 
                   1925:            if (last_valide == d_vrai)
                   1926:            {
                   1927:                sf(s_etat_processus, 31);
                   1928:            }
                   1929: 
                   1930:            return;
                   1931:        }
                   1932: 
                   1933:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1934:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1935:                ((*s_etat_processus).exception != d_ep))
                   1936:        {
                   1937:            liberation(s_etat_processus, s_objet_argument_1);
                   1938:            liberation(s_etat_processus, s_objet_argument_2);
                   1939:            liberation(s_etat_processus, s_objet_argument_3);
                   1940:            liberation(s_etat_processus, s_objet_argument_4);
                   1941: 
                   1942:            if (last_valide == d_vrai)
                   1943:            {
                   1944:                sf(s_etat_processus, 31);
                   1945:            }
                   1946: 
                   1947:            return;
                   1948:        }
                   1949: 
                   1950:        instruction_rot(s_etat_processus);
                   1951: 
                   1952:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1953:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1954:                ((*s_etat_processus).exception != d_ep))
                   1955:        {
                   1956:            liberation(s_etat_processus, s_objet_argument_1);
                   1957:            liberation(s_etat_processus, s_objet_argument_2);
                   1958:            liberation(s_etat_processus, s_objet_argument_3);
                   1959:            liberation(s_etat_processus, s_objet_argument_4);
                   1960: 
                   1961:            if (last_valide == d_vrai)
                   1962:            {
                   1963:                sf(s_etat_processus, 31);
                   1964:            }
                   1965: 
                   1966:            return;
                   1967:        }
                   1968: 
                   1969:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1970:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1971:                ((*s_etat_processus).exception != d_ep))
                   1972:        {
                   1973:            liberation(s_etat_processus, s_objet_argument_1);
                   1974:            liberation(s_etat_processus, s_objet_argument_2);
                   1975:            liberation(s_etat_processus, s_objet_argument_3);
                   1976:            liberation(s_etat_processus, s_objet_argument_4);
                   1977: 
                   1978:            if (last_valide == d_vrai)
                   1979:            {
                   1980:                sf(s_etat_processus, 31);
                   1981:            }
                   1982: 
                   1983:            return;
                   1984:        }
                   1985: 
                   1986:        instruction_plus(s_etat_processus);
                   1987: 
                   1988:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1989:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1990:                ((*s_etat_processus).exception != d_ep))
                   1991:        {
                   1992:            liberation(s_etat_processus, s_objet_argument_1);
                   1993:            liberation(s_etat_processus, s_objet_argument_2);
                   1994:            liberation(s_etat_processus, s_objet_argument_3);
                   1995:            liberation(s_etat_processus, s_objet_argument_4);
                   1996: 
                   1997:            if (last_valide == d_vrai)
                   1998:            {
                   1999:                sf(s_etat_processus, 31);
                   2000:            }
                   2001: 
                   2002:            return;
                   2003:        }
                   2004: 
                   2005:        instruction_putr(s_etat_processus);
                   2006: 
                   2007:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   2008:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   2009:                ((*s_etat_processus).exception != d_ep))
                   2010:        {
                   2011:            liberation(s_etat_processus, s_objet_argument_1);
                   2012:            liberation(s_etat_processus, s_objet_argument_2);
                   2013:            liberation(s_etat_processus, s_objet_argument_3);
                   2014:            liberation(s_etat_processus, s_objet_argument_4);
                   2015: 
                   2016:            if (last_valide == d_vrai)
                   2017:            {
                   2018:                sf(s_etat_processus, 31);
                   2019:            }
                   2020: 
                   2021:            return;
                   2022:        }
                   2023:    }
                   2024:    else
                   2025:    {
                   2026:        liberation(s_etat_processus, s_objet_argument_1);
                   2027:        liberation(s_etat_processus, s_objet_argument_2);
                   2028:        liberation(s_etat_processus, s_objet_argument_3);
                   2029:        liberation(s_etat_processus, s_objet_argument_4);
                   2030: 
                   2031:        if (last_valide == d_vrai)
                   2032:        {
                   2033:            sf(s_etat_processus, 31);
                   2034:        }
                   2035: 
                   2036:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   2037:        return;
                   2038:    }
                   2039: 
                   2040:    if (last_valide == d_vrai)
                   2041:    {
                   2042:        sf(s_etat_processus, 31);
                   2043:    }
                   2044: 
                   2045:    return;
                   2046: }
                   2047: 
                   2048: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>