digitalmars.D.learn - htod
- Jason King (10/10) Aug 12 2011 I'm attempting to convert a c header to d using htod. If this is not
- Jonathan M Davis (10/24) Aug 12 2011 There's nothing wrong with using htod if you can get it to work. However...
- simendsjo (6/30) Aug 12 2011 htod is a fork of dmc or something, right? How difficult is it to update...
- Jason King (5/14) Aug 12 2011 My expectation is not that I can htod that 17k line header and magically...
- Jacob Carlborg (5/10) Aug 12 2011 I'm working on a tool to convert C header files to D modules based on
- Trass3r (3/11) Aug 12 2011 I also played with the idea. Clang's Rewrite facilities should be perfec...
- Jacob Carlborg (4/16) Aug 12 2011 Yeah, I'm using Rewrite, if I recall correctly.
- maarten van damme (3/25) Aug 12 2011 Are you really working on a better htod?
- Jacob Carlborg (5/28) Aug 13 2011 I don't know yet. I'm avoiding the preprocessor for as long as I can.
- Trass3r (1/7) Aug 12 2011 Should really be a community effort :)
- Jacob Carlborg (8/16) Aug 13 2011 I guess so. It started out as a better implementation of my DStep
- Jacob Carlborg (5/13) Aug 15 2011 If someone is interested I've add my clang fork to github:
- Trass3r (4/8) Aug 12 2011 No.
- Andrej Mitrovic (4/8) Aug 12 2011 You have an extra space there. Use:
- Jason King (1/7) Aug 15 2011
I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction. C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h' C:\dir>dir c:\d\dm\include\stdlib.h Directory of c:\d\dm\include 07/28/2011 09:10 PM 12,553 stdlib.h 1 File(s) 12,553 bytes 0 Dir(s) 526,794,256,384 bytes free Putting stdlib.h in same dir with header I'm converting gives no joy either.
Aug 12 2011
On Friday, August 12, 2011 04:07:47 Jason King wrote:I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction. C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h' C:\dir>dir c:\d\dm\include\stdlib.h Directory of c:\d\dm\include 07/28/2011 09:10 PM 12,553 stdlib.h 1 File(s) 12,553 bytes 0 Dir(s) 526,794,256,384 bytes free Putting stdlib.h in same dir with header I'm converting gives no joy either.There's nothing wrong with using htod if you can get it to work. However, the question is whether you can get it to work for what you're doing. And as I understand it, you're gonig to have to go over what it did after it did it, because it doesn't do a perfect job. But if you can get it to work, it's definitely desirable, since it'll save you a fair bit of work. But unfortunately, htod Windows-only, and I haven't been converting much C code lately, I don't know it well enough to really help you get it working. It _is_ worth using though. - Jonathan M Davis
Aug 12 2011
On 12.08.2011 11:24, Jonathan M Davis wrote:On Friday, August 12, 2011 04:07:47 Jason King wrote:htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction. C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h' C:\dir>dir c:\d\dm\include\stdlib.h Directory of c:\d\dm\include 07/28/2011 09:10 PM 12,553 stdlib.h 1 File(s) 12,553 bytes 0 Dir(s) 526,794,256,384 bytes free Putting stdlib.h in same dir with header I'm converting gives no joy either.There's nothing wrong with using htod if you can get it to work. However, the question is whether you can get it to work for what you're doing. And as I understand it, you're gonig to have to go over what it did after it did it, because it doesn't do a perfect job. But if you can get it to work, it's definitely desirable, since it'll save you a fair bit of work. But unfortunately, htod Windows-only, and I haven't been converting much C code lately, I don't know it well enough to really help you get it working. It _is_ worth using though. - Jonathan M Davis
Aug 12 2011
My expectation is not that I can htod that 17k line header and magically have a d module. A lot of the header is #define'd constants and typedefs and I _do_ expect htod to remove some of the scutwork involved there. At this point I'd just be happy if it ran w/o error.There's nothing wrong with using htod if you can get it to work. However, the question is whether you can get it to work for what you're doing. Andhtod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.
Aug 12 2011
On 2011-08-12 11:36, simendsjo wrote:htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project. -- /Jacob Carlborg
Aug 12 2011
Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob me.com>:On 2011-08-12 11:36, simendsjo wrote:I also played with the idea. Clang's Rewrite facilities should be perfect for that.htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.
Aug 12 2011
On 2011-08-12 13:48, Trass3r wrote:Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob me.com>:Yeah, I'm using Rewrite, if I recall correctly. -- /Jacob CarlborgOn 2011-08-12 11:36, simendsjo wrote:I also played with the idea. Clang's Rewrite facilities should be perfect for that.htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.
Aug 12 2011
Are you really working on a better htod? will it try to convert ifdefs in version()? 2011/8/12 Jacob Carlborg <doob me.com>On 2011-08-12 13:48, Trass3r wrote:Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob me.com>: On 2011-08-12 11:36, simendsjo wrote:Yeah, I'm using Rewrite, if I recall correctly. -- /Jacob CarlborgI also played with the idea. Clang's Rewrite facilities should be perfect for that.htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.
Aug 12 2011
On 2011-08-13 02:59, maarten van damme wrote:Are you really working on a better htod?Yes, I guess so.will it try to convert ifdefs in version()?I don't know yet. I'm avoiding the preprocessor for as long as I can.2011/8/12 Jacob Carlborg <doob me.com <mailto:doob me.com>> On 2011-08-12 13:48, Trass3r wrote: Am 12.08.2011, 13:35 Uhr, schrieb Jacob Carlborg <doob me.com <mailto:doob me.com>>: On 2011-08-12 11:36, simendsjo wrote: htod is a fork of dmc or something, right? How difficult is it to update the program to make it more user friendly? Is the source public? Would it be better to use gcc or clang instead? htod is a great thought, but I haven't either gotten it to work for anything but the simplest cases. I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project. I also played with the idea. Clang's Rewrite facilities should be perfect for that. Yeah, I'm using Rewrite, if I recall correctly. -- /Jacob Carlborg-- /Jacob Carlborg
Aug 13 2011
Should really be a community effort :)Yeah, I'm using Rewrite, if I recall correctly.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.I also played with the idea. Clang's Rewrite facilities should be perfect for that.
Aug 12 2011
On 2011-08-13 04:13, Trass3r wrote:I guess so. It started out as a better implementation of my DStep project. To convert Objective-C headers to D modules. But since Objective-C is C as well it needs to handle all C as well. I guess I can put it on github. But currently it's patches for clang, just so I could get a quick start. -- /Jacob CarlborgShould really be a community effort :)Yeah, I'm using Rewrite, if I recall correctly.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.I also played with the idea. Clang's Rewrite facilities should be perfect for that.
Aug 13 2011
On 2011-08-13 04:13, Trass3r wrote:If someone is interested I've add my clang fork to github: https://github.com/jacob-carlborg/clang -- /Jacob CarlborgShould really be a community effort :)Yeah, I'm using Rewrite, if I recall correctly.I'm working on a tool to convert C header files to D modules based on clang. But currently it's not a prioritized project.I also played with the idea. Clang's Rewrite facilities should be perfect for that.
Aug 15 2011
htod is a fork of dmc or something, right?Yep.How difficult is it to update the program to make it more user friendly?Only Walter can.Is the source public?No.Would it be better to use gcc or clang instead?Hell yeah. Clang's predestined for that.
Aug 12 2011
On 8/12/11, Jason King <jhking airmail.net> wrote:I'm attempting to convert a c header to d using htod. If this is not current best practice please point me in another direction. C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h'You have an extra space there. Use: htod -IC:\d\dm\include ocilib.h That will work.
Aug 12 2011
Thank you very much, that solved my issue.C:\dir>htod -I c:\d\dm\include ocilib.h Fatal error: unable to open input file 'stdlib.h'You have an extra space there. Use: htod -IC:\d\dm\include ocilib.h That will work.
Aug 15 2011