Re: [Shrinker] Another landmine

2001-12-26 Thread Robert Baruch

On 26 Dec 2001 12:46:33 -0800
Alexandre Julliard <[EMAIL PROTECTED]> wrote:

> But unlike EXC_CallHandler there is no good reason to do that, except
> to work around Shrinker stupidity. And for all we know there might be
> 20 more similar tests (and if not, they may be added in the next
> Shrinker version), which will lead to major code obfuscation. We will
> also most likely have a lot of trouble supporting the various -winver
> versions.

That was my initial worry. Altering Wine in specific ways just to trick
Shrinker will just make Wine that much less understandable. I can imagine
that other vendors could write their tools in a similar way, so that their
tools check for Genuine(R) Microsoft(TM) Parts(SM). Eventually Wine code
would be Microsoft code!

In addition, as you pointed out before, if there are other Shrinker
versions, there could be more checks to make, and thus more changes to
Wine.

> At this point I think it would be a better strategy to write an
> un-Shrinker tool that disables the most idiotic tests directly in the
> shrinkered binary. Thanks to the DMCA, this should probably be done by
> someone living outside the US...

Well, there's still that SHRINKER.VXD thing under 95/98. If that VXD does
not check for specific Microsoft code, then there could be success in
emulating it and adding to Wine's "VXD toolbox". Of course, if that VXD
contains the "copyright unprotection" code, then emulating it would also
be a violation of the DMCA. But I'm up for a little civil disobediance :)
OTOH, although IANAL, the interoperability clause of the DMCA (section
103f) could be an out.

--Rob





Re: err:heap:HEAP_CreateSystemHeap system heap base address 0x65430000 not available

2001-12-26 Thread Rein Klazes

On 26 Dec 2001 12:54:49 -0800, you wrote:

> Rein Klazes <[EMAIL PROTECTED]> writes:
> 
> > Both programs use native win98 commctrl,comctl32 dll's. One of them is
> > CDmage, available at http://cdmage.cjb.net
> > 
> > Any suggestions?
> 
> Does this help?

Thank you, that solves the problem.

Rein.
-- 
Rein Klazes
[EMAIL PROTECTED]





Re: We *really* need a development model change !

2001-12-26 Thread Francois Gouget


   I wholeheartedly agree with you.

   I think that both approaches (application oriented, and API oriented)
are necessary.

 * We need the application oriented approach because this makes Wine
useful to people now. But maybe we should focus more on specific
applications: getting a few applications working very well seems more
interesting to me than getting a lot of applications kind of working.
The reason is that people migrating from the Windows world don't want
applications that kind of work, they want to see stuff that works just
as well as on Windows, even if it is limited to a few applications.
 * We also need the test framework but not only for regression testing.
All you need to write tests is a Windows computer so we could probably
get the help of people who would otherwise not contribute to Wine
(windows programmers who feel intimidated by contributing to Wine). And
these tests look like a great way to find bugs in our current
implementations: I am quite sure that with just a couple of hours of
coding tests you could find quite a few bugs that may otherwise take you
days to track down in a relay trace.
   But as Alexandre said, tact is needed when soliciting the help of
windows programmers so that this is not seen as blatant spam.


   I also like your section about why Wine is worth contributing to. It
may need some polishing but it would be nice to have it on WineHQ. After
all, WineHQ may tell you what Wine is but there is not a single word
about why it is important and why it is worth contributing to. We keep
hearing about how Wine is bad for Linux, how we should all stop wasting
our time and contribute to native Linux applications instead, how Linux
has all the applications it needs anyway, etc., etc. No wonder! We don't
even tell our side of the story!


   Also we need to have a framework in place so that we can handle the
sudden downpour of help we are going to receive ;-) Well, even if it's
not such a massive number of contributions. We need:
 * someone to organize things (and unfortunately no-one seems to have
the time, please, someone, volunteer!)
 * a mechanism to track which APIs already have tests in place and which
don't. Sure there are 12000 APIs so the risk of overlap seems small, but
I am quite sure that the distribution of submissions will not be random.
 * something to do a 'make test' and report which tests suceeded and
which failed
 * we also need to decide how to write these tests. You seem inclined to
write them in C but there has been some work before to create a
framework in perl. I consider that both have pros and cons and all I
care about at this point is that we do finally get something in place.



