Coverity coverage of Wine

2006-09-12 Thread Paul Vriens
Hi,

the latest run (with report) on the Coverity site seems to be from July
21st. It appears that the main page is updated though (not for the lines
of code but for the errors fixed).

Does anybody know more about the why? I've tried to contact Coverity for
the last month and my last email (where I've requested a read-receipt,
shame on me) was deleted without being read.

Cheers,

Paul.





Re: X11Drv: move WGL extension code

2006-09-12 Thread Lionel Ulmer
On Fri, Sep 01, 2006 at 01:57:24PM +0200, Roderick Colenbrander wrote:
 The way WGL extensions are loaded is different. The old code correctly
 advertised the names of available WGL extensions but the wglGetProcAddress
 code didn't work correctly. Even if an extension wasn't advertised you could
 get a function pointer to the functions. On Windows wglGetProcAddress would
 return NULL.

Note that (as far as I know), 'wglGetProcAddress' returns NULL on
non-existant extensions for all extensions, whether they are GL or WGL ones.

This means that our implementation of it is broken (at least on DRI / Mesa)
as 'glXGetProcAddress' may return a non-NULL value when querying a
non-supported extension.

So if we really want to be windows-like, we would need to add a 'function
name / extension name' database and check if the extension corresponding to
the function is present before actually calling 'glXGetProcAddress'.

But as I ever only once got a bug report linked to that, I never took the
pain to fix it :-)

  Lionel (catching up his old mails)

PS: I guess that this 'database' may be automatically build by the
'make_opengl' script though so it should not be that hard to do :-)

-- 
 Lionel Ulmer - http://www.bbrox.org/




Re: Coverity coverage of Wine

2006-09-12 Thread Detlef Riekenberg
On Di, 2006-09-12 at 08:51 +0200, Paul Vriens wrote:

 the latest run (with report) on the Coverity site seems to be from July
 21st. 

 Does anybody know more about the why?

What comes in my mind, that they offered there Service to Wine
to use it as an Advertisement like:
Coverity detected 800 Errors in Wine and all where fixed in less
than 2 Month

We started to fix them, but the fixing-Rate went down near to Zero
very fast.
To remember, the Announcement from Ben Chelf was on 07. April 2006:
http://www.winehq.org/pipermail/wine-devel/2006-April/046354.html

