March 31, 2006
Don Clugston wrote:
> Stewart Gordon wrote:
<snip>
>> I've just had a look.  I hadn't really thought about testing the translation, with there being so much to test and bits of the API to get to grips with in doing so.
> 
> What would be great would be a 'force extern' dmd option for linking: ensure that every extern function actually exists in the import library.
> Right now you can write:
> extern (Windows) { void SomeOldGarbage(); }
> and it will compile without error. If we had such a feature, we could at least check that all functions were defined correctly.

Good idea.

<snip>
>> I see you've begun to implement your "interim solution" on the Windows versions....
> 
> I didn't use the Perl script, I used my half-baked C2D converter to do the initial conversion. It's a moderately correct preprocessor with an regex replacement of the simple D types. #ifdef to static if is something it does semi-automatically.
> 
> I still don't know what's the right way to do it.

Nor does anybody yet.

> Function definitions are OK, but those structs that have additional members...

Do you mean structs that have members that are only defined in later Windows versions?  These will work in the same way - AIUI structs can contain version blocks just the same.

Stewart.

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

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
March 31, 2006
Comparing the #ifs in MinGW with the information on the MSDN website, there seem to be a lot of errors!  But I guess that we can identify these combinations in what supports a given entity:

- 95, NT4
- 98, NT4
- ME, NT4
- NT4
- 98, 2000
- ME, 2000
- 2000
- XP
- Server 2003

There's also a lone mysterious _WIN32_WINNT >= 0x510 for a function not documented on MSDN.  I'd think it was preparing for Windows Vista, except that
- Vista is internally numbered as 6.0
- there's no doubt going to be more than one new function in it
- Vista will have a whole new API anyway

I'm inclined that there are the following versions for the end programmer to concern him/herself with:

- for Windows 9x compatibility: Windows98, WindowsME, WindowsNTonly
- for Windows NT compatibility: Windows2000, WindowsXP, Windows2003
- for IE compatibility: IE3, IE4, IE401, IE5, IE501, IE6

which should be mapped to internal versions based on the above list.

The only problem is that, since there's no way at the moment to import version manipulation, we'd need to either maintain a copy of the mapping code in each module that uses these versions, or use command line files to set these versions.  What do people think?

Stewart.

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

My e-mail is valid but not my primary mailbox.  Please keep replies on
the 'group where everyone may benefit.
March 31, 2006
Stewart Gordon wrote:
> Comparing the #ifs in MinGW with the information on the MSDN website, there seem to be a lot of errors!  But I guess that we can identify these combinations in what supports a given entity:
> 
> - 95, NT4
> - 98, NT4
> - ME, NT4
> - NT4
> - 98, 2000
> - ME, 2000
> - 2000
> - XP
> - Server 2003
> 
> There's also a lone mysterious _WIN32_WINNT >= 0x510 for a function not
> documented on MSDN.  I'd think it was preparing for Windows Vista,
> except that
> - Vista is internally numbered as 6.0
> - there's no doubt going to be more than one new function in it
> - Vista will have a whole new API anyway
> 
> I'm inclined that there are the following versions for the end programmer to concern him/herself with:
> 
> - for Windows 9x compatibility: Windows98, WindowsME, WindowsNTonly - for Windows NT compatibility: Windows2000, WindowsXP, Windows2003 - for IE compatibility: IE3, IE4, IE401, IE5, IE501, IE6
> 
> which should be mapped to internal versions based on the above list.

This sounds right to me. Are there any which are based on service packs? (eg XP SP2, which seemed to involve big changes to the OS?)

Anyway, I've converted winerror.h (using Excel this time, since it was so repetitive!). I think you'll like this one, I spent some time sorting the values.

How about setting up a repository for this? Maybe resurrect one of the dead dsource projects which was attempting to do exactly this. D.announce is a terrible place to be submitting files to!

> The only problem is that, since there's no way at the moment to import version manipulation, we'd need to either maintain a copy of the mapping code in each module that uses these versions, or use command line files to set these versions.  What do people think?
> 
> Stewart.
> 



March 31, 2006
In article <e0k1g0$du9$1@digitaldaemon.com>, Don Clugston says... ..snip...

>Anyway, I've converted winerror.h (using Excel this time, since it was so repetitive!). I think you'll like this one, I spent some time sorting the values.
>
>How about setting up a repository for this? Maybe resurrect one of the dead dsource projects which was attempting to do exactly this. D.announce is a terrible place to be submitting files to!