--
Francois Gouget [EMAIL PROTECTED]http://fgouget.free.fr/
  Any sufficiently advanced bug is indistinguishable from a feature.
-- from some indian guy






Re: We *really* need a development model change !

2001-12-26 Thread Joerg Mayer

On Wed, Dec 26, 2001 at 10:26:27AM -0800, Andriy Palamarchuk wrote:
> C Unit test frameworks I found after a quick search:
> http://check.sourceforge.net/
> http://people.codefactory.se/~spotty/cunit/
> http://freshmeat.net/projects/autounit/
> 
> C++:
> http://sourceforge.net/projects/cppunit/

Seen on /. two days ago:
http://www.codesourcery.com/qm/qmtest

  Ciao
  Jörg
--
Joerg Mayer  <[EMAIL PROTECTED]>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.





Re: err:heap:HEAP_CreateSystemHeap system heap base address 0x65430000 not available

2001-12-26 Thread Alexandre Julliard

Rein Klazes <[EMAIL PROTECTED]> writes:

> Both programs use native win98 commctrl,comctl32 dll's. One of them is
> CDmage, available at http://cdmage.cjb.net
> 
> Any suggestions?

Does this help?

Index: memory/heap.c
===
RCS file: /opt/cvs-commit/wine/memory/heap.c,v
retrieving revision 1.53
diff -u -r1.53 heap.c
--- memory/heap.c   2001/12/19 19:16:30 1.53
+++ memory/heap.c   2001/12/26 19:12:19
@@ -106,6 +106,7 @@
 {
 /* wait for the heap to be initialized */
 WaitForSingleObject( event, INFINITE );
+systemHeap = (HANDLE)base;
 }
 CloseHandle( map );
 return systemHeap;


-- 
Alexandre Julliard
[EMAIL PROTECTED]





Re: We *really* need a development model change !

2001-12-26 Thread Alexandre Julliard

Andreas Mohr <[EMAIL PROTECTED]> writes:

> I attached a preview of the posting I intend to post on *tons* of Windows
> devel newsgroups ("Call For Volunteers"). That way we might actually get
> hold of hundreds of Windows developers helping us implement a complete
> test suite (complete tests of up to 12000 Windows functions).
> Not to mention the additional PR we might get out of this...

Yeah, I'm sure spamming the Windows newsgroups is a great PR
strategy. Please don't do that.

> Please comment on both my intended posting and the way I programmed the first
> version of the test suite (I'm not extremely happy with the current program;
> if you have any improvements, then get them here ASAP !).

Look at programs/winetest, that's the tool we should use to write
tests IMO.

-- 
Alexandre Julliard
[EMAIL PROTECTED]





Re: [Shrinker] Another landmine

2001-12-26 Thread Alexandre Julliard

Robert Baruch <[EMAIL PROTECTED]> writes:

> So anyway, if we implemented this internal function (in C), then in theory
> it wouldn't be much of a big deal to code LdrAccessResource in assembly.
> Although it will raise a few eyebrows, we can always put in a comment
> similar to the one that will go in the assembler-coded EXC_CallHandler,
> that this code is required by Shrinker.

But unlike EXC_CallHandler there is no good reason to do that, except
to work around Shrinker stupidity. And for all we know there might be
20 more similar tests (and if not, they may be added in the next
Shrinker version), which will lead to major code obfuscation. We will
also most likely have a lot of trouble supporting the various -winver
versions.

At this point I think it would be a better strategy to write an
un-Shrinker tool that disables the most idiotic tests directly in the
shrinkered binary. Thanks to the DMCA, this should probably be done by
someone living outside the US...

-- 
Alexandre Julliard
[EMAIL PROTECTED]





Re: We *really* need a development model change !

2001-12-26 Thread Andriy Palamarchuk


--- Andreas Mohr <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 26, 2001 at 10:07:20AM -0800, Andriy
> Palamarchuk wrote:
> > Andreas Mohr wrote:

[... skipped ...]

> > - it would be better if the suite print summary
> > information and information about failed tests
> only
> Yep. Current output is something like:
>
WINETEST:test:Loader_16:LoadModule:FAILED:01:[retval]
>
WINETEST:test:Loader_16:LoadModule:FAILED:12:[retval]
>
WINETEST:test:Loader_16:LoadModule:FAILED:13:[retval]
> 
> or, in case of success, only:
> WINETEST:test:Loader_16:LoadModule:OK
I mean something like: 
===
Run: 1234 tests
Failed: 2 Errors: 1

