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
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
October 2010
----- 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
1174 discussions
Start a n
N
ew thread
Alexandre Julliard : winebuild: Add more checks to protect against corrupted resource files.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: stable Commit: 4c039666093f38c48a0774fea53d63a4d7ffdc62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c039666093f38c48a0774fea…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 20 16:04:51 2010 +0200 winebuild: Add more checks to protect against corrupted resource files. (cherry picked from commit 58dddbed234a45e6888cd35d4104ee72948e11e7) --- tools/winebuild/res32.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c index 6320a2e..28b950c 100644 --- a/tools/winebuild/res32.c +++ b/tools/winebuild/res32.c @@ -220,8 +220,12 @@ static void load_next_resource( DLLSPEC *spec ) res->data_size = get_dword(); hdr_size = get_dword(); if (hdr_size & 3) fatal_error( "%s header size not aligned\n", input_buffer_filename ); + if (hdr_size < 32) fatal_error( "%s invalid header size %u\n", input_buffer_filename, hdr_size ); res->data = input_buffer + input_buffer_pos - 2*sizeof(unsigned int) + hdr_size; + if ((const unsigned char *)res->data < input_buffer || + (const unsigned char *)res->data >= input_buffer + input_buffer_size) + fatal_error( "%s invalid header size %u\n", input_buffer_filename, hdr_size ); get_string( &res->type ); get_string( &res->name ); if (input_buffer_pos & 2) get_word(); /* align to dword boundary */
1
0
0
0
Alexandre Julliard : comctl32: Fix positioning of toolbars that have the WS_BORDER style.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: stable Commit: 985770e0ac9c53a8a08050bdfd231733496f084f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=985770e0ac9c53a8a08050bdf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 20 14:29:24 2010 +0200 comctl32: Fix positioning of toolbars that have the WS_BORDER style. (cherry picked from commit af6fb4712fd841f17583f1fb32a50089d70f9820) --- dlls/comctl32/toolbar.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index fe782c3..9b41732 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3028,7 +3028,7 @@ TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr) if (!(infoPtr->dwStyle & CCS_NORESIZE)) { RECT window_rect; - UINT uPosFlags = SWP_NOZORDER; + UINT uPosFlags = SWP_NOZORDER | SWP_NOACTIVATE; if ((infoPtr->dwStyle & CCS_BOTTOM) == CCS_NOMOVEY) { @@ -3050,9 +3050,8 @@ TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr) if (infoPtr->dwStyle & WS_BORDER) { - x = y = 1; /* FIXME: this looks wrong */ - cy += GetSystemMetrics(SM_CYEDGE); - cx += GetSystemMetrics(SM_CXEDGE); + cy += 2 * GetSystemMetrics(SM_CXBORDER); + cx += 2 * GetSystemMetrics(SM_CYBORDER); } SetWindowPos(infoPtr->hwndSelf, NULL, x, y, cx, cy, uPosFlags); @@ -4842,7 +4841,7 @@ TOOLBAR_SetRows (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPRECT lprc) SetWindowPos(infoPtr->hwndSelf, NULL, 0, 0, infoPtr->rcBound.right - infoPtr->rcBound.left, infoPtr->rcBound.bottom - infoPtr->rcBound.top, - SWP_NOMOVE); + SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); } /* repaint toolbar */ @@ -6007,7 +6006,7 @@ TOOLBAR_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam) GetWindowRect (hwnd, &rcWindow); OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top); if( dwStyle & WS_BORDER ) - OffsetRect (&rcWindow, 1, 1); + InflateRect (&rcWindow, -1, -1); DrawEdge (hdc, &rcWindow, EDGE_ETCHED, BF_TOP); }
1
0
0
0
Owen Rudge : fusion: Install assemblies into correct directory for architecture.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: stable Commit: 64f421f4458f95410538047e6019dcd751bf78a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64f421f4458f95410538047e6…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Mon Jul 19 19:33:19 2010 +0100 fusion: Install assemblies into correct directory for architecture. (cherry picked from commit c6d34d7b05aec8dae05c2db7093af43cd085a3c5) --- dlls/fusion/asmcache.c | 27 ++++++++++++++++++++++----- dlls/fusion/assembly.c | 14 ++++++++++++++ dlls/fusion/fusionpriv.h | 1 + 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/dlls/fusion/asmcache.c b/dlls/fusion/asmcache.c index f35de7f..7334e5d 100644 --- a/dlls/fusion/asmcache.c +++ b/dlls/fusion/asmcache.c @@ -91,15 +91,32 @@ static BOOL create_full_path(LPCWSTR path) return ret; } -static BOOL get_assembly_directory(LPWSTR dir, DWORD size) +static BOOL get_assembly_directory(LPWSTR dir, DWORD size, BYTE architecture) { - static const WCHAR gac[] = - {'\\','a','s','s','e','m','b','l','y','\\','G','A','C','_','M','S','I','L',0}; + static const WCHAR gac[] = {'\\','a','s','s','e','m','b','l','y','\\','G','A','C',0}; - FIXME("Ignoring assembly architecture\n"); + static const WCHAR msil[] = {'_','M','S','I','L',0}; + static const WCHAR x86[] = {'_','3','2',0}; + static const WCHAR amd64[] = {'_','6','4',0}; GetWindowsDirectoryW(dir, size); strcatW(dir, gac); + + switch (architecture) + { + case peMSIL: + strcatW(dir, msil); + break; + + case peI386: + strcatW(dir, x86); + break; + + case peAMD64: + strcatW(dir, amd64); + break; + } + return TRUE; } @@ -291,7 +308,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, if (FAILED(hr)) goto done; - get_assembly_directory(asmdir, MAX_PATH); + get_assembly_directory(asmdir, MAX_PATH, assembly_get_architecture(assembly)); sprintfW(path, format, asmdir, name, version, token); diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index bc187ac..328b279 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -811,6 +811,20 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) return S_OK; } +BYTE assembly_get_architecture(ASSEMBLY *assembly) +{ + if ((assembly->corhdr->MajorRuntimeVersion == 2) && (assembly->corhdr->MinorRuntimeVersion == 0)) + return 0; /* .NET 1.x assembly */ + + if (assembly->nthdr->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) + return peAMD64; /* AMD64/IA64 assembly */ + + if ((assembly->corhdr->Flags & COMIMAGE_FLAGS_ILONLY) && !(assembly->corhdr->Flags & COMIMAGE_FLAGS_32BITREQUIRED)) + return peMSIL; /* MSIL assembly */ + + return peI386; /* x86 assembly */ +} + static BYTE *assembly_get_blob(ASSEMBLY *assembly, WORD index, ULONG *size) { return GetData(&assembly->blobs[index], size); diff --git a/dlls/fusion/fusionpriv.h b/dlls/fusion/fusionpriv.h index 4b9bd57..6f4b28d 100644 --- a/dlls/fusion/fusionpriv.h +++ b/dlls/fusion/fusionpriv.h @@ -433,6 +433,7 @@ HRESULT assembly_release(ASSEMBLY *assembly); HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name); HRESULT assembly_get_path(ASSEMBLY *assembly, LPWSTR *path); HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version); +BYTE assembly_get_architecture(ASSEMBLY *assembly); HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token); static inline LPWSTR strdupW(LPCWSTR src)
1
0
0
0
Austin English : Remove references to wineprefixcreate.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: stable Commit: 6f2893ed77a52004ae947c472a3e4031d4bfbfdc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f2893ed77a52004ae947c472…
Author: Austin English <austinenglish(a)gmail.com> Date: Mon Jul 19 18:38:04 2010 -0500 Remove references to wineprefixcreate. (cherry picked from commit 82868174bcf2460d3692bad3b48050a82018cabd) --- dlls/dinput8/dinput8_main.c | 2 +- dlls/hlink/tests/hlink.c | 2 +- programs/winecfg/drivedetect.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dinput8/dinput8_main.c b/dlls/dinput8/dinput8_main.c index 87dd07b..9d426fb 100644 --- a/dlls/dinput8/dinput8_main.c +++ b/dlls/dinput8/dinput8_main.c @@ -66,7 +66,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVer hr = CoCreateInstance( &CLSID_DirectInput8, punkOuter, CLSCTX_INPROC_SERVER, riid, ppDI); if(FAILED(hr)) { - ERR("CoCreateInstance failed with hr = %d; Try running wineprefixcreate to fix it.\n", hr); + ERR("CoCreateInstance failed with hr = %d\n", hr); return DIERR_INVALIDPARAM; } diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c index cf031f5..3db2e81 100644 --- a/dlls/hlink/tests/hlink.c +++ b/dlls/hlink/tests/hlink.c @@ -439,7 +439,7 @@ static void test_persist(void) 0, NULL, &IID_IHlink, (LPVOID*) &lnk); ok(hr == S_OK, "IHlinkCreateFromString failed with error 0x%08x\n", hr); if (!lnk) { - skip("Can't create lnk, skipping test_persist. Was wineprefixcreate run properly?\n"); + skip("Can't create lnk, skipping test_persist.\n"); return; } test_persist_save_data("url only", lnk, diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c index 75bce53..b20b97c 100644 --- a/programs/winecfg/drivedetect.c +++ b/programs/winecfg/drivedetect.c @@ -204,7 +204,7 @@ static void report_error(int code) case NO_DRIVE_C: if (gui_mode) - MessageBox(NULL, "No virtual drive C mapped\n\nTry running wineprefixcreate", "", MB_OK | MB_ICONEXCLAMATION); + MessageBox(NULL, "No virtual drive C mapped!\n", "", MB_OK | MB_ICONEXCLAMATION); else fprintf(stderr, "winecfg: no drive_c directory\n");
1
0
0
0
Hans Leidekker : msi: Put the uninstall key for 32-bit packages under Wow6432Node on 64-bit.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: 52aab76eb23d1953c80b3a2b7730dd934e5d5eab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52aab76eb23d1953c80b3a2b7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 5 16:37:33 2010 +0200 msi: Put the uninstall key for 32-bit packages under Wow6432Node on 64-bit. --- dlls/msi/action.c | 4 +- dlls/msi/msipriv.h | 4 +- dlls/msi/package.c | 2 +- dlls/msi/registry.c | 34 ++++++++++--- dlls/msi/tests/install.c | 119 +++++++++++++++++++++++++++++++++++++--------- 5 files changed, 128 insertions(+), 35 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=52aab76eb23d1953c80b3…
1
0
0
0
Laura Leinonen : comdlg32: Update Finnish translation.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: e66b73e5d16951078e1c9efd827b06dad70311b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e66b73e5d16951078e1c9efd8…
Author: Laura Leinonen <leinonen.laura(a)gmail.com> Date: Tue Oct 5 16:09:44 2010 +0300 comdlg32: Update Finnish translation. --- dlls/comdlg32/cdlg_Fi.rc | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/comdlg32/cdlg_Fi.rc b/dlls/comdlg32/cdlg_Fi.rc index e5ea674..8329d41 100644 --- a/dlls/comdlg32/cdlg_Fi.rc +++ b/dlls/comdlg32/cdlg_Fi.rc @@ -440,6 +440,14 @@ sinun t PD32_PRINTER_STATUS_POWER_SAVE "Virrans��st�tila; " } +STRINGTABLE /* Font styles */ +{ + IDS_FONT_REGULAR "Tavallinen" + IDS_FONT_BOLD "Lihavoitu" + IDS_FONT_ITALIC "Kursivoitu" + IDS_FONT_BOLD_ITALIC "Lihavoitu kursivoitu" +} + STRINGTABLE /* Color names */ { IDS_COLOR_BLACK "Musta"
1
0
0
0
Aric Stewart : strmbase: Initial creation of static strmbase library for Quartz and Quartz filters.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: 961921060c9b63beaf80043d7ee0f4f3f74df413 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=961921060c9b63beaf80043d7…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Oct 4 09:48:25 2010 -0500 strmbase: Initial creation of static strmbase library for Quartz and Quartz filters. Move the Media Type Functions. --- configure | 1 + configure.ac | 1 + dlls/qcap/Makefile.in | 2 +- dlls/qcap/enummedia.c | 29 +--------------- dlls/qcap/qcap_main.h | 4 +- dlls/quartz/Makefile.in | 2 +- dlls/quartz/enummedia.c | 49 -------------------------- dlls/quartz/quartz_private.h | 4 +-- dlls/strmbase/Makefile.in | 6 +++ dlls/strmbase/mediatype.c | 78 ++++++++++++++++++++++++++++++++++++++++++ include/wine/strmbase.h | 25 +++++++++++++ 11 files changed, 117 insertions(+), 84 deletions(-) diff --git a/configure b/configure index 025eda3..a735091 100755 --- a/configure +++ b/configure @@ -14884,6 +14884,7 @@ wine_fn_config_dll sti enable_sti sti wine_fn_config_test dlls/sti/tests sti_test wine_fn_config_dll storage.dll16 enable_win16 wine_fn_config_dll stress.dll16 enable_win16 +wine_fn_config_lib strmbase wine_fn_config_lib strmiids wine_fn_config_dll svrapi enable_svrapi wine_fn_config_dll sxs enable_sxs diff --git a/configure.ac b/configure.ac index 52fee51..1a502db 100644 --- a/configure.ac +++ b/configure.ac @@ -2662,6 +2662,7 @@ WINE_CONFIG_DLL(sti,,[sti]) WINE_CONFIG_TEST(dlls/sti/tests) WINE_CONFIG_DLL(storage.dll16,enable_win16) WINE_CONFIG_DLL(stress.dll16,enable_win16) +WINE_CONFIG_LIB(strmbase) WINE_CONFIG_LIB(strmiids) WINE_CONFIG_DLL(svrapi) WINE_CONFIG_DLL(sxs) diff --git a/dlls/qcap/Makefile.in b/dlls/qcap/Makefile.in index f3b61ab..a8675e2 100644 --- a/dlls/qcap/Makefile.in +++ b/dlls/qcap/Makefile.in @@ -1,5 +1,5 @@ MODULE = qcap.dll -IMPORTS = strmiids uuid ole32 gdi32 advapi32 +IMPORTS = strmiids strmbase uuid ole32 gdi32 advapi32 C_SRCS = \ capturegraph.c \ diff --git a/dlls/qcap/enummedia.c b/dlls/qcap/enummedia.c index a4d84b0..94b2907 100644 --- a/dlls/qcap/enummedia.c +++ b/dlls/qcap/enummedia.c @@ -32,37 +32,10 @@ #include "qcap_main.h" #include "wine/debug.h" +#include "wine/strmbase.h" WINE_DEFAULT_DEBUG_CHANNEL(qcap); -HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc) -{ - *pDest = *pSrc; - if (!pSrc->pbFormat) return S_OK; - if (!(pDest->pbFormat = CoTaskMemAlloc(pSrc->cbFormat))) - return E_OUTOFMEMORY; - memcpy(pDest->pbFormat, pSrc->pbFormat, pSrc->cbFormat); - return S_OK; -} - -static void FreeMediaType(AM_MEDIA_TYPE * pMediaType) -{ - CoTaskMemFree(pMediaType->pbFormat); - pMediaType->pbFormat = NULL; - - if (pMediaType->pUnk) - { - IUnknown_Release(pMediaType->pUnk); - pMediaType->pUnk = NULL; - } -} - -void DeleteMediaType(AM_MEDIA_TYPE * pMediaType) -{ - FreeMediaType(pMediaType); - CoTaskMemFree(pMediaType); -} - BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards) { diff --git a/dlls/qcap/qcap_main.h b/dlls/qcap/qcap_main.h index 2b75830..59a172f 100644 --- a/dlls/qcap/qcap_main.h +++ b/dlls/qcap/qcap_main.h @@ -20,6 +20,8 @@ #ifndef _QCAP_MAIN_H_DEFINED #define _QCAP_MAIN_H_DEFINED +#include "wine/strmbase.h" + extern DWORD ObjectRefCount(BOOL increment); extern IUnknown * WINAPI QCAP_createAudioCaptureFilter(IUnknown *pUnkOuter, HRESULT *phr); @@ -50,8 +52,6 @@ typedef struct tagENUMEDIADETAILS HRESULT IEnumPinsImpl_Construct(const ENUMPINDETAILS * pDetails, IEnumPins ** ppEnum); HRESULT IEnumMediaTypesImpl_Construct(const ENUMMEDIADETAILS * pDetails, IEnumMediaTypes ** ppEnum); -HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc); -void DeleteMediaType(AM_MEDIA_TYPE * pmt); BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards); void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt); diff --git a/dlls/quartz/Makefile.in b/dlls/quartz/Makefile.in index 4ccc08c..fe61eae 100644 --- a/dlls/quartz/Makefile.in +++ b/dlls/quartz/Makefile.in @@ -1,6 +1,6 @@ MODULE = quartz.dll IMPORTLIB = quartz -IMPORTS = strmiids uuid dsound msacm32 msvfw32 ole32 oleaut32 shlwapi rpcrt4 user32 gdi32 advapi32 +IMPORTS = strmiids strmbase uuid dsound msacm32 msvfw32 ole32 oleaut32 shlwapi rpcrt4 user32 gdi32 advapi32 EXTRADEFS = -DENTRY_PREFIX=QUARTZ_ -DPROXY_DELEGATION -DREGISTER_PROXY_DLL C_SRCS = \ diff --git a/dlls/quartz/enummedia.c b/dlls/quartz/enummedia.c index 60ff13a..db78965 100644 --- a/dlls/quartz/enummedia.c +++ b/dlls/quartz/enummedia.c @@ -24,55 +24,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); -HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc) -{ - *pDest = *pSrc; - if (!pSrc->pbFormat) return S_OK; - if (!(pDest->pbFormat = CoTaskMemAlloc(pSrc->cbFormat))) - return E_OUTOFMEMORY; - memcpy(pDest->pbFormat, pSrc->pbFormat, pSrc->cbFormat); - if (pDest->pUnk) - IUnknown_AddRef(pDest->pUnk); - return S_OK; -} - -void FreeMediaType(AM_MEDIA_TYPE * pMediaType) -{ - if (pMediaType->pbFormat) - { - CoTaskMemFree(pMediaType->pbFormat); - pMediaType->pbFormat = NULL; - } - if (pMediaType->pUnk) - { - IUnknown_Release(pMediaType->pUnk); - pMediaType->pUnk = NULL; - } -} - -static AM_MEDIA_TYPE * CreateMediaType(AM_MEDIA_TYPE const * pSrc) -{ - AM_MEDIA_TYPE * pDest; - - pDest = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); - if (!pDest) - return NULL; - - if (FAILED(CopyMediaType(pDest, pSrc))) - { - CoTaskMemFree(pDest); - return NULL; - } - - return pDest; -} - -void DeleteMediaType(AM_MEDIA_TYPE * pMediaType) -{ - FreeMediaType(pMediaType); - CoTaskMemFree(pMediaType); -} - BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards) { TRACE("pmt1: "); diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 3e0dfe1..b6dfcfa 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -33,6 +33,7 @@ #include "wingdi.h" #include "winuser.h" #include "dshow.h" +#include "wine/strmbase.h" #include "wine/list.h" #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000) @@ -77,9 +78,6 @@ HRESULT IEnumFiltersImpl_Construct(IBaseFilter ** ppFilters, ULONG nFilters, IEn extern const char * qzdebugstr_guid(const GUID * id); -HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc); -void FreeMediaType(AM_MEDIA_TYPE * pmt); -void DeleteMediaType(AM_MEDIA_TYPE * pmt); BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards); void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt); HRESULT updatehres( HRESULT original, HRESULT new ); diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in new file mode 100644 index 0000000..105b5b6 --- /dev/null +++ b/dlls/strmbase/Makefile.in @@ -0,0 +1,6 @@ +MODULE = strmbase + +C_SRCS = \ + mediatype.c + +@MAKE_IMPLIB_RULES@ diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c new file mode 100644 index 0000000..6de3e7a --- /dev/null +++ b/dlls/strmbase/mediatype.c @@ -0,0 +1,78 @@ +/* + * Implementation of MedaType utility functions + * + * Copyright 2003 Robert Shearman + * Copyright 2010 Aric Stewart, CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include <stdarg.h> + +#define COBJMACROS +#include "dshow.h" + +#include "wine/strmbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(strmbase); + +HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc) +{ + *pDest = *pSrc; + if (!pSrc->pbFormat) return S_OK; + if (!(pDest->pbFormat = CoTaskMemAlloc(pSrc->cbFormat))) + return E_OUTOFMEMORY; + memcpy(pDest->pbFormat, pSrc->pbFormat, pSrc->cbFormat); + if (pDest->pUnk) + IUnknown_AddRef(pDest->pUnk); + return S_OK; +} + +void WINAPI FreeMediaType(AM_MEDIA_TYPE * pMediaType) +{ + if (pMediaType->pbFormat) + { + CoTaskMemFree(pMediaType->pbFormat); + pMediaType->pbFormat = NULL; + } + if (pMediaType->pUnk) + { + IUnknown_Release(pMediaType->pUnk); + pMediaType->pUnk = NULL; + } +} + +AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const * pSrc) +{ + AM_MEDIA_TYPE * pDest; + + pDest = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + if (!pDest) + return NULL; + + if (FAILED(CopyMediaType(pDest, pSrc))) + { + CoTaskMemFree(pDest); + return NULL; + } + + return pDest; +} + +void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType) +{ + FreeMediaType(pMediaType); + CoTaskMemFree(pMediaType); +} diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h new file mode 100644 index 0000000..885a976 --- /dev/null +++ b/include/wine/strmbase.h @@ -0,0 +1,25 @@ +/* + * Header file for Wine's strmbase implementation + * + * Copyright 2003 Robert Shearman + * Copyright 2010 Aric Stewart, CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc); +void WINAPI FreeMediaType(AM_MEDIA_TYPE * pMediaType); +AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const * pSrc); +void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
1
0
0
0
Henri Verbeet : wined3d: Set the depth/ stencil buffer to NULL before releasing it.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: e1b96eb3475d298fb1e4f7b137a6c73bb6dc16df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1b96eb3475d298fb1e4f7b13…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 5 14:32:36 2010 +0200 wined3d: Set the depth/stencil buffer to NULL before releasing it. To prevent device_resource_released() from detecting it as still in use. --- dlls/wined3d/device.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1e42409..7b2b8ce 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2107,13 +2107,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, This->onscreen_depth_stencil = NULL; } - TRACE("Releasing the depth stencil buffer at %p\n", This->depth_stencil); - if (This->depth_stencil && IWineD3DSurface_Release((IWineD3DSurface *)This->depth_stencil)) + if (This->depth_stencil) { - if (This->auto_depth_stencil != This->depth_stencil) - FIXME("(%p) Something is still holding the depth/stencil buffer.\n",This); + IWineD3DSurfaceImpl *ds = This->depth_stencil; + + TRACE("Releasing depth/stencil buffer %p.\n", ds); + + This->depth_stencil = NULL; + if (IWineD3DSurface_Release((IWineD3DSurface *)ds) + && ds != This->auto_depth_stencil) + { + ERR("Something is still holding a reference to depth/stencil buffer %p.\n", ds); + } } - This->depth_stencil = NULL; TRACE("Releasing the render target at %p\n", This->render_targets[0]); IWineD3DSurface_Release((IWineD3DSurface *)This->render_targets[0]);
1
0
0
0
Henri Verbeet : ddraw: Remove another hack.
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: 5fa84c56c344927dcb13b12409fbf64d738438f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5fa84c56c344927dcb13b1240…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Oct 5 14:32:35 2010 +0200 ddraw: Remove another hack. It breaks actual front buffer / back buffer flips. --- dlls/ddraw/ddraw_private.h | 1 - dlls/ddraw/device.c | 78 ++++++---------------------------------- dlls/wined3d/device.c | 86 -------------------------------------------- include/wine/wined3d.idl | 4 -- 4 files changed, 11 insertions(+), 158 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 9b3f614..f9b9a48 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -359,7 +359,6 @@ struct IDirect3DDeviceImpl IDirectDrawImpl *ddraw; IWineD3DBuffer *indexbuffer; IDirectDrawSurfaceImpl *target; - BOOL OffScreenTarget; /* Viewport management */ IDirect3DViewportImpl *viewport_list; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 30109e9..0056a40 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -311,34 +311,10 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface) * IDirect3DVertexBuffer::Release will unset it. */ - /* Restore the render targets */ - if(This->OffScreenTarget) - { - WINED3DVIEWPORT vp; - - vp.X = 0; - vp.Y = 0; - vp.Width = This->ddraw->d3d_target->surface_desc.dwWidth; - vp.Height = This->ddraw->d3d_target->surface_desc.dwHeight; - vp.MinZ = 0.0; - vp.MaxZ = 1.0; - IWineD3DDevice_SetViewport(This->wineD3DDevice, - &vp); - - /* Set the device up to render to the front buffer since the back buffer will - * vanish soon. - */ - IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0, - This->ddraw->d3d_target->WineD3DSurface, - FALSE); - /* This->target is the offscreen target. - * This->ddraw->d3d_target is the target used by DDraw - */ - TRACE("(%p) Release: Using %p as front buffer, %p as back buffer\n", This, This->ddraw->d3d_target, NULL); - IWineD3DDevice_SetFrontBackBuffers(This->wineD3DDevice, - This->ddraw->d3d_target->WineD3DSurface, - NULL); - } + /* Set the device up to render to the front buffer since the back + * buffer will vanish soon. */ + IWineD3DDevice_SetRenderTarget(This->wineD3DDevice, 0, + This->ddraw->d3d_target->WineD3DSurface, TRUE); /* Release the WineD3DDevice. This won't destroy it */ if(IWineD3DDevice_Release(This->wineD3DDevice) <= 0) @@ -7024,46 +7000,14 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi device->wineD3DDevice = ddraw->wineD3DDevice; IWineD3DDevice_AddRef(ddraw->wineD3DDevice); - /* This is for apps which create a non-flip, non-d3d primary surface - * and an offscreen D3DDEVICE surface, then render to the offscreen surface - * and do a Blt from the offscreen to the primary surface. - * - * Set the offscreen D3DDDEVICE surface(=target) as the back buffer, - * and the primary surface(=This->d3d_target) as the front buffer. - * - * This way the app will render to the D3DDEVICE surface and WineD3D - * will catch the Blt was Back Buffer -> Front buffer blt and perform - * a flip instead. This way we don't have to deal with a mixed GL / GDI - * environment. - * - * This should be checked against windowed apps. The only app tested with - * this is moto racer 2 during the loading screen. - */ - TRACE("Is rendertarget: %s, d3d_target %p.\n", - target->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE ? "true" : "false", ddraw->d3d_target); - - if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) - && ddraw->d3d_target != target) - { - TRACE("Using %p as front buffer, %p as back buffer.\n", ddraw->d3d_target, target); - - hr = IWineD3DDevice_SetFrontBackBuffers(ddraw->wineD3DDevice, - ddraw->d3d_target->WineD3DSurface, target->WineD3DSurface); - if (FAILED(hr)) - { - ERR("Failed to set front and back buffer, hr %#x.\n", hr); - IParent_Release((IParent *)index_buffer_parent); - ddraw_handle_table_destroy(&device->handle_table); - return hr; - } - - /* Render to the back buffer */ - IWineD3DDevice_SetRenderTarget(ddraw->wineD3DDevice, 0, target->WineD3DSurface, TRUE); - device->OffScreenTarget = TRUE; - } - else + /* Render to the back buffer */ + hr = IWineD3DDevice_SetRenderTarget(ddraw->wineD3DDevice, 0, target->WineD3DSurface, TRUE); + if (FAILED(hr)) { - device->OffScreenTarget = FALSE; + ERR("Failed to set render target, hr %#x.\n", hr); + IParent_Release((IParent *)index_buffer_parent); + ddraw_handle_table_destroy(&device->handle_table); + return hr; } /* FIXME: This is broken. The target AddRef() makes some sense, because diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ea4f69e..1e42409 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5636,91 +5636,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice *iface, return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_SetFrontBackBuffers(IWineD3DDevice *iface, - IWineD3DSurface *front, IWineD3DSurface *back) -{ - IWineD3DSurfaceImpl *front_impl = (IWineD3DSurfaceImpl *)front; - IWineD3DSurfaceImpl *back_impl = (IWineD3DSurfaceImpl *)back; - IWineD3DSwapChainImpl *swapchain; - HRESULT hr; - - TRACE("iface %p, front %p, back %p.\n", iface, front, back); - - if (FAILED(hr = IWineD3DDevice_GetSwapChain(iface, 0, (IWineD3DSwapChain **)&swapchain))) - { - ERR("Failed to get the swapchain, hr %#x.\n", hr); - return hr; - } - - if (front_impl && !(front_impl->resource.usage & WINED3DUSAGE_RENDERTARGET)) - { - ERR("Trying to set a front buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage.\n"); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); - return WINED3DERR_INVALIDCALL; - } - - if (back_impl) - { - if (!(back_impl->resource.usage & WINED3DUSAGE_RENDERTARGET)) - { - ERR("Trying to set a back buffer which doesn't have WINED3DUSAGE_RENDERTARGET usage.\n"); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); - return WINED3DERR_INVALIDCALL; - } - - if (!swapchain->back_buffers) - { - swapchain->back_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*swapchain->back_buffers)); - if (!swapchain->back_buffers) - { - ERR("Failed to allocate back buffer array memory.\n"); - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); - return E_OUTOFMEMORY; - } - } - } - - if (swapchain->front_buffer != front_impl) - { - TRACE("Changing the front buffer from %p to %p.\n", swapchain->front_buffer, front_impl); - - if (swapchain->front_buffer) - surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_NONE, NULL); - swapchain->front_buffer = front_impl; - - if (front_impl) - surface_set_container(front_impl, WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain); - } - - if (swapchain->back_buffers[0] != back_impl) - { - TRACE("Changing the back buffer from %p to %p.\n", swapchain->back_buffers[0], back_impl); - - if (swapchain->back_buffers[0]) - surface_set_container(swapchain->back_buffers[0], WINED3D_CONTAINER_NONE, NULL); - swapchain->back_buffers[0] = back_impl; - - if (back_impl) - { - swapchain->presentParms.BackBufferWidth = back_impl->currentDesc.Width; - swapchain->presentParms.BackBufferHeight = back_impl->currentDesc.Height; - swapchain->presentParms.BackBufferFormat = back_impl->resource.format->id; - swapchain->presentParms.BackBufferCount = 1; - - surface_set_container(back_impl, WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain); - } - else - { - swapchain->presentParms.BackBufferCount = 0; - HeapFree(GetProcessHeap(), 0, swapchain->back_buffers); - swapchain->back_buffers = NULL; - } - } - - IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); - return WINED3D_OK; -} - static HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice *iface, IWineD3DSurface **depth_stencil) { IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface; @@ -6803,7 +6718,6 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = IWineD3DDeviceImpl_GetRenderState, IWineD3DDeviceImpl_SetRenderTarget, IWineD3DDeviceImpl_GetRenderTarget, - IWineD3DDeviceImpl_SetFrontBackBuffers, IWineD3DDeviceImpl_SetSamplerState, IWineD3DDeviceImpl_GetSamplerState, IWineD3DDeviceImpl_SetScissorRect, diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index 548a08a..d990f70 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -3137,10 +3137,6 @@ interface IWineD3DDevice : IUnknown [in] DWORD render_target_idx, [out] IWineD3DSurface **render_target ); - HRESULT SetFrontBackBuffers( - [in] IWineD3DSurface *front, - [in] IWineD3DSurface *back - ); HRESULT SetSamplerState( [in] DWORD sampler_idx, [in] WINED3DSAMPLERSTATETYPE state,
1
0
0
0
Stefan Oberhumer : ntdll/tests: Add some more tests for qsort().
by Alexandre Julliard
05 Oct '10
05 Oct '10
Module: wine Branch: master Commit: 024530133c0c51c269f90a96332b5bba02a9df9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=024530133c0c51c269f90a963…
Author: Stefan Oberhumer <stefan(a)obssys.com> Date: Tue Oct 5 12:20:13 2010 +0200 ntdll/tests: Add some more tests for qsort(). --- dlls/ntdll/tests/string.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 3f7236a..03fc436 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c @@ -1175,6 +1175,27 @@ static void test_qsort(void) "." }; + p_qsort ((void*)arr, 0, sizeof(int), intcomparefunc); + ok(arr[0] == 23, "badly sorted, nmemb=0, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, nmemb=0, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, nmemb=0, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, nmemb=0, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, nmemb=0, arr[4] is %d\n", arr[4]); + + p_qsort ((void*)arr, 1, sizeof(int), intcomparefunc); + ok(arr[0] == 23, "badly sorted, nmemb=1, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, nmemb=1, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, nmemb=1, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, nmemb=1, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, nmemb=1, arr[4] is %d\n", arr[4]); + + p_qsort ((void*)arr, 5, 0, intcomparefunc); + ok(arr[0] == 23, "badly sorted, size=0, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, size=0, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, size=0, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, size=0, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, size=0, arr[4] is %d\n", arr[4]); + p_qsort ((void*)arr, 5, sizeof(int), intcomparefunc); ok(arr[0] == 4, "badly sorted, arr[0] is %d\n", arr[0]); ok(arr[1] == 8, "badly sorted, arr[1] is %d\n", arr[1]);
1
0
0
0
← Newer
1
...
97
98
99
100
101
102
103
...
118
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200