I think having a dsource project for this is a very good idea.

When you mention resurrection, do you mean like Core32. (For the record, I don't think that Core32 is dead, but it might be sleeping. Or just lazy.) I don't think Core32 is the best name. I think WindowsAPI or WindowsHeaders (or something with Windows or Win in the name) would be better. Also, you probably don't want to actually use any of Core32's existing files (due to the questionable copyright situation). So I'd recommend just starting a new project at dsource.

Or maybe you mean Deimos? That idea never really took off, but it was supposed to be a place to submit files that might become part of Phobos.

Or you could start adding to Bindings without even asking for permission. ;)

jcc7
April 01, 2006
In article <e0k1g0$du9$1@digitaldaemon.com>, Don Clugston says...
> Stewart Gordon wrote:
>> I'm inclined that there are the following versions for the end programmer to concern him/herself with:
>> 
>> - for Windows 9x compatibility: Windows98, WindowsME, WindowsNTonly - for Windows NT compatibility: Windows2000, WindowsXP, Windows2003 - for IE compatibility: IE3, IE4, IE401, IE5, IE501, IE6
>> 
>> which should be mapped to internal versions based on the above list.
> 
> This sounds right to me.  Are there any which are based on service packs?  (eg XP SP2, which seemed to involve big changes to the OS?)

There have indeed been some API features added in service packs. However, these service packs don't tend to be included in the headers.  Rather, I think they just go in as being in the next major Windows version up.

> Anyway, I've converted winerror.h (using Excel this time, since it was so repetitive!).  I think you'll like this one, I spent some time sorting the values.

The web interface (with my being away from my usual workstation) is playing up so I can't download the attachment at the mo.  But I'll have a look as soon as I can.

> How about setting up a repository for this?  Maybe resurrect one of the dead dsource projects which was attempting to do exactly this. D.announce is a terrible place to be submitting files to!

I thought about that a while ago.  However, I can't really do it simply because I haven't been able to get SVN to work on my Mac.  It appears to be a problem with my Internet connection - the error is 400 Bad Request IIRC.  I've tried to find a solution but had no luck. The only SVN repository I've found that works for me is the backup of DStress.

Stewart.


April 01, 2006
Stewart Gordon schrieb am 2006-04-01:
> In article <e0k1g0$du9$1@digitaldaemon.com>, Don Clugston says...
>> How about setting up a repository for this?  Maybe resurrect one of the dead dsource projects which was attempting to do exactly this. D.announce is a terrible place to be submitting files to!
>
> I thought about that a while ago.  However, I can't really do it simply because I haven't been able to get SVN to work on my Mac.  It appears to be a problem with my Internet connection - the error is 400 Bad Request IIRC.  I've tried to find a solution but had no luck. The only SVN repository I've found that works for me is the backup of DStress.

Are you behind some HTTP proxy?

What happens if you try
"svn co svn://dstress.kuehne.cn" instead of
"svn co http://dstress.kuehne.cn"?

(for firewalls: outgoing traffic to port 3690)

Thomas


