Annotation of rpl/src/instructions_s3.c, revision 1.70

1.1       bertrand    1: /*
                      2: ================================================================================
1.70    ! bertrand    3:   RPL/2 (R) version 4.1.33
        !             4:   Copyright (C) 1989-2021 Dr. BERTRAND Joël
1.1       bertrand    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: 
1.11      bertrand   23: #include "rpl-conv.h"
1.1       bertrand   24: 
                     25: 
                     26: /*
                     27: ================================================================================
                     28:   Fonction 'sub'
                     29: ================================================================================
                     30:   Entrées :
                     31: --------------------------------------------------------------------------------
                     32:   Sorties :
                     33: --------------------------------------------------------------------------------
                     34:   Effets de bord : néant
                     35: ================================================================================
                     36: */
                     37: 
                     38: void
                     39: instruction_sub(struct_processus *s_etat_processus)
                     40: {
                     41:    struct_liste_chainee        *l_element_courant;
                     42:    struct_liste_chainee        *l_element_precedent;
                     43: 
                     44:    struct_objet                *s_copie_argument_3;
                     45:    struct_objet                *s_objet_argument_1;
                     46:    struct_objet                *s_objet_argument_2;
                     47:    struct_objet                *s_objet_argument_3;
                     48:    struct_objet                *s_objet_resultat;
                     49: 
1.30      bertrand   50:    unsigned char               *ptr1;
                     51:    unsigned char               *ptr2;
                     52: 
1.45      bertrand   53:    integer8                    i;
1.1       bertrand   54: 
                     55:    (*s_etat_processus).erreur_execution = d_ex;
                     56: 
                     57:    if ((*s_etat_processus).affichage_arguments == 'Y')
                     58:    {
                     59:        printf("\n  SUB ");
                     60: 
                     61:        if ((*s_etat_processus).langue == 'F')
                     62:        {
                     63:            printf("(extraction)\n\n");
                     64:        }
                     65:        else
                     66:        {
                     67:            printf("(suboject extraction)\n\n");
                     68:        }
                     69: 
                     70:        printf("    3: %s, %s\n", d_CHN, d_LST);
                     71:        printf("    2: %s\n", d_INT);
                     72:        printf("    1: %s\n", d_INT);
                     73:        printf("->  1: %s, %s\n", d_CHN, d_LST);
                     74: 
                     75:        return;
                     76:    }
                     77:    else if ((*s_etat_processus).test_instruction == 'Y')
                     78:    {
                     79:        (*s_etat_processus).nombre_arguments = -1;
                     80:        return;
                     81:    }
                     82:    
                     83:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                     84:    {
                     85:        if (empilement_pile_last(s_etat_processus, 3) == d_erreur)
                     86:        {
                     87:            return;
                     88:        }
                     89:    }
                     90: 
                     91:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                     92:            &s_objet_argument_1) == d_erreur)
                     93:    {
                     94:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                     95:        return;
                     96:    }
                     97: 
                     98:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                     99:            &s_objet_argument_2) == d_erreur)
                    100:    {
                    101:        liberation(s_etat_processus, s_objet_argument_1);
                    102: 
                    103:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    104:        return;
                    105:    }
                    106: 
                    107:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    108:            &s_objet_argument_3) == d_erreur)
                    109:    {
                    110:        liberation(s_etat_processus, s_objet_argument_1);
                    111:        liberation(s_etat_processus, s_objet_argument_2);
                    112: 
                    113:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    114:        return;
                    115:    }
                    116: 
                    117:    if (((*s_objet_argument_1).type != INT) ||
                    118:            ((*s_objet_argument_2).type != INT))
                    119:    {
                    120:        liberation(s_etat_processus, s_objet_argument_1);
                    121:        liberation(s_etat_processus, s_objet_argument_2);
                    122:        liberation(s_etat_processus, s_objet_argument_3);
                    123: 
                    124:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    125:        return;
                    126:    }
                    127: 
                    128:    if (((*((integer8 *) (*s_objet_argument_1).objet)) < 1) ||
                    129:            ((*((integer8 *) (*s_objet_argument_2).objet)) < 1) ||
                    130:            ((*((integer8 *) (*s_objet_argument_1).objet)) <
                    131:            (*((integer8 *) (*s_objet_argument_2).objet))))
                    132:    {
                    133:        liberation(s_etat_processus, s_objet_argument_1);
                    134:        liberation(s_etat_processus, s_objet_argument_2);
                    135:        liberation(s_etat_processus, s_objet_argument_3);
                    136: 
                    137:        (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                    138:        return;
                    139:    }
                    140: 
                    141: /*
                    142: --------------------------------------------------------------------------------
                    143:   Traitement des chaînes de caractères
                    144: --------------------------------------------------------------------------------
                    145: */
                    146: 
                    147:    if ((*s_objet_argument_3).type == CHN)
                    148:    {
                    149:        if ((*((integer8 *) (*s_objet_argument_1).objet)) > (integer8)
1.30      bertrand  150:                longueur_chaine(s_etat_processus,
                    151:                (unsigned char *) (*s_objet_argument_3).objet))
1.1       bertrand  152:        {
                    153:            liberation(s_etat_processus, s_objet_argument_1);
                    154:            liberation(s_etat_processus, s_objet_argument_2);
                    155:            liberation(s_etat_processus, s_objet_argument_3);
                    156: 
                    157:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                    158:            return;
                    159:        }
                    160: 
                    161:        if ((s_objet_resultat = allocation(s_etat_processus, CHN)) == NULL)
                    162:        {
                    163:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    164:            return;
                    165:        }
                    166: 
1.30      bertrand  167:        if ((ptr1 = pointeur_ieme_caractere(s_etat_processus, (unsigned char *)
1.1       bertrand  168:                (*s_objet_argument_3).objet, (*((integer8 *)
1.30      bertrand  169:                (*s_objet_argument_2).objet)) - 1)) == NULL)
                    170:        {
                    171:            liberation(s_etat_processus, s_objet_argument_1);
                    172:            liberation(s_etat_processus, s_objet_argument_2);
                    173:            liberation(s_etat_processus, s_objet_argument_3);
                    174: 
                    175:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                    176:            return;
                    177:        }
                    178: 
                    179:        if ((ptr2 = pointeur_ieme_caractere(s_etat_processus, ptr1,
                    180:                (*((integer8 *) (*s_objet_argument_1).objet))
                    181:                - ((*((integer8 *) (*s_objet_argument_2).objet)) - 1))) == NULL)
                    182:        {
                    183:            liberation(s_etat_processus, s_objet_argument_1);
                    184:            liberation(s_etat_processus, s_objet_argument_2);
                    185:            liberation(s_etat_processus, s_objet_argument_3);
                    186: 
                    187:            (*s_etat_processus).erreur_execution = d_ex_argument_invalide;
                    188:            return;
                    189:        }
                    190: 
1.45      bertrand  191:        if (((*s_objet_resultat).objet = malloc(((size_t) ((ptr2 - ptr1) + 1)) *
1.30      bertrand  192:                sizeof(unsigned char))) == NULL)
1.1       bertrand  193:        {
                    194:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    195:            return;
                    196:        }
1.30      bertrand  197: 
                    198:        strncpy((unsigned char *) (*s_objet_resultat).objet, ptr1,
1.45      bertrand  199:                (size_t) (ptr2 - ptr1))[ptr2 - ptr1] = d_code_fin_chaine;
1.1       bertrand  200:    }
                    201: 
                    202: /*
                    203: --------------------------------------------------------------------------------
                    204:   Traitement des listes
                    205: --------------------------------------------------------------------------------
                    206: */
                    207: 
                    208:    else if ((*s_objet_argument_3).type == LST)
                    209:    {
                    210:        if ((s_copie_argument_3 = copie_objet(s_etat_processus,
                    211:                s_objet_argument_3, 'N')) == NULL)
                    212:        {
                    213:            (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    214:            return;
                    215:        }
                    216: 
                    217:        liberation(s_etat_processus, s_objet_argument_3);
                    218:        s_objet_argument_3 = s_copie_argument_3;
                    219: 
                    220:        l_element_courant = (struct_liste_chainee *) (*s_objet_argument_3)
                    221:                .objet;
                    222:        i = 1;
                    223: 
1.45      bertrand  224:        while(i < (*((integer8 *) (*s_objet_argument_2).objet)))
1.1       bertrand  225:        {
                    226:            if (l_element_courant == NULL)
                    227:            {
                    228:                liberation(s_etat_processus, s_objet_argument_1);
                    229:                liberation(s_etat_processus, s_objet_argument_2);
                    230:                liberation(s_etat_processus, s_objet_argument_3);
                    231: 
                    232:                (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
                    233:                return;
                    234:            }
                    235: 
                    236:            l_element_precedent = l_element_courant;
                    237:            l_element_courant = (*l_element_courant).suivant;
                    238: 
                    239:            liberation(s_etat_processus, (*l_element_precedent).donnee);
                    240:            free(l_element_precedent);
                    241: 
                    242:            i++;
                    243:        }
                    244: 
                    245:        (*s_objet_argument_3).objet = l_element_courant;
                    246: 
1.45      bertrand  247:        while(i < (*((integer8 *) (*s_objet_argument_1).objet)))
1.1       bertrand  248:        {
                    249:            if (l_element_courant == NULL)
                    250:            {
                    251:                liberation(s_etat_processus, s_objet_argument_1);
                    252:                liberation(s_etat_processus, s_objet_argument_2);
                    253:                liberation(s_etat_processus, s_objet_argument_3);
                    254: 
                    255:                (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
                    256:                return;
                    257:            }
                    258: 
                    259:            l_element_courant = (*l_element_courant).suivant;
                    260:            i++;
                    261:        }
                    262: 
                    263:        l_element_precedent = l_element_courant;
                    264: 
                    265:        if (l_element_courant == NULL)
                    266:        {
                    267:            liberation(s_etat_processus, s_objet_argument_1);
                    268:            liberation(s_etat_processus, s_objet_argument_2);
                    269:            liberation(s_etat_processus, s_objet_argument_3);
                    270: 
                    271:            (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
                    272:            return;
                    273:        }
                    274: 
                    275:        l_element_courant = (*l_element_courant).suivant;
                    276:        (*l_element_precedent).suivant = NULL;
                    277: 
                    278:        while(l_element_courant != NULL)
                    279:        {
                    280:            l_element_precedent = l_element_courant;
                    281:            l_element_courant = (*l_element_courant).suivant;
                    282: 
                    283:            liberation(s_etat_processus, (*l_element_precedent).donnee);
                    284:            free(l_element_precedent);
                    285:        }
                    286: 
                    287:        s_objet_resultat = s_objet_argument_3;
                    288:        s_objet_argument_3 = NULL;
                    289:    }
                    290: 
                    291: /*
                    292: --------------------------------------------------------------------------------
                    293:   Arguments invalides
                    294: --------------------------------------------------------------------------------
                    295: */
                    296: 
                    297:    else
                    298:    {
                    299:        liberation(s_etat_processus, s_objet_argument_1);
                    300:        liberation(s_etat_processus, s_objet_argument_2);
                    301:        liberation(s_etat_processus, s_objet_argument_3);
                    302: 
                    303:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    304:        return;
                    305:    }
                    306: 
                    307:    liberation(s_etat_processus, s_objet_argument_1);
                    308:    liberation(s_etat_processus, s_objet_argument_2);
                    309:    liberation(s_etat_processus, s_objet_argument_3);
                    310: 
                    311:    if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    312:            s_objet_resultat) == d_erreur)
                    313:    {
                    314:        return;
                    315:    }
                    316: 
                    317:    return;
                    318: }
                    319: 
                    320: 
                    321: /*
                    322: ================================================================================
                    323:   Fonction 'sto+'
                    324: ================================================================================
                    325:   Entrées :
                    326: --------------------------------------------------------------------------------
                    327:   Sorties :
                    328: --------------------------------------------------------------------------------
                    329:   Effets de bord : néant
                    330: ================================================================================
                    331: */
                    332: 
                    333: void
                    334: instruction_sto_plus(struct_processus *s_etat_processus)
                    335: {
                    336:    logical1                        variable_partagee;
                    337: 
                    338:    struct_liste_chainee            *registre_pile_last;
                    339: 
                    340:    struct_objet                    *s_objet_1;
                    341:    struct_objet                    *s_objet_2;
                    342:    struct_objet                    *s_objet_3;
                    343: 
                    344:    (*s_etat_processus).erreur_execution = d_ex;
                    345: 
                    346:    if ((*s_etat_processus).affichage_arguments == 'Y')
                    347:    {
                    348:        printf("\n  STO+ ");
                    349: 
                    350:        if ((*s_etat_processus).langue == 'F')
                    351:        {
                    352:            printf("(modification d'une variable par addition)\n\n");
                    353:        }
                    354:        else
                    355:        {
                    356:            printf("(add to the content of a variable)\n\n");
                    357:        }
                    358: 
                    359:        printf("    2: %s, %s, %s, %s, %s, %s,\n"
                    360:                "       %s, %s, %s\n",
                    361:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                    362:        printf("    1: %s\n\n", d_NOM);
                    363: 
                    364:        printf("    2: %s\n", d_NOM);
                    365:        printf("    1: %s, %s, %s, %s, %s, %s,\n"
                    366:                "       %s, %s, %s\n",
                    367:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                    368: 
                    369:        return;
                    370:    }
                    371:    else if ((*s_etat_processus).test_instruction == 'Y')
                    372:    {
                    373:        (*s_etat_processus).nombre_arguments = -1;
                    374:        return;
                    375:    }
                    376:    
                    377:    registre_pile_last = NULL;
                    378: 
                    379:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    380:    {
                    381:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                    382:        {
                    383:            return;
                    384:        }
                    385: 
                    386:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                    387:        (*s_etat_processus).l_base_pile_last = NULL;
                    388:    }
                    389: 
                    390:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    391:            &s_objet_1) == d_erreur)
                    392:    {
                    393:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    394: 
                    395:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    396:        {
                    397:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    398:            {
                    399:                return;
                    400:            }
                    401: 
                    402:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    403:        }
                    404: 
                    405:        return;
                    406:    }
                    407: 
                    408:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    409:            &s_objet_2) == d_erreur)
                    410:    {
                    411:        liberation(s_etat_processus, s_objet_1);
                    412: 
                    413:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    414:        {
                    415:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    416:            {
                    417:                return;
                    418:            }
                    419: 
                    420:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    421:        }
                    422: 
                    423:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    424:        return;
                    425:    }
                    426: 
                    427: /*
                    428: --------------------------------------------------------------------------------
                    429:   Une valeur et un nom
                    430: --------------------------------------------------------------------------------
                    431: */
                    432: 
                    433:    variable_partagee = d_faux;
                    434: 
                    435:    if (((*s_objet_1).type == NOM) &&
                    436:            (((*s_objet_2).type == INT) ||
                    437:            ((*s_objet_2).type == REL) ||
                    438:            ((*s_objet_2).type == CPL) ||
                    439:            ((*s_objet_2).type == VIN) ||
                    440:            ((*s_objet_2).type == VRL) ||
                    441:            ((*s_objet_2).type == VCX) ||
                    442:            ((*s_objet_2).type == MIN) ||
                    443:            ((*s_objet_2).type == MRL) ||
                    444:            ((*s_objet_2).type == MCX)))
                    445:    {
                    446:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                    447:                (*s_objet_1).objet)).nom) == d_faux)
                    448:        {
                    449:            (*s_etat_processus).erreur_systeme = d_es;
                    450:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                    451: 
                    452:            liberation(s_etat_processus, s_objet_1);
                    453:            liberation(s_etat_processus, s_objet_2);
                    454: 
                    455:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    456:            {
                    457:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    458:                {
                    459:                    return;
                    460:                }
                    461: 
                    462:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    463:            }
                    464: 
                    465:            return;
                    466:        }
                    467: 
