htod - convert C .h files to D import files

Tom S h3r3tic at remove.mat.uni.torun.pl
Wed May 24 14:29:24 PDT 2006


BCS wrote:
> Walter Bright wrote:
>> I'm not sure how useful this will be.
>>
>> Here it is: http://www.digitalmars.com/d/htod.html
> 
> 
> One case that it doesn't handle but would seem to be simple is:
> 
> #define FOO "bar"
>   |
>   v
> const char[] FOO = "bar\0"; //explicitly null terminate

Why would you need it to be explicitly null terminated ? D string 
literals have a zero anyway just after their normal data (it's not 
reflected by the 'length' property, but it's there).


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O 
!M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y
------END GEEK CODE BLOCK------

Tomasz Stachowiak  /+ a.k.a. h3r3tic +/



More information about the Digitalmars-d-announce mailing list