Diff for /rpl/src/instructions_g2.c between versions 1.66 and 1.73

version 1.66, 2018/12/22 13:11:52 version 1.73, 2020/01/10 11:15:45
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.29    RPL/2 (R) version 4.1.32
   Copyright (C) 1989-2018 Dr. BERTRAND Joël    Copyright (C) 1989-2020 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 95  instruction_get(struct_processus *s_etat Line 95  instruction_get(struct_processus *s_etat
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s,\n"
                 "       %s, %s\n\n",                  "       %s, %s, %s\n\n",
                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,                  d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,                  d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
                 d_SQL, d_SLB, d_PRC, d_MTX);                  d_SQL, d_SLB, d_PRC, d_MTX, d_REC);
   
         printf("    2: %s\n", d_REC);          printf("    2: %s\n", d_REC);
         printf("    1: %s\n", d_CHN);          printf("    1: %s\n", d_CHN);
Line 106  instruction_get(struct_processus *s_etat Line 106  instruction_get(struct_processus *s_etat
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s,\n"
                 "       %s, %s\n\n",                  "       %s, %s, %s\n\n",
                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,                  d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,                  d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
                 d_SQL, d_SLB, d_PRC, d_MTX);                  d_SQL, d_SLB, d_PRC, d_MTX, d_REC);
   
         printf("    2: %s, %s\n", d_LST, d_NOM);          printf("    2: %s, %s\n", d_LST, d_NOM);
         printf("    1: %s\n", d_INT);          printf("    1: %s\n", d_INT);
Line 117  instruction_get(struct_processus *s_etat Line 117  instruction_get(struct_processus *s_etat
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s,\n"
                 "       %s, %s\n",                  "       %s, %s, %s\n",
                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,                  d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,                  d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
                 d_SQL, d_SLB, d_PRC, d_MTX);                  d_SQL, d_SLB, d_PRC, d_MTX, d_REC);
   
         return;          return;
     }      }
Line 1262  instruction_get(struct_processus *s_etat Line 1262  instruction_get(struct_processus *s_etat
                 return;                  return;
             }              }
         }          }
           else if ((*s_objet_3).type == REC)
           {
               if ((*s_objet_1).type != CHN)
               {
                   if (variable_partagee == d_vrai)
                   {
                       if (pthread_mutex_unlock(&((*(*s_etat_processus)
                               .pointeur_variable_partagee_courante).mutex)) != 0)
                       {
                           (*s_etat_processus).erreur_systeme = d_es_processus;
                           return;
                       }
                   }
   
                   liberation(s_etat_processus, s_objet_1);
                   liberation(s_etat_processus, s_objet_2);
   
                   (*s_etat_processus).erreur_execution =
                           d_ex_erreur_type_argument;
                   return;
               }
   
               s_objet_noms = (*((struct_record *) (*s_objet_3).objet)).noms;
   
               if ((s_enregistrement = bsearch((unsigned char *)
                       (*s_objet_1).objet, (*((struct_tableau *)
                       (*s_objet_noms).objet)).elements,
                       (size_t) (*((struct_tableau *) (*s_objet_noms).objet))
                       .nombre_elements, sizeof(struct_objet *),
                       fonction_comparaison)) == NULL)
               {
                   if (variable_partagee == d_vrai)
                   {
                       if (pthread_mutex_unlock(&((*(*s_etat_processus)
                               .pointeur_variable_partagee_courante).mutex)) != 0)
                       {
                           (*s_etat_processus).erreur_systeme = d_es_processus;
                           return;
                       }
                   }
   
                   liberation(s_etat_processus, s_objet_1);
                   liberation(s_etat_processus, s_objet_2);
   
                   (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
                   return;
               }
   
               indice_i = s_enregistrement - (*((struct_tableau *)
                       (*s_objet_noms).objet)).elements;
   
               // Récupération de l'objet dans le tableau données
   
               if ((s_objet_resultat = copie_objet(s_etat_processus,
                       (*((struct_tableau *) (*(*((struct_record *)
                       (*s_objet_3).objet)).donnees).objet)).elements[indice_i],
                       'P')) == NULL)
               {
                   if (variable_partagee == d_vrai)
                   {
                       if (pthread_mutex_unlock(&((*(*s_etat_processus)
                               .pointeur_variable_partagee_courante).mutex)) != 0)
                       {
                           (*s_etat_processus).erreur_systeme = d_es_processus;
                           return;
                       }
                   }
   
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
           }
         else          else
         {          {
             if (variable_partagee == d_vrai)              if (variable_partagee == d_vrai)
Line 1451  instruction_geti(struct_processus *s_eta Line 1523  instruction_geti(struct_processus *s_eta
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s, %s,\n"
                 "       %s, %s, %s, %s,\n"                  "       %s, %s, %s, %s,\n"
                 "       %s, %s\n",                  "       %s, %s, %s\n",
                 d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,                  d_INT, d_REL, d_CPL, d_VIN, d_VRL, d_VCX, d_MIN, d_MRL, d_MCX,
                 d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,                  d_TAB, d_BIN, d_NOM, d_CHN, d_LST, d_ALG, d_RPN, d_FCH, d_SCK,
                 d_SQL, d_SLB, d_PRC, d_MTX);                  d_SQL, d_SLB, d_PRC, d_MTX, d_REC);
   
         return;          return;
     }      }

Removed from v.1.66  
changed lines
  Added in v.1.73


CVSweb interface <joel.bertrand@systella.fr>