Commit 120ea453 authored by claes's avatar claes

*** empty log message ***

parent ce7c9df7
......@@ -201,11 +201,7 @@ pwr_tOid wb_adrep::boid()
//
pwr_tCid wb_adrep::cid()
{
pwr_tCid cid;
//dbs_sCdef *c = (dbs_sCdef*)dbs_Address(sts, m_v->m_env, m_a->cdef);
return cid;
return m_orep->cid();
}
wb_vrep *wb_adrep::vrep() const
......
......@@ -60,7 +60,7 @@ size_t wb_bdrep::size()
pwr_tStatus sts;
pwr_sObjBodyDef body;
m_orep->m_vrep->readBody( &sts, m_orep, bix(), (void *) &body);
m_orep->m_vrep->readBody( &sts, m_orep, cdh_eBix_sys, (void *) &body);
if ( EVEN(sts)) throw wb_error(sts);
return body.Size;
......
......@@ -101,7 +101,7 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, int bix)
return bdrep;
}
old = orep;
orep = (wb_orepdbs *)m_orep->m_vrep->next( sts, orep);
orep = (wb_orepdbs *)m_orep->m_vrep->after( sts, orep);
// Delete
old->ref();
......@@ -122,7 +122,7 @@ wb_adrep *wb_cdrep::adrep( pwr_tStatus *sts, const char *aname)
return adrep;
}
}
orep_attr = (wb_orepdbs *)orep_attr->next( sts);
orep_attr = (wb_orepdbs *)orep_attr->after( sts);
}
return 0;
}
......
......@@ -197,12 +197,24 @@ wb_vrepdbs::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned i
dbs_sObject *op = ((wb_orepdbs *)o)->o();
void *bp = dbs_Body(sts, dbsenv(), op, bix);
if (bp == 0)
return 0;
if (bp == 0) {
*sts = LDH__NOSUCHBODY;
return 0;
}
if (p) {
switch (bix) {
case cdh_eBix_rt:
memcpy(p, (char *)bp + offset, MIN(op->rbody.size - offset, size));
return p;
break;
case cdh_eBix_dev:
memcpy(p, (char *)bp + offset, MIN(op->dbody.size - offset, size));
break;
default:
*sts = LDH__NOSUCHBODY;
break;
}
return p;
}
return (void *)((char *)bp + offset);
......@@ -212,20 +224,32 @@ wb_vrepdbs::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned i
void *
wb_vrepdbs::readBody(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, void *p)
{
*sts = LDH__SUCCESS;
*sts = LDH__SUCCESS;
dbs_sObject *op = ((wb_orepdbs *)o)->o();
void *bp = dbs_Body(sts, dbsenv(), op, bix);
dbs_sObject *op = ((wb_orepdbs *)o)->o();
void *bp = dbs_Body(sts, dbsenv(), op, bix);
if (bp == 0)
return 0;
if (bp == 0) {
*sts = LDH__NOSUCHBODY;
return 0;
}
if (p) {
memcpy(p, bp, op->rbody.size);
return p;
if (p) {
switch (bix) {
case cdh_eBix_rt:
memcpy(p, bp, op->rbody.size);
break;
case cdh_eBix_dev:
memcpy(p, bp, op->dbody.size);
break;
default:
*sts = LDH__NOSUCHBODY;
break;
}
return p;
}
return bp;
return bp;
}
......
......@@ -447,6 +447,7 @@ void wb_wblnode::build( bool recursive)
;
}
}
attr = attr->o_fws;
}
}
child = child->o_fws;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment