htod - convert C .h files to D import files
Rémy Mouëza
Rémy_member at pathlink.com
Sun May 28 07:32:48 PDT 2006
In article <e5a6dp$ols$1 at digitaldaemon.com>, Chris Nicholson-Sauls says...
>With DMD 0.158 on Windows, I got "foo bar" from this. Note the space between. Also note
>that writef is written in D, for D, and therefore doesn't use null characters as
>end-of-string (it relies on the .length property instead). The big problem had to do with
>sending these strings to C code, which /will/ see the null's as an end-of-array marker.
>Try replacing your writefln with a printf, and you will only get "foo" printed to the screen.
Using printf with dmd 0.158 on Linux, I've got 5 spaces and then "foo".
I guess that even a restricted use of the C preprocessor for our D interfaces
won't solve the problem since it seems to be type specific, will it ?
More information about the Digitalmars-d-announce
mailing list