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.0 required=5.0 tests=BAYES_20 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,610e53a911ec64b3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-23 04:16:27 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!news.mathworks.com!zombie.ncsc.mil!news.duke.edu!news-feed-1.peachnet.edu!gatech!newsfeed.pitt.edu!uunet!newsflash.concordia.ca!vega.concordia.ca!ct_oreg From: ct_oreg@vega.concordia.ca (Chris O'Regan) Newsgroups: comp.lang.ada Subject: Importing C Structures Date: 23 Mar 1995 06:34:43 GMT Organization: Concordia University, Montreal, Canada Message-ID: <3kr4q3$jd9@newsflash.concordia.ca> NNTP-Posting-Host: vega.concordia.ca NNTP-Posting-User: ct_oreg Date: 1995-03-23T06:34:43+00:00 List-Id: For my Real-Time Systems project, my partner and I are writing a program to control a train set. We will be working on an Indy using GNAT 2.03, and as little C code as possible. We need to interface the Indy's serial port. We have some documention which explains how to do this in standard C, but we would prefer to do this in Ada. We figure that we will need to import the functions and types from the standard C library. Importing a function isn't a problem, but what about data types? Rationale and the Reference Manual claim that it is possible, but without an sample code snippet, we don't know where to begin. Could someone shed some light on the subject? Or should we give in and write our serial port routines in C? Chris O'Regan Computer Engineering, Concordia University, Montreal, Canada. --