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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e289b5ceae0f39c3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-11 16:47:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!194.168.222.21.MISMATCH!newspeer1-gui.server.ntli.net!ntli.net!newsfep4-glfd.server.ntli.net.POSTED!53ab2750!not-for-mail From: chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030718 X-Accept-Language: en, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Binding to C References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <%VVZa.9764$Kx1.137096@newsfep4-glfd.server.ntli.net> Date: Tue, 12 Aug 2003 00:49:20 +0100 NNTP-Posting-Host: 81.98.236.164 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep4-glfd.server.ntli.net 1060645627 81.98.236.164 (Tue, 12 Aug 2003 00:47:07 BST) NNTP-Posting-Date: Tue, 12 Aug 2003 00:47:07 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:41327 Date: 2003-08-12T00:49:20+01:00 List-Id: Patrice Freydiere wrote: > so it can gives you some ideas for C binding from ADA. Thanks. > ps: when i started writing the simplejpeglib binding for ADA. > i had a lot of interfacing problems du to the portability macros of the > jpeglib. (it's surely possible, but when i've started my binding, my C > interfacing Skills from ADA was poor). > So i decided in my design to build a simple C interface to make Ada > binding easier. This permit me to be "C structure independent" and provide a > more easy upgrade of the jpeglib. This is a problem... and I haven't found a *convienant* way to solve this (other than wrapping it up as you and Warren pointed out - thanks). Macros change this, that and the other. My ada code would need to be changed at the spec level on different platforms, compilers, etc... yuck. A more experienced Ada developer could probably organise it better, but All I really want to do now is *decode* and encode (at various qualities) a jpeg (in RBG). Later things might get more complicated, but for now that's it. I'm going to look at your lib again now I've got a bit more time.