Diff for /rpl/src/instructions_p2.c between versions 1.43 and 1.73

version 1.43, 2013/02/26 19:56:15 version 1.73, 2023/08/07 17:42:56
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.12    RPL/2 (R) version 4.1.35
   Copyright (C) 1989-2013 Dr. BERTRAND Joël    Copyright (C) 1989-2023 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 112  instruction_p_vers_r(struct_processus *s Line 112  instruction_p_vers_r(struct_processus *s
         if ((*s_objet_argument).type == INT)          if ((*s_objet_argument).type == INT)
         {          {
             (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle              (*((struct_complexe16 *) (*s_objet_resultat).objet)).partie_reelle
                     = (*((integer8 *) (*s_objet_argument).objet));                      = (real8) (*((integer8 *) (*s_objet_argument).objet));
         }          }
         else          else
         {          {
Line 374  instruction_p_vers_r(struct_processus *s Line 374  instruction_p_vers_r(struct_processus *s
 ================================================================================  ================================================================================
 */  */
   
   static int
   fonction_comparaison(const void *argument_1, const void *argument_2)
   {
       return(strcmp((unsigned char *) argument_1,
               (unsigned char *) (**((struct_objet **) argument_2)).objet));
   }
   
   
 void  void
 instruction_put(struct_processus *s_etat_processus)  instruction_put(struct_processus *s_etat_processus)
 {  {
Line 383  instruction_put(struct_processus *s_etat Line 391  instruction_put(struct_processus *s_etat
   
     struct_objet                        *s_copie_3;      struct_objet                        *s_copie_3;
     struct_objet                        *s_copie_4;      struct_objet                        *s_copie_4;
       struct_objet                        **s_enregistrement;
     struct_objet                        *s_objet_1;      struct_objet                        *s_objet_1;
     struct_objet                        *s_objet_2;      struct_objet                        *s_objet_2;
     struct_objet                        *s_objet_3;      struct_objet                        *s_objet_3;
     struct_objet                        *s_objet_4;      struct_objet                        *s_objet_4;
     struct_objet                        *s_objet_element;      struct_objet                        *s_objet_element;
   
     unsigned long                       i;      integer8                            i;
     unsigned long                       indice_i;      integer8                            indice_i;
     unsigned long                       indice_j;      integer8                            indice_j;
     unsigned long                       j;      integer8                            j;
     unsigned long                       nombre_dimensions;      integer8                            nombre_dimensions;
   
     void                                *tampon;      void                                *tampon;
   
Line 428  instruction_put(struct_processus *s_etat Line 437  instruction_put(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);
         printf("->  1: %s\n\n", d_LST);          printf("->  1: %s\n\n", d_LST);
   
         printf("    3: %s\n", d_TAB);          printf("    3: %s\n", d_TAB);
Line 440  instruction_put(struct_processus *s_etat Line 449  instruction_put(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);
         printf("->  1: %s\n\n", d_TAB);          printf("->  1: %s\n\n", d_TAB);
   
           printf("    3: %s\n", d_REC);
           printf("    2: %s\n", d_CHN);
           printf("    1: %s, %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\n",
                   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_SQL, d_SLB, d_PRC, d_MTX, d_REC);
           printf("->  1: %s\n\n", d_REC);
   
         printf("    3: %s\n", d_NOM);          printf("    3: %s\n", d_NOM);
         printf("    2: %s, %s\n", d_LST, d_INT);          printf("    2: %s, %s\n", d_LST, d_INT);
         printf("    1: %s, %s, %s, %s, %s, %s,\n"          printf("    1: %s, %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, %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 610  instruction_put(struct_processus *s_etat Line 631  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = VRL;                  (*s_objet_3).type = VRL;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille * sizeof(real8)))                          (*s_objet_3).objet)).taille) * sizeof(real8)))
                         == NULL)                          == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 645  instruction_put(struct_processus *s_etat Line 666  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = VCX;                  (*s_objet_3).type = VCX;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille *                          (*s_objet_3).objet)).taille) *
                         sizeof(struct_complexe16))) == NULL)                          sizeof(struct_complexe16))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 726  instruction_put(struct_processus *s_etat Line 747  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = VCX;                  (*s_objet_3).type = VCX;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille *                          (*s_objet_3).objet)).taille) *
                         sizeof(struct_complexe16))) == NULL)                          sizeof(struct_complexe16))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 969  instruction_put(struct_processus *s_etat Line 990  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = MRL;                  (*s_objet_3).type = MRL;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes * sizeof(real8 *)))                          (*s_objet_3).objet)).nombre_lignes) * sizeof(real8 *)))
                         == NULL)                          == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 983  instruction_put(struct_processus *s_etat Line 1004  instruction_put(struct_processus *s_etat
                 {                  {
                     if ((((real8 **) (*((struct_matrice *)                      if ((((real8 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(real8))) == NULL)                              sizeof(real8))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 1022  instruction_put(struct_processus *s_etat Line 1043  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = MCX;                  (*s_objet_3).type = MCX;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes *                          (*s_objet_3).objet)).nombre_lignes) *
                         sizeof(struct_complexe16 *))) == NULL)                          sizeof(struct_complexe16 *))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 1036  instruction_put(struct_processus *s_etat Line 1057  instruction_put(struct_processus *s_etat
                 {                  {
                     if ((((struct_complexe16 **) (*((struct_matrice *)                      if ((((struct_complexe16 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 1122  instruction_put(struct_processus *s_etat Line 1143  instruction_put(struct_processus *s_etat
                 (*s_objet_3).type = MCX;                  (*s_objet_3).type = MCX;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes *                          (*s_objet_3).objet)).nombre_lignes) *
                         sizeof(struct_complexe16 *))) == NULL)                          sizeof(struct_complexe16 *))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 1136  instruction_put(struct_processus *s_etat Line 1157  instruction_put(struct_processus *s_etat
                 {                  {
                     if ((((struct_complexe16 **) (*((struct_matrice *)                      if ((((struct_complexe16 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 1417  instruction_put(struct_processus *s_etat Line 1438  instruction_put(struct_processus *s_etat
   
 /*  /*
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
     Traitement des enregistrements
   --------------------------------------------------------------------------------
   */
   
       else if ((*s_objet_3).type == REC)
       {
           if ((*s_objet_2).type != CHN)
           {
               liberation(s_etat_processus, s_objet_1);
               liberation(s_etat_processus, s_objet_2);
               liberation(s_etat_processus, s_objet_3);
   
               (*s_etat_processus).erreur_execution = d_ex_erreur_type_argument;
               return;
           }
   
           if ((*s_objet_3).nombre_occurrences > 1)
           {
               if ((s_copie_3 = copie_objet(s_etat_processus, s_objet_3, 'N'))
                       == NULL)
               {
                   (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
                   return;
               }
   
               liberation(s_etat_processus, s_objet_3);
               s_objet_3 = s_copie_3;
           }
   
           if ((s_enregistrement = bsearch((unsigned char *) (*s_objet_2).objet,
                   (*((struct_tableau *) (*(*((struct_record *)
                   (*s_objet_3).objet)).noms).objet)).elements,
                   (size_t) (*((struct_tableau *) (*(*((struct_record *)
                   (*s_objet_3).objet)).noms).objet)).nombre_elements,
                   sizeof(struct_objet *), fonction_comparaison)) == NULL)
           {
               liberation(s_etat_processus, s_objet_1);
               liberation(s_etat_processus, s_objet_2);
               liberation(s_etat_processus, s_objet_3);
   
               (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
               return;
           }
   
           indice_i = s_enregistrement - (*((struct_tableau *)
                   (*(*((struct_record *) (*s_objet_3).objet)).noms).objet))
                   .elements;
   
           liberation(s_etat_processus, (*((struct_tableau *)
                   (*(*((struct_record *) (*s_objet_3).objet)).donnees).objet))
                   .elements[indice_i]);
           (*((struct_tableau *) (*(*((struct_record *) (*s_objet_3).objet))
                   .donnees).objet)).elements[indice_i] = s_objet_1;
   
           liberation(s_etat_processus, s_objet_2);
   
           if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile),
                   s_objet_3) == d_erreur)
           {
               return;
           }
       }
   
   /*
   --------------------------------------------------------------------------------
   Traitement des noms    Traitement des noms
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
 */  */
Line 1646  instruction_put(struct_processus *s_etat Line 1732  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = VRL;                      (*s_objet_4).type = VRL;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille * sizeof(real8)))                              (*s_objet_4).objet)).taille) * sizeof(real8)))
                             == NULL)                              == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 1694  instruction_put(struct_processus *s_etat Line 1780  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = VCX;                      (*s_objet_4).type = VCX;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille *                              (*s_objet_4).objet)).taille) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 1799  instruction_put(struct_processus *s_etat Line 1885  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = VCX;                      (*s_objet_4).type = VCX;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille *                              (*s_objet_4).objet)).taille) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 2152  instruction_put(struct_processus *s_etat Line 2238  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = MRL;                      (*s_objet_4).type = MRL;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(real8 *))) == NULL)                              sizeof(real8 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 2178  instruction_put(struct_processus *s_etat Line 2264  instruction_put(struct_processus *s_etat
                     {                      {
                         if ((((real8 **) (*((struct_matrice *)                          if ((((real8 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(real8))) == NULL)                                  sizeof(real8))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)
Line 2229  instruction_put(struct_processus *s_etat Line 2315  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = MCX;                      (*s_objet_4).type = MCX;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(struct_complexe16 *))) == NULL)                              sizeof(struct_complexe16 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 2255  instruction_put(struct_processus *s_etat Line 2341  instruction_put(struct_processus *s_etat
                     {                      {
                         if ((((struct_complexe16 **) (*((struct_matrice *)                          if ((((struct_complexe16 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(struct_complexe16))) == NULL)                                  sizeof(struct_complexe16))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)
Line 2366  instruction_put(struct_processus *s_etat Line 2452  instruction_put(struct_processus *s_etat
                     (*s_objet_4).type = MCX;                      (*s_objet_4).type = MCX;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(struct_complexe16 *))) == NULL)                              sizeof(struct_complexe16 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 2392  instruction_put(struct_processus *s_etat Line 2478  instruction_put(struct_processus *s_etat
                     {                      {
                         if ((((struct_complexe16 **) (*((struct_matrice *)                          if ((((struct_complexe16 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(struct_complexe16))) == NULL)                                  sizeof(struct_complexe16))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)
Line 2838  instruction_put(struct_processus *s_etat Line 2924  instruction_put(struct_processus *s_etat
   
             liberation(s_etat_processus, s_objet_2);              liberation(s_etat_processus, s_objet_2);
         }          }
           else if ((*s_objet_4).type == REC)
           {
               if ((*s_objet_2).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);
                   liberation(s_etat_processus, s_objet_3);
   
                   (*s_etat_processus).erreur_execution =
                           d_ex_erreur_type_argument;
                   return;
               }
   
               if ((*s_objet_4).nombre_occurrences > 1)
               {
                   if ((s_copie_4 = copie_objet(s_etat_processus, s_objet_3, 'N'))
                           == 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;
                   }
   
                   liberation(s_etat_processus, s_objet_4);
                   s_objet_4 = s_copie_4;
               }
   
               if ((s_enregistrement = bsearch(
                       (unsigned char *) (*s_objet_2).objet,
                       (*((struct_tableau *) (*(*((struct_record *)
                       (*s_objet_4).objet)).noms).objet)).elements,
                       (size_t) (*((struct_tableau *) (*(*((struct_record *)
                       (*s_objet_4).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);
                   liberation(s_etat_processus, s_objet_3);
   
                   (*s_etat_processus).erreur_execution = d_ex_element_inexistant;
                   return;
               }
   
               indice_i = s_enregistrement - (*((struct_tableau *)
                       (*(*((struct_record *) (*s_objet_4).objet)).noms).objet))
                       .elements;
   
               liberation(s_etat_processus, (*((struct_tableau *)
                       (*(*((struct_record *) (*s_objet_4).objet)).donnees).objet))
                       .elements[indice_i]);
               (*((struct_tableau *) (*(*((struct_record *) (*s_objet_4).objet))
                       .donnees).objet)).elements[indice_i] = s_objet_1;
   
               if (variable_partagee == d_faux)
               {
                   (*(*s_etat_processus).pointeur_variable_courante).objet =
                           s_objet_4;
               }
               else
               {
                   (*(*s_etat_processus).pointeur_variable_courante).objet = NULL;
                   (*(*s_etat_processus).pointeur_variable_partagee_courante)
                           .objet = s_objet_4;
   
                   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_2);
           }
         else          else
         {          {
             if (variable_partagee == d_vrai)              if (variable_partagee == d_vrai)
Line 2907  instruction_puti(struct_processus *s_eta Line 3103  instruction_puti(struct_processus *s_eta
     struct_objet                        *s_objet_3;      struct_objet                        *s_objet_3;
     struct_objet                        *s_objet_4;      struct_objet                        *s_objet_4;
   
     unsigned long                       i;      integer8                            i;
     unsigned long                       indice_i;      integer8                            indice_i;
     unsigned long                       indice_j;      integer8                            indice_j;
     unsigned long                       j;      integer8                            j;
     unsigned long                       nombre_dimensions;      integer8                            nombre_dimensions;
     unsigned long                       nombre_elements;      integer8                            nombre_elements;
   
     void                                *tampon;      void                                *tampon;
   
Line 2949  instruction_puti(struct_processus *s_eta Line 3145  instruction_puti(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);
         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 3118  instruction_puti(struct_processus *s_eta Line 3314  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = VRL;                  (*s_objet_3).type = VRL;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille * sizeof(real8)))                          (*s_objet_3).objet)).taille) * sizeof(real8)))
                         == NULL)                          == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3153  instruction_puti(struct_processus *s_eta Line 3349  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = VCX;                  (*s_objet_3).type = VCX;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille *                          (*s_objet_3).objet)).taille) *
                         sizeof(struct_complexe16))) == NULL)                          sizeof(struct_complexe16))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3234  instruction_puti(struct_processus *s_eta Line 3430  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = VCX;                  (*s_objet_3).type = VCX;
   
                 if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau                  if (((*((struct_vecteur *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_vecteur *)                          = malloc(((size_t) (*((struct_vecteur *)
                         (*s_objet_3).objet)).taille *                          (*s_objet_3).objet)).taille) *
                         sizeof(struct_complexe16))) == NULL)                          sizeof(struct_complexe16))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3486  instruction_puti(struct_processus *s_eta Line 3682  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = MRL;                  (*s_objet_3).type = MRL;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes * sizeof(real8 *)))                          (*s_objet_3).objet)).nombre_lignes) * sizeof(real8 *)))
                         == NULL)                          == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3500  instruction_puti(struct_processus *s_eta Line 3696  instruction_puti(struct_processus *s_eta
                 {                  {
                     if ((((real8 **) (*((struct_matrice *)                      if ((((real8 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(real8))) == NULL)                              sizeof(real8))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 3539  instruction_puti(struct_processus *s_eta Line 3735  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = MCX;                  (*s_objet_3).type = MCX;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes *                          (*s_objet_3).objet)).nombre_lignes) *
                         sizeof(struct_complexe16 *))) == NULL)                          sizeof(struct_complexe16 *))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3553  instruction_puti(struct_processus *s_eta Line 3749  instruction_puti(struct_processus *s_eta
                 {                  {
                     if ((((struct_complexe16 **) (*((struct_matrice *)                      if ((((struct_complexe16 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 3639  instruction_puti(struct_processus *s_eta Line 3835  instruction_puti(struct_processus *s_eta
                 (*s_objet_3).type = MCX;                  (*s_objet_3).type = MCX;
   
                 if (((*((struct_matrice *) (*s_objet_3).objet)).tableau                  if (((*((struct_matrice *) (*s_objet_3).objet)).tableau
                         = malloc((*((struct_matrice *)                          = malloc(((size_t) (*((struct_matrice *)
                         (*s_objet_3).objet)).nombre_lignes *                          (*s_objet_3).objet)).nombre_lignes) *
                         sizeof(struct_complexe16 *))) == NULL)                          sizeof(struct_complexe16 *))) == NULL)
                 {                  {
                     (*s_etat_processus).erreur_systeme =                      (*s_etat_processus).erreur_systeme =
Line 3653  instruction_puti(struct_processus *s_eta Line 3849  instruction_puti(struct_processus *s_eta
                 {                  {
                     if ((((struct_complexe16 **) (*((struct_matrice *)                      if ((((struct_complexe16 **) (*((struct_matrice *)
                             (*s_objet_3).objet)).tableau)[i]                              (*s_objet_3).objet)).tableau)[i]
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_3).objet)).nombre_colonnes *                              (*s_objet_3).objet)).nombre_colonnes) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         (*s_etat_processus).erreur_systeme =                          (*s_etat_processus).erreur_systeme =
Line 4113  instruction_puti(struct_processus *s_eta Line 4309  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = VRL;                      (*s_objet_4).type = VRL;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille * sizeof(real8)))                              (*s_objet_4).objet)).taille) * sizeof(real8)))
                             == NULL)                              == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4161  instruction_puti(struct_processus *s_eta Line 4357  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = VCX;                      (*s_objet_4).type = VCX;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille *                              (*s_objet_4).objet)).taille) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4266  instruction_puti(struct_processus *s_eta Line 4462  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = VCX;                      (*s_objet_4).type = VCX;
   
                     if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau                      if (((*((struct_vecteur *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_vecteur *)                              = malloc(((size_t) (*((struct_vecteur *)
                             (*s_objet_4).objet)).taille *                              (*s_objet_4).objet)).taille) *
                             sizeof(struct_complexe16))) == NULL)                              sizeof(struct_complexe16))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4624  instruction_puti(struct_processus *s_eta Line 4820  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = MRL;                      (*s_objet_4).type = MRL;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(real8 *))) == NULL)                              sizeof(real8 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4650  instruction_puti(struct_processus *s_eta Line 4846  instruction_puti(struct_processus *s_eta
                     {                      {
                         if ((((real8 **) (*((struct_matrice *)                          if ((((real8 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(real8))) == NULL)                                  sizeof(real8))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)
Line 4701  instruction_puti(struct_processus *s_eta Line 4897  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = MCX;                      (*s_objet_4).type = MCX;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(struct_complexe16 *))) == NULL)                              sizeof(struct_complexe16 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4727  instruction_puti(struct_processus *s_eta Line 4923  instruction_puti(struct_processus *s_eta
                     {                      {
                         if ((((struct_complexe16 **) (*((struct_matrice *)                          if ((((struct_complexe16 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(struct_complexe16))) == NULL)                                  sizeof(struct_complexe16))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)
Line 4838  instruction_puti(struct_processus *s_eta Line 5034  instruction_puti(struct_processus *s_eta
                     (*s_objet_4).type = MCX;                      (*s_objet_4).type = MCX;
   
                     if (((*((struct_matrice *) (*s_objet_4).objet)).tableau                      if (((*((struct_matrice *) (*s_objet_4).objet)).tableau
                             = malloc((*((struct_matrice *)                              = malloc(((size_t) (*((struct_matrice *)
                             (*s_objet_4).objet)).nombre_lignes *                              (*s_objet_4).objet)).nombre_lignes) *
                             sizeof(struct_complexe16 *))) == NULL)                              sizeof(struct_complexe16 *))) == NULL)
                     {                      {
                         if (variable_partagee == d_vrai)                          if (variable_partagee == d_vrai)
Line 4864  instruction_puti(struct_processus *s_eta Line 5060  instruction_puti(struct_processus *s_eta
                     {                      {
                         if ((((struct_complexe16 **) (*((struct_matrice *)                          if ((((struct_complexe16 **) (*((struct_matrice *)
                                 (*s_objet_4).objet)).tableau)[i]                                  (*s_objet_4).objet)).tableau)[i]
                                 = malloc((*((struct_matrice *)                                  = malloc(((size_t) (*((struct_matrice *)
                                 (*s_objet_4).objet)).nombre_colonnes *                                  (*s_objet_4).objet)).nombre_colonnes) *
                                 sizeof(struct_complexe16))) == NULL)                                  sizeof(struct_complexe16))) == NULL)
                         {                          {
                             if (variable_partagee == d_vrai)                              if (variable_partagee == d_vrai)

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


CVSweb interface <joel.bertrand@systella.fr>