(file) Return to System.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/System.cpp between version 1.29 and 1.29.2.1

version 1.29, 2005/06/06 14:27:55 version 1.29.2.1, 2005/09/29 03:25:00
Line 50 
Line 50 
 #include <cstring> #include <cstring>
 #include "System.h" #include "System.h"
 #include "Socket.h" #include "Socket.h"
   #include "CharSet.h"
  
 #ifdef PEGASUS_PLATFORM_WIN32_IX86_MSVC #ifdef PEGASUS_PLATFORM_WIN32_IX86_MSVC
 # include <windows.h> # include <windows.h>
Line 97 
Line 98 
     return true;     return true;
 } }
  
 // ATTN: Move to platform-specific System implementation files and call  
 // strcasecmp where it is available.  
 Sint32 System::strcasecmp(const char* s1, const char* s2) Sint32 System::strcasecmp(const char* s1, const char* s2)
 { {
     while (*s1 && *s2)      // Note: this is faster than glibc strcasecmp().
     {  
         int r = tolower(*s1++) - tolower(*s2++);  
  
         if (r)      Uint8* p = (Uint8*)s1;
             return r;      Uint8* q = (Uint8*)s2;
     }      int r;
   
       for (;;)
       {
           if ((r = CharSet::to_lower(p[0]) - CharSet::to_lower(q[0])) || !p[0] ||
               (r = CharSet::to_lower(p[1]) - CharSet::to_lower(q[1])) || !p[1] ||
               (r = CharSet::to_lower(p[2]) - CharSet::to_lower(q[2])) || !p[2] ||
               (r = CharSet::to_lower(p[3]) - CharSet::to_lower(q[3])) || !p[3])
               break;
  
     if (*s2)          p += 4;
         return -1;          q += 4;
     else if (*s1)      }
         return 1;  
  
     return 0;      return r;
 } }
  
 // Return the just the file name from the path into basename // Return the just the file name from the path into basename


Legend:
Removed from v.1.29  
changed lines
  Added in v.1.29.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2