This determines if the implied string (at the current supplied chain iterator) is of the supplied form

Return TypeFunction nameArguments
uint32_tFormCheckChain(hzChain::Iter&,const char*,)

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

Function Logic:

0:START 1:unknown 2:Return true 3:unknown 4:Return false 5:unknown 6:unknown 7:items items items 8:unknown 9:unknown 10:c items items 11:unknown 12:c items items 13:unknown 14:c items items 15:unknown 16:unknown 17:unknown 18:unknown 19:items items items 20:unknown 21:Return len 22:Return 0

Function body:

uint32_t FormCheckChain (hzChain::Iter& ci)const char* cpCtrl, 
{
   //  Category: Regular Expression
   //  
   //  This determines if the implied string (at the current supplied chain iterator) is of the supplied form
   //  
   //  Arguments: 1) ci  The input chain as chain iterator
   //     2) cpCtrl The control string
   //  
   //  Returns: Number of chars in the chain that comprise the construct of the supplied form
   _hzfunc(__func__) ;
   chIter      z ;         //  For processing ctrl string into parts
   const char* c ;         //  Progressive ptr for test string
   uint32_t    len = 0;    //  Length of construct
   if (!cpCtrl || !cpCtrl[0])
       return true ;
   if (ci.eof())
       return false ;
   //  Process the CTRL string
   for (c = cpCtrl, z = ci ; *c && !z.eof() ;)
   {
       if (*c == CHAR_QUERY)
           { c++ ; len++ ; z++ ; continue ; }
       if (*c == CHAR_SQOPEN)
       {
           if (memcmp(c, "[0-9]", 5)== 0&& *z >&eq; ''0''&&*z <&eq; ''9''){c += 5; len++ ; z++ ; continue ; }
           if (memcmp(c, "[a-z]", 5)== 0&& *z >&eq; ''a''&&*z <&eq; ''z''){c += 5; len++ ; z++ ; continue ; }
           if (memcmp(c, "[A-Z]", 5)== 0&& *z >&eq; ''A''&&*z <&eq; ''Z''){c += 5; len++ ; z++ ; continue ; }
       }
       if (*c == CHAR_ASTERISK)
       {
           //  Advance the control until no longer on an asterisk. Then look for the first occurence of the control char in the test
           for (; *c == CHAR_ASTERISK ; c++) ;
           for (; !z.eof() && *z != *c ; len++, z++) ;
           continue ;
       }
       if (*c == *z)
           { c++ ; len++ ; z++ ; continue ; }
       break ;
   }
   if (*c == 0)
       return len ;
   return 0;
}