Return TypeFunction nameArguments
hzEcodehzXbuf::AddByte(const char,)

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

Function Logic:

0:START 1:!mx 2:mx 3:!mx->m_Begin 4:_xblk_alloc mx mx 5:curBlk 6:!curBlk 7:Fatal 8:curBlk->xize==XBLKSIZE 9:_xblk_alloc newBlk 10:!newBlk 11:Fatal 12:_xblk::Next mx curBlk 13:curBlk items items 14:Return E_OK

Function body:

hzEcode hzXbuf::AddByte (const char C)
{
   _hzfunc("hzXbuf::AddByte") ;
   _xblk*  curBlk ;
   _xblk*  newBlk ;
   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) ;
   if (curBlk->xize == XBLKSIZE)
   {
       newBlk = _xblk_alloc() ;
       if (!newBlk)
           Fatal("No allocation (case 2)\n") ;
       curBlk->Next(newBlk) ;
       mx->m_End = newBlk ;
       curBlk = newBlk ;
   }
   curBlk->m_Data[curBlk->xize] = C ;
   curBlk->xize++ ;
   mx->m_nSize++ ;
   return E_OK ;
}