htod - convert C .h files to D import files
Derek Parnell
derek at psych.ward
Thu May 25 00:05:27 PDT 2006
On Wed, 24 May 2006 14:15:43 -0700, 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
But if that happened, things lke concatenation would cause problems.
#define FOO "foo"
#define BAR "bar"
|
|
V
const char[] FOO = "foo\0"; //explicitly null terminate
const char[] BAR = "bar\0"; //explicitly null terminate
. . .
char[] x = FOO ~ BAR; // Now it has an embedded \0 !
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
25/05/2006 5:03:13 PM
More information about the Digitalmars-d-announce
mailing list