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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a4667ccac660a488,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-03 04:19:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!news.ecp.fr!news.int-evry.fr!u-psud.fr!not-for-mail From: "Philippe Tarroux" Newsgroups: comp.lang.ada Subject: Interfaces.C.Strings Date: Sat, 1 Jun 2002 14:34:44 +0200 Organization: Universite Paris-Sud, France. Message-ID: NNTP-Posting-Host: artemis.limsi.fr X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Xref: archiver1.google.com comp.lang.ada:25248 Date: 2002-06-01T14:34:44+02:00 List-Id: I got a problem in interfacing a TclTk function with Ada: This function returns a Chars_Ptr (Char *) type which is a pointer to a char_array supposed to be nul terminated. In the present case, this array contains pixel values and probably several nul values. The array I get from the Interfaces.C.Strings.Value procedure is truncated to the first nul and I was unable to find a way to bypass this limitation. I came to the conclusion that there is no way in Ada to get an array pointed by a Chars_Ptr and containing nul values? Am I wrong?