Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Nonportable...

2 views
Skip to first unread message

MeyerK

unread,
Jan 2, 2005, 6:33:25 AM1/2/05
to
Two things come to my mind: first, is LD_complex really expecting a
pointer or rather a handle of a block ? Second, searching the NewBasic
source code for CD_data.LD_complex brings up some swat instructions
like

PrintMessage <fix up LD_complex usage>
;; movdw es:[di].CD_data.LD_complex, bxcx

Whatever that means... ;-)

Bye,
MeyerK

Dominique Vocat

unread,
Jan 2, 2005, 6:46:06 AM1/2/05
to

ah well... if i knew :-) i'd hope someone enlightens me :-)

ps: have you read my mail about the source of your components? Would
like to maintain all components in source maybe at sourceforge or so...
or a custom server that does theusual stuff like nightly builds etc.
Will need to ask Andreas Bollhalder about the feasability :-).
--
C:\>

Dominique Vocat

unread,
Jan 2, 2005, 6:48:55 AM1/2/05
to
Dominique Vocat wrote:
> ah well... if i knew :-) i'd hope someone enlightens me :-)

Um, if I read

"
case TYPE_COMPLEX:
{
optr complexArray;
BDescHeader* bdh;
BDescBlock* bdb;
RunHeapToken* newTok;
RunHeapToken complex;
RunHeapInfo* rhi;

complex = data.CD_data.LD_complex;
if (complex)
{
/* Not representable as text, so add the description ourselves
* (or not, as the case may be)
*/
rhi = RunComponentLockHeap((EntObjectBlockHeader*)
MemDeref(OptrToHandle(oself)));
bdb = (BDescBlock *)ConstructOptr(SegmentOf(text), 0);
EC_ERROR_IF(bdb->BDB_cookie != BDB_COOKIE, -1);
bdh = (BDescHeader*)MemLock(bdb->BDB_myHeader);
complexArray = ConstructOptr(bdh->BDH_meta.LMBH_handle,
bdh->BDH_clipItemArray);
EC_BOUNDS(text);

strcat(text, _TEXT("GetComplex(")); text += 11;
/* text += strlen(_TEXT("GetComplex(")); */
itoa(ChunkArrayGetCount(complexArray), text);
strcat(text, _TEXT(")"));
EC_BOUNDS(text);

newTok = ChunkArrayAppend(complexArray, 0);
*newTok = complex;
/* memunlock must be after all ChunkArray calls */
MemUnlock(bdb->BDB_myHeader);

RunHeapIncRef(rhi, complex);

RunComponentUnlockHeap((EntObjectBlockHeader*)
MemDeref(OptrToHandle(oself)));

}
else
{
error = TRUE;
}
break;
}
"

correctly itmight be a runheaptoken knda thing whatever that may be and
how ever i might deal with it :-)
--
C:\>

Dominique Vocat

unread,
Jan 2, 2005, 9:15:32 AM1/2/05
to
ok, i now do

"
LegosComplex lc;
RunHeapToken mycomplex = RunHeapAlloc(rhi, RHT_COMPLEX, 0, sizeof(lc), &lc);

lc.LC_vmfh = pself->tempVMFile;
lc.LC_chain = VMCHAIN_MAKE_FROM_VM_BLOCK(pself->bmpBlock);
lc.LC_format = CIF_BITMAP;

value->CD_type = TYPE_COMPLEX;
value->CD_data.LD_complex = mycomplex;
"

it compiles ok but kr-09's after second time it's called plus there is
never any complex data beeig passed back so i assume it might be
syntactically ok but totaly crap logically :-). ah well...

Dom
--
C:\>

MeyerK

unread,
Jan 2, 2005, 12:11:53 PM1/2/05
to
Well... I do understand the "ELSE" branch of your IF :-)

However, if it's a RunHeapToken it's definitely a MemHandle, so you
can't assign the pointer directly to the the element of your field.
You will have to create a block, lock it, use the structure for the
block, assign some data, unlock the block and add the block to your
CD_data.LD_complex field...

Looking at the code makes me remember why I gave up GEOS... ;-)

Bye,
MeyerK

0 new messages