1.19      bertrand  468:        if ((*(*s_etat_processus).pointeur_variable_courante)
                    469:                .variable_verrouillee == d_vrai)
1.1       bertrand  470:        {
                    471:            liberation(s_etat_processus, s_objet_1);
                    472:            liberation(s_etat_processus, s_objet_2);
                    473: 
                    474:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    475:            {
                    476:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    477:                {
                    478:                    return;
                    479:                }
                    480: 
                    481:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    482:            }
                    483: 
                    484:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                    485:            return;
                    486:        }
                    487: 
1.19      bertrand  488:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand  489:        {
                    490:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand  491:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                    492:                    (*(*s_etat_processus).pointeur_variable_courante)
                    493:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand  494:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand  495:            {
                    496:                (*s_etat_processus).erreur_systeme = d_es;
                    497:                (*s_etat_processus).erreur_execution =
                    498:                        d_ex_variable_non_definie;
                    499: 
                    500:                liberation(s_etat_processus, s_objet_1);
                    501:                liberation(s_etat_processus, s_objet_2);
                    502: 
                    503:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    504:                {
                    505:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    506:                    {
                    507:                        return;
                    508:                    }
                    509: 
                    510:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    511:                }
                    512: 
                    513:                return;
                    514:            }
                    515: 
                    516:            variable_partagee = d_vrai;
                    517: 
                    518:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand  519:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand  520:            {
                    521:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  522:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  523:                {
                    524:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    525:                    return;
                    526:                }
                    527: 
                    528:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    529: 
                    530:                liberation(s_etat_processus, s_objet_1);
                    531:                liberation(s_etat_processus, s_objet_2);
                    532: 
                    533:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    534:                {
                    535:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    536:                    {
                    537:                        return;
                    538:                    }
                    539: 
                    540:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    541:                }
                    542: 
                    543:                return;
                    544:            }
                    545:        }
                    546:        else
                    547:        {
                    548:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand  549:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand  550:                    'P')) == NULL)
                    551:            {
                    552:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    553: 
                    554:                liberation(s_etat_processus, s_objet_1);
                    555:                liberation(s_etat_processus, s_objet_2);
                    556: 
                    557:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    558:                {
                    559:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    560:                    {
                    561:                        return;
                    562:                    }
                    563: 
                    564:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    565:                }
                    566: 
                    567:                return;
                    568:            }
                    569:        }
                    570: 
                    571:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    572:                s_objet_2) == d_erreur)
                    573:        {
                    574:            if (variable_partagee == d_vrai)
                    575:            {
                    576:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  577:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  578:                {
                    579:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    580:                    return;
                    581:                }
                    582:            }
                    583: 
                    584:            return;
                    585:        }
                    586: 
                    587:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    588:                s_objet_3) == d_erreur)
                    589:        {
                    590:            if (variable_partagee == d_vrai)
                    591:            {
                    592:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  593:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  594:                {
                    595:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    596:                    return;
                    597:                }
                    598:            }
                    599: 
                    600:            return;
                    601:        }
                    602: 
                    603:        instruction_plus(s_etat_processus);
                    604:        s_objet_2 = NULL;
                    605:        /* s_objet_2 et s_objet_3 sont libérés par cet appel... */
                    606: 
                    607:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                    608:                ((*s_etat_processus).erreur_execution != d_ex) ||
                    609:                ((*s_etat_processus).exception != d_ep))
                    610:        {
                    611:            if (variable_partagee == d_vrai)
                    612:            {
                    613:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  614:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  615:                {
                    616:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    617:                    return;
                    618:                }
                    619:            }
                    620: 
                    621:            liberation(s_etat_processus, s_objet_1);
                    622:            liberation(s_etat_processus, s_objet_2);
                    623: 
                    624:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    625:            {
                    626:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    627:                {
                    628:                    return;
                    629:                }
                    630: 
                    631:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    632:            }
                    633: 
                    634:            return;
                    635:        }
                    636: 
                    637:        if (variable_partagee == d_vrai)
                    638:        {
                    639:            liberation(s_etat_processus,
1.39      bertrand  640:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                    641:                    .objet);
1.1       bertrand  642: 
                    643:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    644:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand  645:                    .pointeur_variable_partagee_courante).objet))
1.1       bertrand  646:                    == d_erreur)
                    647:            {
                    648:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  649:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  650:                {
                    651:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    652:                    return;
                    653:                }
                    654: 
                    655:                liberation(s_etat_processus, s_objet_1);
                    656: 
                    657:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    658:                {
                    659:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    660:                    {
                    661:                        return;
                    662:                    }
                    663: 
                    664:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    665:                }
                    666: 
                    667:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    668:                return;
                    669:            }
                    670: 
                    671:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  672:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  673:            {
                    674:                (*s_etat_processus).erreur_systeme = d_es_processus;
                    675:                return;
                    676:            }
                    677:        }
                    678:        else
                    679:        {
                    680:            liberation(s_etat_processus,
1.19      bertrand  681:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand  682: 
                    683:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand  684:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                    685:                    == d_erreur)
1.1       bertrand  686:            {
                    687:                liberation(s_etat_processus, s_objet_1);
                    688: 
                    689:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    690:                {
                    691:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    692:                    {
                    693:                        return;
                    694:                    }
                    695: 
                    696:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    697:                }
                    698: 
                    699:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    700:                return;
                    701:            }
                    702:        }
                    703:    }
                    704:    else if (((*s_objet_2).type == NOM) &&
                    705:            (((*s_objet_1).type == INT) ||
                    706:            ((*s_objet_1).type == REL) ||
                    707:            ((*s_objet_1).type == CPL) ||
                    708:            ((*s_objet_1).type == VIN) ||
                    709:            ((*s_objet_1).type == VRL) ||
                    710:            ((*s_objet_1).type == VCX) ||
                    711:            ((*s_objet_1).type == MIN) ||
                    712:            ((*s_objet_1).type == MRL) ||
                    713:            ((*s_objet_1).type == MCX)))
                    714:    {
                    715:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                    716:                (*s_objet_2).objet)).nom) == d_faux)
                    717:        {
                    718:            (*s_etat_processus).erreur_systeme = d_es;
                    719:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                    720: 
                    721:            liberation(s_etat_processus, s_objet_1);
                    722:            liberation(s_etat_processus, s_objet_2);
                    723: 
                    724:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    725:            {
                    726:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    727:                {
                    728:                    return;
                    729:                }
                    730: 
                    731:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    732:            }
                    733: 
                    734:            return;
                    735:        }
                    736: 
1.19      bertrand  737:        if ((*(*s_etat_processus).pointeur_variable_courante)
                    738:                .variable_verrouillee == d_vrai)
1.1       bertrand  739:        {
                    740:            liberation(s_etat_processus, s_objet_1);
                    741:            liberation(s_etat_processus, s_objet_2);
                    742: 
                    743:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    744:            {
                    745:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    746:                {
                    747:                    return;
                    748:                }
                    749: 
                    750:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    751:            }
                    752: 
                    753:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                    754:            return;
                    755:        }
                    756: 
1.19      bertrand  757:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand  758:        {
                    759:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand  760:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                    761:                    (*(*s_etat_processus).pointeur_variable_courante)
                    762:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand  763:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand  764:            {
                    765:                (*s_etat_processus).erreur_systeme = d_es;
                    766:                (*s_etat_processus).erreur_execution =
                    767:                        d_ex_variable_non_definie;
                    768: 
                    769:                liberation(s_etat_processus, s_objet_1);
                    770:                liberation(s_etat_processus, s_objet_2);
                    771: 
                    772:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    773:                {
                    774:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    775:                    {
                    776:                        return;
                    777:                    }
                    778: 
                    779:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    780:                }
                    781: 
                    782:                return;
                    783:            }
                    784: 
                    785:            variable_partagee = d_vrai;
                    786: 
                    787:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand  788:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand  789:            {
                    790:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  791:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  792:                {
                    793:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    794:                    return;
                    795:                }
                    796: 
                    797:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    798: 
                    799:                liberation(s_etat_processus, s_objet_1);
                    800:                liberation(s_etat_processus, s_objet_2);
                    801: 
                    802:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    803:                {
                    804:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    805:                    {
                    806:                        return;
                    807:                    }
                    808: 
                    809:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    810:                }
                    811: 
                    812:                return;
                    813:            }
                    814:        }
                    815:        else
                    816:        {
                    817:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand  818:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand  819:                    'P')) == NULL)
                    820:            {
                    821:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                    822: 
                    823:                liberation(s_etat_processus, s_objet_1);
                    824:                liberation(s_etat_processus, s_objet_2);
                    825: 
                    826:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    827:                {
                    828:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    829:                    {
                    830:                        return;
                    831:                    }
                    832: 
                    833:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    834:                }
                    835: 
                    836:                return;
                    837:            }
                    838:        }
                    839: 
                    840:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    841:                s_objet_3) == d_erreur)
                    842:        {
                    843:            if (variable_partagee == d_vrai)
                    844:            {
                    845:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  846:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  847:                {
                    848:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    849:                    return;
                    850:                }
                    851:            }
                    852: 
                    853:            return;
                    854:        }
                    855: 
                    856:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    857:                s_objet_1) == d_erreur)
                    858:        {
                    859:            if (variable_partagee == d_vrai)
                    860:            {
                    861:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  862:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  863:                {
                    864:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    865:                    return;
                    866:                }
                    867:            }
                    868: 
                    869:            return;
                    870:        }
                    871: 
                    872:        instruction_plus(s_etat_processus);
                    873:        s_objet_1 = NULL;
                    874:        /* s_objet_1 et s_objet_3 sont libérés par cet appel... */
                    875: 
                    876:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                    877:                ((*s_etat_processus).erreur_execution != d_ex) ||
                    878:                ((*s_etat_processus).exception != d_ep))
                    879:        {
                    880:            if (variable_partagee == d_vrai)
                    881:            {
                    882:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  883:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  884:                {
                    885:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    886:                    return;
                    887:                }
                    888:            }
                    889: 
                    890:            liberation(s_etat_processus, s_objet_1);
                    891:            liberation(s_etat_processus, s_objet_2);
                    892: 
                    893:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    894:            {
                    895:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    896:                {
                    897:                    return;
                    898:                }
                    899: 
                    900:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    901:            }
                    902: 
                    903:            return;
                    904:        }
                    905: 
                    906:        if (variable_partagee == d_vrai)
                    907:        {
                    908:            liberation(s_etat_processus,
1.39      bertrand  909:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                    910:                    .objet);
1.1       bertrand  911: 
                    912:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                    913:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand  914:                    .pointeur_variable_partagee_courante).objet))
