comp.lang.ada
 help / color / mirror / Atom feed
* Binding to C
@ 2003-07-21 18:59 chris
  2003-07-21 20:02 ` Martin Krischik
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: chris @ 2003-07-21 18:59 UTC (permalink / raw)


Hi,

I came across the following in libjpeg... what should I map it to?

const char* const* jpeg_message_table

Also does anyone have any advice in general mapping to C.  For the 
jpeg_error_mgr struct, I mapped ptrs to functions to System.Address and 
made the struct a record.  Will this work, or will the corresponding 
type of the struct have to be a System.Address?


Chris

package Low_Jpg.Error is

    package C renames Interfaces.C;

    type Jpeg_Error_Mgr is record
       Error_Exit      : System.Address; -- addr of a handler
       Emit_Message    : System.Address;
       Output_Message  : System.Address;
       Format_Message  : System.Address;
       Reset_Error_Mgr : System.Address;
       Msg_Code        : C.Int;
       Msg_Parm        : System.Address;
       Trace_Level     : C.Int;
       Num_Warnings    : C.Long;
    end record;
    pragma Convention (C, Jpeg_Error_Mgr);

end Low_Jpg.Error;




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-08-12 11:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 18:59 Binding to C chris
2003-07-21 20:02 ` Martin Krischik
2003-07-22 17:12   ` chris
2003-07-23 13:47     ` Martin Krischik
2003-07-27 13:11     ` Matthew Heaney
2003-07-27 13:07   ` Matthew Heaney
2003-07-21 21:07 ` tmoran
2003-07-21 21:57   ` chris
2003-07-27 13:04 ` Matthew Heaney
2003-07-28 20:52 ` Freejack
2003-07-29 19:21   ` chris
2003-08-09 11:29 ` Patrice Freydiere
2003-08-09 13:09   ` Jeffrey Creem
2003-08-09 13:54     ` Patrice Freydiere
2003-08-11 23:49   ` chris
2003-08-12  6:40     ` Patrice Freydiere
2003-08-12 11:58       ` chris

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