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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6c7be346cfa17c37 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Ada/Motif problem... Date: 1996/08/28 Message-ID: <1996Aug28.110744.1@eisner>#1/1 X-Deja-AN: 177042211 x-nntp-posting-host: eisner.decus.org references: <4vupg6$ljf@goanna.cs.rmit.edu.au> <4vvrfg$800@goanna.cs.rmit.edu.au> <3223B293.15C831D5@ix.netcom.com> x-nntp-posting-user: KILGALLEN x-trace: 841244870/28794 organization: LJK Software newsgroups: comp.lang.ada Date: 1996-08-28T00:00:00+00:00 List-Id: Dale Stanbrough wrote: > > Larry Kilgallen writes: > > "Understanding that you have asked us how to lie to an Ada compiler... > > > Any inspiration on how to pass Ada strings as callback data in Motif? > > Depending on compiler specifics, you may be able to get away with > an access to a single character (the first in the string). > > Larry Kilgallen" > > But that doesn't really help at the other end, that is the routine that > gets called and gets passed a pointer to a character. It may know that > it points to the first character of a string, but how should it know how > long the string is? We lose the bounds of the string if we do this. In my experience calling DECwindows from Ada, it wanted a lot of null-terminated strings. Thus the called subsystem, being written in C, cannot tell the difference between a pointer to null-terminated string and a pointer to the first character thereof.