Return TypeFunction nameArguments
hzEmaddr&hzEmaddr::operator=(const char*,)

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

Function Logic:

0:START 1:hzEmaddr::Clear 2:!cpStr||!cpStr[0] 3:Return *this 4:!IsEmaddr(cpStr) 5:Return *this 6:*i&&*i!='@'; 7:*i=='@' 8:*i; 9:nLhs<1||nLhs>192||nRhs<1||nRhs>63 10:Return *this 11:hzSSR::Alloc m_addr 12:!m_addr 13:hzexit 14:hzSSR::Xlate destCtl destCtl destCtl destCtl 15:*i; 16:* 17:Return *this

Function body:

hzEmaddr& hzEmaddr::operator= (const char* cpStr)
{
   _hzfunc("hzEmaddr::operator=(cstr)") ;
   _ema_space* destCtl ;
   const char* i ;
   char*       j ;
   uint32_t    nLhs = 0;
   uint32_t    nRhs = 0;
   Clear() ;
   if (!cpStr || !cpStr[0])
       return *this ;
   if (!IsEmaddr(cpStr))
   {
       hzerr(E_FORMAT, "Cannot assign %s", cpStr) ;
       return *this ;
   }
   for (i = cpStr ; *i && *i != ''@'';nLhs++, i++) ;
   if (*i == ''@'')
       for (i++ ; *i ; nRhs++, i++) ;
   if (nLhs < 1|| nLhs > 192||nRhs< 1|| nRhs > 63)
   {
       hzerr(E_FORMAT, "Cannot assign %s", cpStr) ;
       return *this ;
   }
   m_addr = g_ssrInet.Alloc(nLhs + nRhs + 1+ EMA_FACTOR) ;
   if (!m_addr)
       hzexit(E_MEMORY, "Cannot assign %s", cpStr) ;
   destCtl = (_ema_space*) g_ssrInet.Xlate(m_addr) ;
   destCtl->m_copy = 1;
   destCtl->m_lhs = nLhs & 0xff;
   destCtl->m_rhs = nRhs & 0xff;
   for (j = destCtl->m_data, i = cpStr ; *i ; *j++ = _tolower(*i++)) ;
   *j = 0;
   return *this ;
}