Fail 1: <>
Fail 2: <>
Error 1: <>
===
In the example above failture means condition check
failure, Error - exception.

I suggest to print nothing for successfull tests. At
least this is the way I am accustomed with JUnit.
We are not interested in successfull tests, are we?
;-)

> This output is pretty useful, I think:
> It can be parsed *very* easily, and grepping for
> regressions is also pretty
> easy.
> 
> "WINETEST" exists to be able to distinguish this
> output from bogus Wine
> messages,
> "test" indicates that this is a test line output
> versus a warning message or
> similar output,
> "Loader_16" indicates testing of 16bit loader
> functionality,
> "LoadModule" - well... ;-)
> "FAILED" - obvious
> "01" - test number 01 failed.
> "[retval]" - contains the (wrong) return value of
> the function, if applicable.

Looks simple and the output is really useful. I just
don't see any reason to show information about
successfull tests.
At least we can get short form of the output by
clipping all "Ok" messages from your suggested form.

> BTW, I think having a test suite wouldn't be about
> hunting regressions
> at first: just look at my LoadModule16 example and
> you'll see that we're
> still quite far from hunting regressions *only*.
> My guess is that we'll be shocked at how many
> functions fail in how many ways.

Agree, agree, agree... We can even use eXtreme
Programming approaches :-) See
http://xprogramming.com/ and other sites on the subj.
I also like this article:
http://members.pingnet.ch/gamma/junit.htm
I use JUnit extensively and like the whole idea.

> > - make the test suite more "visible" for existing
> > developers. Ask them to run the test suite before
> > submitting a patch?
> No, I don't think so.
> I think it suffices if Alexandre runs the test suite
> before or after every
> large commit cycle.
> That way he'd be able to back out problematic
> patches.
> Asking developers to run the *whole* test suite for
> each patch could be
> pretty painful.

I don't see why running the unit tests is paintful.
I'd estimate that it would not take more then 5
minutes to test all 12000 W32 functions. We also can
keep tests for slow/rarely changed areas of API in
separate "complete" suite.

I think the test suite is for developers, not for
Alexandre (I meas as a team leader :-) or QA. This is
why I want to increase "visibility" of unit tests.
Again, the developers will more likely to contribute
to the suite if they will remember about it.

I do not suggest to enforce the unit test usage
because we'll always have developers/companies who
don't want to do that. It would suffice to recomment
before submitting a patch to check that we have the
same (accidentally - less :-) number of failures as we
had before or report any new bugs introduced.
It is even Ok to have increased number of issues as
soon as developer consiously makes decision to break
something. Compact tests output I describe above also
will help to quicky identify any changes in unit tests
output.

> We'd also need to pass a winver value to the test
> suite via command line
> in order to let the test app adapt to different
> windows environments
> (and thus also to different wine --winver settings
> !).

Sounds good.

> > - it would be greate to have functionality to
> support
> > output comparison? For some functionality it is
> easier
> > to write tests to compare output instead of doing
> > explicit checks (e.g. tests, involving a few
> > processes). The output can be redirected to file
> and
> > files compared. If we use files we need to store
> files
> > for Wine and a few versions of Windows :-(
> Hmm, I don't quite get what exactly you're talking
> about.

Example: I have pretty big unit test for
SystemParametersInfo function. Part of the test is to
insure that WM_SETTINGCHANGE window message is fired
when necessary. I have simple handler for the message
which prints confirmation when the message received. I
save output when I run tests under Windows and Wine
and compare the output. Advantages - 1) simplicity, 2)
I can see contents of the failure. To do explicit
check I need to set up some communication (common
variable, step counter etc) between the message
handler and testing code. If these 2 code snippets are
in different processes I need to use IPC to do
explicit check?

Ideally I'd l

Re: We *really* need a development model change !

2001-12-26 Thread Andreas Mohr

