htod feature request: save commands in translated file

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Oct 17 20:51:34 PDT 2010


htod could also use a --help switch so we don't have to fire up the
browser every time we need to remind ourselves on what arguments it
can take. Or, you know, Walter could give us the source code and we'll
fix it for him. Hehe. :>

Here's one failed conversion from 5 minutes ago:

C:
typedef	struct SNDFILE_tag	SNDFILE ;

htod:
alias SNDFILE_tag SNDFILE;

This should be:
struct SNDFILE_tag {}
alias SNDFILE_tag SNDFILE;

But I guess that's a rare and dubious case.

On 10/18/10, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> On 10/17/2010 07:52 PM, Andrej Mitrovic wrote:
>> I don't know where else to put this topic. Currently htod translates a
>> C/CPP header file to D and adds a line at the top such as:
>>
>> /* Converted to D from someheaderfile.h by htod */
>>
>> The Bindings project relies heavily on htod, but the problem is: when a
>> new version of a library comes out you're left wondering which commands
>> were used with htod to translate the header files.
>>
>> So the feature request is, if I specify some commands to htod, such as:
>>
>> htod cheader.h dimport.d -cpp -hc -hi
>>
>> then htod should put those commands in the resulting file as a comment,
>> e.g.:
>>
>> /* Converted to D from someheaderfile.h by htod */
>> /* using arguments: -cpp -hc -hi */
>>
>> Whaddya think?
>
> It's useful, as would be the addition "on 2010/10/17 at 20:38:50 CST"
> and the htod version used.
>
> Andrei
>


More information about the Digitalmars-d mailing list