1.1       bertrand  915:                    == d_erreur)
                    916:            {
                    917:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  918:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  919:                {
                    920:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                    921:                    return;
                    922:                }
                    923: 
                    924:                liberation(s_etat_processus, s_objet_1);
                    925: 
                    926:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    927:                {
                    928:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    929:                    {
                    930:                        return;
                    931:                    }
                    932: 
                    933:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    934:                }
                    935: 
                    936:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    937:                return;
                    938:            }
                    939: 
                    940:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand  941:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand  942:            {
                    943:                (*s_etat_processus).erreur_systeme = d_es_processus;
                    944:                return;
                    945:            }
                    946:        }
                    947:        else
                    948:        {
                    949:            liberation(s_etat_processus,
1.19      bertrand  950:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand  951: 
                    952:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand  953:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                    954:                    == d_erreur)
1.1       bertrand  955:            {
                    956:                liberation(s_etat_processus, s_objet_1);
                    957: 
                    958:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    959:                {
                    960:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    961:                    {
                    962:                        return;
                    963:                    }
                    964: 
                    965:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    966:                }
                    967: 
                    968:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                    969:                return;
                    970:            }
                    971:        }
                    972:    }
                    973: 
                    974: /*
                    975: --------------------------------------------------------------------------------
                    976:   Arguments incompatibles avec la fonction STO+
                    977: --------------------------------------------------------------------------------
                    978: */
                    979: 
                    980:    else
                    981:    {
                    982:        liberation(s_etat_processus, s_objet_1);
                    983:        liberation(s_etat_processus, s_objet_2);
                    984: 
                    985:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                    986:        {
                    987:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                    988:            {
                    989:                return;
                    990:            }
                    991: 
                    992:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                    993:        }
                    994: 
                    995:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                    996:        return;
                    997:    }
                    998: 
                    999:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1000:    {
                   1001:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1002:        {
                   1003:            return;
                   1004:        }
                   1005: 
                   1006:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1007:    }
                   1008: 
                   1009:    liberation(s_etat_processus, s_objet_1);
                   1010:    liberation(s_etat_processus, s_objet_2);
                   1011: 
                   1012:    return;
                   1013: }
                   1014: 
                   1015: 
                   1016: /*
                   1017: ================================================================================
                   1018:   Fonction 'sto-'
                   1019: ================================================================================
                   1020:   Entrées :
                   1021: --------------------------------------------------------------------------------
                   1022:   Sorties :
                   1023: --------------------------------------------------------------------------------
                   1024:   Effets de bord : néant
                   1025: ================================================================================
                   1026: */
                   1027: 
                   1028: void
                   1029: instruction_sto_moins(struct_processus *s_etat_processus)
                   1030: {
                   1031:    logical1                        variable_partagee;
                   1032: 
                   1033:    struct_liste_chainee            *registre_pile_last;
                   1034: 
                   1035:    struct_objet                    *s_objet_1;
                   1036:    struct_objet                    *s_objet_2;
                   1037:    struct_objet                    *s_objet_3;
                   1038: 
                   1039:    (*s_etat_processus).erreur_execution = d_ex;
                   1040: 
                   1041:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   1042:    {
                   1043:        printf("\n  STO- ");
                   1044: 
                   1045:        if ((*s_etat_processus).langue == 'F')
                   1046:        {
                   1047:            printf("(modification d'une variable par soustraction)\n\n");
                   1048:        }
                   1049:        else
                   1050:        {
                   1051:            printf("(substract from the content of a variable)\n\n");
                   1052:        }
                   1053: 
                   1054:        printf("    2: %s, %s, %s, %s, %s, %s,\n"
                   1055:                "       %s, %s, %s\n",
                   1056:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   1057:        printf("    1: %s\n\n", d_NOM);
                   1058: 
                   1059:        printf("    2: %s\n", d_NOM);
                   1060:        printf("    1: %s, %s, %s, %s, %s, %s,\n"
                   1061:                "       %s, %s, %s\n",
                   1062:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   1063: 
                   1064:        return;
                   1065:    }
                   1066:    else if ((*s_etat_processus).test_instruction == 'Y')
                   1067:    {
                   1068:        (*s_etat_processus).nombre_arguments = -1;
                   1069:        return;
                   1070:    }
                   1071:    
                   1072:    registre_pile_last = NULL;
                   1073: 
                   1074:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1075:    {
                   1076:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                   1077:        {
                   1078:            return;
                   1079:        }
                   1080: 
                   1081:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   1082:        (*s_etat_processus).l_base_pile_last = NULL;
                   1083:    }
                   1084: 
                   1085:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1086:            &s_objet_1) == d_erreur)
                   1087:    {
                   1088:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1089: 
                   1090:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1091:        {
                   1092:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1093:            {
                   1094:                return;
                   1095:            }
                   1096: 
                   1097:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1098:        }
                   1099: 
                   1100:        return;
                   1101:    }
                   1102: 
                   1103:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1104:            &s_objet_2) == d_erreur)
                   1105:    {
                   1106:        liberation(s_etat_processus, s_objet_1);
                   1107: 
                   1108:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1109:        {
                   1110:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1111:            {
                   1112:                return;
                   1113:            }
                   1114: 
                   1115:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1116:        }
                   1117: 
                   1118:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1119:        return;
                   1120:    }
                   1121: 
                   1122:    variable_partagee = d_faux;
                   1123: 
                   1124: /*
                   1125: --------------------------------------------------------------------------------
                   1126:   Une valeur et un nom
                   1127: --------------------------------------------------------------------------------
                   1128: */
                   1129: 
                   1130:    if (((*s_objet_1).type == NOM) &&
                   1131:            (((*s_objet_2).type == INT) ||
                   1132:            ((*s_objet_2).type == REL) ||
                   1133:            ((*s_objet_2).type == CPL) ||
                   1134:            ((*s_objet_2).type == VIN) ||
                   1135:            ((*s_objet_2).type == VRL) ||
                   1136:            ((*s_objet_2).type == VCX) ||
                   1137:            ((*s_objet_2).type == MIN) ||
                   1138:            ((*s_objet_2).type == MRL) ||
                   1139:            ((*s_objet_2).type == MCX)))
                   1140:    {
                   1141:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   1142:                (*s_objet_1).objet)).nom) == d_faux)
                   1143:        {
                   1144:            (*s_etat_processus).erreur_systeme = d_es;
                   1145:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   1146: 
                   1147:            liberation(s_etat_processus, s_objet_1);
                   1148:            liberation(s_etat_processus, s_objet_2);
                   1149: 
                   1150:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1151:            {
                   1152:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1153:                {
                   1154:                    return;
                   1155:                }
                   1156: 
                   1157:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1158:            }
                   1159: 
                   1160:            return;
                   1161:        }
                   1162: 
1.19      bertrand 1163:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   1164:                .variable_verrouillee == d_vrai)
1.1       bertrand 1165:        {
                   1166:            liberation(s_etat_processus, s_objet_1);
                   1167:            liberation(s_etat_processus, s_objet_2);
                   1168: 
                   1169:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1170:            {
                   1171:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1172:                {
                   1173:                    return;
                   1174:                }
                   1175: 
                   1176:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1177:            }
                   1178: 
                   1179:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   1180:            return;
                   1181:        }
                   1182: 
1.19      bertrand 1183:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 1184:        {
                   1185:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 1186:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   1187:                    (*(*s_etat_processus).pointeur_variable_courante)
                   1188:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 1189:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 1190:            {
                   1191:                (*s_etat_processus).erreur_systeme = d_es;
                   1192:                (*s_etat_processus).erreur_execution =
                   1193:                        d_ex_variable_non_definie;
                   1194: 
                   1195:                liberation(s_etat_processus, s_objet_1);
                   1196:                liberation(s_etat_processus, s_objet_2);
                   1197: 
                   1198:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1199:                {
                   1200:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1201:                    {
                   1202:                        return;
                   1203:                    }
                   1204: 
                   1205:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1206:                }
                   1207: 
                   1208:                return;
                   1209:            }
                   1210: 
                   1211:            variable_partagee = d_vrai;
                   1212: 
                   1213:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 1214:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 1215:            {
                   1216:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1217:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1218:                {
                   1219:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1220:                    return;
                   1221:                }
                   1222: 
                   1223:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1224: 
                   1225:                liberation(s_etat_processus, s_objet_1);
                   1226:                liberation(s_etat_processus, s_objet_2);
                   1227: 
                   1228:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1229:                {
                   1230:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1231:                    {
                   1232:                        return;
                   1233:                    }
                   1234: 
                   1235:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1236:                }
                   1237: 
                   1238:                return;
                   1239:            }
                   1240:        }
                   1241:        else
                   1242:        {
                   1243:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 1244:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 1245:                    'P')) == NULL)
                   1246:            {
                   1247:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1248: 
                   1249:                liberation(s_etat_processus, s_objet_1);
                   1250:                liberation(s_etat_processus, s_objet_2);
                   1251: 
                   1252:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1253:                {
                   1254:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1255:                    {
                   1256:                        return;
                   1257:                    }
                   1258: 
                   1259:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1260:                }
                   1261: 
                   1262:                return;
                   1263:            }
                   1264:        }
                   1265: 
                   1266:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1267:                s_objet_2) == d_erreur)
                   1268:        {
                   1269:            if (variable_partagee == d_vrai)
                   1270:            {
                   1271:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1272:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1273:                {
                   1274:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1275:                    return;
                   1276:                }
                   1277:            }
                   1278: 
                   1279:            return;
                   1280:        }
                   1281: 
                   1282:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1283:                s_objet_3) == d_erreur)
                   1284:        {
                   1285:            if (variable_partagee == d_vrai)
                   1286:            {
                   1287:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1288:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1289:                {
                   1290:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1291:                    return;
                   1292:                }
                   1293:            }
                   1294: 
                   1295:            return;
                   1296:        }
                   1297: 
                   1298:        instruction_moins(s_etat_processus);
                   1299:        s_objet_2 = NULL;
                   1300:        /* s_objet_2 et s_objet_3 sont libérés par cet appel... */
                   1301: 
                   1302:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1303:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1304:                ((*s_etat_processus).exception != d_ep))
                   1305:        {
                   1306:            if (variable_partagee == d_vrai)
                   1307:            {
                   1308:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1309:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1310:                {
                   1311:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1312:                    return;
                   1313:                }
                   1314:            }
                   1315: 
                   1316:            liberation(s_etat_processus, s_objet_1);
                   1317:            liberation(s_etat_processus, s_objet_2);
                   1318: 
                   1319:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1320:            {
                   1321:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1322:                {
                   1323:                    return;
                   1324:                }
                   1325: 
                   1326:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1327:            }
                   1328: 
                   1329:            return;
                   1330:        }
                   1331: 
                   1332:        if (variable_partagee == d_vrai)
                   1333:        {
                   1334:            liberation(s_etat_processus,
1.39      bertrand 1335:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   1336:                    .objet);
1.1       bertrand 1337: 
                   1338:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1339:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 1340:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 1341:            {
                   1342:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1343:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1344:                {
                   1345:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1346:                    return;
                   1347:                }
                   1348: 
                   1349:                liberation(s_etat_processus, s_objet_1);
                   1350: 
                   1351:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1352:                {
                   1353:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1354:                    {
                   1355:                        return;
                   1356:                    }
                   1357: 
                   1358:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1359:                }
                   1360: 
                   1361:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1362:                return;
                   1363:            }
                   1364: 
                   1365:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1366:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1367:            {
                   1368:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   1369:                return;
                   1370:            }
                   1371:        }
                   1372:        else
                   1373:        {
                   1374:            liberation(s_etat_processus,
1.19      bertrand 1375:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 1376: 
                   1377:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 1378:                    &((*(*s_etat_processus).pointeur_variable_courante)
                   1379:                    .objet)) == d_erreur)
1.1       bertrand 1380:            {
                   1381:                liberation(s_etat_processus, s_objet_1);
                   1382: 
                   1383:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1384:                {
                   1385:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1386:                    {
                   1387:                        return;
                   1388:                    }
                   1389: 
                   1390:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1391:                }
                   1392: 
                   1393:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1394:                return;
                   1395:            }
                   1396:        }
                   1397:    }
                   1398:    else if (((*s_objet_2).type == NOM) &&
                   1399:            (((*s_objet_1).type == INT) ||
                   1400:            ((*s_objet_1).type == REL) ||
                   1401:            ((*s_objet_1).type == CPL) ||
                   1402:            ((*s_objet_1).type == VIN) ||
                   1403:            ((*s_objet_1).type == VRL) ||
                   1404:            ((*s_objet_1).type == VCX) ||
                   1405:            ((*s_objet_1).type == MIN) ||
                   1406:            ((*s_objet_1).type == MRL) ||
                   1407:            ((*s_objet_1).type == MCX)))
                   1408:    {
                   1409:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   1410:                (*s_objet_2).objet)).nom) == d_faux)
                   1411:        {
                   1412:            (*s_etat_processus).erreur_systeme = d_es;
                   1413:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   1414: 
                   1415:            liberation(s_etat_processus, s_objet_1);
                   1416:            liberation(s_etat_processus, s_objet_2);
                   1417: 
                   1418:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1419:            {
                   1420:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1421:                {
                   1422:                    return;
                   1423:                }
                   1424: 
                   1425:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1426:            }
                   1427: 
                   1428:            return;
                   1429:        }
                   1430: 
1.19      bertrand 1431:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   1432:                .variable_verrouillee == d_vrai)
1.1       bertrand 1433:        {
                   1434:            liberation(s_etat_processus, s_objet_1);
                   1435:            liberation(s_etat_processus, s_objet_2);
                   1436: 
                   1437:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1438:            {
                   1439:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1440:                {
                   1441:                    return;
                   1442:                }
                   1443: 
                   1444:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1445:            }
                   1446: 
                   1447:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   1448:            return;
                   1449:        }
                   1450: 