The first Day, we fixed 31 Defects
( http://www.winehq.org/pipermail/wine-devel/2006-April/046433.html ),
but the total Results are not so good:

We marked 74 Defects as RESOLVED, 78 Entries are Verified and 344 are
still Uninspected or Pending. (Overview at http://scan.coverity.com )

You must also think, that every Run is visible with annotated source.
This cost them a lot of GB HD-Space, that is always online for us.

 I've tried to contact Coverity for
 the last month and my last email (where I've requested a read-receipt,
 shame on me) was deleted without being read.

IMHO, they did not see enough benefit for there investigation in Wine.
Simple: We do not pay, they stopped


BUG-Hunting is not a fun thing, but Alexandre can open bug-hunting
Weeks, similar to the feature-freeze before wine-0.9.

This can target the Bugs found by Coverity and Smatch with Priority.

Seems to be a nice theme for Wineconf (Sorry, I'm not there).


-- 
 
By by ... Detlef






Re: comctl32: Remove dead code in tooltips.c (coverity)

2006-09-12 Thread Alexandre Julliard
Detlef Riekenberg [EMAIL PROTECTED] writes:

 We return with FALSE at the top of the Function,
 when lpToolInfo is NULL.

I think that's where the real bug is, we shouldn't always return FALSE
in that case.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: Coverity coverage of Wine

2006-09-12 Thread Paul Vriens
On Tue, 2006-09-12 at 11:15 +0200, Detlef Riekenberg wrote:
 On Di, 2006-09-12 at 08:51 +0200, Paul Vriens wrote:
 
  the latest run (with report) on the Coverity site seems to be from July
  21st. 
 
  Does anybody know more about the why?
 
 What comes in my mind, that they offered there Service to Wine
 to use it as an Advertisement like:
 Coverity detected 800 Errors in Wine and all where fixed in less
 than 2 Month
 
 We started to fix them, but the fixing-Rate went down near to Zero
 very fast.
 To remember, the Announcement from Ben Chelf was on 07. April 2006:
 http://www.winehq.org/pipermail/wine-devel/2006-April/046354.html
 
 The first Day, we fixed 31 Defects
 ( http://www.winehq.org/pipermail/wine-devel/2006-April/046433.html ),
 but the total Results are not so good:
 
 We marked 74 Defects as RESOLVED, 78 Entries are Verified and 344 are
 still Uninspected or Pending. (Overview at http://scan.coverity.com )
 
 You must also think, that every Run is visible with annotated source.
 This cost them a lot of GB HD-Space, that is always online for us.
 
  I've tried to contact Coverity for
  the last month and my last email (where I've requested a read-receipt,
  shame on me) was deleted without being read.
 
 IMHO, they did not see enough benefit for there investigation in Wine.
 Simple: We do not pay, they stopped
 
But wouldn't it be nice if they would tell us?

The page http://scan.coverity.com/; shows lots of projects and I cannot
believe they are all paying 'customers'.

If they want to stop covering Wine they can do it of course, but it
would be nice to throw us of the main page then. Otherwise all that will
be seen is 'look at how many issues Wine still has, it must be (very)
bad'.

Cheers,

Paul.






RTL language support in usp.dll

2006-09-12 Thread Vijay Kiran Kamuju

Hi,

Your patch for RTL support in usp10.dll.
http://www.winehq.org/pipermail/wine-patches/2006-September/030571.html

Only includes support for Arabic.
If you could include for other RTL languages esp Hebrew (other RTL
languages are Farsi and Urdu).
I think that would be an easy task for you as you know the usp internals. ;)

bye,
VJ




Re: State management in D3D

2006-09-12 Thread Stefan Dösinger
Am Montag 11 September 2006 23:36 schrieb H. Verbeet:
 On 11/09/06, Stefan Dösinger [EMAIL PROTECTED] wrote:
  Am Montag 11 September 2006 19:56 schrieb H. Verbeet:
   On 11/09/06, Stefan Dösinger [EMAIL PROTECTED] wrote:
That's what I'd use the state.changed field for. Set it to TRUE when
the state is first modified and to FALSE when it it applied to gl. Do
not add the state to the list of changes whn state.changed == TRUE
  
   Well, sure, that's what the constants loading code does as well, but I
   still like a list better :-)
 
  What would the list look like? Lionel was talking about some tree.

 That's not related to the trees thing, but your proposal with a list
 instead of a fixed size array.

 (the changed marker
  can store the position + 1)

 Instead of a boolean dirty flag, you could store a pointer to the list
 element :-)
Yeah, but we still can't remove the entry. Or wait, set it to 0 and implement 
state 0 as a nop-apply :-)


pgpSq5oMrrJBb.pgp
Description: PGP signature



Re: State management in D3D

2006-09-12 Thread H. Verbeet

On 12/09/06, Stefan Dösinger [EMAIL PROTECTED] wrote:

Yeah, but we still can't remove the entry. Or wait, set it to 0 and implement
state 0 as a nop-apply :-)

Why wouldn't you be able to remove an entry from a list?




Help with git

2006-09-12 Thread Kapila De Silva
Hi all,

Hope this is the right place to post this, if not, my apologies.

Im trying to track down an issue that occurred between 0.9.19 and
0.9.20, and am using git bisect to track the issue. In the process of
trying to identify the cause of the issue, I would like to be able to
get the code up till a certain patch, and then apply patches one by one
as well. 

I have not been able to find out how to do this, despite several web
searches and man pages. Can anyone give me any pointers to this please? 

Thanks in advance

Kapila





Re: Low-level coding

2006-09-12 Thread Kai Blin
On Monday 11 September 2006 22:58, Kuba Ober wrote:
 On Monday 11 September 2006 12:12, Frank Richter wrote:
[...]
  :S might've been an emoticon here.

 Thought about that, a quick google for :S didn't show up anything
 interesting.

According to [1], it's a contratidcory remark smiley.

Cheers,

Kai

[1] David Sanderson, Smileys , O'Reilly, 1993

-- 
Kai Blin, kai Dot blin At gmail Dot com
WorldForge developerhttp://www.worldforge.org/
Wine developer  http://wiki.winehq.org/KaiBlin/
--
Will code for cotton.


pgpBiUw9wJJPR.pgp
Description: PGP signature



Help with shader code

2006-09-12 Thread Kapila De Silva
Hi All,

can someone help me understand some code from
dlls/wined3d/vertexshader.c please?

Im new to shader code, but to me the following looks a bit strange:

