Return TypeFunction nameArguments
intCstrCompareW(const char*,const char*,)

Declared in file: hzTextproc.h
Defined in file : hzTextproc.cpp

Function Logic:

0:START 1:pA 2:*pA&&*pA<=(char)32; 3:pB 4:*pB&&*pB<=(char)32; 5:; 6:len entB entA 7:pA 8:*pA&&*pA<=(char)32 9:*pA<=(char)32; 10:entA 11:*pA; 12:IsEntity(entA,len,pA) 13:pA IsUnicodeSeq 14:IsUnicodeSeq(entA,len,pA) 15:pA 16:entA IsAlphanum 17:IsAlphanum(entA) 18:entA 19:*pA==0&&entA==(char)32 20:entA 21:pB 22:*pB&&*pB<=(char)32 23:*pB&&*pB<=(char)32; 24:entB 25:*pB; 26:IsEntity(entB,len,pB) 27:pB IsUnicodeSeq 28:IsUnicodeSeq(entB,len,pB) 29:pB 30:entB IsAlphanum 31:IsAlphanum(entB) 32:entB 33:*pB==0&&entB==(char)32 34:entB 35:entA!=entB 36:Return entA-entB 37:!entA 38:Return 0

Function body:

int CstrCompareW (const char* a, const char* b)
{
   const char* pA = a ;
   const char* pB = b ;
   uint32_t    entA ;
   uint32_t    entB ;
   uint32_t    len ;
   if (pA)
       for (pA++ ; *pA && *pA <&eq; CHAR_SPACE ; pA++) ;
   if (pB)
       for (pB++ ; *pB && *pB <&eq; CHAR_SPACE ; pB++) ;
   for (;;)
   {
       entA = entB = len = 0;
       if (pA)
       {
           if (*pA && *pA <&eq; CHAR_SPACE)
           {
               for (pA++ ; *pA <&eq; CHAR_SPACE ; pA++) ;
               entA = CHAR_SPACE ;
           }
           else
           {
               for (; *pA ;)
               {
                   if (IsEntity(entA, len, pA))
                       pA += len ;
                   else if (IsUnicodeSeq(entA, len, pA))
                       pA += len ;
                   else
                       entA = *pA++ ;
                   if (IsAlphanum(entA))
                       { entA = conv2lower(entA) ; break ; }
               }
           }
           if (*pA == 0&& entA == CHAR_SPACE)
               entA = 0;
       }
       if (pB)
       {
           if (*pB && *pB <&eq; CHAR_SPACE)
           {
               for (pB++ ; *pB && *pB <&eq; CHAR_SPACE ; pB++) ;
               entB = CHAR_SPACE ;
           }
           else
           {
               for (; *pB ;)
               {
                   if (IsEntity(entB, len, pB))
                       pB += len ;
                   else if (IsUnicodeSeq(entB, len, pB))
                       pB += len ;
                   else
                       entB = *pB++ ;
                   if (IsAlphanum(entB))
                       { entB = conv2lower(entB) ; break ; }
               }
           }
           if (*pB == 0&& entB == CHAR_SPACE)
               entB = 0;
       }
       if (entA != entB)
           return entA - entB ;
       if (!entA)
           break ;
   }
   return 0;
}