1.19      bertrand 1451:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 1452:        {
                   1453:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 1454:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   1455:                    (*(*s_etat_processus).pointeur_variable_courante)
                   1456:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 1457:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 1458:            {
                   1459:                (*s_etat_processus).erreur_systeme = d_es;
                   1460:                (*s_etat_processus).erreur_execution =
                   1461:                        d_ex_variable_non_definie;
                   1462: 
                   1463:                liberation(s_etat_processus, s_objet_1);
                   1464:                liberation(s_etat_processus, s_objet_2);
                   1465: 
                   1466:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1467:                {
                   1468:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1469:                    {
                   1470:                        return;
                   1471:                    }
                   1472: 
                   1473:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1474:                }
                   1475: 
                   1476:                return;
                   1477:            }
                   1478: 
                   1479:            variable_partagee = d_vrai;
                   1480: 
                   1481:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 1482:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 1483:            {
                   1484:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1485:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1486:                {
                   1487:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1488:                    return;
                   1489:                }
                   1490: 
                   1491:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1492: 
                   1493:                liberation(s_etat_processus, s_objet_1);
                   1494:                liberation(s_etat_processus, s_objet_2);
                   1495: 
                   1496:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1497:                {
                   1498:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1499:                    {
                   1500:                        return;
                   1501:                    }
                   1502: 
                   1503:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1504:                }
                   1505: 
                   1506:                return;
                   1507:            }
                   1508:        }
                   1509:        else
                   1510:        {
                   1511:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 1512:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 1513:                    'P')) == NULL)
                   1514:            {
                   1515:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1516: 
                   1517:                liberation(s_etat_processus, s_objet_1);
                   1518:                liberation(s_etat_processus, s_objet_2);
                   1519: 
                   1520:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1521:                {
                   1522:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1523:                    {
                   1524:                        return;
                   1525:                    }
                   1526: 
                   1527:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1528:                }
                   1529: 
                   1530:                return;
                   1531:            }
                   1532:        }
                   1533: 
                   1534:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1535:                s_objet_3) == d_erreur)
                   1536:        {
                   1537:            if (variable_partagee == d_vrai)
                   1538:            {
                   1539:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1540:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1541:                {
                   1542:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1543:                    return;
                   1544:                }
                   1545:            }
                   1546: 
                   1547:            return;
                   1548:        }
                   1549: 
                   1550:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1551:                s_objet_1) == d_erreur)
                   1552:        {
                   1553:            if (variable_partagee == d_vrai)
                   1554:            {
                   1555:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1556:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1557:                {
                   1558:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1559:                    return;
                   1560:                }
                   1561:            }
                   1562: 
                   1563:            return;
                   1564:        }
                   1565: 
                   1566:        instruction_moins(s_etat_processus);
                   1567:        s_objet_1 = NULL;
                   1568:        /* s_objet_1 et s_objet_3 sont libérés par cet appel... */
                   1569: 
                   1570:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1571:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1572:                ((*s_etat_processus).exception != d_ep))
                   1573:        {
                   1574:            if (variable_partagee == d_vrai)
                   1575:            {
                   1576:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1577:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1578:                {
                   1579:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1580:                    return;
                   1581:                }
                   1582:            }
                   1583: 
                   1584:            liberation(s_etat_processus, s_objet_1);
                   1585:            liberation(s_etat_processus, s_objet_2);
                   1586: 
                   1587:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1588:            {
                   1589:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1590:                {
                   1591:                    return;
                   1592:                }
                   1593: 
                   1594:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1595:            }
                   1596: 
                   1597:            return;
                   1598:        }
                   1599: 
                   1600:        if (variable_partagee == d_vrai)
                   1601:        {
                   1602:            liberation(s_etat_processus,
1.39      bertrand 1603:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   1604:                    .objet);
1.1       bertrand 1605: 
                   1606:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1607:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 1608:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 1609:            {
                   1610:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1611:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1612:                {
                   1613:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1614:                    return;
                   1615:                }
                   1616: 
                   1617:                liberation(s_etat_processus, s_objet_1);
                   1618: 
                   1619:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1620:                {
                   1621:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1622:                    {
                   1623:                        return;
                   1624:                    }
                   1625: 
                   1626:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1627:                }
                   1628: 
                   1629:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1630:                return;
                   1631:            }
                   1632: 
                   1633:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1634:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1635:            {
                   1636:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   1637:                return;
                   1638:            }
                   1639:        }
                   1640:        else
                   1641:        {
                   1642:            liberation(s_etat_processus,
1.19      bertrand 1643:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 1644: 
                   1645:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 1646:                    &((*(*s_etat_processus).pointeur_variable_courante)
                   1647:                    .objet)) == d_erreur)
1.1       bertrand 1648:            {
                   1649:                liberation(s_etat_processus, s_objet_1);
                   1650: 
                   1651:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1652:                {
                   1653:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1654:                    {
                   1655:                        return;
                   1656:                    }
                   1657: 
                   1658:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1659:                }
                   1660: 
                   1661:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1662:                return;
                   1663:            }
                   1664:        }
                   1665:    }
                   1666: 
                   1667: /*
                   1668: --------------------------------------------------------------------------------
                   1669:   Arguments incompatibles avec la fonction STO-
                   1670: --------------------------------------------------------------------------------
                   1671: */
                   1672: 
                   1673:    else
                   1674:    {
                   1675:        liberation(s_etat_processus, s_objet_1);
                   1676:        liberation(s_etat_processus, s_objet_2);
                   1677: 
                   1678:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1679:        {
                   1680:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1681:            {
                   1682:                return;
                   1683:            }
                   1684: 
                   1685:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1686:        }
                   1687: 
                   1688:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   1689:        return;
                   1690:    }
                   1691: 
                   1692:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1693:    {
                   1694:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1695:        {
                   1696:            return;
                   1697:        }
                   1698: 
                   1699:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1700:    }
                   1701: 
                   1702:    liberation(s_etat_processus, s_objet_1);
                   1703:    liberation(s_etat_processus, s_objet_2);
                   1704: 
                   1705:    return;
                   1706: }
                   1707: 
                   1708: 
                   1709: /*
                   1710: ================================================================================
                   1711:   Fonction 'sto*'
                   1712: ================================================================================
                   1713:   Entrées :
                   1714: --------------------------------------------------------------------------------
                   1715:   Sorties :
                   1716: --------------------------------------------------------------------------------
                   1717:   Effets de bord : néant
                   1718: ================================================================================
                   1719: */
                   1720: 
                   1721: void
                   1722: instruction_sto_fois(struct_processus *s_etat_processus)
                   1723: {
                   1724:    logical1                        variable_partagee;
                   1725: 
                   1726:    struct_liste_chainee            *registre_pile_last;
                   1727: 
                   1728:    struct_objet                    *s_objet_1;
                   1729:    struct_objet                    *s_objet_2;
                   1730:    struct_objet                    *s_objet_3;
                   1731: 
                   1732:    (*s_etat_processus).erreur_execution = d_ex;
                   1733: 
                   1734:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   1735:    {
                   1736:        printf("\n  STO* ");
                   1737: 
                   1738:        if ((*s_etat_processus).langue == 'F')
                   1739:        {
                   1740:            printf("(modification d'une variable par multiplication)\n\n");
                   1741:        }
                   1742:        else
                   1743:        {
                   1744:            printf("(multiply the content of a variable)\n\n");
                   1745:        }
                   1746: 
                   1747:        printf("    2: %s, %s, %s, %s, %s, %s,\n"
                   1748:                "       %s, %s, %s\n",
                   1749:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   1750:        printf("    1: %s\n\n", d_NOM);
                   1751: 
                   1752:        printf("    2: %s\n", d_NOM);
                   1753:        printf("    1: %s, %s, %s, %s, %s, %s,\n"
                   1754:                "       %s, %s, %s\n",
                   1755:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   1756: 
                   1757:        return;
                   1758:    }
                   1759:    else if ((*s_etat_processus).test_instruction == 'Y')
                   1760:    {
                   1761:        (*s_etat_processus).nombre_arguments = -1;
                   1762:        return;
                   1763:    }
                   1764:    
                   1765:    registre_pile_last = NULL;
                   1766: 
                   1767:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1768:    {
                   1769:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                   1770:        {
                   1771:            return;
                   1772:        }
                   1773: 
                   1774:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   1775:        (*s_etat_processus).l_base_pile_last = NULL;
                   1776:    }
                   1777: 
                   1778:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1779:            &s_objet_1) == d_erreur)
                   1780:    {
                   1781:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1782: 
                   1783:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1784:        {
                   1785:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1786:            {
                   1787:                return;
                   1788:            }
                   1789: 
                   1790:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1791:        }
                   1792: 
                   1793:        return;
                   1794:    }
                   1795: 
                   1796:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1797:            &s_objet_2) == d_erreur)
                   1798:    {
                   1799:        liberation(s_etat_processus, s_objet_1);
                   1800: 
                   1801:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1802:        {
                   1803:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1804:            {
                   1805:                return;
                   1806:            }
                   1807: 
                   1808:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1809:        }
                   1810: 
                   1811:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   1812:        return;
                   1813:    }
                   1814: 
                   1815: /*
                   1816: --------------------------------------------------------------------------------
                   1817:   Une valeur et un nom
                   1818: --------------------------------------------------------------------------------
                   1819: */
                   1820: 
                   1821:    variable_partagee = d_faux;
                   1822: 
                   1823:    if (((*s_objet_1).type == NOM) &&
                   1824:            (((*s_objet_2).type == INT) ||
                   1825:            ((*s_objet_2).type == REL) ||
                   1826:            ((*s_objet_2).type == CPL) ||
                   1827:            ((*s_objet_2).type == VIN) ||
                   1828:            ((*s_objet_2).type == VRL) ||
                   1829:            ((*s_objet_2).type == VCX) ||
                   1830:            ((*s_objet_2).type == MIN) ||
                   1831:            ((*s_objet_2).type == MRL) ||
                   1832:            ((*s_objet_2).type == MCX)))
                   1833:    {
                   1834:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   1835:                (*s_objet_1).objet)).nom) == d_faux)
                   1836:        {
                   1837:            (*s_etat_processus).erreur_systeme = d_es;
                   1838:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   1839: 
                   1840:            liberation(s_etat_processus, s_objet_1);
                   1841:            liberation(s_etat_processus, s_objet_2);
                   1842: 
                   1843:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1844:            {
                   1845:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1846:                {
                   1847:                    return;
                   1848:                }
                   1849: 
                   1850:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1851:            }
                   1852: 
                   1853:            return;
                   1854:        }
                   1855: 
1.19      bertrand 1856:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   1857:                .variable_verrouillee == d_vrai)
1.1       bertrand 1858:        {
                   1859:            liberation(s_etat_processus, s_objet_1);
                   1860:            liberation(s_etat_processus, s_objet_2);
                   1861: 
                   1862:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1863:            {
                   1864:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1865:                {
                   1866:                    return;
                   1867:                }
                   1868: 
                   1869:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1870:            }
                   1871: 
                   1872:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   1873:            return;
                   1874:        }
                   1875: 
1.19      bertrand 1876:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 1877:        {
                   1878:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 1879:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   1880:                    (*(*s_etat_processus).pointeur_variable_courante)
                   1881:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 1882:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 1883:            {
                   1884:                (*s_etat_processus).erreur_systeme = d_es;
                   1885:                (*s_etat_processus).erreur_execution =
                   1886:                        d_ex_variable_non_definie;
                   1887: 
                   1888:                liberation(s_etat_processus, s_objet_1);
                   1889:                liberation(s_etat_processus, s_objet_2);
                   1890: 
                   1891:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1892:                {
                   1893:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1894:                    {
                   1895:                        return;
                   1896:                    }
                   1897: 
                   1898:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1899:                }
                   1900: 
                   1901:                return;
                   1902:            }
                   1903: 
                   1904:            variable_partagee = d_vrai;
                   1905: 
                   1906:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 1907:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 1908:            {
                   1909:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1910:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1911:                {
                   1912:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1913:                    return;
                   1914:                }
                   1915: 
                   1916:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1917: 
                   1918:                liberation(s_etat_processus, s_objet_1);
                   1919:                liberation(s_etat_processus, s_objet_2);
                   1920: 
                   1921:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1922:                {
                   1923:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1924:                    {
                   1925:                        return;
                   1926:                    }
                   1927: 
                   1928:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1929:                }
                   1930: 
                   1931:                return;
                   1932:            }
                   1933:        }
                   1934:        else
                   1935:        {
                   1936:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 1937:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 1938:                    'P')) == NULL)
                   1939:            {
                   1940:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   1941: 
                   1942:                liberation(s_etat_processus, s_objet_1);
                   1943:                liberation(s_etat_processus, s_objet_2);
                   1944: 
                   1945:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   1946:                {
                   1947:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   1948:                    {
                   1949:                        return;
                   1950:                    }
                   1951: 
                   1952:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   1953:                }
                   1954: 
                   1955:                return;
                   1956:            }
                   1957:        }
                   1958: 
                   1959:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1960:                s_objet_2) == d_erreur)
                   1961:        {
                   1962:            if (variable_partagee == d_vrai)
                   1963:            {
                   1964:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1965:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1966:                {
                   1967:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1968:                    return;
                   1969:                }
                   1970:            }
                   1971: 
                   1972:            return;
                   1973:        }
                   1974: 
                   1975:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   1976:                s_objet_3) == d_erreur)
                   1977:        {
                   1978:            if (variable_partagee == d_vrai)
                   1979:            {
                   1980:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 1981:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 1982:                {
                   1983:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   1984:                    return;
                   1985:                }
                   1986:            }
                   1987: 
                   1988:            return;
                   1989:        }
                   1990: 
                   1991:        instruction_multiplication(s_etat_processus);
                   1992:        s_objet_2 = NULL;
                   1993:        /* s_objet_2 et s_objet_3 sont libérés par cet appel... */
                   1994: 
                   1995:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   1996:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   1997:                ((*s_etat_processus).exception != d_ep))
                   1998:        {
                   1999:            if (variable_partagee == d_vrai)
                   2000:            {
                   2001:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2002:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2003:                {
                   2004:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2005:                    return;
                   2006:                }
                   2007:            }
                   2008: 
                   2009:            liberation(s_etat_processus, s_objet_1);
                   2010:            liberation(s_etat_processus, s_objet_2);
                   2011: 
                   2012:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2013:            {
                   2014:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2015:                {
                   2016:                    return;
                   2017:                }
                   2018: 
                   2019:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2020:            }
                   2021: 
                   2022:            return;
                   2023:        }
                   2024: 
                   2025:        if (variable_partagee == d_vrai)
                   2026:        {
                   2027:            liberation(s_etat_processus,
1.39      bertrand 2028:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   2029:                    .objet);
1.1       bertrand 2030: 
                   2031:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2032:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 2033:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 2034:            {
                   2035:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2036:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2037:                {
                   2038:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2039:                    return;
                   2040:                }
                   2041: 
                   2042:                liberation(s_etat_processus, s_objet_1);
                   2043: 
                   2044:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2045:                {
                   2046:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2047:                    {
                   2048:                        return;
                   2049:                    }
                   2050: 
                   2051:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2052:                }
                   2053: 
                   2054:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2055:                return;
                   2056:            }
                   2057: 
                   2058:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2059:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2060:            {
                   2061:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   2062:                return;
                   2063:            }
                   2064:        }
                   2065:        else
                   2066:        {
                   2067:            liberation(s_etat_processus,
1.19      bertrand 2068:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 2069: 
                   2070:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 2071:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   2072:                    == d_erreur)
1.1       bertrand 2073:            {
                   2074:                liberation(s_etat_processus, s_objet_1);
                   2075: 
                   2076:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2077:                {
                   2078:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2079:                    {
                   2080:                        return;
                   2081:                    }
                   2082: 
                   2083:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2084:                }
                   2085: 
                   2086:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2087:                return;
                   2088:            }
                   2089:        }
                   2090:    }
                   2091:    else if (((*s_objet_2).type == NOM) &&
                   2092:            (((*s_objet_1).type == INT) ||
                   2093:            ((*s_objet_1).type == REL) ||
                   2094:            ((*s_objet_1).type == CPL) ||
                   2095:            ((*s_objet_1).type == VIN) ||
                   2096:            ((*s_objet_1).type == VRL) ||
                   2097:            ((*s_objet_1).type == VCX) ||
                   2098:            ((*s_objet_1).type == MIN) ||
                   2099:            ((*s_objet_1).type == MRL) ||
                   2100:            ((*s_objet_1).type == MCX)))
                   2101:    {
                   2102:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   2103:                (*s_objet_2).objet)).nom) == d_faux)
                   2104:        {
                   2105:            (*s_etat_processus).erreur_systeme = d_es;
                   2106:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   2107: 
                   2108:            liberation(s_etat_processus, s_objet_1);
                   2109:            liberation(s_etat_processus, s_objet_2);
                   2110: 
                   2111:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2112:            {
                   2113:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2114:                {
                   2115:                    return;
                   2116:                }
                   2117: 
                   2118:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2119:            }
                   2120: 
                   2121:            return;
                   2122:        }
                   2123: 