On Wed, Dec 26, 2001 at 10:07:20AM -0800, Andriy Palamarchuk wrote:
> Andreas Mohr wrote:
> > I guess we really should change our development
> model from trying tons of
> > programs to *systematically* testing functions and
> Windows mechanisms now.
> > If we can show everyone where stuff is failing, it
> might be a lot easier
> > to attract new people.
> 
> I *completely* support this idea. Benefits of such
> test suite are enormous. Existing developers can
> contribute a lot by adding test snippets for the
> functions they create. Now they create such snippets
> anyway and throw them away.
Ah, good ! :-)
Exactly. A lot of people create test code e.g. for undocumented functions etc.
By adding a *slight* bit more work, they'd have a test for this function.

> Comments:
> - Don't want to reinvent the weel. Is there any
> existing test suite framework we can use? Sorry, I
> can't suggest any for C but I'm very impressed with
> JUnit in Java. It is even Ok if the framework is GPLed
> or LGPLed - I don't think any company will make
> buziness based on the test suite.
Hmm, good question. I don't know of any, but we should probably do some more
research. After all it's about 12000 functions, so we should get it right.

> - I /personally/ prefer CL interface only for such
> suite
Yes, yes, yes. *Much* easier to use. That's why I did exactly that kind of
thing.

> - it would be better if the suite print summary
> information and information about failed tests only
Yep. Current output is something like:
WINETEST:test:Loader_16:LoadModule:FAILED:01:[retval]
WINETEST:test:Loader_16:LoadModule:FAILED:12:[retval]
WINETEST:test:Loader_16:LoadModule:FAILED:13:[retval]

or, in case of success, only:
WINETEST:test:Loader_16:LoadModule:OK

(yeah, I know, wishful thinking ;-)

This output is pretty useful, I think:
It can be parsed *very* easily, and grepping for regressions is also pretty
easy.

"WINETEST" exists to be able to distinguish this output from bogus Wine
messages,
"test" indicates that this is a test line output versus a warning message or
similar output,
"Loader_16" indicates testing of 16bit loader functionality,
"LoadModule" - well... ;-)
"FAILED" - obvious
"01" - test number 01 failed.
"[retval]" - contains the (wrong) return value of the function, if applicable.

BTW, I think having a test suite wouldn't be about hunting regressions
at first: just look at my LoadModule16 example and you'll see that we're
still quite far from hunting regressions *only*.
My guess is that we'll be shocked at how many functions fail in how many ways.

> - make the test suite more "visible" for existing
> developers. Ask them to run the test suite before
> submitting a patch?
No, I don't think so.
I think it suffices if Alexandre runs the test suite before or after every
large commit cycle.
That way he'd be able to back out problematic patches.
Asking developers to run the *whole* test suite for each patch could be
pretty painful.

> - I think the suite test will consist from a few
> separate applications because different tests may have
> different requirements to GUI configuration,
> processes, etc. We need a way to run all the
> applications in one batch.
Exactly. Which is why I really prefer simple text output. IMHO it's the only way
to go.

> - define variable which indicates whether the suite
> runs under Wine. Such indicator can be used for Wine
> "white-box" testing.
Hmm, yes, that might be useful.
We'd also need to pass a winver value to the test suite via command line
in order to let the test app adapt to different windows environments
(and thus also to different wine --winver settings !).

> - it would be greate to have functionality to support
> output comparison? For some functionality it is easier
> to write tests to compare output instead of doing
> explicit checks (e.g. tests, involving a few
> processes). The output can be redirected to file and
> files compared. If we use files we need to store files
> for Wine and a few versions of Windows :-(
Hmm, I don't quite get what exactly you're talking about.

> - the suite applications size will be pretty big. Is
> it better to move it to separate CVS tree?
Yep, I'd say so. There definitely is no business for it to reside in the main
Wine tree.

> - what about running the suite weekly (or daily)
> automatically and publishing the results to
> wine-devel?
Good idea ! Might prove worthwhile.

> - most developers on this list have access to one
> version of Windows. Is it difficult to create "testing
> farm" with remote access to a few versions of windows?
> This would help developers to test their code on a few
> platforms. Existing environments in the companies,
> involved in the project can be used.
Hmm, why ?
The idea is that hundreds (or hopefully thousands ?) of volunteer Windows
developers create bazillions of test functions for specific API functions.
That will happen on specific Windows version only, of course.
Now we have a test framework for a specific API f

Re: Cooperation between Odin & Wine

2001-12-26 Thread Sander van Leeuwen

On Wed, 26 Dec 2001 17:25:50 +0100, Rein Klazes wrote:
>> For more information about Odin you can visit http://odin.netlabs.org (some 
>information is outdated though).
>> There you can find out where to download the sources (cvs).
>I have one silly question about this. The cvs server address is
>[EMAIL PROTECTED]:d:/netlabs.src/odin32, but the current version
>of the linux cvs client is rejecting the DOS drivespec in it:
First of all, the path is incorrect. I thought this was updated, but apparently not.
The current path is e:/netlabs.cvs/odin32

