Populate supplied chain with EDO value
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzEdo::GetValue | (hzChain&,) |
Declared in file: hzDatabase.h
Defined in file : hdbObjRepos.cpp
Function Logic:
Function body:
hzEcode hzEdo::GetValue (hzChain& Z)
{
// Populate supplied chain with EDO value
//
// Argument: Z The target chain
//
// Returns: E_CORRUPT If the EDO address is illegal
// E_OK Operation successful
_hzfunc("hzEdo::GetValue") ;
uchar* pSlot ; // EDO slot
uint32_t nSize ; // EDO size
uint32_t nC ; // Char counter
Z.Clear() ;
if (!m_addr)
return 0;
pSlot = g_pSMAR_Edo->Xlate(m_addr) ;
if (!pSlot)
return hzerr(E_CORRUPT, "Illegal address %u:%u", m_addr/0xffff,m_addr%0xffff);
if (pSlot[0]& 0x80)
{
if (pSlot[0]& 0x40)
nSize = (((pSlot[0]& 0x3f)<<16)+(pSlot[1]<<8)+pSlot[2])+ 3;
else
nSize = (((pSlot[0]& 0x3f)<<8)+pSlot[1])+2;
}
else
nSize = pSlot[0]+ 1;
for (nC = 0; nC < nSize ; nC++)
{
Z.AddByte(pSlot[nC]) ;
}
return E_OK ;
}