April 01, 2006
In article <e0k60o$hrq$1@digitaldaemon.com>, jcc7 says... <snip>
> I think having a dsource project for this is a very good idea.
> 
> When you mention resurrection, do you mean like Core32.  (For the record, I don't think that Core32 is dead, but it might be sleeping.  Or just lazy.)

There are a number of problems with some of the existing translations:
- how some of the content gets lost in translation
- arcane, undocumented features, e.g.  version (STANDALONE) in Core32
- as you say, copyright issues

Making a clean start is a good way to avoid these.  This is kind of what I was trying to do by starting from MinGW and by writing a wiki page to coordinate the effort.

<snip>
> Or maybe you mean Deimos?  That idea never really took off, but it was supposed to be a place to submit files that might become part of Phobos.

I'm a bit confused about what Deimos was supposed to be.  Most claimed that it's just a name for the etc section of the standard library.  Others used it to mean Arcane Jill's big integer library, which was filed in etc but never made it into any official DMD distribution.  (Does anyone have any idea where Jill is these days?)

Stewart.


April 02, 2006
In article <e0n1kg$14b8$1@digitaldaemon.com>, Stewart Gordon says...
>
>In article <e0k60o$hrq$1@digitaldaemon.com>, jcc7 says... <snip>
>> I think having a dsource project for this is a very good idea.
>> 
>> When you mention resurrection, do you mean like Core32.  (For the record, I don't think that Core32 is dead, but it might be sleeping.  Or just lazy.)
>
>There are a number of problems with some of the existing translations: - how some of the content gets lost in translation

I don't know what you mean by this, but you've probably studied Core32 more than I have, and you're probably right.

>- arcane, undocumented features, e.g.  version (STANDALONE) in Core32

There's a simple purpose for version(STANDALONE), but it might be controversial.

>- as you say, copyright issues

Right.

>Making a clean start is a good way to avoid these.  This is kind of what I was trying to do by starting from MinGW and by writing a wiki page to coordinate the effort.

Since SVN is a problem on your Mac, maybe you could start a project at dsource and just use the Trac wiki to attach files. It's not ideal, but it's better than these newsgroups (IMO). There has to be something better than attaching the files to these newsgroups. The files can be decoded from the web interface, but it sure slows a person down when they don't have a news reader available.

><snip>
>> Or maybe you mean Deimos?  That idea never really took off, but it was supposed to be a place to submit files that might become part of Phobos.
>
>I'm a bit confused about what Deimos was supposed to be.  Most claimed that it's just a name for the etc section of the standard library.  Others used it to mean Arcane Jill's big integer library, which was filed in etc but never made it into any official DMD distribution.  (Does anyone have any idea where Jill is these days?)

Deimos was supposed to be "etc". The "etc" section is supposed to include stuff that could be become part of Phobos if it matures. In reality, "etc" seems to be just stuff that Walter doesn't want to junk, but doesn't want to give the Phobos seal of approval to either.

I don't know what happened to Arcane Jill. She was very vocal for a few weeks (or months?) and without any warning that I noticed she stopped posting. I suspect that she just decided that D wasn't the language of her dreams after all (I think she had some cryptographic concerns that left her unsatisfied).

jcc7
April 03, 2006
Stewart Gordon wrote:
> In article <e0k1g0$du9$1@digitaldaemon.com>, Don Clugston says...
>> Stewart Gordon wrote:
>>> I'm inclined that there are the following versions for the end programmer to concern him/herself with:
>>>
>>> - for Windows 9x compatibility: Windows98, WindowsME, WindowsNTonly
>>> - for Windows NT compatibility: Windows2000, WindowsXP, Windows2003
>>> - for IE compatibility: IE3, IE4, IE401, IE5, IE501, IE6
>>>
>>> which should be mapped to internal versions based on the above list.
>> This sounds right to me.  Are there any which are based on service packs?  (eg XP SP2, which seemed to involve big changes to the OS?)
> 
> There have indeed been some API features added in service packs.  However, these service packs don't tend to be included in the headers.  Rather, I think they just go in as being in the next major Windows version up.
> 
>> Anyway, I've converted winerror.h (using Excel this time, since it was so repetitive!).  I think you'll like this one, I spent some time sorting the values.
> 
> The web interface (with my being away from my usual workstation) is playing up so I can't download the attachment at the mo.  But I'll have a look as soon as I can.
> 
>> How about setting up a repository for this?  Maybe resurrect one of the dead dsource projects which was attempting to do exactly this.  D.announce is a terrible place to be submitting files to!
> 
> I thought about that a while ago.  However, I can't really do it simply because I haven't been able to get SVN to work on my Mac.  It appears to be a problem with my Internet connection - the error is 400 Bad Request IIRC.  I've tried to find a solution but had no luck.  The only SVN repository I've found that works for me is the backup of DStress.

I've copied them into the dsource Bindings repository for now, you should at least be able to see the web version of the files. I've done winbase now, too -- another one of the central ones, which is included very early in windows.h. Next, I'll complete the bits I left out of wingdi.


April 03, 2006
Don Clugston wrote:
> Stewart Gordon wrote:
<snip>
>> I thought about that a while ago.  However, I can't really do it simply because I haven't been able to get SVN to work on my Mac.  It appears to be a problem with my Internet connection - the error is 400 Bad Request IIRC.  I've tried to find a solution but had no luck.  The only SVN repository I've found that works for me is the backup of DStress.
> 
> I've copied them into the dsource Bindings repository for now, you should at least be able to see the web version of the files. I've done winbase now, too -- another one of the central ones, which is included very early in windows.h. Next, I'll complete the bits I left out of wingdi.

I've translated winnls and winnetwk, and tweaked winerror.d a little. See the updated win32.zip.

Meanwhile, I'll have a look at people's suggestions for getting things to work....

Stewart.

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

My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.