>| cvs login: CVSROOT (":pserver:[EMAIL PROTECTED]:d:/netlabs.src/odin32")
>| cvs login: may only specify a positive, non-zero, integer port (not "d:").
>| cvs login: perhaps you entered a relative pathname?
>
> and I have not been able to find a way to make it accept it.
>Is there a way to use linux cvs client with Odin's server?
Sorry, I can't help you with that. I never tried this with a linux cvs client.

Sander






Re: We *really* need a development model change !

2001-12-26 Thread Andriy Palamarchuk

C Unit test frameworks I found after a quick search:
http://check.sourceforge.net/
http://people.codefactory.se/~spotty/cunit/
http://freshmeat.net/projects/autounit/

C++:
http://sourceforge.net/projects/cppunit/

Thanks,
Andriy Palamarchuk

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com





Re: We *really* need a development model change !

2001-12-26 Thread Andriy Palamarchuk

Andreas Mohr wrote:
> I guess we really should change our development
model from trying tons of
> programs to *systematically* testing functions and
Windows mechanisms now.
> If we can show everyone where stuff is failing, it
might be a lot easier
> to attract new people.

I *completely* support this idea. Benefits of such
test suite are enormous. Existing developers can
contribute a lot by adding test snippets for the
functions they create. Now they create such snippets
anyway and throw them away.

> I attached a preview of the posting I intend to post
on *tons* of Windows
> devel newsgroups ("Call For Volunteers"). That way
we might actually get
> hold of hundreds of Windows developers helping us
implement a complete
> test suite (complete tests of up to 12000 Windows
functions).
> Not to mention the additional PR we might get out of
this...

Lets ask for help only after the suite structure is
more/less defined and we'll be able to give people
something to work on.

Comments:
- Don't want to reinvent the weel. Is there any
existing test suite framework we can use? Sorry, I
can't suggest any for C but I'm very impressed with
JUnit in Java. It is even Ok if the framework is GPLed
or LGPLed - I don't think any company will make
buziness based on the test suite.
- I /personally/ prefer CL interface only for such
suite
- it would be better if the suite print summary
information and information about failed tests only
- make the test suite more "visible" for existing
developers. Ask them to run the test suite before
submitting a patch?
- I think the suite test will consist from a few
separate applications because different tests may have
different requirements to GUI configuration,
processes, etc. We need a way to run all the
applications in one batch.
- define variable which indicates whether the suite
runs under Wine. Such indicator can be used for Wine
"white-box" testing.
- it would be greate to have functionality to support
output comparison? For some functionality it is easier
to write tests to compare output instead of doing
explicit checks (e.g. tests, involving a few
processes). The output can be redirected to file and
files compared. If we use files we need to store files
for Wine and a few versions of Windows :-(
- the suite applications size will be pretty big. Is
it better to move it to separate CVS tree?
- what about running the suite weekly (or daily)
automatically and publishing the results to
wine-devel?
- most developers on this list have access to one
version of Windows. Is it difficult to create "testing
farm" with remote access to a few versions of windows?
This would help developers to test their code on a few
platforms. Existing environments in the companies,
involved in the project can be used.
- I remember long time ago there was a post on
wine-devel about using Perl or Perl-like language for
unit testing.
What is current status of that project?

Thanks,
Andriy Palamarchuk


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com





Re: Cooperation between Odin & Wine

2001-12-26 Thread Rein Klazes

On Wed, 26 Dec 2001 12:28:09 +0100 (CET), you wrote:

> For more information about Odin you can visit http://odin.netlabs.org (some 
>information is outdated though).
> There you can find out where to download the sources (cvs).

I have one silly question about this. The cvs server address is
[EMAIL PROTECTED]:d:/netlabs.src/odin32, but the current version
of the linux cvs client is rejecting the DOS drivespec in it:

