comp.lang.ada
 help / color / mirror / Atom feed
From: mmcnett@sparc53.cs.uiuc.edu (mcnett michael david)
Subject: C-Ada Import of struct's -- Help
Date: 18 Oct 94 03:34:16 GMT
Date: 1994-10-18T03:34:16+00:00	[thread overview]
Message-ID: <mmcnett.782451256@sparc53.cs.uiuc.edu> (raw)


I am having a problem on how to implement the following C structure in
Ada.  The problem is I need to interface into a C procedure by passing
it this structure so that it may update the information contained within
it.  It will then return any changes made to the structure.  Much of 
the code in the C routine depends on this structure and I don't want to
make changes to the procedure since many other routines also depend on
the struct.


C-structure:

struct queue_noncyc_s {
    char *debugname;	      /* name for debugging purposes */
    int length;		      /* length (max items+1) of queue */
    int first, last;	      /* begin and end of queue */
    Qitem *entries;	      /* array[length] of entries */
};


Ada Code:
procedure DDInitDisk (????????????); -- want to pass in the queue struct
pragma IMPORT (C, DDInitDisk, "DDInitDisk");

Thanks in advance,

______________________________________________________________
Michael McNett               |
Graduate Student             |
University of Illinois       |
mmcnett@uiuc                 |




             reply	other threads:[~1994-10-18  3:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-18  3:34 mcnett michael david [this message]
1994-10-18  9:48 ` C-Ada Import of struct's -- Help David Emery
  -- strict thread matches above, loose matches on Subject: below --
1994-10-18 10:20 Bob Wells #402
1994-10-18  9:58 ` David Emery
1994-10-18 19:11   ` Robert Dewar
1994-10-19 10:02     ` David Emery
1994-10-20  0:36     ` Keith Thompson @pulsar
1994-10-19 13:57 Bob Wells #402
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox