Help convert a C++ header to D

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jan 3 00:29:22 PST 2016


On 03/01/16 9:26 PM, Arialis Majoris wrote:
> On Sunday, 3 January 2016 at 06:07:09 UTC, Rikki Cattermole wrote:
>> On 03/01/16 7:04 PM, Arialis Majoris wrote:
>>> I have a rather large header file used to write plugins for reaper:
>>>
>>> http://pastebin.com/Eebv1e0M
>>>
>>> This file, unfortunately may change quite often depending on the version
>>> of reaper. Reaper automatically generates the C++ file. Is there a way
>>> to automatically convert this without too much trouble?
>>>
>>> Thanks
>>
>> It's really quite simple.
>> You would probably only need like 2 regex's to do it.
>
> If that's the case, shouldn't there be an automated utility? Seems like
> it would be more complex? I thought there was a D tool that converted C
> headers into D?

htod is pretty old at this point and is Windows only.

Most headers don't port well. This one will.
Its just so simple and constant the pattern.



More information about the Digitalmars-d-learn mailing list