| cvs login: CVSROOT (":pserver:[EMAIL PROTECTED]:d:/netlabs.src/odin32")
| cvs login: may only specify a positive, non-zero, integer port (not "d:").
| cvs login: perhaps you entered a relative pathname?

 and I have not been able to find a way to make it accept it.
Is there a way to use linux cvs client with Odin's server?

Rein.
-- 
Rein Klazes
[EMAIL PROTECTED]





Re: CVS server

2001-12-26 Thread Jan Dvorak

On Sun, Dec 23, 2001 at 12:11:25PM -0500, Dimitrie O. Paun wrote:
> It looks like we're running an old version of CVS on the server, as it
> complains it does not understand
> 
> #cvs up -C
> 

[johnydog@napalm wine]# cat CVS/Root
:pserver:[EMAIL PROTECTED]:/home/wine
[johnydog@napalm wine]# cvs update -d -P -C
(Locally modified Make.rules.in moved to .#Make.rules.in.1.95)
...

Works fine for me.

> is it possible to upgrade it? That would be a good idea irrespective of
> the -C problem, as the new versions fixed quite a few (nasty) bugs.
> 

The rule is: never change a working system. If you are able to
address/trigger any bugs than yes, it's neccessary. And, you know, in every
project, most of the bugs fixed in latest release was introduced in just
previous version.

> --
> Dimi.
> 

Jan Dvorak <[EMAIL PROTECTED]>






Re: Wine Tasklist (UNC)

2001-12-26 Thread Andreas Mohr

On Wed, Dec 26, 2001 at 12:08:46PM +1000, Mike McCormack wrote:
> 
> Hi Francois,
> 
> I think the best way to handle UNC pathes is to do it properly; Wine
> should talk SMB/NBT directly to other machines on the network, not
> through Linux's VFS layer.
> 
> This approach would give high level of flexability to Wine. We could:
Yep. Actually I've never understood why one would go through mount points
for *dynamic* host paths !
In short: do it once, do it *right*.
Don't go for a weak compromise.
That's why I'm strongly in favour of high Samba integration.
Wine really needs this functionality, AFAICS.

-- 
Andreas MohrStauferstr. 6, D-71272 Renningen, Germany
Tel. +49 7159 800604http://home.nexgo.de/andi.mohr/





err:heap:HEAP_CreateSystemHeap system heap base address 0x65430000 not available

2001-12-26 Thread Rein Klazes

Date: Wed, 26 Dec 2001 12:51:22 +0100
X-Agent-Group: 
X-Agent-Format: 0 0 0 0 0 50 0 0 1 0 "*" 0

Hi,

This patch makes a two of my programs fail with the subject error
message:

| ChangeSet ID: 1008789390367047399282455
| CVSROOT:  /opt/cvs-commit
| Module name:  wine
| Changes by:   julliard@wine2. 01/12/19 14:16:30
| 
| Modified files:
|   dlls/kernel: kernel32.spec 
|   dlls/ntdll : Makefile.in debugtools.c ntdll.spec rtl.c 
|   dlls/ole32 : ifs.c 
|   graphics/win16drv: font.c 
|   include: heap.h ntddk.h winbase.h winnt.h 
|   memory : heap.c selector.c 
| Added files:
|   dlls/ntdll : heap.c 
| 
| Log message:
|   Moved heap functions to ntdll.
|   Got rid of internal heap flags.
|   Reimplemented MapLS to not depend on the segptr heap.

Both programs use native win98 commctrl,comctl32 dll's. One of them is
CDmage, available at http://cdmage.cjb.net

Any suggestions?

Rein.
-- 
Rein Klazes
[EMAIL PROTECTED]





Cooperation between Odin & Wine

2001-12-26 Thread Sander van Leeuwen

Hi,

As some of you might remember I'm the lead developer of the Odin project. (project
for OS/2 with the same goals as Wine). Odin is partly based on Wine code. The
core dlls (gdi32, user32, kernel32) + some special dlls (winmm, directx, winsock)
use some Wine code, but is basically incompatible with Wine for obvious reasons.
Most of the remaining dlls are based entirely on Wine code.

The last few years there has been little cooperation between both projects for several 
reasons.
One of them is that we have far fewer active developers and cooperation sometimes 
proved to be
difficult.  Some source files of the two project had grown apart since changes were 
never merged back into Wine.

