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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.125.72 with SMTP id x8mr8942119qar.5.1380501399866; Sun, 29 Sep 2013 17:36:39 -0700 (PDT) X-Received: by 10.49.14.132 with SMTP id p4mr715859qec.2.1380501399844; Sun, 29 Sep 2013 17:36:39 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!a6no86857qak.0!news-out.google.com!9ni803qaf.0!nntp.google.com!q9no351047qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 29 Sep 2013 17:36:39 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=174.28.152.201; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 174.28.152.201 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Can someone who doesn't know C ever hope to write thick bindings for a C library to Ada? From: Shark8 Injection-Date: Mon, 30 Sep 2013 00:36:39 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2221 Xref: number.nntp.dca.giganews.com comp.lang.ada:183520 Date: 2013-09-29T17:36:39-07:00 List-Id: On Sunday, September 29, 2013 2:28:45 PM UTC-6, Kevin Keith wrote: > Okay, so I *sort of* know C, but I'm by no means an expert or proficient = in it. I sort of know it in that I can kinda sort follow well commented C c= ode. Earlier I posted about thick SDL bindings, and another person asked if= it were possible to utilize C2Ada without knowing C, my question is sort o= f in between. Is it possible to write thick bindings from auto-generated C = bindings (using GNAT) without really knowing C very well? Yes. I'm certainly no C expert and I'm doing it. See https://github.com/OneWingedShark/TAO-GL Several things to watch out for: 1) Using pointers/addresses for arrays, get those to proper Ada arrays ASAP= . 2) Keep an eye out for subtyping possibilities. [esp null exclusion or non-= numeric exclusions for IEEE754 floats.] 3) It can get kind of tedious, if you don't autogenerate stuff and/or have = a clear idea in mind for the interface.