Yet another effort at translating the Win32 API headers
Don Clugston
dac at nospam.com.au
Thu Apr 6 00:08:36 PDT 2006
Stewart Gordon wrote:
> Don Clugston wrote:
>> Stewart Gordon wrote:
> <snip>
>>> Here's the list of versions that we _might_ want to keep in:
> <snip>
>> I'd like to see almost all of those things disappear. DIRECT3D is
>> important, and probably ODBCVER, but most of the others should vanish.
>> Many of them only exist to reduce compilation time.
>
> Taken the words out of my mouth there. And now that computers are
> faster and that D's symbolic imports are supposed to be more efficient
> than old-fashioned C preprocessor includes, this benefit isn't really
> there to the same extent.
>
>> There seem to be a few that are for compatibility with the DDK
>> headers, but the ones I've seen are mostly to avoid duplicate
>> definitions, so shouldn't be a problem with D.
>
> Yes, I cut those out of the list already. And what's DDK?
The Device Development Kit. It's in the w32api\ddk\ directory in MinGW.
Microsoft distributes DDK seperately from the SDK, and it seems that
there are some #defines that are different in the two files.
>
> <snip>
>> We should probably remove the aliases for near pointers. There's not
>> many of them, and most of them were a bad idea even in the Win 3.0 days.
>
> Aliases for near pointers? I thought there were only aliases for
> default pointers and aliases for far pointers.
In Wingdi.h was
typedef LOGPALETTE * PLOGPALETTE, * NPLOGPALETTE, * LPLOGPALETTE;
and in winnt.h was
typedef CHAR * NPSTR;
I've just removed them. Grepping through the MinGW files I didn't find
any other examples.
But the distinction is
> irrelevant in Win32 and hence in D. But the C headers still use both
> sets of aliases. Personally I don't think we need either. Shall we do
> away with them?
That one's tricky. Usage of LPSTR seems to be _really_ common. Much more
common than PSTR. I think we need to get a D SDK that compiles before we
consider a cleanup on that scale.
>
> BTW it seems one of us made a slip-up with winbase.d and an older
> version ended up being re-committed to Dsource. Revision 40 of this
> file is better than revision 43.
'one of us' would be me <g>. Unclobbered.
BTW -
I think the primary goal for the short term should be to have the
WIN32LEANANDMEAN subset compiling. Once we have that, this project will
be a viable substitute for std.c.windows.windows. I think it would be
good to split the file list in the wiki into the LEAN&MEAN files, which
are high priority, and the more obscure stuff. It would be good to see
how much we still need to do.
More information about the Digitalmars-d-announce
mailing list