Diff for /rpl/src/instructions_s2.c between versions 1.4 and 1.37

version 1.4, 2010/02/26 19:22:05 version 1.37, 2012/01/05 10:19:04
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.11    RPL/2 (R) version 4.1.5
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2012 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
   
 /*  /*
Line 764  instruction_size(struct_processus *s_eta Line 764  instruction_size(struct_processus *s_eta
         }          }
   
         (*((integer8 *) (*s_objet_resultat).objet)) =          (*((integer8 *) (*s_objet_resultat).objet)) =
                 strlen((unsigned char *) (*s_objet_argument).objet);                  longueur_chaine(s_etat_processus,
                   (unsigned char *) (*s_objet_argument).objet);
     }      }
   
 /*  /*
Line 1092  instruction_str_fleche(struct_processus Line 1093  instruction_str_fleche(struct_processus
   
     if ((*s_objet).type == CHN)      if ((*s_objet).type == CHN)
     {      {
         position_courante = (*s_etat_processus).position_courante;  
         registre_definitions_chainees = (*s_etat_processus)  
                 .definitions_chainees;  
         registre_instruction_courante = (*s_etat_processus)  
                 .instruction_courante;  
   
         // Comptage des caractères à protéger.          // Comptage des caractères à protéger.
   
         drapeau45 = test_cfsf(s_etat_processus, 45);          drapeau45 = test_cfsf(s_etat_processus, 45);
Line 1127  instruction_str_fleche(struct_processus Line 1122  instruction_str_fleche(struct_processus
   
             if (presence_chaine == d_vrai)              if (presence_chaine == d_vrai)
             {              {
                 if ((*ptr_l) == '\\')                  switch(*ptr_l)
                   {
                       case '\\':
                       case '\t':
                       case '\b':
                       case '\n':
                       {
                           nombre_caracteres_supplementaires++;
                           break;
                       }
                   }
               }
               else
               {
                   switch(*ptr_l)
                 {                  {
                     nombre_caracteres_supplementaires++;                      case '\n':
                       case '\b':
                       case '\t':
                       {
                           nombre_caracteres_supplementaires--;
                           break;
                       }
                 }                  }
             }              }
   
Line 1163  instruction_str_fleche(struct_processus Line 1178  instruction_str_fleche(struct_processus
   
             if (presence_chaine == d_vrai)              if (presence_chaine == d_vrai)
             {              {
                 if ((*ptr_l) == '\\')                  switch(*ptr_l)
                 {                  {
                     (*(++ptr_e)) = '\\';                      case '\\':
                       {
                           (*(++ptr_e)) = '\\';
                           break;
                       }
   
                       case '\t':
                       {
                           (*ptr_e) = '\\';
                           (*(++ptr_e)) = 't';
                           break;
                       }
   
                       case '\b':
                       {
                           (*ptr_e) = '\\';
                           (*(++ptr_e)) = 'b';
                           break;
                       }
   
                       case '\n':
                       {
                           (*ptr_e) = '\\';
                           (*(++ptr_e)) = 'n';
                           break;
                       }
                   }
               }
               else
               {
                   switch(*ptr_l)
                   {
                       case '\n':
                       case '\b':
                       case '\t':
                       {
                           ptr_e--;
                           break;
                       }
                 }                  }
             }              }
   
Line 1175  instruction_str_fleche(struct_processus Line 1228  instruction_str_fleche(struct_processus
   
         (*ptr_e) = d_code_fin_chaine;          (*ptr_e) = d_code_fin_chaine;
   
           position_courante = (*s_etat_processus).position_courante;
           registre_definitions_chainees = (*s_etat_processus)
                   .definitions_chainees;
           registre_instruction_courante = (*s_etat_processus)
                   .instruction_courante;
           (*s_etat_processus).position_courante = 0;
         (*s_etat_processus).definitions_chainees = chaine_convertie;          (*s_etat_processus).definitions_chainees = chaine_convertie;
         free(tampon);          free(tampon);
   
Line 1199  instruction_str_fleche(struct_processus Line 1258  instruction_str_fleche(struct_processus
   
             recherche_type(s_etat_processus);              recherche_type(s_etat_processus);
   
             if ((*s_etat_processus).erreur_execution != d_ex)              if (((*s_etat_processus).erreur_execution != d_ex) ||
                       ((*s_etat_processus).erreur_systeme != d_es))
             {              {
                 liberation(s_etat_processus, s_objet);                  liberation(s_etat_processus, s_objet);
   

Removed from v.1.4  
changed lines
  Added in v.1.37


CVSweb interface <joel.bertrand@systella.fr>