Diff for /rpl/src/instructions_o1.c between versions 1.17 and 1.41

version 1.17, 2010/08/06 15:26:48 version 1.41, 2011/11/26 10:01:30
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.18    RPL/2 (R) version 4.1.5
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2011 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 897  instruction_open(struct_processus *s_eta Line 897  instruction_open(struct_processus *s_eta
      * Format :       * Format :
      *   FORMATTED   : fichier texte ;       *   FORMATTED   : fichier texte ;
      *   UNFORMATTED : fichier binaire.       *   UNFORMATTED : fichier binaire.
        *   FLOW        : chaîne de caractères sans format (en tant qu'objet
        *                 binaire comme "\x00avz\xFD")
      */       */
   
     file                        *descripteur;      file                        *descripteur;
Line 1190  instruction_open(struct_processus *s_eta Line 1192  instruction_open(struct_processus *s_eta
   
                     type_ouverture = 'R';                      type_ouverture = 'R';
                 }                  }
                   else if (strcmp(argument_majuscule, "OLD") == 0)
                   {
                       if (type_ouverture != ' ')
                       {
                           liberation(s_etat_processus, s_objet_argument);
                           free(argument_majuscule);
   
                           (*s_etat_processus).erreur_execution =
                                   d_ex_erreur_parametre_fichier;
                           return;
                       }
   
                       if (type_arguments == ' ')
                       {
                           type_arguments = 'F';
                       }
                       else if (type_arguments == 'S')
                       {
                           liberation(s_etat_processus, s_objet_argument);
                           free(argument_majuscule);
   
                           (*s_etat_processus).erreur_execution =
                                   d_ex_erreur_parametre_fichier;
                           return;
                       }
   
                       type_ouverture = 'O';
                   }
                 else if (strcmp(argument_majuscule, "UNKNOWN") == 0)                  else if (strcmp(argument_majuscule, "UNKNOWN") == 0)
                 {                  {
                     if (type_ouverture != ' ')                      if (type_ouverture != ' ')
Line 2782  instruction_open(struct_processus *s_eta Line 2812  instruction_open(struct_processus *s_eta
                             return;                              return;
                         }                          }
   
                           sqlite = NULL;
   
                         if (sqlite3_open_v2(nom, &sqlite,                          if (sqlite3_open_v2(nom, &sqlite,
                                 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,                                  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
                                 NULL) != SQLITE_OK)                                  NULL) != SQLITE_OK)
                         {                          {
                               if (sqlite != NULL)
                               {
                                   sqlite3_close(sqlite);
                               }
   
                             free(nom);                              free(nom);
   
                             liberation(s_etat_processus, s_objet_argument);                              liberation(s_etat_processus, s_objet_argument);
Line 2888  instruction_open(struct_processus *s_eta Line 2925  instruction_open(struct_processus *s_eta
                     }                      }
                     else                      else
                     {                      {
                           sqlite = NULL;
   
                         if (sqlite3_open_v2(nom, &sqlite,                          if (sqlite3_open_v2(nom, &sqlite,
                                 SQLITE_OPEN_READWRITE,                                  SQLITE_OPEN_READWRITE,
                                 NULL) != SQLITE_OK)                                  NULL) != SQLITE_OK)
                         {                          {
                               if (sqlite != NULL)
                               {
                                   sqlite3_close(sqlite);
                               }
   
                             free(nom);                              free(nom);
   
                             liberation(s_etat_processus, s_objet_argument);                              liberation(s_etat_processus, s_objet_argument);
Line 3027  instruction_open(struct_processus *s_eta Line 3071  instruction_open(struct_processus *s_eta
                     }                      }
                     else                      else
                     {                      {
                           sqlite = NULL;
   
                         if (sqlite3_open_v2(nom, &sqlite,                          if (sqlite3_open_v2(nom, &sqlite,
                                 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,                                  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
                                 NULL) != SQLITE_OK)                                  NULL) != SQLITE_OK)
                         {                          {
                               if (sqlite != NULL)
                               {
                                   sqlite3_close(sqlite);
                               }
   
                             free(nom);                              free(nom);
   
                             liberation(s_etat_processus, s_objet_argument);                              liberation(s_etat_processus, s_objet_argument);
Line 3138  instruction_open(struct_processus *s_eta Line 3189  instruction_open(struct_processus *s_eta
                         }                          }
                         else                          else
                         {                          {
                               sqlite = NULL;
   
                             if (sqlite3_open_v2(nom, &sqlite,                              if (sqlite3_open_v2(nom, &sqlite,
                                     SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,                                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
                                     NULL) != SQLITE_OK)                                      NULL) != SQLITE_OK)
                             {                              {
                                   if (sqlite != NULL)
                                   {
                                       sqlite3_close(sqlite);
                                   }
   
                                 free(nom);                                  free(nom);
   
                                 liberation(s_etat_processus, s_objet_argument);                                  liberation(s_etat_processus, s_objet_argument);
Line 3232  instruction_open(struct_processus *s_eta Line 3290  instruction_open(struct_processus *s_eta
                         }                          }
                         else                          else
                         {                          {
                               sqlite = NULL;
   
                             if (sqlite3_open_v2(nom, &sqlite,                              if (sqlite3_open_v2(nom, &sqlite,
                                     SQLITE_OPEN_READWRITE,                                      SQLITE_OPEN_READWRITE,
                                     NULL) != SQLITE_OK)                                      NULL) != SQLITE_OK)
                             {                              {
                                   if (sqlite != NULL)
                                   {
                                       sqlite3_close(sqlite);
                                   }
   
                                 free(nom);                                  free(nom);
   
                                 liberation(s_etat_processus, s_objet_argument);                                  liberation(s_etat_processus, s_objet_argument);
Line 3310  instruction_open(struct_processus *s_eta Line 3375  instruction_open(struct_processus *s_eta
                             return;                              return;
                         }                          }
   
                           sqlite = NULL;
   
                         if (sqlite3_open_v2(nom, &sqlite,                          if (sqlite3_open_v2(nom, &sqlite,
                                 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,                                  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
                                 NULL) != SQLITE_OK)                                  NULL) != SQLITE_OK)
                         {                          {
                               if (sqlite != NULL)
                               {
                                   sqlite3_close(sqlite);
                               }
   
                             free(nom);                              free(nom);
   
                             liberation(s_etat_processus, s_objet_argument);                              liberation(s_etat_processus, s_objet_argument);
Line 4185  instruction_open(struct_processus *s_eta Line 4257  instruction_open(struct_processus *s_eta
                         pointeur++;                          pointeur++;
                     }                      }
   
                     strncpy(socket_unix.sun_path, pointeur, 108);                      strncpy(socket_unix.sun_path, pointeur, UNIX_PATH_MAX);
                     socket_unix.sun_path[108 - 1] = d_code_fin_chaine;                      socket_unix.sun_path[UNIX_PATH_MAX - 1] = d_code_fin_chaine;
   
                     if (options_socket() == d_erreur)                      if (options_socket() == d_erreur)
                     {                      {
Line 4440  instruction_open(struct_processus *s_eta Line 4512  instruction_open(struct_processus *s_eta
                                         .sin6_addr.s6_addr[i]);                                          .sin6_addr.s6_addr[i]);
                             }                              }
 #                           else  #                           else
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Attention : Support du protocole"
                                           " IPv6 indisponible\n");
                               }
                               else
                               {
                                   printf("+++Warning : IPv6 support "
                                           "unavailable\n");
                               }
 #                           endif  #                           endif
                         }                          }
   
Line 4600  instruction_open(struct_processus *s_eta Line 4682  instruction_open(struct_processus *s_eta
                                 return;                                  return;
                             }                              }
 #                           else  #                           else
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Attention : Support du protocole"
                                           " IPv6 indisponible\n");
                               }
                               else
                               {
                                   printf("+++Warning : IPv6 support "
                                           "unavailable\n");
                               }
 #                           endif  #                           endif
                         }                          }
                     }                      }
Line 4704  instruction_open(struct_processus *s_eta Line 4796  instruction_open(struct_processus *s_eta
   
                     socket_unix.sun_family = AF_UNIX;                      socket_unix.sun_family = AF_UNIX;
                     strncpy(socket_unix.sun_path, (*((struct_socket *)                      strncpy(socket_unix.sun_path, (*((struct_socket *)
                             (*s_objet_resultat).objet)).adresse, 108);                              (*s_objet_resultat).objet)).adresse, UNIX_PATH_MAX);
                     socket_unix.sun_path[108 - 1] = d_code_fin_chaine;                      socket_unix.sun_path[UNIX_PATH_MAX - 1] = d_code_fin_chaine;
   
                     if ((type_socket == 'S') || (type_socket == 'Q'))                      if ((type_socket == 'S') || (type_socket == 'Q'))
                     {                      {
Line 4960  instruction_open(struct_processus *s_eta Line 5052  instruction_open(struct_processus *s_eta
                                         .sin6_addr.s6_addr[i]);                                          .sin6_addr.s6_addr[i]);
                             }                              }
 #                           else  #                           else
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Attention : Support du protocole"
                                           " IPv6 indisponible\n");
                               }
                               else
                               {
                                   printf("+++Warning : IPv6 support "
                                           "unavailable\n");
                               }
 #                           endif  #                           endif
                         }                          }
   
Line 5162  instruction_open(struct_processus *s_eta Line 5264  instruction_open(struct_processus *s_eta
                                         .socket_en_ecoute = 'N';                                          .socket_en_ecoute = 'N';
                             }                              }
 #                           else  #                           else
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Attention : Support du protocole"
                                           " IPv6 indisponible\n");
                               }
                               else
                               {
                                   printf("+++Warning : IPv6 support "
                                           "unavailable\n");
                               }
 #                           endif  #                           endif
                         }                          }
                         else                          else

Removed from v.1.17  
changed lines
  Added in v.1.41


CVSweb interface <joel.bertrand@systella.fr>