1.19      bertrand 2124:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   2125:                .variable_verrouillee == d_vrai)
1.1       bertrand 2126:        {
                   2127:            liberation(s_etat_processus, s_objet_1);
                   2128:            liberation(s_etat_processus, s_objet_2);
                   2129: 
                   2130:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2131:            {
                   2132:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2133:                {
                   2134:                    return;
                   2135:                }
                   2136: 
                   2137:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2138:            }
                   2139: 
                   2140:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   2141:            return;
                   2142:        }
                   2143: 
1.19      bertrand 2144:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 2145:        {
                   2146:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 2147:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   2148:                    (*(*s_etat_processus).pointeur_variable_courante)
                   2149:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 2150:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 2151:            {
                   2152:                (*s_etat_processus).erreur_systeme = d_es;
                   2153:                (*s_etat_processus).erreur_execution =
                   2154:                        d_ex_variable_non_definie;
                   2155: 
                   2156:                liberation(s_etat_processus, s_objet_1);
                   2157:                liberation(s_etat_processus, s_objet_2);
                   2158: 
                   2159:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2160:                {
                   2161:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2162:                    {
                   2163:                        return;
                   2164:                    }
                   2165: 
                   2166:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2167:                }
                   2168: 
                   2169:                return;
                   2170:            }
                   2171: 
                   2172:            variable_partagee = d_vrai;
                   2173: 
                   2174:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 2175:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 2176:            {
                   2177:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2178:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2179:                {
                   2180:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2181:                    return;
                   2182:                }
                   2183: 
                   2184:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2185: 
                   2186:                liberation(s_etat_processus, s_objet_1);
                   2187:                liberation(s_etat_processus, s_objet_2);
                   2188: 
                   2189:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2190:                {
                   2191:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2192:                    {
                   2193:                        return;
                   2194:                    }
                   2195: 
                   2196:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2197:                }
                   2198: 
                   2199:                return;
                   2200:            }
                   2201:        }
                   2202:        else
                   2203:        {
                   2204:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 2205:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 2206:                    'P')) == NULL)
                   2207:            {
                   2208:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2209: 
                   2210:                liberation(s_etat_processus, s_objet_1);
                   2211:                liberation(s_etat_processus, s_objet_2);
                   2212: 
                   2213:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2214:                {
                   2215:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2216:                    {
                   2217:                        return;
                   2218:                    }
                   2219: 
                   2220:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2221:                }
                   2222: 
                   2223:                return;
                   2224:            }
                   2225:        }
                   2226: 
                   2227:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2228:                s_objet_3) == d_erreur)
                   2229:        {
                   2230:            if (variable_partagee == d_vrai)
                   2231:            {
                   2232:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2233:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2234:                {
                   2235:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2236:                    return;
                   2237:                }
                   2238:            }
                   2239: 
                   2240:            return;
                   2241:        }
                   2242: 
                   2243:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2244:                s_objet_1) == d_erreur)
                   2245:        {
                   2246:            if (variable_partagee == d_vrai)
                   2247:            {
                   2248:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2249:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2250:                {
                   2251:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2252:                    return;
                   2253:                }
                   2254:            }
                   2255: 
                   2256:            return;
                   2257:        }
                   2258: 
                   2259:        instruction_multiplication(s_etat_processus);
                   2260:        s_objet_1 = NULL;
                   2261:        /* s_objet_1 et s_objet_3 sont libérés par cet appel... */
                   2262: 
                   2263:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   2264:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   2265:                ((*s_etat_processus).exception != d_ep))
                   2266:        {
                   2267:            if (variable_partagee == d_vrai)
                   2268:            {
                   2269:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2270:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2271:                {
                   2272:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2273:                    return;
                   2274:                }
                   2275:            }
                   2276: 
                   2277:            liberation(s_etat_processus, s_objet_1);
                   2278:            liberation(s_etat_processus, s_objet_2);
                   2279: 
                   2280:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2281:            {
                   2282:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2283:                {
                   2284:                    return;
                   2285:                }
                   2286: 
                   2287:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2288:            }
                   2289: 
                   2290:            return;
                   2291:        }
                   2292: 
                   2293:        if (variable_partagee == d_vrai)
                   2294:        {
                   2295:            liberation(s_etat_processus,
1.39      bertrand 2296:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   2297:                    .objet);
1.1       bertrand 2298: 
                   2299:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2300:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 2301:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 2302:            {
                   2303:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2304:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2305:                {
                   2306:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2307:                    return;
                   2308:                }
                   2309: 
                   2310:                liberation(s_etat_processus, s_objet_1);
                   2311: 
                   2312:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2313:                {
                   2314:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2315:                    {
                   2316:                        return;
                   2317:                    }
                   2318: 
                   2319:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2320:                }
                   2321: 
                   2322:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2323:                return;
                   2324:            }
                   2325: 
                   2326:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2327:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2328:            {
                   2329:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   2330:                return;
                   2331:            }
                   2332:        }
                   2333:        else
                   2334:        {
                   2335:            liberation(s_etat_processus,
1.19      bertrand 2336:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 2337: 
                   2338:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 2339:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   2340:                    == d_erreur)
1.1       bertrand 2341:            {
                   2342:                liberation(s_etat_processus, s_objet_1);
                   2343: 
                   2344:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2345:                {
                   2346:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2347:                    {
                   2348:                        return;
                   2349:                    }
                   2350: 
                   2351:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2352:                }
                   2353: 
                   2354:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2355:                return;
                   2356:            }
                   2357:        }
                   2358:    }
                   2359: 
                   2360: /*
                   2361: --------------------------------------------------------------------------------
                   2362:   Arguments incompatibles avec la fonction STO*
                   2363: --------------------------------------------------------------------------------
                   2364: */
                   2365: 
                   2366:    else
                   2367:    {
                   2368:        liberation(s_etat_processus, s_objet_1);
                   2369:        liberation(s_etat_processus, s_objet_2);
                   2370: 
                   2371:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2372:        {
                   2373:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2374:            {
                   2375:                return;
                   2376:            }
                   2377: 
                   2378:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2379:        }
                   2380: 
                   2381:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   2382:        return;
                   2383:    }
                   2384: 
                   2385:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2386:    {
                   2387:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2388:        {
                   2389:            return;
                   2390:        }
                   2391: 
                   2392:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2393:    }
                   2394: 
                   2395:    liberation(s_etat_processus, s_objet_1);
                   2396:    liberation(s_etat_processus, s_objet_2);
                   2397: 
                   2398:    return;
                   2399: }
                   2400: 
                   2401: 
                   2402: /*
                   2403: ================================================================================
                   2404:   Fonction 'sto/'
                   2405: ================================================================================
                   2406:   Entrées :
                   2407: --------------------------------------------------------------------------------
                   2408:   Sorties :
                   2409: --------------------------------------------------------------------------------
                   2410:   Effets de bord : néant
                   2411: ================================================================================
                   2412: */
                   2413: 
                   2414: void
                   2415: instruction_sto_division(struct_processus *s_etat_processus)
                   2416: {
                   2417:    logical1                        variable_partagee;
                   2418: 
                   2419:    struct_liste_chainee            *registre_pile_last;
                   2420: 
                   2421:    struct_objet                    *s_objet_1;
                   2422:    struct_objet                    *s_objet_2;
                   2423:    struct_objet                    *s_objet_3;
                   2424: 
                   2425:    (*s_etat_processus).erreur_execution = d_ex;
                   2426: 
                   2427:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   2428:    {
                   2429:        printf("\n  STO/ ");
                   2430: 
                   2431:        if ((*s_etat_processus).langue == 'F')
                   2432:        {
                   2433:            printf("(modification d'une variable par division)\n\n");
                   2434:        }
                   2435:        else
                   2436:        {
                   2437:            printf("(divide the content of a variable)\n\n");
                   2438:        }
                   2439: 
                   2440:        printf("    2: %s, %s, %s, %s, %s, %s,\n"
                   2441:                "       %s, %s, %s\n",
                   2442:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   2443:        printf("    1: %s\n\n", d_NOM);
                   2444: 
                   2445:        printf("    2: %s\n", d_NOM);
                   2446:        printf("    1: %s, %s, %s, %s, %s, %s,\n"
                   2447:                "       %s, %s, %s\n",
                   2448:                d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX);
                   2449: 
                   2450:        return;
                   2451:    }
                   2452:    else if ((*s_etat_processus).test_instruction == 'Y')
                   2453:    {
                   2454:        (*s_etat_processus).nombre_arguments = -1;
                   2455:        return;
                   2456:    }
                   2457:    
                   2458:    registre_pile_last = NULL;
                   2459: 
                   2460:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2461:    {
                   2462:        if (empilement_pile_last(s_etat_processus, 2) == d_erreur)
                   2463:        {
                   2464:            return;
                   2465:        }
                   2466: 
                   2467:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   2468:        (*s_etat_processus).l_base_pile_last = NULL;
                   2469:    }
                   2470: 
                   2471:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2472:            &s_objet_1) == d_erreur)
                   2473:    {
                   2474:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2475: 
                   2476:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2477:        {
                   2478:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2479:            {
                   2480:                return;
                   2481:            }
                   2482: 
                   2483:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2484:        }
                   2485: 
                   2486:        return;
                   2487:    }
                   2488: 
                   2489:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2490:            &s_objet_2) == d_erreur)
                   2491:    {
                   2492:        liberation(s_etat_processus, s_objet_1);
                   2493: 
                   2494:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2495:        {
                   2496:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2497:            {
                   2498:                return;
                   2499:            }
                   2500: 
                   2501:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2502:        }
                   2503: 
                   2504:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2505:        return;
                   2506:    }
                   2507: 
                   2508: /*
                   2509: --------------------------------------------------------------------------------
                   2510:   Une valeur et un nom
                   2511: --------------------------------------------------------------------------------
                   2512: */
                   2513: 
                   2514:    variable_partagee = d_faux;
                   2515: 
                   2516:    if (((*s_objet_1).type == NOM) &&
                   2517:            (((*s_objet_2).type == INT) ||
                   2518:            ((*s_objet_2).type == REL) ||
                   2519:            ((*s_objet_2).type == CPL) ||
                   2520:            ((*s_objet_2).type == VIN) ||
                   2521:            ((*s_objet_2).type == VRL) ||
                   2522:            ((*s_objet_2).type == VCX) ||
                   2523:            ((*s_objet_2).type == MIN) ||
                   2524:            ((*s_objet_2).type == MRL) ||
                   2525:            ((*s_objet_2).type == MCX)))
                   2526:    {
                   2527:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   2528:                (*s_objet_1).objet)).nom) == d_faux)
                   2529:        {
                   2530:            (*s_etat_processus).erreur_systeme = d_es;
                   2531:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   2532: 
                   2533:            liberation(s_etat_processus, s_objet_1);
                   2534:            liberation(s_etat_processus, s_objet_2);
                   2535: 
                   2536:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2537:            {
                   2538:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2539:                {
                   2540:                    return;
                   2541:                }
                   2542: 
                   2543:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2544:            }
                   2545: 
                   2546:            return;
                   2547:        }
                   2548: 
1.19      bertrand 2549:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   2550:                .variable_verrouillee == d_vrai)
1.1       bertrand 2551:        {
                   2552:            liberation(s_etat_processus, s_objet_1);
                   2553:            liberation(s_etat_processus, s_objet_2);
                   2554: 
                   2555:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2556:            {
                   2557:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2558:                {
                   2559:                    return;
                   2560:                }
                   2561: 
                   2562:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2563:            }
                   2564: 
                   2565:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   2566:            return;
                   2567:        }
                   2568: 