shader_addline(buffer, ADD result.position.x, TMP_OUT.x,
PROJECTIONX.w;\n);
shader_addline(buffer, ADD result.position.y, TMP_OUT.y,
PROJECTIONY.w;\n);
/* Account for any inverted textures (render to texture case) by
reversing the y coordinate
 *  (this is handled in drawPrim() when it sets the MODELVIEW
and PROJECTION matrices)
 */
shader_addline(buffer, MUL result.position.y, TMP_OUT.y,
PROJECTIONY.y;\n);

Am I correct that the last line makes the second line redundant? Wont
result.position.y be equal to TMP_OUT.y * PROJECTIONY.y no matter what?

Thanks in advance.

Kapila.





Re: Help with git

2006-09-12 Thread Matt Finnicum

What I do is to follow along with things on the shortlog:
http://source.winehq.org/git/?p=wine.git;a=shortlog

Lets say you want to move your current branch to my recent patch
riched20: Rewrite of scrolling and some redrawing code. - you'd
click the link commit to the right of it. In the page that you'll be
taken to, you'll see a line like this:
commit  abecd9e393925e008449a80ec14682790b29042c

you can then do a git reset --hard abecd9e393925e008449a80ec14682790b29042c

and your git will be moved to the point in time right after that
commit. If you then want to manually apply a patch, click commitdiff
to the right of it's entry in the shortlog, followed by plain on the
top - this will take you to a plaintext diff of the patch, which you
could save to a file and apply with the patch command. (patch -p1 
thepatch.diff usualy works well for me)

--Matt

On 9/9/06, Kapila De Silva [EMAIL PROTECTED] wrote:

Hi all,

Hope this is the right place to post this, if not, my apologies.

Im trying to track down an issue that occurred between 0.9.19 and
0.9.20, and am using git bisect to track the issue. In the process of
trying to identify the cause of the issue, I would like to be able to
get the code up till a certain patch, and then apply patches one by one
as well.

I have not been able to find out how to do this, despite several web
searches and man pages. Can anyone give me any pointers to this please?

Thanks in advance

Kapila









Re: Help with shader code

2006-09-12 Thread H. Verbeet

That does look wrong. The proper code should probably look like this:

shader_addline(buffer, ADD result.position.x, TMP_OUT.x, PROJECTIONX.w;\n);
shader_addline(buffer, MAD result.position.y, TMP_OUT.y,
PROJECTIONY.y, PROJECTIONY.w;\n);




Re: Help with shader code

2006-09-12 Thread H. Verbeet

On 12/09/06, H. Verbeet [EMAIL PROTECTED] wrote:

That does look wrong. The proper code should probably look like this:

shader_addline(buffer, ADD result.position.x, TMP_OUT.x, PROJECTIONX.w;\n);
shader_addline(buffer, MAD result.position.y, TMP_OUT.y,
PROJECTIONY.y, PROJECTIONY.w;\n);


Actually, that's not completely true... that would do the add after
the multiplication instead of before. It might still be worth it to do
it that way and invert the offset instead though.




Re: Using gdb

2006-09-12 Thread Eric Pouech



I don't end up with a gdb prompt. It is just stuck there.
 


yeah, that's a bug. I'm working on it





Re: ALSA implementation

2006-09-12 Thread Eric Pouech

Tom Spear wrote:

Eric Pouech is the original author, so if he still hangs around here 
he would be your best bet.


for the sake of record, I'm not the alsa driver author (at least not the 
current 0.9x / 1.y)

A+




Re: ALSA implementation

2006-09-12 Thread Eric Pouech

Aaron Slunt wrote:


Hi,

I talked on #winehq in irc about how horribly alsa is implemented 
right now. I was told that winmm would need a complete re-write and 
the dsound needs some changes as well.


the rewrite we're talking about is dealing with putting most of the 
drivers in a single DLL, and abstracting a bit the implementation of the 
interface
but it will not modify the core of the ALSA implementation, nor any 
issues related with current code




My question is: anybody here who's familiar with all of the changes 
that need to be made to get alsa working properly?


if it doesn't work in a satisfactory manner for you, then you should fix it
A+




Re: ALSA implementation

2006-09-12 Thread Jan Zerebecki
On Fri, Sep 08, 2006 at 04:43:18PM -0400, Aaron Slunt wrote:
 I talked on #winehq in irc about how horribly alsa is implemented right 
 now. I was told that winmm would need a complete re-write and the dsound 
 needs some changes as well.

The alsa specific problems should be fixeable without touching
the rest of winmm or dsound. They each have problems, but not
directly related ones. In fact one of those bugs is realy
grave.

