comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » DLM on 64 bit machine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
DLM on 64 bit machine [message #43758] Wed, 27 April 2005 07:40
Ed Wright is currently offline  Ed Wright
Messages: 39
Registered: February 1999
Member
To: IDL
From: Ed Wright

Last year, I finished a large DLM interface to the JPL/NAIF CSPICE
library. The DLM functions on four platforms (Sun, OSX, XP, Linux) under
five different compilers.

Last week I attempted to use it on 64bit Solaris compiled with gcc 3.3x.
- which failed (not a surprise). The code needs modification to run
64bit clean.

I discovered one problem due to the failure to return ints/longs from
the DLM to IDL.

Note the following code, 'found' typedefs to an int (used as a boolean),
'n' also typedefs to an int:

PROCEDURE CSPICE_DTPOOL(int Argc, IDL_VPTR Argv_orig[], char *Argk)

{
SpiceBoolean found;
SpiceInt n;

IDL_ALLTYPES f;
IDL_ALLTYPES g;

...

f.c = (UCHAR) found;
IDL_StoreScalar( Argv_orig[1], IDL_TYP_BYTE, (IDL_ALLTYPES*) &f );

g.l = (IDL_LONG)n;
IDL_StoreScalar( Argv_orig[2], IDL_TYP_LONG, (IDL_ALLTYPES*) &n );


...
}

This code works. Pass 'found' via the ALLTYPES union, pass '&n' directly.

My question, if I use the 'g' union in the second IDL_StoreScalar call
rather than the ref to 'n', the value 'n' does not return to IDL.
Conversley if I use the ref to 'found' in the first IDL_StoreScalar,
'found' does not return. Can someone explain why? I think I missed
something fundamental.


As always,
Ed Wright
ed.wright@jpl.nasa.gov
1-818-354-0371

--
DISCLAIMER: JPL requires notice in all electronic communication that
any and all opinions presented herein are my own and do not, in any
way, represent the opinion or policy of JPL, CalTech, NASA, or the US
Government.

Disclaimers are without standing on traffic from this domain.

I do not accept responsibility for unexpected collisions between NASA
vehicles and Alien cruisers, any resulting interplanetary war, or a
grumpy Kilrathi.
[Message index]
 
Read Message
Previous Topic: Re: IDL-Java bridge problem
Next Topic: Q: call_external hangs IDL Windows GUI?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:35:01 PDT 2025

Total time taken to generate the page: 0.00960 seconds