1.19      bertrand 2569:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 2570:        {
                   2571:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 2572:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   2573:                    (*(*s_etat_processus).pointeur_variable_courante)
                   2574:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 2575:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 2576:            {
                   2577:                (*s_etat_processus).erreur_systeme = d_es;
                   2578:                (*s_etat_processus).erreur_execution =
                   2579:                        d_ex_variable_non_definie;
                   2580: 
                   2581:                liberation(s_etat_processus, s_objet_1);
                   2582:                liberation(s_etat_processus, s_objet_2);
                   2583: 
                   2584:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2585:                {
                   2586:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2587:                    {
                   2588:                        return;
                   2589:                    }
                   2590: 
                   2591:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2592:                }
                   2593: 
                   2594:                return;
                   2595:            }
                   2596: 
                   2597:            variable_partagee = d_vrai;
                   2598: 
                   2599:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 2600:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 2601:            {
                   2602:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2603:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2604:                {
                   2605:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2606:                    return;
                   2607:                }
                   2608: 
                   2609:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2610: 
                   2611:                liberation(s_etat_processus, s_objet_1);
                   2612:                liberation(s_etat_processus, s_objet_2);
                   2613: 
                   2614:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2615:                {
                   2616:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2617:                    {
                   2618:                        return;
                   2619:                    }
                   2620: 
                   2621:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2622:                }
                   2623: 
                   2624:                return;
                   2625:            }
                   2626:        }
                   2627:        else
                   2628:        {
                   2629:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 2630:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 2631:                    'P')) == NULL)
                   2632:            {
                   2633:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2634: 
                   2635:                liberation(s_etat_processus, s_objet_1);
                   2636:                liberation(s_etat_processus, s_objet_2);
                   2637: 
                   2638:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2639:                {
                   2640:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2641:                    {
                   2642:                        return;
                   2643:                    }
                   2644: 
                   2645:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2646:                }
                   2647: 
                   2648:                return;
                   2649:            }
                   2650:        }
                   2651: 
                   2652:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2653:                s_objet_2) == d_erreur)
                   2654:        {
                   2655:            if (variable_partagee == d_vrai)
                   2656:            {
                   2657:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2658:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2659:                {
                   2660:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2661:                    return;
                   2662:                }
                   2663:            }
                   2664: 
                   2665:            return;
                   2666:        }
                   2667: 
                   2668:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2669:                s_objet_3) == d_erreur)
                   2670:        {
                   2671:            if (variable_partagee == d_vrai)
                   2672:            {
                   2673:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2674:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2675:                {
                   2676:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2677:                    return;
                   2678:                }
                   2679:            }
                   2680: 
                   2681:            return;
                   2682:        }
                   2683: 
                   2684:        instruction_division(s_etat_processus);
                   2685:        s_objet_2 = NULL;
                   2686:        /* s_objet_2 et s_objet_3 sont libérés par cet appel... */
                   2687: 
                   2688:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   2689:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   2690:                ((*s_etat_processus).exception != d_ep))
                   2691:        {
                   2692:            if (variable_partagee == d_vrai)
                   2693:            {
                   2694:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2695:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2696:                {
                   2697:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2698:                    return;
                   2699:                }
                   2700:            }
                   2701: 
                   2702:            liberation(s_etat_processus, s_objet_1);
                   2703:            liberation(s_etat_processus, s_objet_2);
                   2704: 
                   2705:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2706:            {
                   2707:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2708:                {
                   2709:                    return;
                   2710:                }
                   2711: 
                   2712:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2713:            }
                   2714: 
                   2715:            return;
                   2716:        }
                   2717: 
                   2718:        if (variable_partagee == d_vrai)
                   2719:        {
                   2720:            liberation(s_etat_processus,
1.39      bertrand 2721:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   2722:                    .objet);
1.1       bertrand 2723: 
                   2724:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2725:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 2726:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 2727:            {
                   2728:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2729:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2730:                {
                   2731:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2732:                    return;
                   2733:                }
                   2734: 
                   2735:                liberation(s_etat_processus, s_objet_1);
                   2736: 
                   2737:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2738:                {
                   2739:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2740:                    {
                   2741:                        return;
                   2742:                    }
                   2743: 
                   2744:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2745:                }
                   2746: 
                   2747:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2748:                return;
                   2749:            }
                   2750: 
                   2751:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2752:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2753:            {
                   2754:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   2755:                return;
                   2756:            }
                   2757:        }
                   2758:        else
                   2759:        {
                   2760:            liberation(s_etat_processus,
1.19      bertrand 2761:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 2762: 
                   2763:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 2764:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   2765:                    == d_erreur)
1.1       bertrand 2766:            {
                   2767:                liberation(s_etat_processus, s_objet_1);
                   2768: 
                   2769:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2770:                {
                   2771:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2772:                    {
                   2773:                        return;
                   2774:                    }
                   2775: 
                   2776:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2777:                }
                   2778: 
                   2779:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   2780:                return;
                   2781:            }
                   2782:        }
                   2783:    }
                   2784:    else if (((*s_objet_2).type == NOM) &&
                   2785:            (((*s_objet_1).type == INT) ||
                   2786:            ((*s_objet_1).type == REL) ||
                   2787:            ((*s_objet_1).type == CPL) ||
                   2788:            ((*s_objet_1).type == VIN) ||
                   2789:            ((*s_objet_1).type == VRL) ||
                   2790:            ((*s_objet_1).type == VCX) ||
                   2791:            ((*s_objet_1).type == MIN) ||
                   2792:            ((*s_objet_1).type == MRL) ||
                   2793:            ((*s_objet_1).type == MCX)))
                   2794:    {
                   2795:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   2796:                (*s_objet_2).objet)).nom) == d_faux)
                   2797:        {
                   2798:            (*s_etat_processus).erreur_systeme = d_es;
                   2799:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   2800: 
                   2801:            liberation(s_etat_processus, s_objet_1);
                   2802:            liberation(s_etat_processus, s_objet_2);
                   2803: 
                   2804:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2805:            {
                   2806:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2807:                {
                   2808:                    return;
                   2809:                }
                   2810: 
                   2811:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2812:            }
                   2813: 
                   2814:            return;
                   2815:        }
                   2816: 
1.19      bertrand 2817:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   2818:                .variable_verrouillee == d_vrai)
1.1       bertrand 2819:        {
                   2820:            liberation(s_etat_processus, s_objet_1);
                   2821:            liberation(s_etat_processus, s_objet_2);
                   2822: 
                   2823:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2824:            {
                   2825:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2826:                {
                   2827:                    return;
                   2828:                }
                   2829: 
                   2830:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2831:            }
                   2832: 
                   2833:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   2834:            return;
                   2835:        }
                   2836: 
1.19      bertrand 2837:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 2838:        {
                   2839:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 2840:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   2841:                    (*(*s_etat_processus).pointeur_variable_courante)
                   2842:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 2843:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 2844:            {
                   2845:                (*s_etat_processus).erreur_systeme = d_es;
                   2846:                (*s_etat_processus).erreur_execution =
                   2847:                        d_ex_variable_non_definie;
                   2848: 
                   2849:                liberation(s_etat_processus, s_objet_1);
                   2850:                liberation(s_etat_processus, s_objet_2);
                   2851: 
                   2852:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2853:                {
                   2854:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2855:                    {
                   2856:                        return;
                   2857:                    }
                   2858: 
                   2859:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2860:                }
                   2861: 
                   2862:                return;
                   2863:            }
                   2864: 
                   2865:            variable_partagee = d_vrai;
                   2866: 
                   2867:            if ((s_objet_3 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 2868:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 2869:            {
                   2870:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2871:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2872:                {
                   2873:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2874:                    return;
                   2875:                }
                   2876: 
                   2877:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2878: 
                   2879:                liberation(s_etat_processus, s_objet_1);
                   2880:                liberation(s_etat_processus, s_objet_2);
                   2881: 
                   2882:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2883:                {
                   2884:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2885:                    {
                   2886:                        return;
                   2887:                    }
                   2888: 
                   2889:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2890:                }
                   2891: 
                   2892:                return;
                   2893:            }
                   2894:        }
                   2895:        else
                   2896:        {
                   2897:            if ((s_objet_3 = copie_objet(s_etat_processus,
1.19      bertrand 2898:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 2899:                    'P')) == NULL)
                   2900:            {
                   2901:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   2902: 
                   2903:                liberation(s_etat_processus, s_objet_1);
                   2904:                liberation(s_etat_processus, s_objet_2);
                   2905: 
                   2906:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2907:                {
                   2908:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2909:                    {
                   2910:                        return;
                   2911:                    }
                   2912: 
                   2913:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2914:                }
                   2915: 
                   2916:                return;
                   2917:            }
                   2918:        }
                   2919: 
                   2920:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2921:                s_objet_3) == d_erreur)
                   2922:        {
                   2923:            if (variable_partagee == d_vrai)
                   2924:            {
                   2925:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2926:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2927:                {
                   2928:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2929:                    return;
                   2930:                }
                   2931:            }
                   2932: 
                   2933:            return;
                   2934:        }
                   2935: 
                   2936:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2937:                s_objet_1) == d_erreur)
                   2938:        {
                   2939:            if (variable_partagee == d_vrai)
                   2940:            {
                   2941:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2942:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2943:                {
                   2944:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2945:                    return;
                   2946:                }
                   2947:            }
                   2948: 
                   2949:            return;
                   2950:        }
                   2951: 
                   2952:        instruction_division(s_etat_processus);
                   2953:        s_objet_1 = NULL;
                   2954:        /* s_objet_1 et s_objet_3 sont libérés par cet appel... */
                   2955: 
                   2956:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   2957:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   2958:                ((*s_etat_processus).exception != d_ep))
                   2959:        {
                   2960:            if (variable_partagee == d_vrai)
                   2961:            {
                   2962:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2963:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2964:                {
                   2965:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   2966:                    return;
                   2967:                }
                   2968:            }
                   2969: 
                   2970:            liberation(s_etat_processus, s_objet_1);
                   2971:            liberation(s_etat_processus, s_objet_2);
                   2972: 
                   2973:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   2974:            {
                   2975:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   2976:                {
                   2977:                    return;
                   2978:                }
                   2979: 
                   2980:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   2981:            }
                   2982: 
                   2983:            return;
                   2984:        }
                   2985: 
                   2986:        if (variable_partagee == d_vrai)
                   2987:        {
                   2988:            liberation(s_etat_processus,
1.39      bertrand 2989:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   2990:                    .objet);
1.1       bertrand 2991: 
                   2992:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   2993:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 2994:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 2995:            {
                   2996:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 2997:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 2998:                {
                   2999:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3000:                    return;
                   3001:                }
                   3002: 
                   3003:                liberation(s_etat_processus, s_objet_1);
                   3004: 
                   3005:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3006:                {
                   3007:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3008:                    {
                   3009:                        return;
                   3010:                    }
                   3011: 
                   3012:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3013:                }
                   3014: 
                   3015:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3016:                return;
                   3017:            }
                   3018: 
                   3019:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3020:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3021:            {
                   3022:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   3023:                return;
                   3024:            }
                   3025:        }
                   3026:        else
                   3027:        {
                   3028:            liberation(s_etat_processus,
1.19      bertrand 3029:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 3030: 
                   3031:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 3032:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   3033:                    == d_erreur)
1.1       bertrand 3034:            {
                   3035:                liberation(s_etat_processus, s_objet_1);
                   3036: 
                   3037:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3038:                {
                   3039:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3040:                    {
                   3041:                        return;
                   3042:                    }
                   3043: 
                   3044:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3045:                }
                   3046: 
                   3047:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3048:                return;
                   3049:            }
                   3050:        }
                   3051:    }
                   3052: 
                   3053: /*
                   3054: --------------------------------------------------------------------------------
                   3055:   Arguments incompatibles avec la fonction STO/
                   3056: --------------------------------------------------------------------------------
                   3057: */
                   3058: 
                   3059:    else
                   3060:    {
                   3061:        liberation(s_etat_processus, s_objet_1);
                   3062:        liberation(s_etat_processus, s_objet_2);
                   3063: 
                   3064:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3065:        {
                   3066:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3067:            {
                   3068:                return;
                   3069:            }
                   3070: 
                   3071:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3072:        }
                   3073: 
                   3074:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   3075:        return;
                   3076:    }
                   3077: 
                   3078:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3079:    {
                   3080:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3081:        {
                   3082:            return;
                   3083:        }
                   3084: 
                   3085:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3086:    }
                   3087: 
                   3088:    liberation(s_etat_processus, s_objet_1);
                   3089:    liberation(s_etat_processus, s_objet_2);
                   3090: 
                   3091:    return;
                   3092: }
                   3093: 
                   3094: 
                   3095: /*
                   3096: ================================================================================
                   3097:   Fonction 'sneg'
                   3098: ================================================================================
                   3099:   Entrées :
                   3100: --------------------------------------------------------------------------------
                   3101:   Sorties :
                   3102: --------------------------------------------------------------------------------
                   3103:   Effets de bord : néant
                   3104: ================================================================================
                   3105: */
                   3106: 
                   3107: void
                   3108: instruction_sneg(struct_processus *s_etat_processus)
                   3109: {
                   3110:    logical1                        variable_partagee;
                   3111: 
                   3112:    struct_liste_chainee            *registre_pile_last;
                   3113: 
                   3114:    struct_objet                    *s_objet_1;
                   3115:    struct_objet                    *s_objet_2;
                   3116: 
                   3117:    (*s_etat_processus).erreur_execution = d_ex;
                   3118: 
                   3119:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   3120:    {
                   3121:        printf("\n  SNEG ");
                   3122: 
                   3123:        if ((*s_etat_processus).langue == 'F')
                   3124:        {
                   3125:            printf("(modification d'une variable par opposition)\n\n");
                   3126:        }
                   3127:        else
                   3128:        {
                   3129:            printf("(store the opposite of the content in a variable)\n\n");
                   3130:        }
                   3131: 
                   3132:        printf("    1: %s\n", d_NOM);
                   3133: 
                   3134:        return;
                   3135:    }
                   3136:    else if ((*s_etat_processus).test_instruction == 'Y')
                   3137:    {
                   3138:        (*s_etat_processus).nombre_arguments = -1;
                   3139:        return;
                   3140:    }
                   3141:    
                   3142:    registre_pile_last = NULL;
                   3143: 
                   3144:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3145:    {
                   3146:        if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
                   3147:        {
                   3148:            return;
                   3149:        }
                   3150: 
                   3151:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   3152:        (*s_etat_processus).l_base_pile_last = NULL;
                   3153:    }
                   3154: 
                   3155:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3156:            &s_objet_1) == d_erreur)
                   3157:    {
                   3158:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3159: 
                   3160:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3161:        {
                   3162:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3163:            {
                   3164:                return;
                   3165:            }
                   3166: 
                   3167:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3168:        }
                   3169: 
                   3170:        return;
                   3171:    }
                   3172: 
                   3173: /*
                   3174: --------------------------------------------------------------------------------
                   3175:   Un nom
                   3176: --------------------------------------------------------------------------------
                   3177: */
                   3178: 
                   3179:    if ((*s_objet_1).type == NOM)
                   3180:    {
                   3181:        variable_partagee = d_faux;
                   3182: 
                   3183:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   3184:                (*s_objet_1).objet)).nom) == d_faux)
                   3185:        {
                   3186:            (*s_etat_processus).erreur_systeme = d_es;
                   3187:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   3188: 
                   3189:            liberation(s_etat_processus, s_objet_1);
                   3190: 
                   3191:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3192:            {
                   3193:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3194:                {
                   3195:                    return;
                   3196:                }
                   3197: 
                   3198:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3199:            }
                   3200: 
                   3201:            return;
                   3202:        }
                   3203: 