Now, I'm trying to change this situation, but am wondering how to proceed. I can post 
bug fixes to this list, but
it will be difficult for me to actually test these changes in Wine itself. (too time 
consuming)
Posting diff files is not always possible due to the major differences between source 
files.

Merging changes from Wine into our source tree is no problem. We can do that 
ourselves. However, it would
be nice if compiler incompatibilites (we use IBM VisualAge C++, not GCC) could be 
resolved. There aren't
many, but the IBM compiler is not always as flexible as GCC and of course doesn't 
understand any GCC extensions.
It would be a big help if incompatible code could be changed. Switching compilers is 
not an option for us.
I can post a (small) list of changes we had to make.

The license of our project is not compatible with Wine, but the dlls that are largely 
based on Wine (such as 
comctl32, shell32, ole) are an exception to the project license. The sources of those 
dlls are released under the
Wine license. 
In case there is ever interest in the other sources, then you can just ask me. I'd be 
happy to 'donate' them to 
Wine.

For more information about Odin you can visit http://odin.netlabs.org (some 
information is outdated though).
There you can find out where to download the sources (cvs).

The next post from me will contains some patches for bugs in Wine that I've recently 
found.

Sander








Patches for several bugs

2001-12-26 Thread Sander van Leeuwen

Hi,

Here are the bug fixes I promised. There are more, but I can post those at a later 
time.

- controls\button.c
   CB_Paint, line 806

hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd );
if (!hBrush) /* did the app forget to call defwindowproc ? */
hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd 
);

   -> (Auto)Check, (Auto)Radio & (Auto)3State buttons send WM_CTLCOLORSTATIC instead 
of WM_CTLCOLORBTN (verified in NT4)
   (fixes opening dialog buttons in Opera 6 (choose interface))


- dll\user32\text.c
  TEXT_GrayString, line 499
if(!hdc) {
DeleteDC(memdc);
return FALSE;
}
-> DC leak


- COMCTL32: Comboex, rebar, tooltips, toolbar:  NEVER delete the font object received 
by WM_SETFONT
   -> See attached diff files for comboex, rebar & toolbar. Our tooltips has too many 
differences for diff to produce usable output,
but the changes are similar to the other three.


- COMCTL32: Tooltips: wrong COMCTL32_Free calls
   -> 4 calls with wrong pointer: COMCTL32_Free(&lpttsi);
should be COMCTL32_Free(lpttsi);


- user32: frame tracking
 * - Only draw changed track frame instead of clearing the old one and
 *   drawing the new one (less flickering)
 * - Send WM_MOVING when moving a window
 * - Send WM_SIZING only when sizing a window 
 * - Fixed handling of rectangles changed by WM_SIZING/MOVING
   -> Can't easily produce diff file. Too many changes. (check src\user32\wintrack.cpp 
in our CVS tree)


- USER32: groupbox redrawing fixes
   -> I am not 100% sure the same happens in Wine, but it looks like that.
   When an application changes the font or the text of a groupbox (smaller font or 
fewer characters), then
   the old text has to be erase properly or else you'll still see part of it.
   If I remember correctly, that could be seen in Opera 5.12 (property dialogs)
   -> Again, too many changes to produce a diff file. (check src\user32\button.cpp, 
BUTTON_SetText & BUTTON_SetFont)


- USER32: static control
   -> our version supports more styles (SS_CENTERIMAGE, SS_REALSIZEIMAGE) and features 
(SS_ENHMETAFILE)
(src\user32\static.cpp)


Sander





comboex.diff
Description: Binary data


rebar.diff
Description: Binary data


toolbar.diff
Description: Binary data


Re: Bulletproof the debugger.

2001-12-26 Thread Michael Stefaniuc

Hello,

please do not apply the previous patch, i did something very stupid. Use
the attached patch instead (makes also better use of the C99 style
return value).

bye
michael

On Wed, Dec 26, 2001 at 01:09:06AM +0100, Michael Stefaniuc wrote:
[snip]
> I did a short check with
> camus:~/work/wine$ grep -r -I -C snprintf ./ | less
> and this is what I found:
> - most of the time the return value of *snprintf isn't checked
> - if the return value is checked it's mostly checked for C89 and C99
>   style
> - the attached patch should fix all the remaining cases.
> 
Changelog:
   Michael Stefaniuc <[EMAIL PROTECTED]>
   check the return value of *snprintf for C99 style overflow reporting