See bug #4093 : deadlock in alsa driver: CriticalSection WINEALSA_mmap_crst
http://bugs.winehq.org/show_bug.cgi?id=4093

There is another bug in winealsa that leads to changing the
size of the mmap-buffer (that makes a test in dsound fail) and at
a first go I didn't find the proper function in alsa to set the
buffer size. I didn't look further into this as it's pretty easy
to set a buffer size with alsa dmix. (The buffer size needs to be
a multiple of any sample size we will use, so that we don't need
to change the size to avoid a remainder. Thas is because we can't
have fractions of samples and the buffer is looped over so just
not using part of it does not work either.)

 My question is: anybody here who's familiar with all of the changes that 
 need to be made to get alsa working properly?

To fix bug #4093 we need to replace the currently used signal
callback method (very complex to make signals work properly [in
Wine], thus we should avoid it) with I guess a fd based method
for example with select. The alsa-api documentation about this
looks pretty usable.

There are still frequent other problems with sound (especialy
with dsound), but together with something like
SetThreadPriority I found most sound is quite ok.
http://wiki.winehq.org/SetThreadPriority


Jan





Re: State management in D3D

2006-09-12 Thread Stefan Dösinger
Am Dienstag 12 September 2006 18:13 schrieb H. Verbeet:
 On 12/09/06, Stefan Dösinger [EMAIL PROTECTED] wrote:
  Yeah, but we still can't remove the entry. Or wait, set it to 0 and
  implement state 0 as a nop-apply :-)

 Why wouldn't you be able to remove an entry from a list?
With the array, we can only truly remove a single element by moving all other 
entries by one, reducing the total amount of entries and adjusting all values 
that specify a list index. This is possible, but the amount of work needed is 
growing linearly with the numbers of elements in the list.

However, we can set the to delete value to 0, and if our apply function hits 
the state 0 to apply, it just continues with the next state :-) It is not 
truly removed then, but this works too and is much cheaper.


pgpx4F4SyzWve.pgp
Description: PGP signature



Re: State management in D3D

2006-09-12 Thread H. Verbeet

On 12/09/06, Stefan Dösinger [EMAIL PROTECTED] wrote:

 Why wouldn't you be able to remove an entry from a list?
With the array, we can only truly remove a single element by moving all other
entries by one, reducing the total amount of entries and adjusting all values
that specify a list index. This is possible, but the amount of work needed is
growing linearly with the numbers of elements in the list.

An array is not the same as a list... :-)




Re: Help with git

2006-09-12 Thread Mike McCormack


Matt Finnicum wrote:

What I do is to follow along with things on the shortlog:
http://source.winehq.org/git/?p=wine.git;a=shortlog

Lets say you want to move your current branch to my recent patch
riched20: Rewrite of scrolling and some redrawing code. - you'd
click the link commit to the right of it. In the page that you'll be
taken to, you'll see a line like this:
commitabecd9e393925e008449a80ec14682790b29042c

you can then do a git reset --hard abecd9e393925e008449a80ec14682790b29042c

and your git will be moved to the point in time right after that
commit. If you then want to manually apply a patch, click commitdiff
to the right of it's entry in the shortlog, followed by plain on the
top - this will take you to a plaintext diff of the patch, which you
could save to a file and apply with the patch command. (patch -p1 
thepatch.diff usualy works well for me)


There's easier ways to do the second bit.

1) Use git cherry-pick

   git branch master-20060913
   git reset --hard abecd9e393925e00
   #examine the log for commits
   git log master-20060913..abecd9e39392
   #pull in commits
   git cherry -r 112810a480aaee4d6d8
   git cherry -r aaca30cf039c227e
   #etc

2) Use git format-patch to get all the patches in the tree before
   resetting:

   # put them all in one file named mb
   git format-patch --stdout abecd9e39392  mb

   # or create multiple files
   git format-patch abecd9e393925e008

   Then reset (remember to have a clean tree!)

   git reset --hard abecd9e393925e

   Then edit mb and git am the patches you want:

   git am mb

You don't need the full SHA1 ID... just enough to make it unique in the 
tree.


Mike





wine complation fails with latest git

2006-09-12 Thread EA Durbin

I'm not able to compile wine with the latest source from git.

gcc-3.4 -c -I. -I. -I../../include -I../../include-Wall -pipe 
-fno-strict-aliasing -gstabs+ -Wdeclaration-after-statement -Wwrite-strings 
-Wpointer-arith  -g -O2  -o parser.yy.o parser.yy.c

