Append the current chain with the supplied uchar string operand.

Return TypeFunction nameArguments
hzXbuf&hzXbuf::operator+=(unsigned char*,)

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

Function Logic:

0:START 1:unknown 2:Return *this 3:unknown 4:mx 5:unknown 6:mx 7:mx 8:curBlk 9:unknown 10:items 11:unknown 12:unknown 13:newBlk 14:unknown 15:items 16:items mx curBlk 17:curBlk items items 18:Return *this

Function body:

hzXbuf& hzXbuf::operator+= (unsigned char* s)
{
   //  Append the current chain with the supplied uchar string operand.
   //  
   //  Arguments: 1) s The null terminated string to add to the chain
   //  
   //  Returns: Reference to this chain
   _hzfunc("hzXbuf::operator+=(uchar*)") ;
   _xblk*          curBlk ;    //  Block pointer
   _xblk*          newBlk ;    //  Working block pointer
   const uchar*    i ;         //  Supplied string iterator
   if (!s || !s[0])
       return *this ;
   //  If nothing in chain, create the first block
   if (!mx)
       mx = new _xbuf() ;
   if (!mx->m_Begin)
       mx->m_Begin = mx->m_End = _xblk_alloc() ;
   curBlk = (_xblk*) mx->m_End ;
   if (!curBlk)
       Fatal("Chain %p has no end block\n", this) ;
   for (i = s ; *i ; i++)
   {
       if (curBlk->xize == XBLKSIZE)
       {
           //  Out of space - make new block
           newBlk = _xblk_alloc() ;
           if (!newBlk)
               Fatal("No allocation (case 2)\n") ;
           //  newBlk->Prev((_xblk*) mx->m_End) ;
           curBlk->Next(newBlk) ;
           mx->m_End = newBlk ;
           curBlk = newBlk ;
       }
       curBlk->m_Data[curBlk->xize] = *i ;
       curBlk->xize++ ;
       mx->m_nSize++ ;
   }
   return *this ;
}