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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9fe1efa8d27f96d7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-29 06:46:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!feed.news.nacamar.de!news.belwue.de!news.uni-stuttgart.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Data structures Date: Mon, 29 Jul 2002 15:46:50 +0200 Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <87it2yprxx.fsf@CERT.Uni-Stuttgart.DE> References: NNTP-Posting-Host: login.cert.uni-stuttgart.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-stuttgart.de 1027950410 13557 129.69.16.19 (29 Jul 2002 13:46:50 GMT) X-Complaints-To: news@news.uni-stuttgart.de NNTP-Posting-Date: Mon, 29 Jul 2002 13:46:50 +0000 (UTC) User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:KsJZchAH3ENLg23nUP4ePnobhWs= Xref: archiver1.google.com comp.lang.ada:27448 Date: 2002-07-29T15:46:50+02:00 List-Id: Igor Gilitschenski writes: > I was looking for a tool, which is able to convert C data structures > (from *.h files) into Ada data structures, but I wasn't successfull yet. > Do you know where to find one or isn't there such a tool. There's a tool called c2ada which might do what you want (it can't most GCC extensions you'll find in typical GNU libc header files, unfortunately). Personally, I avoid importing structures from C. If I have to pass data structures between C and Ada code, I use special get/set subprograms (written in C or in Ada, depending on the language used for the data structure). In my experience this approach is more portable and less error-prone, but of course, it introduces a slight overhead. -- Florian Weimer Weimer@CERT.Uni-Stuttgart.DE University of Stuttgart http://CERT.Uni-Stuttgart.DE/people/fw/ RUS-CERT fax +49-711-685-5898