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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b667898b16e99a9d X-Google-Attributes: gid103376,public From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk) Subject: Re: MD5 Function in Ada Date: 1997/06/06 Message-ID: <865559473.31snx@jvdsys.nextjk.stuyts.nl>#1/1 X-Deja-AN: 246461568 Distribution: world References: Jon, long time since C_ECHO :-) In article 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