Diff for /rpl/src/rplexternals.h between versions 1.47 and 1.50

version 1.47, 2013/03/29 10:30:32 version 1.50, 2013/04/02 11:56:33
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.13    RPL/2 (R) version 4.1.14
   Copyright (C) 1989-2013 Dr. BERTRAND Joël    Copyright (C) 1989-2013 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 960 Line 960
 #define setString(object, string) do { \  #define setString(object, string) do { \
     ifIsString(object) \      ifIsString(object) \
     { \      { \
         if ((*object).nombre_occurrences > 1) \          if (string == NULL) executionError("Nullified string"); else \
         { \          { \
             struct_objet *__tmp_object; \              if ((*object).nombre_occurrences > 1) \
             if ((__tmp_object = copie_objet(object, 'O')) == NULL) \              { \
                   struct_objet *__tmp_object; \
                   if ((__tmp_object = copie_objet(object, 'O')) == NULL) \
                       systemError("Memory allocation error"); \
                   liberation(object); \
                   object = __tmp_object; \
               } \
               free((unsigned char *) (*object).objet); \
               if (((*object).objet = malloc((strlen(string) + 1) * \
                       sizeof(unsigned char))) == NULL) \
                 systemError("Memory allocation error"); \                  systemError("Memory allocation error"); \
             liberation(object); \              strcpy((char *) (*object).objet, string); \
             object = __tmp_object; \  
         } \          } \
         free((unsigned char *) (*object).objet); \  
         if (((*object).objet = malloc((strlen(string) + 1) * \  
                 sizeof(unsigned char))) == NULL) \  
             systemError("Memory allocation error"); \  
         strcpy((char *) (*object).objet, string); \  
     } \      } \
     else executionError("Type mistmatch error"); } while(0)      else executionError("Type mistmatch error"); } while(0)
   
Line 1071 Line 1074
 #define removeObjectFromList(list, object) do { \  #define removeObjectFromList(list, object) do { \
     ifIsList(list) \      ifIsList(list) \
     { \      { \
         if ((*object).objet == NULL) \          if ((*list).objet != NULL) \
         { \          { \
             struct_objet *__tmp_object; \              struct_liste_chainee    *__current; \
             if ((__tmp_object = copie_objet(list, 'N')) == NULL) \              struct_liste_chainee    *__previous; \
                 systemError("Memory allocation error"); \              __current = (*list).objet; \
             liberation(object); \              __previous = NULL; \
             object = __tmp_object; \              if ((*__current).donnee == object) \
             \              { \
             \                  (*list).objet = (*__current).suivant; \
             \              } \
             \              else \
         } \              { \
                   while(__current != NULL) \
                   { \
                       if ((*__current).donnee == object) \
                       { \
                           (*__previous).suivant = (*__current).suivant; \
                           break; \
                       } \
                       __previous = __current; \
                       __current = (*__current).suivant; \
                   } \
               } \
               liberation((*__current).donnee); \
               free(__current); \
           } \
     } \      } \
     else executionError("Type mistmatch error"); } while(0)      else executionError("Type mistmatch error"); } while(0)
   

Removed from v.1.47  
changed lines
  Added in v.1.50


CVSweb interface <joel.bertrand@systella.fr>