Giter Club home page Giter Club logo

Comments (5)

mikequentel avatar mikequentel commented on August 15, 2024

Hi @apfeltee I am thrilled you are interested in c2ada and I am ok with you doing as you see fit with the version you have created. I have not had time to work more on c2ada so it is great you are maintaining and revising this code. Please feel free to advertise the project at a new location and to take the lead on it--I purposely licensed the code as MIT so anyone can do what they want with it. Also, I would be pleased to merge fixes and enhancements back into my fork, too. I have no problem with you also calling the new revision "c2ada"--I can always tag the version I currently have--I could rename my version "c2ada_classic" to make it distinct from the one you are on. I did not initially realise you had also separately imported from Source Forge. May I also please suggest considering the addition of a licence to your version so others can freely use it.

I do not claim exclusive ownership of the code, especially as it originated from other people--I just felt strongly that it should be shared on GitHub and licensed under a permissive licensing scheme, so I imported it from Source Forge and gave it the MIT licence. So please feel free to take the lead on it, enjoy, and keep in touch--I think it is great you are working on c2ada--many thanks and I look forward to seeing where it goes.

from c2ada.

apfeltee avatar apfeltee commented on August 15, 2024

I'm glad you're ok with the changes, @mikequentel. As for the license, it's already implied that the original license still applies, though I'll add a note in the readme, as well as a license file.

Right now I'm mostly doing it out of curiosity, not so much out of need for a ada->c compiler, but it's always fun to take a second glance at older stuff ;-)

Also, on a perhaps unrelated note: The generated file uses imports from files, such as "c-ops.ads", etc. But I'm not sure where I'm supposed to get those, tbh. That's the main issue that keeps me from properly testing c2ada. :-(
Full listing from gnat make:

hello.adb:1:06: file "c.ads" not found
hello.adb:2:06: file "c-ops.ads" not found
hello.adb:3:06: file "stdarg.ads" not found
hello.adb:4:06: file "c-pointers.ads" not found

from c2ada.

mikequentel avatar mikequentel commented on August 15, 2024

Hi @apfeltee I do not know about those files but maybe Nasser Abbasi would know--he was the maintainer of the code in Source Forge.

from c2ada.

maxime-esa avatar maxime-esa commented on August 15, 2024

You can find the missing stdarg.ads here: http://www.cs.uofs.edu/~beidler/Ada/win32/stdarg.ads as it seems to provide the expected interfaces.

The rest is more tricky. c.ads, c-pointers.ads don't exist as such. The generated code should use Interfaces.C, Interfaces.C.Strings and Interfaces.C.Pointers (see http://www.adapower.com/rm95/RM-B-3-2.html). That would solve a big part of the issues, but not all, because the code expects some constructs from these package that don't exist (anymore?), like a type named charp. In Interfaces.C.Strings you find instead a type named chars_ptr, which seems to correspond. Once this is fixed, there are further namespace issues.

To conclude, it seems that the code generator requires quite a huge refresh to produce code that works with a recent GNAT compiler.

from c2ada.

apfeltee avatar apfeltee commented on August 15, 2024

(Sorry for the belated response from my side)

@maxime-esa Awesome! That puts the whole thing back on track. Tracking those namespace issues down seemed easy at first, but it needs some more digging. I haven't considered that the standard had changed that much... but it gives me a reason to read up some more on Ada 😄

If it would turn out to be really necessary, then I'm sure I could re-implement these missing structures as prelude code, or somesuch.

from c2ada.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.