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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f0d9db8126fd91cb X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!l1g2000yqj.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Converting pointers to non nul-terminated C "strings" to Ada string Date: Sat, 14 Feb 2009 01:28:26 -0800 (PST) Organization: http://groups.google.com Message-ID: <08d021c3-8373-4056-ab5d-17aef057aae4@l1g2000yqj.googlegroups.com> References: NNTP-Posting-Host: 82.20.239.213 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1234603707 5130 127.0.0.1 (14 Feb 2009 09:28:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 14 Feb 2009 09:28:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l1g2000yqj.googlegroups.com; posting-host=82.20.239.213; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4600 Date: 2009-02-14T01:28:26-08:00 List-Id: On Feb 14, 6:58=A0am, xorquew...@googlemail.com wrote: > Is it possible to properly convert unterminated C strings or do I > need to start messing about with raw System.Address types? I think you may need this from Interfaces.C (after all, what you're looking at isn't a C string, which is what Interfaces.C.Strings is for). function To_Ada (Item : char_array; Trim_Nul : Boolean :=3D True) return String; You'll need to define your own pointer-to-Interfaces.C.char_array, I think.