-- 
Michael Stefaniuc   Tel.: +49-711-96437-199
System Administration   Fax.: +49-711-96437-111
Red Hat GmbHEmail: [EMAIL PROTECTED]
Hauptstaetterstr. 58http://www.redhat.de/
D-70178 Stuttgart


Index: dlls/kernel/format_msg.c
===
RCS file: /home/wine/wine/dlls/kernel/format_msg.c,v
retrieving revision 1.19
diff -u -r1.19 format_msg.c
--- dlls/kernel/format_msg.c2001/10/10 02:51:24 1.19
+++ dlls/kernel/format_msg.c2001/12/26 09:46:29
@@ -265,6 +265,7 @@
 strcpy( fmtstr, "%s" );
 }
 if (args) {
+   int ret;
 int sz;
 LPSTR b;
 
@@ -282,8 +283,9 @@
 b = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz 
= 100);
 /* CMF - This makes a BIG assumption about va_list */
 TRACE("A BIG assumption\n");
-while (vsnprintf(b, sz, fmtstr, (va_list) 
argliststart) < 0) {
-b = HeapReAlloc(GetProcessHeap(), 
HEAP_ZERO_MEMORY, b, sz += 100);
+while ((ret = vsnprintf(b, sz, fmtstr, (va_list) 
+argliststart) < 0) || (ret >= sz)) {
+   sz = (ret == -1 ? sz + 100 : ret + 1);
+b = HeapReAlloc(GetProcessHeap(), 
+HEAP_ZERO_MEMORY, b, sz);
 }
 }
 for (x=b; *x; x++) ADD_TO_T(*x);
Index: dlls/user/lstr.c
===
RCS file: /home/wine/wine/dlls/user/lstr.c,v
retrieving revision 1.18
diff -u -r1.18 lstr.c
--- dlls/user/lstr.c2001/10/17 17:50:02 1.18
+++ dlls/user/lstr.c2001/12/26 09:46:30
@@ -683,14 +683,16 @@
 strcpy( fmtstr, "%s" );
 }
if (args) {
+   int ret;
int sz;
LPSTR   b = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz = 
100);

argliststart=args+insertnr-1;
   
/* CMF - This makes a BIG assumption about va_list */
-   while (vsnprintf(b, sz, fmtstr, (va_list) argliststart) < 0) {
-   b = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, b, sz 
+= 100);
+   while ((ret = vsnprintf(b, sz, fmtstr, (va_list) argliststart) 
+< 0) || (ret >= sz)) {
+   sz = (ret == -1 ? sz + 100 : ret + 1);
+   b = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, b, sz);
}
for (x=b; *x; x++) ADD_TO_T(*x);
} else {
Index: programs/wineconsole/wineconsole.c
===
RCS file: /home/wine/wine/programs/wineconsole/wineconsole.c,v
retrieving revision 1.4
diff -u -r1.4 wineconsole.c
--- programs/wineconsole/wineconsole.c  2001/12/04 20:46:54 1.4
+++ programs/wineconsole/wineconsole.c  2001/12/26 09:46:36
@@ -22,7 +22,7 @@
 len = vsnprintf(buf, sizeof(buf), format, valist);
 va_end(valist);
  
-if (len <= -1) 
+if ((len <= -1) || (len >= sizeof(buf)))
 {
 len = sizeof(buf) - 1;
 buf[len] = 0;
Index: win32/console.c
===
RCS file: /home/wine/wine/win32/console.c,v
retrieving revision 1.84
diff -u -r1.84 console.c
--- win32/console.c 2001/12/21 20:29:10 1.84
+++ win32/console.c 2001/12/26 09:46:38
@@ -62,6 +62,7 @@
 static BOOLstart_console_renderer(void)
 {
 char   buffer[256];
+intret;
 STARTUPINFOA   si;
 PROCESS_INFORMATIONpi;
 HANDLE hEvent = 0;
@@ -85,14 +86,16 @@
 /* first try environment variable */
 if ((p = getenv("WINECONSOLE")) != NULL)
 {
-   if (snprintf(buffer, sizeof(buffer), "%s -- --use