parser.l: In function `parser_lex':
parser.l:129: error: `parser_lval' undeclared (first use in this function)
parser.l:129: error: (Each undeclared identifier is reported only once
parser.l:129: error: for each function it appears in.)
parser.l: In function `kw_token':
parser.l:342: error: `parser_lval' undeclared (first use in this function)
make[2]: *** [parser.yy.o] Error 1
make[2]: Leaving directory `/home/eric/wine/tools/widl'
make[1]: *** [widl] Error 2
make[1]: Leaving directory `/home/eric/wine/tools'
make: *** [tools] Error 2






Re: wine complation fails with latest git

2006-09-12 Thread Vijay Kiran Kamuju

Please do a make clean in widl directory and do make

On 9/12/06, EA Durbin [EMAIL PROTECTED] wrote:

I'm not able to compile wine with the latest source from git.

gcc-3.4 -c -I. -I. -I../../include -I../../include-Wall -pipe
-fno-strict-aliasing -gstabs+ -Wdeclaration-after-statement -Wwrite-strings
-Wpointer-arith  -g -O2  -o parser.yy.o parser.yy.c
parser.l: In function `parser_lex':
parser.l:129: error: `parser_lval' undeclared (first use in this function)
parser.l:129: error: (Each undeclared identifier is reported only once
parser.l:129: error: for each function it appears in.)
parser.l: In function `kw_token':
parser.l:342: error: `parser_lval' undeclared (first use in this function)
make[2]: *** [parser.yy.o] Error 1
make[2]: Leaving directory `/home/eric/wine/tools/widl'
make[1]: *** [widl] Error 2
make[1]: Leaving directory `/home/eric/wine/tools'
make: *** [tools] Error 2










Re: wine complation fails with latest git

2006-09-12 Thread EA Durbin

I did a make clean in the wine directory and it appears to be working now.


From: Vijay Kiran Kamuju [EMAIL PROTECTED]
To: EA Durbin [EMAIL PROTECTED]
CC: wine-devel@winehq.org
Subject: Re: wine complation fails with latest git
Date: Wed, 13 Sep 2006 00:00:24 -0400

Please do a make clean in widl directory and do make

On 9/12/06, EA Durbin [EMAIL PROTECTED] wrote:

I'm not able to compile wine with the latest source from git.

gcc-3.4 -c -I. -I. -I../../include -I../../include-Wall -pipe
-fno-strict-aliasing -gstabs+ -Wdeclaration-after-statement 
-Wwrite-strings

-Wpointer-arith  -g -O2  -o parser.yy.o parser.yy.c
parser.l: In function `parser_lex':
parser.l:129: error: `parser_lval' undeclared (first use in this function)
parser.l:129: error: (Each undeclared identifier is reported only once
parser.l:129: error: for each function it appears in.)
parser.l: In function `kw_token':
parser.l:342: error: `parser_lval' undeclared (first use in this function)
make[2]: *** [parser.yy.o] Error 1
make[2]: Leaving directory `/home/eric/wine/tools/widl'
make[1]: *** [widl] Error 2
make[1]: Leaving directory `/home/eric/wine/tools'
make: *** [tools] Error 2












question about storage32.c code and while loop

2006-09-12 Thread EA Durbin
I've mentioned this before but I'm no expert C programmer. Can someone 
explain why we do the following in storage32.c?


   if (cbRead  0)
   {
   cbTotalRead += cbRead;

   resWrite = BlockChainStream_WriteAt(bbTempChain,
   offset,
   cbRead,
   buffer,
   cbWritten);

   if (FAILED(resWrite))
   break;

   cbTotalWritten += cbWritten;
   offset.u.LowPart += This-smallBlockSize;
   }
 } while (cbRead  0);
 HeapFree(GetProcessHeap(),0,buffer);

 if (FAILED(resRead) || FAILED(resWrite))
 {
   ERR(conversion failed: resRead = 0x%08lx, resWrite = 0x%08lx\n, 
resRead, resWrite);

   BlockChainStream_Destroy(bbTempChain);
   return NULL;
 }




in the while loop above

while (cbRead  0);

it appears it terminates without doing anything due to the semicolon, is 
this intentional or is this semicolon not supposed to be there and its 
supposed to execute the line below it? If it is intentional why is the empty 
while loop here?







RE: question about storage32.c code and while loop

2006-09-12 Thread EA Durbin


disregard I see the do statement above it.