Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for libplaton/platon/str/strplus.c between version 1.26 and 1.27

version 1.26, 2003/05/08 23:48:55 version 1.27, 2003/09/24 16:51:56
Line 32  PLATON_FUNC(stristr)(s1, s2)
Line 32  PLATON_FUNC(stristr)(s1, s2)
         const char *s2;          const char *s2;
 {  {
         char *a_s1, *a_s2;          char *a_s1, *a_s2;
         register char *ret;          register char *ret = NULL;
   
         a_s1 = strdup(s1);          a_s1 = strdup(s1);
         a_s2 = strdup(s2);          a_s2 = strdup(s2);
   
         if (a_s1 == NULL) {          if (a_s1 != NULL && a_s2 != NULL) {
                 free(a_s1);                  ret = strstr(PLATON_FUNC(strtolower)(a_s1),
                 return NULL;                                  PLATON_FUNC(strtolower)(a_s2));
                   if (ret != NULL)
                           ret = (char *) s1 + (ret - a_s1);
         }          }
   
         if (a_s2 == NULL) {          if (a_s2 != NULL)
                 free(a_s2);                  free(a_s2);
                 return NULL;  
         }  
   
         if ((ret = strstr(PLATON_FUNC(strtolower)(a_s1),          if (a_s1 != NULL)
                                         PLATON_FUNC(strtolower)(a_s2))) != NULL)                  free(a_s1);
                 ret = (char *) s1 + (ret - a_s1);  
   
         free(a_s1);  
         free(a_s2);  
   
         return ret;          return ret;
 }  }

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top