From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,27c5af633ebf98af,start X-Google-Attributes: gid103376,public From: msb@sei.cmu.edu (Mark Bell) Subject: Vads X/Motif & C Date: 1996/09/13 Message-ID: <51bpk5$8st@news.sei.cmu.edu>#1/1 X-Deja-AN: 180376256 organization: Software Engineering Institute newsgroups: comp.lang.ada Date: 1996-09-13T00:00:00+00:00 List-Id: Thanks to all who responded to my questions, either via private email or this newsgroup. Most of the suggestions I had already tried, but I was glad to see that I was at least looking in the correct areas. I've done Ada for many years, but this is the first time I've had to deal with X/Motif, let alone interfacing to it from Ada ! I can not change the malloc() calls to Xtmalloc() calls in the C source code, as the C code is "off the shelf". Even though I have some of the source for reference, changing it is not an option. Several folks asked some further questions about my application. The C code is from the U.S. Army, and is called TEM (Terrain Evaluation Module V 9.3.1). It consists of main program which spawns several servers. It comes with a C-based GUI interface. As received, the application and GUI seems to work fine on the Solaris platform. (Can I infer that the malloc vs xtmalloc issue is not a problem here, or that it just hasn't surfaced yet? The C code does use malloc). We (at the SEI) have written a Convoy Planning Prototype in Ada 83. This uses the VADS X/Motif interface. The initial versions used a line map for Convoy routing purposes. These versions run fine on the Solaris platform. We are attempting to replace the line map with the actual geographical maps and accompying services offered by TEM. Thus, we need to bypass the provided GUI and use our own. This is where the problems are. Concerning the following code segment > Xt.Xt_Resource_Management.Xt_Set_Arg( > Arg => An_Arg_List(0), > Name => Xt_Stringdefs.Xt_N_background, > Value => blank_color'Address); > > Xt.Xt_Resource_Management.Xt_Get_Values( > W => Presentation_Drawing_Area, > Args => An_Arg_List(0..0)); > > Xt.Xt_Resource_Management.Xt_Set_Values( > W => Presentation_Drawing_Area, > Args => An_Arg_List(0..0)); > > (Segmentation fault occurs) > I was not surprised to see that it was such an obvious goof... another case of not seeing the trees in the forest ! I wondered why this was the only place that I had trouble with the Xt_Set_Value function. Thanks again... Mark S. Bell 412-268-7925 (Voice) Software Engineering Institute 412-268-5758 (Fax) Carnegie Mellon University ** These are my opinions, 4500 Fifth Ave, Pittsburgh PA.,15213 not those of the SEI or CMU **