winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2008
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
734 discussions
Start a n
N
ew thread
Vincent Povirk : rundll32: Build with -mwindows.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: f54a8ab71b5608fc1f2713df791b01d8e81c2a9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f54a8ab71b5608fc1f2713df7…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Oct 30 11:10:34 2008 -0500 rundll32: Build with -mwindows. --- programs/rundll32/Makefile.in | 2 +- programs/rundll32/rundll32.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/programs/rundll32/Makefile.in b/programs/rundll32/Makefile.in index c3a2bce..7bb09b0 100644 --- a/programs/rundll32/Makefile.in +++ b/programs/rundll32/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = rundll32.exe -APPMODE = -mconsole +APPMODE = -mwindows IMPORTS = user32 kernel32 C_SRCS = \ diff --git a/programs/rundll32/rundll32.c b/programs/rundll32/rundll32.c index 9846831..37f831a 100644 --- a/programs/rundll32/rundll32.c +++ b/programs/rundll32/rundll32.c @@ -211,7 +211,7 @@ static LPWSTR GetNextArg(LPWSTR *cmdline) return arg; } -int main(int argc, char* argv[]) +int WINAPI WinMain(HINSTANCE instance, HINSTANCE hOldInstance, LPSTR szCmdArgs, int nCmdShow) { HWND hWnd; LPWSTR szCmdLine; @@ -219,7 +219,7 @@ int main(int argc, char* argv[]) void *entry_point; BOOL unicode, win16; STARTUPINFOW info; - HMODULE hDll, instance; + HMODULE hDll; hWnd=NULL; hDll=NULL; @@ -281,7 +281,6 @@ int main(int argc, char* argv[]) GetStartupInfoW( &info ); if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWDEFAULT; - instance = GetModuleHandleW(NULL); /* Windows always uses that, not hDll */ if (unicode) {
1
0
0
0
Tony Wasserka : d3dx9: Implement ID3DXSprite_Draw.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: edae5d545ee38dd0dfa2a9e2077ae2810ef4e771 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edae5d545ee38dd0dfa2a9e20…
Author: Tony Wasserka <tony.wasserka(a)freenet.de> Date: Wed Nov 5 13:00:35 2008 +0100 d3dx9: Implement ID3DXSprite_Draw. --- dlls/d3dx9_36/d3dx9_36_private.h | 3 +- dlls/d3dx9_36/sprite.c | 73 ++++++++++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h index 6297e89..036d1f5 100644 --- a/dlls/d3dx9_36/d3dx9_36_private.h +++ b/dlls/d3dx9_36/d3dx9_36_private.h @@ -68,7 +68,8 @@ typedef struct ID3DXSpriteImpl DWORD alphacmp_caps; SPRITE *sprites; - int sprite_count; + int sprite_count; /* number of sprites to be drawn */ + int allocated_sprites; /* number of (pre-)allocated sprites */ } ID3DXSpriteImpl; diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c index 0cf3255..61de2d6 100644 --- a/dlls/d3dx9_36/sprite.c +++ b/dlls/d3dx9_36/sprite.c @@ -51,6 +51,14 @@ static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) TRACE("(%p): ReleaseRef to %d\n", This, ref); if(ref==0) { + if(This->sprites) { + int i; + for(i=0;i<This->sprite_count;i++) + if(This->sprites[i].texture) + IDirect3DTexture9_Release(This->sprites[i].texture); + + HeapFree(GetProcessHeap(), 0, This->sprites); + } if(This->stateblock) IDirect3DStateBlock9_Release(This->stateblock); if(This->vdecl) IDirect3DVertexDeclaration9_Release(This->vdecl); if(This->device) IDirect3DDevice9_Release(This->device); @@ -105,14 +113,71 @@ static HRESULT WINAPI ID3DXSpriteImpl_Draw(LPD3DXSPRITE iface, LPDIRECT3DTEXTURE CONST D3DXVECTOR3 *position, D3DCOLOR color) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - FIXME("(%p): stub\n", This); - return E_NOTIMPL; + D3DSURFACE_DESC texdesc; + TRACE("(%p): relay\n", This); + + if(texture==NULL) return D3DERR_INVALIDCALL; + + if(This->allocated_sprites==0) { + This->sprites=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 32*sizeof(SPRITE)); + This->allocated_sprites=32; + } else if(This->allocated_sprites<=This->sprite_count) { + This->allocated_sprites=This->allocated_sprites*3/2; + This->sprites=HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->sprites, This->allocated_sprites*sizeof(SPRITE)); + } + This->sprites[This->sprite_count].texture=texture; + IUnknown_AddRef(texture); + + /* Reuse the texture desc if possible */ + if(This->sprite_count) { + if(This->sprites[This->sprite_count-1].texture!=texture) { + IDirect3DTexture9_GetLevelDesc(texture, 0, &texdesc); + } else { + texdesc.Width=This->sprites[This->sprite_count-1].texw; + texdesc.Height=This->sprites[This->sprite_count-1].texh; + } + } else IDirect3DTexture9_GetLevelDesc(texture, 0, &texdesc); + + This->sprites[This->sprite_count].texw=texdesc.Width; + This->sprites[This->sprite_count].texh=texdesc.Height; + + if(rect==NULL) { + This->sprites[This->sprite_count].rect.left=0; + This->sprites[This->sprite_count].rect.top=0; + This->sprites[This->sprite_count].rect.right=texdesc.Width; + This->sprites[This->sprite_count].rect.bottom=texdesc.Height; + } else This->sprites[This->sprite_count].rect=*rect; + + if(center==NULL) { + This->sprites[This->sprite_count].center.x=0.0f; + This->sprites[This->sprite_count].center.y=0.0f; + This->sprites[This->sprite_count].center.z=0.0f; + } else This->sprites[This->sprite_count].center=*center; + + if(position==NULL) { + This->sprites[This->sprite_count].pos.x=0.0f; + This->sprites[This->sprite_count].pos.y=0.0f; + This->sprites[This->sprite_count].pos.z=0.0f; + } else This->sprites[This->sprite_count].pos=*position; + + This->sprites[This->sprite_count].color=color; + This->sprite_count++; + + return D3D_OK; } static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + int i; FIXME("(%p): stub\n", This); + + for(i=0;i<This->sprite_count;i++) + if(This->sprites[i].texture) + IDirect3DTexture9_Release(This->sprites[i].texture); + + This->sprite_count=0; + return E_NOTIMPL; } @@ -120,6 +185,9 @@ static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface) { ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; FIXME("(%p): stub\n", This); + + ID3DXSprite_Flush(iface); + return E_NOTIMPL; } @@ -198,6 +266,7 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) object->sprites=NULL; object->sprite_count=0; + object->allocated_sprites=0; *sprite=(ID3DXSprite*)object;
1
0
0
0
Tony Wasserka : d3dx9: Implement D3DXCreateSprite.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: d0fd93ef92aa17c5629c30cecd3393e8d3224f73 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0fd93ef92aa17c5629c30cec…
Author: Tony Wasserka <tony.wasserka(a)freenet.de> Date: Wed Nov 5 12:32:47 2008 +0100 d3dx9: Implement D3DXCreateSprite. --- dlls/d3dx9_36/d3dx9_36_private.h | 26 ++++++++++++++++++++++++++ dlls/d3dx9_36/sprite.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h index e1c266d..6297e89 100644 --- a/dlls/d3dx9_36/d3dx9_36_private.h +++ b/dlls/d3dx9_36/d3dx9_36_private.h @@ -27,6 +27,7 @@ #include "d3dx9.h" +/* ID3DXFont */ typedef struct ID3DXFontImpl { /* IUnknown fields */ @@ -36,6 +37,17 @@ typedef struct ID3DXFontImpl /* ID3DXFont fields */ } ID3DXFontImpl; + +/*ID3DXSprite */ +typedef struct _SPRITE { + LPDIRECT3DTEXTURE9 texture; + UINT texw, texh; + RECT rect; + D3DXVECTOR3 center; + D3DXVECTOR3 pos; + D3DCOLOR color; +} SPRITE; + typedef struct ID3DXSpriteImpl { /* IUnknown fields */ @@ -43,6 +55,20 @@ typedef struct ID3DXSpriteImpl LONG ref; /* ID3DXSprite fields */ + IDirect3DDevice9 *device; + IDirect3DVertexDeclaration9 *vdecl; + IDirect3DStateBlock9 *stateblock; + D3DXMATRIX transform; + D3DXMATRIX view; + DWORD flags; + + /* Store the relevant caps to prevent multiple GetDeviceCaps calls */ + DWORD texfilter_caps; + DWORD maxanisotropy; + DWORD alphacmp_caps; + + SPRITE *sprites; + int sprite_count; } ID3DXSpriteImpl; diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c index db97761..0cf3255 100644 --- a/dlls/d3dx9_36/sprite.c +++ b/dlls/d3dx9_36/sprite.c @@ -51,6 +51,9 @@ static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) TRACE("(%p): ReleaseRef to %d\n", This, ref); if(ref==0) { + if(This->stateblock) IDirect3DStateBlock9_Release(This->stateblock); + if(This->vdecl) IDirect3DVertexDeclaration9_Release(This->vdecl); + if(This->device) IDirect3DDevice9_Release(This->device); HeapFree(GetProcessHeap(), 0, This); } return ref; @@ -157,8 +160,16 @@ static const ID3DXSpriteVtbl D3DXSprite_Vtbl = HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) { ID3DXSpriteImpl *object; + D3DCAPS9 caps; + static const D3DVERTEXELEMENT9 elements[] = + { + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, + { 0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0 }, + { 0, 16, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }, + D3DDECL_END() + }; - FIXME("stub\n"); + TRACE("(void): relay\n"); if(device==NULL || sprite==NULL) return D3DERR_INVALIDCALL; @@ -169,6 +180,24 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) } object->lpVtbl=&D3DXSprite_Vtbl; object->ref=1; + object->device=device; + IUnknown_AddRef(device); + + IDirect3DDevice9_CreateVertexDeclaration(object->device, elements, &object->vdecl); + object->stateblock=NULL; + + D3DXMatrixIdentity(&object->transform); + D3DXMatrixIdentity(&object->view); + + object->flags=0; + + IDirect3DDevice9_GetDeviceCaps(device, &caps); + object->texfilter_caps=caps.TextureFilterCaps; + object->maxanisotropy=caps.MaxAnisotropy; + object->alphacmp_caps=caps.AlphaCmpCaps; + + object->sprites=NULL; + object->sprite_count=0; *sprite=(ID3DXSprite*)object;
1
0
0
0
Nicolas Le Cam : cryptui/tests: Fix test failures on Win2k and below.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 5ddcedff189ae48becc46941cfc7927310f86fdf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ddcedff189ae48becc46941c…
Author: Nicolas Le Cam <niko.lecam(a)gmail.com> Date: Fri Nov 7 00:39:36 2008 +0100 cryptui/tests: Fix test failures on Win2k and below. --- dlls/cryptui/tests/cryptui.c | 47 +++++++++++++++++++++-------------------- 1 files changed, 24 insertions(+), 23 deletions(-) diff --git a/dlls/cryptui/tests/cryptui.c b/dlls/cryptui/tests/cryptui.c index c96bcb5..6665c0c 100644 --- a/dlls/cryptui/tests/cryptui.c +++ b/dlls/cryptui/tests/cryptui.c @@ -295,8 +295,7 @@ static BOOL (WINAPI *pCryptUIWizImport)(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardTitle, PCCRYPTUI_WIZ_IMPORT_SRC_INFO pImportSrc, HCERTSTORE hDestCertStore); -static void find_and_delete_cert_in_store(HCERTSTORE store, LPCSTR storeName, - PCCERT_CONTEXT cert, LPCSTR certName, BOOL todo) +static BOOL find_and_delete_cert_in_store(HCERTSTORE store, PCCERT_CONTEXT cert) { CERT_ID id; PCCERT_CONTEXT found; @@ -308,17 +307,13 @@ static void find_and_delete_cert_in_store(HCERTSTORE store, LPCSTR storeName, &cert->pCertInfo->SerialNumber, sizeof(CRYPT_INTEGER_BLOB)); found = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_CERT_ID, &id, NULL); - if (todo) - todo_wine ok(found != NULL, "expected to find %s in %s store\n", - certName, storeName); - else - ok(found != NULL, "expected to find %s in %s store\n", certName, - storeName); - if (found) - { - CertDeleteCertificateFromStore(found); - CertFreeCertificateContext(found); - } + if (!found) + return FALSE; + + CertDeleteCertificateFromStore(found); + CertFreeCertificateContext(found); + + return TRUE; } static void test_crypt_ui_wiz_import(void) @@ -382,8 +377,8 @@ static void test_crypt_ui_wiz_import(void) if (ca) { - find_and_delete_cert_in_store(ca, "CA", - info.u.pCertContext, "v1CertWithValidPubKey", FALSE); + ret = find_and_delete_cert_in_store(ca, info.u.pCertContext); + ok(ret, "expected to find v1CertWithValidPubKey in CA store\n"); CertCloseStore(ca, 0); } } @@ -405,8 +400,11 @@ static void test_crypt_ui_wiz_import(void) if (addressBook) { - find_and_delete_cert_in_store(addressBook, "AddressBook", - info.u.pCertContext, "iTunesCert3", FALSE); + ret = find_and_delete_cert_in_store(addressBook, + info.u.pCertContext); + ok(ret || + broken(!ret), /* Windows 2000 and earlier */ + "expected to find iTunesCert3 in AddressBook store\n"); CertCloseStore(addressBook, 0); } } @@ -436,8 +434,8 @@ static void test_crypt_ui_wiz_import(void) ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, NULL, &info, store); ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - find_and_delete_cert_in_store(store, "memory", info.u.pCertContext, - "iTunesCert3", FALSE); + ret = find_and_delete_cert_in_store(store, info.u.pCertContext); + ok(ret, "expected to find iTunesCert3 in memory store\n"); CertFreeCertificateContext(info.u.pCertContext); CertCloseStore(store, 0); @@ -454,8 +452,11 @@ static void test_crypt_ui_wiz_import(void) if (addressBook) { - find_and_delete_cert_in_store(addressBook, "AddressBook", - info.u.pCertContext, "iTunesCert1", FALSE); + ret = find_and_delete_cert_in_store(addressBook, + info.u.pCertContext); + ok(ret || + broken(!ret), /* Windows 2000 and earlier */ + "expected to find iTunesCert1 in AddressBook store\n"); CertCloseStore(addressBook, 0); } } @@ -473,8 +474,8 @@ static void test_crypt_ui_wiz_import(void) if (ca) { - find_and_delete_cert_in_store(ca, "CA", - info.u.pCertContext, "iTunesCert2", FALSE); + ret = find_and_delete_cert_in_store(ca, info.u.pCertContext); + ok(ret, "expected to find iTunesCert2 in CA store\n"); CertCloseStore(ca, 0); } }
1
0
0
0
Nicolas Le Cam : advapi32/tests: Run a test on more platforms.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: ae0bddeb856d5d731d7cea528c3bfd6a1284785a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae0bddeb856d5d731d7cea528…
Author: Nicolas Le Cam <niko.lecam(a)gmail.com> Date: Thu Nov 6 16:26:26 2008 +0100 advapi32/tests: Run a test on more platforms. --- dlls/advapi32/tests/crypt.c | 52 +++++++++++++++++++++++++----------------- 1 files changed, 31 insertions(+), 21 deletions(-) diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 75cd422..44d0896 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -560,7 +560,7 @@ static void test_enum_providers(void) LocalFree(provider); } -static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTypeName, +static BOOL FindProvTypesRegVals(DWORD *pdwIndex, DWORD *pdwProvType, LPSTR *pszTypeName, DWORD *pcbTypeName, DWORD *pdwTypeCount) { HKEY hKey; @@ -581,33 +581,43 @@ static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTy if (!(szName = LocalAlloc(LMEM_ZEROINIT, cbName))) goto cleanup; - if (RegEnumKeyEx(hKey, dwIndex, szName, &cbName, NULL, NULL, NULL, NULL)) - goto cleanup; - cbName++; - ch = szName + strlen(szName); - /* Convert "Type 000" to 0, etc/ */ - *pdwProvType = *(--ch) - '0'; - *pdwProvType += (*(--ch) - '0') * 10; - *pdwProvType += (*(--ch) - '0') * 100; + while (!RegEnumKeyEx(hKey, *pdwIndex, szName, &cbName, NULL, NULL, NULL, NULL)) + { + cbName++; + ch = szName + strlen(szName); + /* Convert "Type 000" to 0, etc/ */ + *pdwProvType = *(--ch) - '0'; + *pdwProvType += (*(--ch) - '0') * 10; + *pdwProvType += (*(--ch) - '0') * 100; - if (RegOpenKey(hKey, szName, &hSubKey)) - goto cleanup; + if (RegOpenKey(hKey, szName, &hSubKey)) + break; - if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName)) - goto cleanup; + if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName)) + { + if (!(*pszTypeName = LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))) + break; - if (!(*pszTypeName = LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))) - goto cleanup; + if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) + { + ret = TRUE; + break; + } - if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) - ret = TRUE; + LocalFree(*pszTypeName); + } + + RegCloseKey(hSubKey); + + (*pdwIndex)++; + } -cleanup: if (!ret) LocalFree(*pszTypeName); + RegCloseKey(hSubKey); LocalFree(szName); - RegCloseKey(hSubKey); +cleanup: RegCloseKey(hKey); return ret; @@ -616,7 +626,7 @@ cleanup: static void test_enum_provider_types(void) { /* expected values */ - DWORD dwProvType; + DWORD dwProvType = 0; LPSTR pszTypeName = NULL; DWORD cbTypeName; DWORD dwTypeCount; @@ -637,7 +647,7 @@ static void test_enum_provider_types(void) return; } - if (!FindProvTypesRegVals(index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount)) + if (!FindProvTypesRegVals(&index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount)) { skip("Could not find provider types in registry\n"); return;
1
0
0
0
Nicolas Le Cam : advapi32/tests: test_enum_provider_types test cleanup.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: f714cf4bd1333c44ada8380add4a9a149e84d292 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f714cf4bd1333c44ada8380ad…
Author: Nicolas Le Cam <niko.lecam(a)gmail.com> Date: Thu Nov 6 23:15:33 2008 +0100 advapi32/tests: test_enum_provider_types test cleanup. --- dlls/advapi32/tests/crypt.c | 135 +++++++++++++++++++++++-------------------- 1 files changed, 73 insertions(+), 62 deletions(-) diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 09a23fc..75cd422 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -566,43 +566,51 @@ static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTy HKEY hKey; HKEY hSubKey; PSTR ch; - + LPSTR szName; + DWORD cbName; + BOOL ret = FALSE; + if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey)) return FALSE; - - if (RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwTypeCount, pcbTypeName, NULL, + + if (RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwTypeCount, &cbName, NULL, NULL, NULL, NULL, NULL, NULL)) - return FALSE; - (*pcbTypeName)++; - - if (!(*pszTypeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbTypeName)))) - return FALSE; - - if (RegEnumKeyEx(hKey, dwIndex, *pszTypeName, pcbTypeName, NULL, NULL, NULL, NULL)) - return FALSE; - (*pcbTypeName)++; - ch = *pszTypeName + strlen(*pszTypeName); + goto cleanup; + cbName++; + + if (!(szName = LocalAlloc(LMEM_ZEROINIT, cbName))) + goto cleanup; + + if (RegEnumKeyEx(hKey, dwIndex, szName, &cbName, NULL, NULL, NULL, NULL)) + goto cleanup; + cbName++; + ch = szName + strlen(szName); /* Convert "Type 000" to 0, etc/ */ *pdwProvType = *(--ch) - '0'; *pdwProvType += (*(--ch) - '0') * 10; *pdwProvType += (*(--ch) - '0') * 100; - - if (RegOpenKey(hKey, *pszTypeName, &hSubKey)) - return FALSE; - + + if (RegOpenKey(hKey, szName, &hSubKey)) + goto cleanup; + if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName)) - return FALSE; + goto cleanup; + + if (!(*pszTypeName = LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))) + goto cleanup; + + if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) + ret = TRUE; + +cleanup: + if (!ret) + LocalFree(*pszTypeName); + LocalFree(szName); - if (!(*pszTypeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbTypeName)))) - return FALSE; - - if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) - return FALSE; - RegCloseKey(hSubKey); RegCloseKey(hKey); - - return TRUE; + + return ret; } static void test_enum_provider_types(void) @@ -612,7 +620,7 @@ static void test_enum_provider_types(void) LPSTR pszTypeName = NULL; DWORD cbTypeName; DWORD dwTypeCount; - + /* actual values */ DWORD index = 0; DWORD provType; @@ -622,45 +630,47 @@ static void test_enum_provider_types(void) DWORD result; DWORD notNull = 5; DWORD notZeroFlags = 5; - + if(!pCryptEnumProviderTypesA) { - skip("CryptEnumProviderTypesA is not available\n"); - return; + skip("CryptEnumProviderTypesA is not available\n"); + return; } - + if (!FindProvTypesRegVals(index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount)) { - skip("Could not find provider types in registry\n"); - return; + skip("Could not find provider types in registry\n"); + return; } - + /* check pdwReserved for NULL */ result = pCryptEnumProviderTypesA(index, ¬Null, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", - ERROR_INVALID_PARAMETER, GetLastError()); - + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", + GetLastError()); + /* check dwFlags == zero */ result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %i, got %d\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - /* alloc provider type to half the size required - * cbTypeName holds the size required */ - typeNameSize = cbTypeName / 2; - if (!(typeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, typeNameSize)))) - return; + ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %d\n", + GetLastError()); /* This test fails under Win2k SP4: - result = TRUE, GetLastError() == 0xdeadbeef - SetLastError(0xdeadbeef); - result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%08lx\n", - result, GetLastError()); - */ - - LocalFree(typeName); - + * result = TRUE, GetLastError() == 0xdeadbeef */ + if (0) + { + /* alloc provider type to half the size required + * cbTypeName holds the size required */ + typeNameSize = cbTypeName / 2; + if (!(typeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, typeNameSize)))) + goto cleanup; + + SetLastError(0xdeadbeef); + result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); + ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%d\n", + result, GetLastError()); + + LocalFree(typeName); + } + /* loop through the provider types to get the number of provider types * after loop ends, count should be dwTypeCount + 1 so subtract 1 * to get actual number of provider types */ @@ -669,30 +679,31 @@ static void test_enum_provider_types(void) ; typeCount--; ok(typeCount==dwTypeCount, "expected %d, got %d\n", dwTypeCount, typeCount); - + /* loop past the actual number of provider types to get the error * ERROR_NO_MORE_ITEMS */ for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++) result = pCryptEnumProviderTypesA(typeCount, NULL, 0, &provType, NULL, &typeNameSize); - ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %d\n", - ERROR_NO_MORE_ITEMS, GetLastError()); - + ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", + GetLastError()); /* check expected versus actual values returned */ result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, NULL, &typeNameSize); ok(result && typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); if (!(typeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, typeNameSize)))) - return; - + goto cleanup; + typeNameSize = 0xdeadbeef; result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); ok(result, "expected TRUE, got %d\n", result); ok(provType==dwProvType, "expected %d, got %d\n", dwProvType, provType); if (pszTypeName) - ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName); + ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName); ok(typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); - + LocalFree(typeName); +cleanup: + LocalFree(pszTypeName); } static BOOL FindDfltProvRegVals(DWORD dwProvType, DWORD dwFlags, LPSTR *pszProvName, DWORD *pcbProvName)
1
0
0
0
Sergey Khodych : comctl32/tests: Fix typo in toolbar todo test.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 30a6f54dc902a01cc57bc490a7ff3bd3f9dff903 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30a6f54dc902a01cc57bc490a…
Author: Sergey Khodych <khodych(a)gmail.com> Date: Thu Nov 6 23:37:06 2008 +0200 comctl32/tests: Fix typo in toolbar todo test. --- dlls/comctl32/tests/toolbar.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 04eecfb..328ee2f 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -721,8 +721,8 @@ static tbsize_result_t tbsize_results[] = { {0, 0, 672, 100}, {239, 102}, 3, { { 0, 2, 100, 102}, {100, 2, 139, 102}, {139, 2, 239, 102}, }, }, - { {0, 0, 672, 42}, {183, 40}, 3, { - { 0, 2, 75, 40}, {75, 2, 118, 40}, {118, 2, 183, 40}, + { {0, 0, 672, 42}, {185, 40}, 3, { + { 0, 2, 75, 40}, {75, 2, 118, 40}, {118, 2, 185, 40}, }, }, { {0, 0, 672, 42}, {67, 40}, 1, { { 0, 2, 67, 40},
1
0
0
0
Alexandre Julliard : loader: Use a hidden function instead of an exported global variable to setup pthread functions .
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 17ab5875673c4fe50a8e9390733b41af1826d63c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17ab5875673c4fe50a8e93907…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 7 11:11:21 2008 +0100 loader: Use a hidden function instead of an exported global variable to setup pthread functions. --- loader/kthread.c | 6 +++++- loader/main.c | 2 +- loader/main.h | 6 +++++- loader/pthread.c | 7 ++++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/loader/kthread.c b/loader/kthread.c index acfa10f..c791ef6 100644 --- a/loader/kthread.c +++ b/loader/kthread.c @@ -324,7 +324,7 @@ static void DECLSPEC_NORETURN abort_thread( long status ) /*********************************************************************** * pthread_functions */ -const struct wine_pthread_functions pthread_functions = +static const struct wine_pthread_functions pthread_functions = { init_process, init_thread, @@ -336,6 +336,10 @@ const struct wine_pthread_functions pthread_functions = sigprocmask }; +void init_pthread_functions(void) +{ + wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) ); +} /* Currently this probably works only for glibc2, * which checks for the presence of double-underscore-prepended diff --git a/loader/main.c b/loader/main.c index 289eb68..314398d 100644 --- a/loader/main.c +++ b/loader/main.c @@ -106,7 +106,7 @@ int main( int argc, char *argv[] ) reserve_area( wine_main_preload_info[i].addr, wine_main_preload_info[i].size ); } - wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) ); + init_pthread_functions(); wine_init( argc, argv, error, sizeof(error) ); fprintf( stderr, "wine: failed to initialize: %s\n", error ); exit(1); diff --git a/loader/main.h b/loader/main.h index 8284477..0c6fc84 100644 --- a/loader/main.h +++ b/loader/main.h @@ -30,6 +30,10 @@ struct wine_preload_info size_t size; }; -extern const struct wine_pthread_functions pthread_functions; +#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) +extern void init_pthread_functions(void) __attribute__((visibility ("hidden"))); +#else +extern void init_pthread_functions(void); +#endif #endif /* __WINE_LOADER_MAIN_H */ diff --git a/loader/pthread.c b/loader/pthread.c index dd1a3ba..4951d97 100644 --- a/loader/pthread.c +++ b/loader/pthread.c @@ -246,7 +246,7 @@ static int pthread_sigmask( int how, const sigset_t *newset, sigset_t *oldset ) /*********************************************************************** * pthread_functions */ -const struct wine_pthread_functions pthread_functions = +static const struct wine_pthread_functions pthread_functions = { init_process, init_thread, @@ -257,3 +257,8 @@ const struct wine_pthread_functions pthread_functions = abort_thread, pthread_sigmask }; + +void init_pthread_functions(void) +{ + wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) ); +}
1
0
0
0
Alexandre Julliard : loader: Reserve some space for the virtual heap too.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 912e4d4def2ca98d3ff50c355430ff11e1a71abf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=912e4d4def2ca98d3ff50c355…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 7 11:05:38 2008 +0100 loader: Reserve some space for the virtual heap too. --- loader/main.c | 4 ++-- loader/preloader.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/main.c b/loader/main.c index 0a1afbb..289eb68 100644 --- a/loader/main.c +++ b/loader/main.c @@ -33,8 +33,8 @@ #ifdef __APPLE__ asm(".zerofill WINE_DOS, WINE_DOS, ___wine_dos, 0x60000000"); -asm(".zerofill WINE_SHARED_HEAP, WINE_SHARED_HEAP, ___wine_shared_heap, 0x02000000"); -extern char __wine_dos[0x60000000], __wine_shared_heap[0x02000000]; +asm(".zerofill WINE_SHARED_HEAP, WINE_SHARED_HEAP, ___wine_shared_heap, 0x03000000"); +extern char __wine_dos[0x60000000], __wine_shared_heap[0x03000000]; static const struct wine_preload_info wine_main_preload_info[] = { diff --git a/loader/preloader.c b/loader/preloader.c index 109ad3f..5fcb974 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -111,7 +111,7 @@ static struct wine_preload_info preload_info[] = { (void *)0x00000000, 0x00010000 }, /* low 64k */ { (void *)0x00010000, 0x00100000 }, /* DOS area */ { (void *)0x00110000, 0x5fef0000 }, /* low memory area */ - { (void *)0x7f000000, 0x02000000 }, /* top-down allocations + shared heap */ + { (void *)0x7f000000, 0x03000000 }, /* top-down allocations + shared heap + virtual heap */ { 0, 0 }, /* PE exe range set with WINEPRELOADRESERVE */ { 0, 0 } /* end of list */ };
1
0
0
0
Alexandre Julliard : ntdll: Store correct values in the various limits on all platforms instead of using 0 .
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 66a39678e997b35f70ab3470de801f6fa14e4ad0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66a39678e997b35f70ab3470d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 7 11:04:07 2008 +0100 ntdll: Store correct values in the various limits on all platforms instead of using 0. --- dlls/ntdll/virtual.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 1eb84b8..21da9af 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -125,9 +125,9 @@ static void *working_set_limit = (void *)0x7fff0000; /* top of the current wo static UINT page_shift; static UINT page_size; static UINT_PTR page_mask; -static void * const address_space_limit = 0; /* no limit needed on other platforms */ -static void * const user_space_limit = 0; /* no limit needed on other platforms */ -static void * const working_set_limit = 0; /* no limit needed on other platforms */ +static void *address_space_limit; +static void *user_space_limit; +static void *working_set_limit; #endif /* __i386__ */ #define ROUND_ADDR(addr,mask) \ @@ -371,7 +371,7 @@ static void add_reserved_area( void *addr, size_t size ) */ static inline int is_beyond_limit( const void *addr, size_t size, const void *limit ) { - return (limit && (addr >= limit || (const char *)addr + size > (const char *)limit)); + return (addr >= limit || (const char *)addr + size > (const char *)limit); } @@ -623,6 +623,7 @@ struct alloc_area size_t size; size_t mask; int top_down; + void *limit; void *result; }; @@ -638,7 +639,7 @@ static int alloc_reserved_area_callback( void *start, size_t size, void *arg ) void *end = (char *)start + size; if (start < address_space_start) start = address_space_start; - if (user_space_limit && end > user_space_limit) end = user_space_limit; + if (is_beyond_limit( start, size, alloc->limit )) end = alloc->limit; if (start >= end) return 0; /* make sure we don't touch the preloader reserved range */ @@ -722,6 +723,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size, alloc.size = size; alloc.mask = mask; alloc.top_down = top_down; + alloc.limit = user_space_limit; if (wine_mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down )) { ptr = alloc.result; @@ -1209,7 +1211,7 @@ static int alloc_virtual_heap( void *base, size_t size, void *arg ) { void **heap_base = arg; - if (address_space_limit) address_space_limit = max( (char *)address_space_limit, (char *)base + size ); + if (is_beyond_limit( base, size, address_space_limit )) address_space_limit = (char *)base + size; if (size < VIRTUAL_HEAP_SIZE) return 0; *heap_base = wine_anon_mmap( (char *)base + size - VIRTUAL_HEAP_SIZE, VIRTUAL_HEAP_SIZE, PROT_READ|PROT_WRITE, MAP_FIXED ); @@ -1232,6 +1234,7 @@ void virtual_init(void) assert( !(page_size & page_mask) ); page_shift = 0; while ((1 << page_shift) != page_size) page_shift++; + user_space_limit = working_set_limit = address_space_limit = (void *)~page_mask; #endif /* page_mask */ if ((preload = getenv("WINEPRELOADRESERVE"))) {
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200