1.19      bertrand 3204:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   3205:                .variable_verrouillee == d_vrai)
1.1       bertrand 3206:        {
                   3207:            liberation(s_etat_processus, s_objet_1);
                   3208: 
                   3209:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3210:            {
                   3211:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3212:                {
                   3213:                    return;
                   3214:                }
                   3215: 
                   3216:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3217:            }
                   3218: 
                   3219:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   3220:            return;
                   3221:        }
                   3222: 
1.19      bertrand 3223:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 3224:        {
                   3225:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 3226:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   3227:                    (*(*s_etat_processus).pointeur_variable_courante)
                   3228:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 3229:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 3230:            {
                   3231:                (*s_etat_processus).erreur_systeme = d_es;
                   3232:                (*s_etat_processus).erreur_execution =
                   3233:                        d_ex_variable_non_definie;
                   3234: 
                   3235:                liberation(s_etat_processus, s_objet_1);
                   3236: 
                   3237:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3238:                {
                   3239:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3240:                    {
                   3241:                        return;
                   3242:                    }
                   3243: 
                   3244:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3245:                }
                   3246: 
                   3247:                return;
                   3248:            }
                   3249: 
                   3250:            variable_partagee = d_vrai;
                   3251: 
                   3252:            if ((s_objet_2 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 3253:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 3254:            {
                   3255:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3256:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3257:                {
                   3258:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3259:                    return;
                   3260:                }
                   3261: 
                   3262:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   3263: 
                   3264:                liberation(s_etat_processus, s_objet_1);
                   3265: 
                   3266:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3267:                {
                   3268:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3269:                    {
                   3270:                        return;
                   3271:                    }
                   3272: 
                   3273:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3274:                }
                   3275: 
                   3276:                return;
                   3277:            }
                   3278:        }
                   3279:        else
                   3280:        {
                   3281:            if ((s_objet_2 = copie_objet(s_etat_processus,
1.19      bertrand 3282:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 3283:                    'P')) == NULL)
                   3284:            {
                   3285:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   3286: 
                   3287:                liberation(s_etat_processus, s_objet_1);
                   3288: 
                   3289:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3290:                {
                   3291:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3292:                    {
                   3293:                        return;
                   3294:                    }
                   3295: 
                   3296:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3297:                }
                   3298: 
                   3299:                return;
                   3300:            }
                   3301:        }
                   3302: 
                   3303:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3304:                s_objet_2) == d_erreur)
                   3305:        {
                   3306:            if (variable_partagee == d_vrai)
                   3307:            {
                   3308:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3309:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3310:                {
                   3311:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3312:                    return;
                   3313:                }
                   3314:            }
                   3315: 
                   3316:            return;
                   3317:        }
                   3318: 
                   3319:        instruction_neg(s_etat_processus);
                   3320:        /* s_objet_2 est libéré par cet appel... */
                   3321: 
                   3322:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   3323:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   3324:                ((*s_etat_processus).exception != d_ep))
                   3325:        {
                   3326:            if (variable_partagee == d_vrai)
                   3327:            {
                   3328:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3329:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3330:                {
                   3331:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3332:                    return;
                   3333:                }
                   3334:            }
                   3335: 
                   3336:            liberation(s_etat_processus, s_objet_1);
                   3337:            liberation(s_etat_processus, s_objet_2);
                   3338: 
                   3339:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3340:            {
                   3341:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3342:                {
                   3343:                    return;
                   3344:                }
                   3345: 
                   3346:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3347:            }
                   3348: 
                   3349:            return;
                   3350:        }
                   3351: 
                   3352:        if (variable_partagee == d_vrai)
                   3353:        {
                   3354:            liberation(s_etat_processus,
1.39      bertrand 3355:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   3356:                    .objet);
1.1       bertrand 3357: 
                   3358:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3359:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 3360:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 3361:            {
                   3362:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3363:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3364:                {
                   3365:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3366:                    return;
                   3367:                }
                   3368: 
                   3369:                liberation(s_etat_processus, s_objet_1);
                   3370: 
                   3371:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3372:                {
                   3373:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3374:                    {
                   3375:                        return;
                   3376:                    }
                   3377: 
                   3378:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3379:                }
                   3380: 
                   3381:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3382:                return;
                   3383:            }
                   3384: 
                   3385:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3386:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3387:            {
                   3388:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   3389:                return;
                   3390:            }
                   3391:        }
                   3392:        else
                   3393:        {
                   3394:            liberation(s_etat_processus,
1.19      bertrand 3395:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 3396: 
                   3397:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 3398:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   3399:                    == d_erreur)
1.1       bertrand 3400:            {
                   3401:                liberation(s_etat_processus, s_objet_1);
                   3402: 
                   3403:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3404:                {
                   3405:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3406:                    {
                   3407:                        return;
                   3408:                    }
                   3409: 
                   3410:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3411:                }
                   3412: 
                   3413:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3414:                return;
                   3415:            }
                   3416:        }
                   3417:    }
                   3418: 
                   3419: /*
                   3420: --------------------------------------------------------------------------------
                   3421:   Arguments incompatibles avec la fonction SNEG
                   3422: --------------------------------------------------------------------------------
                   3423: */
                   3424: 
                   3425:    else
                   3426:    {
                   3427:        liberation(s_etat_processus, s_objet_1);
                   3428: 
                   3429:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3430:        {
                   3431:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3432:            {
                   3433:                return;
                   3434:            }
                   3435: 
                   3436:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3437:        }
                   3438: 
                   3439:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   3440:        return;
                   3441:    }
                   3442: 
                   3443:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3444:    {
                   3445:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3446:        {
                   3447:            return;
                   3448:        }
                   3449: 
                   3450:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3451:    }
                   3452: 
                   3453:    liberation(s_etat_processus, s_objet_1);
                   3454: 
                   3455:    return;
                   3456: }
                   3457: 
                   3458: 
                   3459: /*
                   3460: ================================================================================
                   3461:   Fonction 'sinv'
                   3462: ================================================================================
                   3463:   Entrées :
                   3464: --------------------------------------------------------------------------------
                   3465:   Sorties :
                   3466: --------------------------------------------------------------------------------
                   3467:   Effets de bord : néant
                   3468: ================================================================================
                   3469: */
                   3470: 
                   3471: void
                   3472: instruction_sinv(struct_processus *s_etat_processus)
                   3473: {
                   3474:    logical1                        variable_partagee;
                   3475: 
                   3476:    struct_liste_chainee            *registre_pile_last;
                   3477: 
                   3478:    struct_objet                    *s_objet_1;
                   3479:    struct_objet                    *s_objet_2;
                   3480: 
                   3481:    (*s_etat_processus).erreur_execution = d_ex;
                   3482: 
                   3483:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   3484:    {
                   3485:        printf("\n  SINV ");
                   3486: 
                   3487:        if ((*s_etat_processus).langue == 'F')
                   3488:        {
                   3489:            printf("(modification d'une variable par inversion)\n\n");
                   3490:        }
                   3491:        else
                   3492:        {
                   3493:            printf("(store the inverse of the content in a variable)\n\n");
                   3494:        }
                   3495: 
                   3496:        printf("    1: %s\n", d_NOM);
                   3497: 
                   3498:        return;
                   3499:    }
                   3500:    else if ((*s_etat_processus).test_instruction == 'Y')
                   3501:    {
                   3502:        (*s_etat_processus).nombre_arguments = -1;
                   3503:        return;
                   3504:    }
                   3505:    
                   3506:    registre_pile_last = NULL;
                   3507: 
                   3508:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3509:    {
                   3510:        if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
                   3511:        {
                   3512:            return;
                   3513:        }
                   3514: 
                   3515:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   3516:        (*s_etat_processus).l_base_pile_last = NULL;
                   3517:    }
                   3518: 
                   3519:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3520:            &s_objet_1) == d_erreur)
                   3521:    {
                   3522:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3523: 
                   3524:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3525:        {
                   3526:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3527:            {
                   3528:                return;
                   3529:            }
                   3530: 
                   3531:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3532:        }
                   3533: 
                   3534:        return;
                   3535:    }
                   3536: 
                   3537: /*
                   3538: --------------------------------------------------------------------------------
                   3539:   Un nom
                   3540: --------------------------------------------------------------------------------
                   3541: */
                   3542: 
                   3543:    if ((*s_objet_1).type == NOM)
                   3544:    {
                   3545:        variable_partagee = d_faux;
                   3546: 
                   3547:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   3548:                (*s_objet_1).objet)).nom) == d_faux)
                   3549:        {
                   3550:            (*s_etat_processus).erreur_systeme = d_es;
                   3551:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   3552: 
                   3553:            liberation(s_etat_processus, s_objet_1);
                   3554: 
                   3555:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3556:            {
                   3557:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3558:                {
                   3559:                    return;
                   3560:                }
                   3561: 
                   3562:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3563:            }
                   3564: 
                   3565:            return;
                   3566:        }
                   3567: 
1.19      bertrand 3568:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   3569:                .variable_verrouillee == d_vrai)
1.1       bertrand 3570:        {
                   3571:            liberation(s_etat_processus, s_objet_1);
                   3572: 
                   3573:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3574:            {
                   3575:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3576:                {
                   3577:                    return;
                   3578:                }
                   3579: 
                   3580:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3581:            }
                   3582: 
                   3583:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   3584:            return;
                   3585:        }
                   3586: 
