comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: differences between Ada and C in gnat forcing me to use C instead of Ada
Date: Mon, 25 Mar 2019 09:25:53 +0100
Date: 2019-03-25T09:25:53+01:00	[thread overview]
Message-ID: <q7a3ag$hbl$1@gioia.aioe.org> (raw)
In-Reply-To: c1aea932-9ae1-4915-a260-b6bc0b24c12c@googlegroups.com

On 2019-03-25 06:46, matthewbrentmccarty@gmail.com wrote:

> Basically, I wanted to interface with my scanner using SANE (Scanner Access Now Easy).  Using my "real" Debian machine since gnat doesn't work under Windows 10 (Debian subsystem for Linux),

No idea what you mean under "subsystem", but GNAT works under Windows 
virtual machine.

> with Interfaces.C; use Interfaces.C;
> ...
> ...
> subtype SANE_Char is char;  -- /usr/include/sane/sane.h:46
> ...
> type SANE_String is access all SANE_Char;  -- /usr/include/sane/sane.h:47
> ...
> -- unique device name
> type SANE_Device is record
>     name : SANE_String_Const;  -- /usr/include/sane/sane.h:104
>     vendor : SANE_String_Const;  -- /usr/include/sane/sane.h:105
>     model : SANE_String_Const;  -- /usr/include/sane/sane.h:106
>     c_type : SANE_String_Const;  -- /usr/include/sane/sane.h:107
> end record;
> pragma Convention (C_Pass_By_Copy, SANE_Device);  -- /usr/include/sane/sane.h:109

    type SANE_Device is record
      name   : chars_ptr;
      vendor : chars_ptr;
      model  : chars_ptr;
      c_type : chars_ptr;
    end record;
    pragma Convention (C, SANE_Device);

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  parent reply	other threads:[~2019-03-25  8:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25  5:46 differences between Ada and C in gnat forcing me to use C instead of Ada matthewbrentmccarty
2019-03-25  5:58 ` Jere
2019-03-25  8:25 ` Dmitry A. Kazakov [this message]
2019-03-25 14:06   ` Florian Weimer
2019-03-25 10:56 ` Philip Munts
2019-03-25 11:54 ` Lucretia
2019-03-25 14:09 ` matthewbrentmccarty
2019-03-25 14:20   ` Dmitry A. Kazakov
2019-03-25 16:46     ` Jeffrey R. Carter
2019-03-25 18:01       ` Dmitry A. Kazakov
2019-03-25 17:38   ` Niklas Holsti
2019-03-25 16:42 ` matthewbrentmccarty
2019-03-25 18:18   ` Dmitry A. Kazakov
2019-04-04  0:51     ` matthewbrentmccarty
replies disabled

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