FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C bindings

 
Post new topic   Reply to topic     Forum Index -> Bindings
View previous topic :: View next topic  
Author Message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Tue Oct 26, 2004 3:19 pm    Post subject: C bindings Reply with quote

I'm currently creating bindings for C99. My hope is that they can eventually replace what's in std.c. I'll post a link once I've got a few more headers finished.

(oh, I'm posting this because I need more eyes than just my own to make sure this will all work on windows/linux--it's pretty much a straight implementation plus bits pulled from the DM headers when necessary).
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Oct 26, 2004 7:43 pm    Post subject: Reply with quote

Great! I'll keep my eyes on it then. Smile
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Tue Oct 26, 2004 8:30 pm    Post subject: Reply with quote

Here's the first cut:

http://home.f4.ca/sean/d/stdc.zip

It has most of the applicable headers in it. stdio needs a look as a bunch of stuff in there is implementation defined. I'd like to keep the standard C headers pretty much restricted to what's in the C99 spec, and am planning on doing some the Windows-specific ones next. Maybe someone else can tacke the linux/unix ones Smile
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Oct 26, 2004 8:45 pm    Post subject: Reply with quote

Does dmc (digitalmars compiler) meet the C99 spec?
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Tue Oct 26, 2004 9:21 pm    Post subject: Reply with quote

I think it's pretty close, though I haven't done a 1-1 comparison between the spec and the DM headers. I'll try and check into which library functions have been added since the previous C spec and look for them in the DM headers.
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Wed Oct 27, 2004 8:58 am    Post subject: Reply with quote

Okay it looks like DMC has most of the new C99 functions either standard or as underscore-prefixed extensions. I still have to go through math.h and check that, plus I'm going to do as much of tgmath.h as I can although DMC doesn't have this header (it's just type-generic functionf of stuff that's usually already in math.h, so it should be simple enough to do via overloads). I'm also going to do fenv.h and any other remaining headers that might be useful in D.
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Wed Oct 27, 2004 12:16 pm    Post subject: Reply with quote

Second version is up. The file that needs the most attention is stdio.d, I think the others all look pretty good.
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Wed Oct 27, 2004 6:18 pm    Post subject: Reply with quote

Okay final update. I think the headers are complete. They still assume a DigitalMars front-end but should work with a Win32 or Linux back-end. I've preserved copyrights in files where I borrowed stuff from DM or DMD. I'm going to write some unit tests but everything looks good so far. There are some headers I've ignored because they simply don't make sense in D (limits.h, iso646.h, etc). The new C99 stuff is mostly wide i/o or fancy math stuff, both of which DM is quite good at, so on Win32 there should be full support for the new stuff. I haven't tested any of this on Linux, but nothing should be broken that worked before.
Back to top
View user's profile Send private message
sean



Joined: 24 Jun 2004
Posts: 609
Location: Bay Area, CA

PostPosted: Mon Feb 13, 2006 5:52 pm    Post subject: Reply with quote

I haven't been keeping the zipfile up to date so please check the Ares tree for the latest C99 bindings. If anyone wants me to maintain these headers separately, let me know and I'll see about refreshing the standalone.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Bindings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group