1.19      bertrand 3587:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 3588:        {
                   3589:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 3590:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   3591:                    (*(*s_etat_processus).pointeur_variable_courante)
                   3592:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 3593:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 3594:            {
                   3595:                (*s_etat_processus).erreur_systeme = d_es;
                   3596:                (*s_etat_processus).erreur_execution =
                   3597:                        d_ex_variable_non_definie;
                   3598: 
                   3599:                liberation(s_etat_processus, s_objet_1);
                   3600: 
                   3601:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3602:                {
                   3603:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3604:                    {
                   3605:                        return;
                   3606:                    }
                   3607: 
                   3608:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3609:                }
                   3610: 
                   3611:                return;
                   3612:            }
                   3613: 
                   3614:            variable_partagee = d_vrai;
                   3615: 
                   3616:            if ((s_objet_2 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 3617:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 3618:            {
                   3619:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3620:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3621:                {
                   3622:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3623:                    return;
                   3624:                }
                   3625: 
                   3626:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   3627: 
                   3628:                liberation(s_etat_processus, s_objet_1);
                   3629: 
                   3630:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3631:                {
                   3632:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3633:                    {
                   3634:                        return;
                   3635:                    }
                   3636: 
                   3637:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3638:                }
                   3639: 
                   3640:                return;
                   3641:            }
                   3642:        }
                   3643:        else
                   3644:        {
                   3645:            if ((s_objet_2 = copie_objet(s_etat_processus,
1.19      bertrand 3646:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 3647:                    'P')) == NULL)
                   3648:            {
                   3649:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   3650: 
                   3651:                liberation(s_etat_processus, s_objet_1);
                   3652: 
                   3653:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3654:                {
                   3655:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3656:                    {
                   3657:                        return;
                   3658:                    }
                   3659: 
                   3660:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3661:                }
                   3662: 
                   3663:                return;
                   3664:            }
                   3665:        }
                   3666: 
                   3667:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3668:                s_objet_2) == d_erreur)
                   3669:        {
                   3670:            if (variable_partagee == d_vrai)
                   3671:            {
                   3672:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3673:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3674:                {
                   3675:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3676:                    return;
                   3677:                }
                   3678:            }
                   3679: 
                   3680:            return;
                   3681:        }
                   3682: 
                   3683:        instruction_inv(s_etat_processus);
                   3684:        /* s_objet_2 est libéré par cet appel... */
                   3685: 
                   3686:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   3687:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   3688:                ((*s_etat_processus).exception != d_ep))
                   3689:        {
                   3690:            if (variable_partagee == d_vrai)
                   3691:            {
                   3692:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3693:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3694:                {
                   3695:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3696:                    return;
                   3697:                }
                   3698:            }
                   3699: 
                   3700:            liberation(s_etat_processus, s_objet_1);
                   3701:            liberation(s_etat_processus, s_objet_2);
                   3702: 
                   3703:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3704:            {
                   3705:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3706:                {
                   3707:                    return;
                   3708:                }
                   3709: 
                   3710:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3711:            }
                   3712: 
                   3713:            return;
                   3714:        }
                   3715: 
                   3716:        if (variable_partagee == d_vrai)
                   3717:        {
                   3718:            liberation(s_etat_processus,
1.39      bertrand 3719:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   3720:                    .objet);
1.1       bertrand 3721: 
                   3722:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3723:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 3724:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 3725:            {
                   3726:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3727:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3728:                {
                   3729:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3730:                    return;
                   3731:                }
                   3732: 
                   3733:                liberation(s_etat_processus, s_objet_1);
                   3734: 
                   3735:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3736:                {
                   3737:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3738:                    {
                   3739:                        return;
                   3740:                    }
                   3741: 
                   3742:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3743:                }
                   3744: 
                   3745:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3746:                return;
                   3747:            }
                   3748: 
                   3749:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3750:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3751:            {
                   3752:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   3753:                return;
                   3754:            }
                   3755:        }
                   3756:        else
                   3757:        {
                   3758:            liberation(s_etat_processus,
1.19      bertrand 3759:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 3760: 
                   3761:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 3762:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   3763:                    == d_erreur)
1.1       bertrand 3764:            {
                   3765:                liberation(s_etat_processus, s_objet_1);
                   3766: 
                   3767:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3768:                {
                   3769:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3770:                    {
                   3771:                        return;
                   3772:                    }
                   3773: 
                   3774:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3775:                }
                   3776: 
                   3777:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3778:                return;
                   3779:            }
                   3780:        }
                   3781:    }
                   3782: 
                   3783: /*
                   3784: --------------------------------------------------------------------------------
                   3785:   Arguments incompatibles avec la fonction SINV
                   3786: --------------------------------------------------------------------------------
                   3787: */
                   3788: 
                   3789:    else
                   3790:    {
                   3791:        liberation(s_etat_processus, s_objet_1);
                   3792: 
                   3793:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3794:        {
                   3795:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3796:            {
                   3797:                return;
                   3798:            }
                   3799: 
                   3800:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3801:        }
                   3802: 
                   3803:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   3804:        return;
                   3805:    }
                   3806: 
                   3807:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3808:    {
                   3809:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3810:        {
                   3811:            return;
                   3812:        }
                   3813: 
                   3814:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3815:    }
                   3816: 
                   3817:    liberation(s_etat_processus, s_objet_1);
                   3818: 
                   3819:    return;
                   3820: }
                   3821: 
                   3822: 
                   3823: /*
                   3824: ================================================================================
                   3825:   Fonction 'sconj'
                   3826: ================================================================================
                   3827:   Entrées :
                   3828: --------------------------------------------------------------------------------
                   3829:   Sorties :
                   3830: --------------------------------------------------------------------------------
                   3831:   Effets de bord : néant
                   3832: ================================================================================
                   3833: */
                   3834: 
                   3835: void
                   3836: instruction_sconj(struct_processus *s_etat_processus)
                   3837: {
                   3838:    logical1                        variable_partagee;
                   3839: 
                   3840:    struct_liste_chainee            *registre_pile_last;
                   3841: 
                   3842:    struct_objet                    *s_objet_1;
                   3843:    struct_objet                    *s_objet_2;
                   3844: 
                   3845:    (*s_etat_processus).erreur_execution = d_ex;
                   3846: 
                   3847:    if ((*s_etat_processus).affichage_arguments == 'Y')
                   3848:    {
                   3849:        printf("\n  SCONJ ");
                   3850: 
                   3851:        if ((*s_etat_processus).langue == 'F')
                   3852:        {
                   3853:            printf("(modification d'une variable par conjugaison)\n\n");
                   3854:        }
                   3855:        else
                   3856:        {
                   3857:            printf("(store the conjugate of the content in a variable)\n\n");
                   3858:        }
                   3859: 
                   3860:        printf("    1: %s\n", d_NOM);
                   3861: 
                   3862:        return;
                   3863:    }
                   3864:    else if ((*s_etat_processus).test_instruction == 'Y')
                   3865:    {
                   3866:        (*s_etat_processus).nombre_arguments = -1;
                   3867:        return;
                   3868:    }
                   3869:    
                   3870:    registre_pile_last = NULL;
                   3871: 
                   3872:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3873:    {
                   3874:        if (empilement_pile_last(s_etat_processus, 1) == d_erreur)
                   3875:        {
                   3876:            return;
                   3877:        }
                   3878: 
                   3879:        registre_pile_last = (*s_etat_processus).l_base_pile_last;
                   3880:        (*s_etat_processus).l_base_pile_last = NULL;
                   3881:    }
                   3882: 
                   3883:    if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   3884:            &s_objet_1) == d_erreur)
                   3885:    {
                   3886:        (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   3887: 
                   3888:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3889:        {
                   3890:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3891:            {
                   3892:                return;
                   3893:            }
                   3894: 
                   3895:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3896:        }
                   3897: 
                   3898:        return;
                   3899:    }
                   3900: 
                   3901: /*
                   3902: --------------------------------------------------------------------------------
                   3903:   Un nom
                   3904: --------------------------------------------------------------------------------
                   3905: */
                   3906: 
                   3907:    if ((*s_objet_1).type == NOM)
                   3908:    {
                   3909:        variable_partagee = d_faux;
                   3910: 
                   3911:        if (recherche_variable(s_etat_processus, (*((struct_nom *)
                   3912:                (*s_objet_1).objet)).nom) == d_faux)
                   3913:        {
                   3914:            (*s_etat_processus).erreur_systeme = d_es;
                   3915:            (*s_etat_processus).erreur_execution = d_ex_variable_non_definie;
                   3916: 
                   3917:            liberation(s_etat_processus, s_objet_1);
                   3918: 
                   3919:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3920:            {
                   3921:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3922:                {
                   3923:                    return;
                   3924:                }
                   3925: 
                   3926:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3927:            }
                   3928: 
                   3929:            return;
                   3930:        }
                   3931: 
1.19      bertrand 3932:        if ((*(*s_etat_processus).pointeur_variable_courante)
                   3933:                .variable_verrouillee == d_vrai)
1.1       bertrand 3934:        {
                   3935:            liberation(s_etat_processus, s_objet_1);
                   3936: 
                   3937:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3938:            {
                   3939:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3940:                {
                   3941:                    return;
                   3942:                }
                   3943: 
                   3944:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3945:            }
                   3946: 
                   3947:            (*s_etat_processus).erreur_execution = d_ex_variable_verrouillee;
                   3948:            return;
                   3949:        }
                   3950: 
1.19      bertrand 3951:        if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL)
1.1       bertrand 3952:        {
                   3953:            if (recherche_variable_partagee(s_etat_processus,
1.19      bertrand 3954:                    (*(*s_etat_processus).pointeur_variable_courante).nom,
                   3955:                    (*(*s_etat_processus).pointeur_variable_courante)
                   3956:                    .variable_partagee, (*(*s_etat_processus)
1.40      bertrand 3957:                    .pointeur_variable_courante).origine) == NULL)
1.1       bertrand 3958:            {
                   3959:                (*s_etat_processus).erreur_systeme = d_es;
                   3960:                (*s_etat_processus).erreur_execution =
                   3961:                        d_ex_variable_non_definie;
                   3962: 
                   3963:                liberation(s_etat_processus, s_objet_1);
                   3964: 
                   3965:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3966:                {
                   3967:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3968:                    {
                   3969:                        return;
                   3970:                    }
                   3971: 
                   3972:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   3973:                }
                   3974: 
                   3975:                return;
                   3976:            }
                   3977: 
                   3978:            variable_partagee = d_vrai;
                   3979: 
                   3980:            if ((s_objet_2 = copie_objet(s_etat_processus, (*(*s_etat_processus)
1.39      bertrand 3981:                    .pointeur_variable_partagee_courante).objet, 'P')) == NULL)
1.1       bertrand 3982:            {
                   3983:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 3984:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 3985:                {
                   3986:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   3987:                    return;
                   3988:                }
                   3989: 
                   3990:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   3991: 
                   3992:                liberation(s_etat_processus, s_objet_1);
                   3993: 
                   3994:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   3995:                {
                   3996:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   3997:                    {
                   3998:                        return;
                   3999:                    }
                   4000: 
                   4001:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4002:                }
                   4003: 
                   4004:                return;
                   4005:            }
                   4006:        }
                   4007:        else
                   4008:        {
                   4009:            if ((s_objet_2 = copie_objet(s_etat_processus,
1.19      bertrand 4010:                    (*(*s_etat_processus).pointeur_variable_courante).objet,
1.1       bertrand 4011:                    'P')) == NULL)
                   4012:            {
                   4013:                (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   4014: 
                   4015:                liberation(s_etat_processus, s_objet_1);
                   4016: 
                   4017:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4018:                {
                   4019:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4020:                    {
                   4021:                        return;
                   4022:                    }
                   4023: 
                   4024:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4025:                }
                   4026: 
                   4027:                return;
                   4028:            }
                   4029:        }
                   4030: 
                   4031:        if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   4032:                s_objet_2) == d_erreur)
                   4033:        {
                   4034:            if (variable_partagee == d_vrai)
                   4035:            {
                   4036:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 4037:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 4038:                {
                   4039:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   4040:                    return;
                   4041:                }
                   4042:            }
                   4043: 
                   4044:            return;
                   4045:        }
                   4046: 
                   4047:        instruction_conj(s_etat_processus);
                   4048:        /* s_objet_2 est libéré par cet appel... */
                   4049: 
                   4050:        if (((*s_etat_processus).erreur_systeme != d_es) ||
                   4051:                ((*s_etat_processus).erreur_execution != d_ex) ||
                   4052:                ((*s_etat_processus).exception != d_ep))
                   4053:        {
                   4054:            if (variable_partagee == d_vrai)
                   4055:            {
                   4056:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 4057:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 4058:                {
                   4059:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   4060:                    return;
                   4061:                }
                   4062:            }
                   4063: 
                   4064:            liberation(s_etat_processus, s_objet_1);
                   4065:            liberation(s_etat_processus, s_objet_2);
                   4066: 
                   4067:            if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4068:            {
                   4069:                if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4070:                {
                   4071:                    return;
                   4072:                }
                   4073: 
                   4074:                (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4075:            }
                   4076: 
                   4077:            return;
                   4078:        }
                   4079: 
                   4080:        if (variable_partagee == d_vrai)
                   4081:        {
                   4082:            liberation(s_etat_processus,
1.39      bertrand 4083:                    (*(*s_etat_processus).pointeur_variable_partagee_courante)
                   4084:                    .objet);
1.1       bertrand 4085: 
                   4086:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   4087:                    (struct_objet **) &((*(*s_etat_processus)
1.39      bertrand 4088:                    .pointeur_variable_partagee_courante).objet)) == d_erreur)
1.1       bertrand 4089:            {
                   4090:                if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 4091:                        .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 4092:                {
                   4093:                    (*s_etat_processus).erreur_systeme = d_es_processus;
                   4094:                    return;
                   4095:                }
                   4096: 
                   4097:                liberation(s_etat_processus, s_objet_1);
                   4098: 
                   4099:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4100:                {
                   4101:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4102:                    {
                   4103:                        return;
                   4104:                    }
                   4105: 
                   4106:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4107:                }
                   4108: 
                   4109:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   4110:                return;
                   4111:            }
                   4112: 
                   4113:            if (pthread_mutex_unlock(&((*(*s_etat_processus)
1.39      bertrand 4114:                    .pointeur_variable_partagee_courante).mutex)) != 0)
1.1       bertrand 4115:            {
                   4116:                (*s_etat_processus).erreur_systeme = d_es_processus;
                   4117:                return;
                   4118:            }
                   4119:        }
                   4120:        else
                   4121:        {
                   4122:            liberation(s_etat_processus,
1.19      bertrand 4123:                    (*(*s_etat_processus).pointeur_variable_courante).objet);
1.1       bertrand 4124: 
                   4125:            if (depilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
1.19      bertrand 4126:                    &((*(*s_etat_processus).pointeur_variable_courante).objet))
                   4127:                    == d_erreur)
1.1       bertrand 4128:            {
                   4129:                liberation(s_etat_processus, s_objet_1);
                   4130: 
                   4131:                if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4132:                {
                   4133:                    if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4134:                    {
                   4135:                        return;
                   4136:                    }
                   4137: 
                   4138:                    (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4139:                }
                   4140: 
                   4141:                (*s_etat_processus).erreur_execution = d_ex_manque_argument;
                   4142:                return;
                   4143:            }
                   4144:        }
                   4145:    }
                   4146: 
                   4147: /*
                   4148: --------------------------------------------------------------------------------
                   4149:   Arguments incompatibles avec la fonction SCONJ
                   4150: --------------------------------------------------------------------------------
                   4151: */
                   4152: 
                   4153:    else
                   4154:    {
                   4155:        liberation(s_etat_processus, s_objet_1);
                   4156: 
                   4157:        if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4158:        {
                   4159:            if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4160:            {
                   4161:                return;
                   4162:            }
                   4163: 
                   4164:            (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4165:        }
                   4166: 
                   4167:        (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
                   4168:        return;
                   4169:    }
                   4170: 
                   4171:    if (test_cfsf(s_etat_processus, 31) == d_vrai)
                   4172:    {
                   4173:        if (empilement_pile_last(s_etat_processus, 0) == d_erreur)
                   4174:        {
                   4175:            return;
                   4176:        }
                   4177: 
                   4178:        (*s_etat_processus).l_base_pile_last = registre_pile_last;
                   4179:    }
                   4180: 
                   4181:    liberation(s_etat_processus, s_objet_1);
                   4182: 
                   4183:    return;
                   4184: }
                   4185: 
                   4186: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>