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

Home » Public Forums » archive » Portable CALL_EXTERNAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Portable CALL_EXTERNAL [message #244] Wed, 20 November 1991 19:39
gotwols is currently offline  gotwols
Messages: 16
Registered: January 1991
Junior Member
Does anyone know of a good way to write portable code written in C that
can be called from IDL using CALL_EXTERNAL? I am in the process of porting our
VMS CALL_EXTERNAL routines to an HP9000/720 workstation and I found to my
dismay that the calling convention on all UNIX boxes is different than under
VMS. FOr instance under VMS the first line of a C routine might look:
int my_routine(float *x, float *y, float *z)
whereas under any of the UNIX variants it looks like:
int my_routine(int argc, void *argv[])
Now that's a pretty big difference. Yes it can be handled with an #ifdef
scheme but it's ugly to say the least. That is not the only roadblock
to portability. The name of the routine may need to have an underscore
added to it (on SUN'S I think), but on the HP the underscore prefix is
not wanted. Finally, the names of the shareable libraries vary from one
platform to another.

So I would appreciate it if any one who has thought through how to write
portable code would contact me or better yet post the advice on this news group
so others acan also see it.
Thanks, Bruce

--
Bruce L. Gotwols
Johns Hopkins University, Applied Physics Lab., Laurel MD 20723
Internet: gotwols@warper.jhuapl.edu (128.244.176.48)
SPAN: APLSP::STR::GOTWOLS
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 8 bit pseudo color in PV-WAVE.
Next Topic: Memory problems with IDL version 2 on a VAX

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

Current Time: Wed Oct 08 17:13:02 PDT 2025

Total time taken to generate the page: 0.00558 seconds