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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ea88e33ca617708 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.59.229 with SMTP id c5mr16989901pbr.6.1321893190394; Mon, 21 Nov 2011 08:33:10 -0800 (PST) Path: lh20ni2090pbb.0!nntp.google.com!news1.google.com!postnews.google.com!o5g2000yqa.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Calling Ada Procedure from C - how to handle a char ptr/array Date: Mon, 21 Nov 2011 08:33:01 -0800 (PST) Organization: http://groups.google.com Message-ID: <7afca7cf-c479-4065-8097-144d135683c2@o5g2000yqa.googlegroups.com> References: <8e5541a3-cdd5-40af-a6fd-f7539ee61326@l19g2000yqc.googlegroups.com> NNTP-Posting-Host: 192.91.171.42 Mime-Version: 1.0 X-Trace: posting.google.com 1321893185 24453 127.0.0.1 (21 Nov 2011 16:33:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 21 Nov 2011 16:33:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o5g2000yqa.googlegroups.com; posting-host=192.91.171.42; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Xref: news1.google.com comp.lang.ada:18993 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-21T08:33:01-08:00 List-Id: I've been side-tracked on another task this morning so I haven't had a chance to investigate this further, but wanted to respond with a 'Thanks' for the suggestions and the related information. My familiarity with Ada is limited - I understand the basics but when interfacing with C, I have a tendency to get myself confused - since it seems that a lot of the 'constraint' information that Ada uses is packed in different locations depending upon the compiler. The original programmers of this code made some assumptions that do appears to be entirely compiler dependent and are not portable moving to GNAT. It would seem that modifying my approach to use the Interfaces.C.strings and char_ptr would make more sense. Thanks!