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,d3b2e17058959a22,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-20 01:15:30 PST Path: bga.com!news.sprintlink.net!pipex!dsbc.icl.co.uk!oasis.icl.co.uk!jerry.rb.icl.co.uk!not-for-mail From: skj@rb.icl.co.uk (Simon Johnston) Newsgroups: comp.lang.ada Subject: Re: C++ to Ada95, help please Date: 20 Mar 1995 08:06:46 -0000 Organization: ICL Retail Systems,Bracknell,Berks,UK Message-ID: <3kjd2m$d3t@jerry.rb.icl.co.uk> NNTP-Posting-Host: jerry.rb.icl.co.uk X-Newsreader: TIN [version 1.2 PL2] Date: 1995-03-20T08:06:46+00:00 List-Id: Hi, thanks everyone for helping with my last query. I have a new C nasty for you. I am converting some C headers into packages for use with GNAT and have come accross the old chestnut: typedef struct _STRUCT_NAME {.....type struct_STRUCT_NAME is ....................................record int item1;..........................item1 : int; union { : int u_item1; : long u_item2; : } u_name; : int item2;..........................item2 : int; ....................................end record; } STRUCT_NAME;....................type STRUCT_NAME is new struct_STRUCT_NAME; this I know is a contrived example but it does show the problem, how do I describe the C struct on the left as an Ada record on the right. (The code I have put on the right is lifted from the windows.ads package spec provided in the GNAT examples directory for Windows NT. Thanks. MODULE Sig; FROM ICL IMPORT StdDisclaimer; FROM Interests IMPORT Modula2, Modula3, Linux, OS2; BEGIN (* ------------------------------------------------------------------------. |Simon K. Johnston - Development Engineer (C/C++) |ICL Retail Systems | |------------------------------------------------------|3/4 Willoughby Road| |Unix Mail : S.K.Johnston@bra0801.wins.icl.co.uk |Bracknell, Berks | |Telephone : +44 (0)344 476320 Fax: +44 (0)344 476302|United Kingdom | |Internal : 7261 6320 OP Mail: S.K.Johnston@BRA0801|RG12 8TJ | `------------------------------------------------------------------------ *) END Sig.