Diff for /rpl/src/instructions_u1.c between versions 1.36 and 1.72

version 1.36, 2012/01/05 10:19:04 version 1.72, 2020/01/10 11:15:49
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.5    RPL/2 (R) version 4.1.32
   Copyright (C) 1989-2012 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 710  instruction_use(struct_processus *s_etat Line 710  instruction_use(struct_processus *s_etat
         if ((*s_etat_processus).langue == 'F')          if ((*s_etat_processus).langue == 'F')
         {          {
             printf("(insertion d'une bibliothèque dynamique)\n\n");              printf("(insertion d'une bibliothèque dynamique)\n\n");
             printf("Si le chemin ne comprend pas de '/', la bibliothèque "              printf("Si le chemin ne commence pas par '/', la bibliothèque "
                     "est recherchée\n");                      "est recherchée\n");
             printf("successivement dans le répertoire courant puis dans %s."              printf("successivement dans le répertoire courant puis dans %s."
                     "\n\n", d_exec_path);                      "\n\n", d_exec_path);
Line 718  instruction_use(struct_processus *s_etat Line 718  instruction_use(struct_processus *s_etat
         else          else
         {          {
             printf("(insert a shared library)\n\n");              printf("(insert a shared library)\n\n");
             printf("If this path does not include '/', RPL/2 tries to find "              printf("If this path does not begin with '/', RPL/2 tries to find "
                     "it in current\n");                      "it in current\n");
             printf("directory or %s in this order.\n\n", d_exec_path);              printf("directory or %s in this order.\n\n", d_exec_path);
         }          }
Line 752  instruction_use(struct_processus *s_etat Line 752  instruction_use(struct_processus *s_etat
     if ((*s_objet_argument).type == CHN)      if ((*s_objet_argument).type == CHN)
     {      {
         /*          /*
          * Si le nom contient un '/', il est traité comme un chemin           * Si le nom commence par un '/', il est traité comme un chemin
          * absolu. Dans le cas contraire, on essaye successivement           * absolu. Dans le cas contraire, on essaye successivement
          * './' puis le répertoire lib de l'installation du langage.           * './' puis le répertoire lib de l'installation du langage.
          */           */
   
         if (index((unsigned char *) (*s_objet_argument).objet, '/') == NULL)          if (((unsigned char *) (*s_objet_argument).objet)[0] != '/')
         {          {
             if ((tampon = malloc((strlen((unsigned char *) (*s_objet_argument)              if ((tampon = malloc((strlen((unsigned char *) (*s_objet_argument)
                     .objet) + 3) * sizeof(unsigned char))) == NULL)                      .objet) + 3) * sizeof(unsigned char))) == NULL)
Line 811  instruction_use(struct_processus *s_etat Line 811  instruction_use(struct_processus *s_etat
                             (unsigned char *) (*s_objet_argument).objet);                              (unsigned char *) (*s_objet_argument).objet);
                 }                  }
   
                   // Si la chaîne commence par '//', on supprime un '/'.
                   // tampon[1] existe toujours.
   
                   if (tampon[1] == '/')
                   {
                       memmove(tampon, tampon + 1, strlen(tampon));
                   }
   
                 caracteristiques_fichier(s_etat_processus, tampon,                  caracteristiques_fichier(s_etat_processus, tampon,
                         &existence, &ouverture, &unite);                          &existence, &ouverture, &unite);
   

Removed from v.1.36  
changed lines
  Added in v.1.72


CVSweb interface <joel.bertrand@systella.fr>