From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: MD5 Function in Ada
Date: 1997/06/06
Date: 1997-06-06T00:00:00+00:00 [thread overview]
Message-ID: <865559473.31snx@jvdsys.nextjk.stuyts.nl> (raw)
Jon, long time since C_ECHO :-)
In article <Pine.LNX.3.91.970604091908.3334A-100000@weck.bro jguthrie@brokersys.com writes:
>That's okay. I actually expected someone to suggest linking in a C source
>file. As a matter of fact, I have two different MD5 implementations in C
>source (and I could type in the one in APPLIED CRYPTOGRAPHY if I wanted a
>third.) I just don't want to have to figure out how to call C code from
>Ada in order to implement this.
Actually, using GNAT, this doesn't take much figuring out:
/* interface to 'int do_something(int input) */
function Do_Something (Input : in Integer) return Integer;
pragma Import (C, Do_Something, "do_something);
as in GNAT there's a direct correspondence between the Ada and C type's.
If you do not want to rely on this, standard Ada95 with support for
Annex B (Interface to other languages), has the package Interfaces.C
defining them portably (and also have Interfaces.C.Strings and
Interfaces.C.Pointers).
--
-- Jerry van Dijk | Leiden, Holland
-- Consultant | Team Ada
-- Ordina Finance | jdijk@acm.org
next reply other threads:[~1997-06-06 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-06 0:00 Jerry van Dijk [this message]
[not found] <199706041300.JAA27378@acmey.gatech.edu>
1997-06-04 0:00 ` MD5 Function in Ada Jonathan Guthrie
-- strict thread matches above, loose matches on Subject: below --
1997-06-03 0:00 Jonathan Guthrie
1997-06-04 0:00 ` Rolf Ebert
1997-06-05 0:00 ` Anne & Bill Pritchett
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox