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
December 2007
----- 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
3 participants
824 discussions
Start a n
N
ew thread
Lei Zhang : quartz: Add videorenderer aggregation test.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 766046d4ab5ad649bbf2203b573319b8e8667478 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=766046d4ab5ad649bbf2203b5…
Author: Lei Zhang <thestig(a)google.com> Date: Thu Dec 13 02:53:06 2007 -0800 quartz: Add videorenderer aggregation test. --- dlls/quartz/tests/videorenderer.c | 103 +++++++++++++++++++++++++++++++++++++ 1 files changed, 103 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index dde6886..ce0a43f 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -27,6 +27,10 @@ ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \ ok(ppv != NULL, "Pointer is NULL\n"); +#define QI_FAIL(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ + ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface returned %x\n", hr); \ + ok(ppv == NULL, "Pointer is %p\n", ppv); + #define ADDREF_EXPECT(iface, num) if (iface) { \ hr = IUnknown_AddRef(iface); \ ok(hr == num, "IUnknown_AddRef should return %d, got %d\n", num, hr); \ @@ -39,6 +43,104 @@ static IUnknown *pVideoRenderer = NULL; +static void test_aggregation(void) +{ + HRESULT hr; + IUnknown *pUnkOuter = NULL; + IUnknown *pUnkInner = NULL; + IVideoWindow *pVideoWindowInner = NULL; + IUnknown *pUnkOuterTest = NULL; + IUnknown *pUnkInnerTest = NULL; + IVideoWindow *pVideoWindowTest = NULL; + IReferenceClock *pReferenceClockTest = NULL; + IUnknown *pUnkTest = NULL; + + hr = CoCreateInstance(&CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (LPVOID*)&pUnkOuter); + ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(pUnkOuter != NULL, "pUnkOuter is NULL\n"); + + if (!pUnkOuter) + { + skip("pUnkOuter is NULL\n"); + return; + } + + /* for aggregation, we should only be able to request IUnknown */ + hr = CoCreateInstance(&CLSID_VideoRenderer, pUnkOuter, CLSCTX_INPROC_SERVER, + &IID_IVideoWindow, (LPVOID*)&pVideoWindowInner); + todo_wine { + ok(hr == E_NOINTERFACE, "CoCreateInstance returned %x\n", hr); + } + ok(pVideoWindowInner == NULL, "pVideoWindowInner is not NULL\n"); + + /* aggregation, request IUnknown */ + hr = CoCreateInstance(&CLSID_VideoRenderer, pUnkOuter, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (LPVOID*)&pUnkInner); + todo_wine { + ok(hr == S_OK, "CoCreateInstance returned %x\n", hr); + ok(pUnkInner != NULL, "pUnkInner is NULL\n"); + } + + if (!pUnkInner) + { + skip("pUnkInner is NULL\n"); + return; + } + + ADDREF_EXPECT(pUnkOuter, 2); + ADDREF_EXPECT(pUnkInner, 2); + RELEASE_EXPECT(pUnkOuter, 1); + RELEASE_EXPECT(pUnkInner, 1); + + QI_FAIL(pUnkOuter, IID_IVideoWindow, pVideoWindowTest); + QI_FAIL(pUnkInner, IID_IReferenceClock, pReferenceClockTest); + + /* these QueryInterface calls should work */ + QI_SUCCEED(pUnkOuter, IID_IReferenceClock, pReferenceClockTest); + QI_SUCCEED(pUnkOuter, IID_IUnknown, pUnkOuterTest); + QI_SUCCEED(pUnkInner, IID_IVideoWindow, pVideoWindowTest); + QI_SUCCEED(pUnkInner, IID_IUnknown, pUnkInnerTest); + + if (!pReferenceClockTest || !pUnkOuterTest || !pVideoWindowTest \ + || !pUnkInnerTest) + { + skip("One of the required interfaces is NULL\n"); + return; + } + + ADDREF_EXPECT(pReferenceClockTest, 5); + ADDREF_EXPECT(pUnkOuterTest, 6); + ADDREF_EXPECT(pVideoWindowTest, 7); + ADDREF_EXPECT(pUnkInnerTest, 3); + RELEASE_EXPECT(pReferenceClockTest, 6); + RELEASE_EXPECT(pUnkOuterTest, 5); + RELEASE_EXPECT(pVideoWindowTest, 4); + RELEASE_EXPECT(pUnkInnerTest, 2); + + QI_SUCCEED(pReferenceClockTest, IID_IUnknown, pUnkTest); + QI_SUCCEED(pUnkOuterTest, IID_IUnknown, pUnkTest); + QI_SUCCEED(pVideoWindowTest, IID_IUnknown, pUnkTest); + QI_SUCCEED(pUnkInnerTest, IID_IUnknown, pUnkTest); + + QI_FAIL(pReferenceClockTest, IID_IVideoWindow, pUnkTest); + QI_FAIL(pUnkOuterTest, IID_IVideoWindow, pUnkTest); + QI_FAIL(pVideoWindowTest, IID_IVideoWindow, pUnkTest); + QI_SUCCEED(pUnkInnerTest, IID_IVideoWindow, pUnkTest); + + QI_SUCCEED(pReferenceClockTest, IID_IReferenceClock, pUnkTest); + QI_SUCCEED(pUnkOuterTest, IID_IReferenceClock, pUnkTest); + QI_SUCCEED(pVideoWindowTest, IID_IReferenceClock, pUnkTest); + QI_FAIL(pUnkInnerTest, IID_IReferenceClock, pUnkTest); + + RELEASE_EXPECT(pReferenceClockTest, 10); + RELEASE_EXPECT(pUnkOuterTest, 9); + RELEASE_EXPECT(pVideoWindowTest, 8); + RELEASE_EXPECT(pUnkInnerTest, 2); + RELEASE_EXPECT(pUnkOuter, 7); + RELEASE_EXPECT(pUnkInner, 1); +} + static int create_video_renderer(void) { HRESULT hr; @@ -98,6 +200,7 @@ START_TEST(videorenderer) return; test_query_interface(); + test_aggregation(); release_video_renderer(); }
1
0
0
0
Lei Zhang : quartz: Add videorenderer QueryInterface test.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 4f6f1bcb6e82b3d53c084797ac5ba3d4967c3046 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f6f1bcb6e82b3d53c084797a…
Author: Lei Zhang <thestig(a)google.com> Date: Wed Dec 12 16:51:55 2007 -0800 quartz: Add videorenderer QueryInterface test. --- dlls/quartz/tests/Makefile.in | 5 +- dlls/quartz/tests/videorenderer.c | 103 +++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/Makefile.in b/dlls/quartz/tests/Makefile.in index 5163157..5c97b6d 100644 --- a/dlls/quartz/tests/Makefile.in +++ b/dlls/quartz/tests/Makefile.in @@ -4,12 +4,13 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = quartz.dll IMPORTS = ole32 kernel32 -EXTRALIBS = -lstrmiids +EXTRALIBS = -lstrmiids -luuid CTESTS = \ filtergraph.c \ memallocator.c \ - referenceclock.c + referenceclock.c \ + videorenderer.c @MAKE_TEST_RULES@ diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c new file mode 100644 index 0000000..dde6886 --- /dev/null +++ b/dlls/quartz/tests/videorenderer.c @@ -0,0 +1,103 @@ +/* + * Unit tests for Video Renderer functions + * + * Copyright (C) 2007 Google (Lei Zhang) + * + * 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 + */ + +#define COBJMACROS + +#include "wine/test.h" +#include "dshow.h" + +#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ + ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \ + ok(ppv != NULL, "Pointer is NULL\n"); + +#define ADDREF_EXPECT(iface, num) if (iface) { \ + hr = IUnknown_AddRef(iface); \ + ok(hr == num, "IUnknown_AddRef should return %d, got %d\n", num, hr); \ +} + +#define RELEASE_EXPECT(iface, num) if (iface) { \ + hr = IUnknown_Release(iface); \ + ok(hr == num, "IUnknown_Release should return %d, got %d\n", num, hr); \ +} + +static IUnknown *pVideoRenderer = NULL; + +static int create_video_renderer(void) +{ + HRESULT hr; + + hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (LPVOID*)&pVideoRenderer); + return (hr == S_OK && pVideoRenderer != NULL); +} + +static void release_video_renderer(void) +{ + HRESULT hr; + + hr = IUnknown_Release(pVideoRenderer); + ok(hr == 0, "IUnknown_Release failed with %x\n", hr); +} + +static void test_query_interface(void) +{ + HRESULT hr; + IBaseFilter *pBaseFilter = NULL; + IBasicVideo *pBasicVideo = NULL; + IDirectDrawVideo *pDirectDrawVideo = NULL; + IKsPropertySet *pKsPropertySet = NULL; + IMediaPosition *pMediaPosition = NULL; + IMediaSeeking *pMediaSeeking = NULL; + IQualityControl *pQualityControl = NULL; + IQualProp *pQualProp = NULL; + IVideoWindow *pVideoWindow = NULL; + + QI_SUCCEED(pVideoRenderer, IID_IBaseFilter, pBaseFilter); + RELEASE_EXPECT(pBaseFilter, 1); + QI_SUCCEED(pVideoRenderer, IID_IBasicVideo, pBasicVideo); + RELEASE_EXPECT(pBasicVideo, 1); + todo_wine { + QI_SUCCEED(pVideoRenderer, IID_IDirectDrawVideo, pDirectDrawVideo); + RELEASE_EXPECT(pDirectDrawVideo, 1); + QI_SUCCEED(pVideoRenderer, IID_IKsPropertySet, pKsPropertySet); + RELEASE_EXPECT(pKsPropertySet, 1); + QI_SUCCEED(pVideoRenderer, IID_IMediaPosition, pMediaPosition); + RELEASE_EXPECT(pMediaPosition, 1); + QI_SUCCEED(pVideoRenderer, IID_IMediaSeeking, pMediaSeeking); + RELEASE_EXPECT(pMediaSeeking, 1); + QI_SUCCEED(pVideoRenderer, IID_IQualityControl, pQualityControl); + RELEASE_EXPECT(pQualityControl, 1); + QI_SUCCEED(pVideoRenderer, IID_IQualProp, pQualProp); + RELEASE_EXPECT(pQualProp, 1); + } + QI_SUCCEED(pVideoRenderer, IID_IVideoWindow, pVideoWindow); + RELEASE_EXPECT(pVideoWindow, 1); +} + +START_TEST(videorenderer) +{ + CoInitialize(NULL); + if (!create_video_renderer()) + return; + + test_query_interface(); + + release_video_renderer(); +}
1
0
0
0
Alexandre Julliard : user32: Print the RegisterHotKey fixme only once.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: e533e50d59cea7c464641d49f7d2d7f918a5d923 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e533e50d59cea7c464641d49f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 13 14:33:35 2007 +0100 user32: Print the RegisterHotKey fixme only once. --- dlls/user32/input.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index dfb5201..7796e96 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -788,7 +788,8 @@ UINT WINAPI GetKeyboardLayoutList(INT nBuff, HKL *layouts) */ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) { - FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk); + static int once; + if (!once++) FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk); return TRUE; } @@ -797,7 +798,8 @@ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) */ BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) { - FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id); + static int once; + if (!once++) FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id); return TRUE; }
1
0
0
0
Alexandre Julliard : hhctrl.ocx: Store a copy of the string pointers to enable freeing them without casting away const .
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 7293f00d9dccf1411ed84817755c6378377bbc33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7293f00d9dccf1411ed848177…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 13 13:48:00 2007 +0100 hhctrl.ocx: Store a copy of the string pointers to enable freeing them without casting away const. --- dlls/hhctrl.ocx/chm.c | 30 +++++++++++++++--------------- dlls/hhctrl.ocx/help.c | 22 +++++++++++----------- dlls/hhctrl.ocx/hhctrl.h | 15 ++++++++++++++- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 1c18240..013cb7d 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -200,10 +200,10 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index) * FIXME: There may be more than one window type in the file, so * add the ability to choose a certain window type */ -BOOL LoadWinTypeFromCHM(CHMInfo *pChmInfo, HH_WINTYPEW *pHHWinType) +BOOL LoadWinTypeFromCHM(HHInfo *info) { LARGE_INTEGER liOffset; - IStorage *pStorage = pChmInfo->pStorage; + IStorage *pStorage = info->pCHMInfo->pStorage; IStream *pStream; HRESULT hr; DWORD cbRead; @@ -221,26 +221,26 @@ BOOL LoadWinTypeFromCHM(CHMInfo *pChmInfo, HH_WINTYPEW *pHHWinType) if (FAILED(hr)) goto done; /* read the HH_WINTYPE struct data */ - hr = IStream_Read(pStream, pHHWinType, sizeof(*pHHWinType), &cbRead); + hr = IStream_Read(pStream, &info->WinType, sizeof(info->WinType), &cbRead); if (FAILED(hr)) goto done; /* convert the #STRINGS offsets to actual strings */ - pHHWinType->pszType = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszType)); - pHHWinType->pszCaption = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszCaption)); - pHHWinType->pszToc = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszToc)); - pHHWinType->pszIndex = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszIndex)); - pHHWinType->pszFile = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszFile)); - pHHWinType->pszHome = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszHome)); - pHHWinType->pszJump1 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszJump1)); - pHHWinType->pszJump2 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszJump2)); - pHHWinType->pszUrlJump1 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszUrlJump1)); - pHHWinType->pszUrlJump2 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszUrlJump2)); - + info->WinType.pszType = info->pszType = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszType)); + info->WinType.pszCaption = info->pszCaption = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszCaption)); + info->WinType.pszToc = info->pszToc = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszToc)); + info->WinType.pszIndex = info->pszIndex = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszIndex)); + info->WinType.pszFile = info->pszFile = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszFile)); + info->WinType.pszHome = info->pszHome = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszHome)); + info->WinType.pszJump1 = info->pszJump1 = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszJump1)); + info->WinType.pszJump2 = info->pszJump2 = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszJump2)); + info->WinType.pszUrlJump1 = info->pszUrlJump1 = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszUrlJump1)); + info->WinType.pszUrlJump2 = info->pszUrlJump2 = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszUrlJump2)); + /* FIXME: pszCustomTabs is a list of multiple zero-terminated strings so ReadString won't * work in this case */ #if 0 - pHHWinType->pszCustomTabs = CHM_ReadString(pChmInfo, (DWORD)pHHWinType->pszCustomTabs); + info->WinType.pszCustomTabs = info->pszCustomTabs = CHM_ReadString(pChmInfo, (DWORD_PTR)info->WinType.pszCustomTabs); #endif done: diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 85c076d..c49d3cf 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -922,16 +922,16 @@ void ReleaseHelpViewer(HHInfo *info) return; /* Free allocated strings */ - heap_free((LPWSTR)info->WinType.pszType); - heap_free((LPWSTR)info->WinType.pszCaption); - heap_free((LPWSTR)info->WinType.pszToc); - heap_free((LPWSTR)info->WinType.pszIndex); - heap_free((LPWSTR)info->WinType.pszFile); - heap_free((LPWSTR)info->WinType.pszHome); - heap_free((LPWSTR)info->WinType.pszJump1); - heap_free((LPWSTR)info->WinType.pszJump2); - heap_free((LPWSTR)info->WinType.pszUrlJump1); - heap_free((LPWSTR)info->WinType.pszUrlJump2); + heap_free(info->pszType); + heap_free(info->pszCaption); + heap_free(info->pszToc); + heap_free(info->pszIndex); + heap_free(info->pszFile); + heap_free(info->pszHome); + heap_free(info->pszJump1); + heap_free(info->pszJump2); + heap_free(info->pszUrlJump1); + heap_free(info->pszUrlJump2); if (info->pCHMInfo) CloseCHM(info->pCHMInfo); @@ -958,7 +958,7 @@ HHInfo *CreateHelpViewer(LPCWSTR filename) return NULL; } - if (!LoadWinTypeFromCHM(info->pCHMInfo, &info->WinType)) { + if (!LoadWinTypeFromCHM(info)) { ReleaseHelpViewer(info); return NULL; } diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 73ec569..26c9d4d 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -92,6 +92,19 @@ typedef struct { IOleObject *wb_object; HH_WINTYPEW WinType; + + LPWSTR pszType; + LPWSTR pszCaption; + LPWSTR pszToc; + LPWSTR pszIndex; + LPWSTR pszFile; + LPWSTR pszHome; + LPWSTR pszJump1; + LPWSTR pszJump2; + LPWSTR pszUrlJump1; + LPWSTR pszUrlJump2; + LPWSTR pszCustomTabs; + CHMInfo *pCHMInfo; ContentItem *content; HWND hwndTabCtrl; @@ -111,7 +124,7 @@ void InitContent(HHInfo*); void ReleaseContent(HHInfo*); CHMInfo *OpenCHM(LPCWSTR szFile); -BOOL LoadWinTypeFromCHM(CHMInfo *pCHMInfo, HH_WINTYPEW *pHHWinType); +BOOL LoadWinTypeFromCHM(HHInfo *info); CHMInfo *CloseCHM(CHMInfo *pCHMInfo); void SetChmPath(ChmPath*,LPCWSTR,LPCWSTR); IStream *GetChmStream(CHMInfo*,LPCWSTR,ChmPath*);
1
0
0
0
Rob Shearman : rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 9642714d0647481d72f1d0fb1bb36e79d8ad4a6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9642714d0647481d72f1d0fb1…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Dec 13 12:40:27 2007 +0000 rpcrt4: Add tests for freeing non-NdrAllocate allocated memory blocks. --- dlls/rpcrt4/tests/ndr_marshall.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index f0028bd..d19d50f 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -1195,6 +1195,14 @@ todo_wine { NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); ok(my_free_called == 1, "free called %d\n", my_free_called); + mem = my_alloc(10); + my_free_called = 0; + StubMsg.Buffer = StubMsg.BufferStart; + NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); +todo_wine { + ok(my_free_called == 1, "free called %d\n", my_free_called); +} + /* Server */ my_alloc_called = 0; StubMsg.IsClient = 0; @@ -1232,6 +1240,14 @@ todo_wine { ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); } + mem = my_alloc(10); + my_free_called = 0; + StubMsg.Buffer = StubMsg.BufferStart; + NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); +todo_wine { + ok(my_free_called == 1, "free called %d\n", my_free_called); +} + HeapFree(GetProcessHeap(), 0, mem_orig); HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); }
1
0
0
0
Rob Shearman : widl: Swap the version packing order back to what typelibs expect.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 00db711c6feffedaa80e3e72ad7193cff6661f91 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00db711c6feffedaa80e3e72a…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Dec 13 12:40:23 2007 +0000 widl: Swap the version packing order back to what typelibs expect. --- tools/widl/utils.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/widl/utils.h b/tools/widl/utils.h index 1cd3dd3..7d6ce5c 100644 --- a/tools/widl/utils.h +++ b/tools/widl/utils.h @@ -46,8 +46,10 @@ size_t widl_getline(char **linep, size_t *lenp, FILE *fp); UUID *parse_uuid(const char *u); int is_valid_uuid(const char *s); -#define MAKEVERSION(major, minor) ((((major) & 0xffff) << 16) | ((minor) & 0xffff)) -#define MAJORVERSION(version) (((version) >> 16) & 0xffff) -#define MINORVERSION(version) ((version) & 0xffff) +/* typelibs expect the minor version to be stored in the higher bits and + * major to be stored in the lower bits */ +#define MAKEVERSION(major, minor) ((((minor) & 0xffff) << 16) | ((major) & 0xffff)) +#define MAJORVERSION(version) ((version) & 0xffff) +#define MINORVERSION(version) (((version) >> 16) & 0xffff) #endif
1
0
0
0
Aric Stewart : gdi32: Cache font enum info.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 3c9e7aba75cc70639ea15705429c42499254e497 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c9e7aba75cc70639ea157054…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Dec 11 22:09:21 2007 +0900 gdi32: Cache font enum info. Cache the enum info so that repeated calls to EnumFontFamiles and such does not have to repeatedly load the font file. --- dlls/gdi32/freetype.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index b6a9344..f8b4e92 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -259,6 +259,11 @@ typedef struct tagFace { Bitmap_Size size; /* set if face is a bitmap */ BOOL external; /* TRUE if we should manually add this font to the registry */ struct tagFamily *family; + /* Cached data for Enum */ + BOOL cache_valid; + ENUMLOGFONTEXW elf; + NEWTEXTMETRICEXW ntm; + DWORD type; } Face; typedef struct tagFamily { @@ -1234,6 +1239,7 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_ } } face = HeapAlloc(GetProcessHeap(), 0, sizeof(*face)); + face->cache_valid = FALSE; list_add_tail(&family->faces, &face->entry); face->StyleName = StyleW; if (file) @@ -3253,6 +3259,15 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, GdiFont *font = alloc_font(); LONG width, height; + if (face->cache_valid) + { + TRACE("Cached\n"); + memcpy(pelf,&face->elf,sizeof(ENUMLOGFONTEXW)); + memcpy(pntm,&face->ntm,sizeof(NEWTEXTMETRICEXW)); + *ptype = face->type; + return; + } + if(face->scalable) { height = 100; width = 0; @@ -3348,6 +3363,11 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, pelf->elfScript[0] = '\0'; /* This will get set in WineEngEnumFonts */ + memcpy(&face->elf,pelf,sizeof(ENUMLOGFONTEXW)); + memcpy(&face->ntm,pntm,sizeof(NEWTEXTMETRICEXW)); + face->type = *ptype; + face->cache_valid = TRUE; + free_font(font); }
1
0
0
0
Anatoly Lyutin : start: Convert to Unicode.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 67271dcf3b265a7405c0ec85929229cafc55d897 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67271dcf3b265a7405c0ec859…
Author: Anatoly Lyutin <vostok(a)etersoft.ru> Date: Tue Dec 11 23:14:13 2007 +0300 start: Convert to Unicode. --- programs/start/Makefile.in | 2 +- programs/start/start.c | 133 ++++++++++++++++++++++++++------------------ 2 files changed, 79 insertions(+), 56 deletions(-) diff --git a/programs/start/Makefile.in b/programs/start/Makefile.in index e889acc..d7deed0 100644 --- a/programs/start/Makefile.in +++ b/programs/start/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = start.exe -APPMODE = -mconsole +APPMODE = -mconsole -municode IMPORTS = shell32 user32 kernel32 C_SRCS = start.c diff --git a/programs/start/start.c b/programs/start/start.c index 773544f..58748c8 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -3,6 +3,7 @@ * Compatible with Microsoft's "c:\windows\command\start.exe" * * Copyright 2003 Dan Kegel + * Copyright 2007 Lyutin Anatoly (Etersoft) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,40 +26,40 @@ #include <stdlib.h> #include <shlobj.h> +#include <wine/unicode.h> +#include <wine/debug.h> + #include "resources.h" +WINE_DEFAULT_DEBUG_CHANNEL(start); + /** Output given message to stdout without formatting. */ -static void output(const char *message) +static void output(const WCHAR *message) { DWORD count; - WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), message, strlen(message), &count, NULL); -} + DWORD res; + int wlen = strlenW(message); -/** - Output given message, - followed by ": ", - followed by description of given GetLastError() value to stdout, - followed by a trailing newline, - then terminate. -*/ -static void fatal_error(const char *msg, DWORD error_code) -{ - LPVOID lpMsgBuf; - int status; + if (!wlen) return; - output(msg); - output(": "); - status = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, (LPTSTR) & lpMsgBuf, 0, NULL); - if (!status) { - output("FormatMessage failed\n"); - } else { - output(lpMsgBuf); - LocalFree((HLOCAL) lpMsgBuf); - output("\n"); + res = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), message, wlen, &count, NULL); + + /* If writing to console fails, assume its file + i/o so convert to OEM codepage and output */ + if (!res) + { + DWORD len; + char *mesA; + /* Convert to OEM, then output */ + len = WideCharToMultiByte( GetConsoleOutputCP(), 0, message, wlen, NULL, 0, NULL, NULL ); + mesA = HeapAlloc(GetProcessHeap(), 0, len*sizeof(char)); + if (!mesA) return; + WideCharToMultiByte( GetConsoleOutputCP(), 0, message, wlen, mesA, len, NULL, NULL ); + WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), mesA, len, &count, FALSE); + HeapFree(GetProcessHeap(), 0, mesA); } - ExitProcess(1); } /** @@ -68,24 +69,47 @@ static void fatal_error(const char *msg, DWORD error_code) followed by a trailing newline, then terminate. */ + +static void fatal_error(const WCHAR *msg, DWORD error_code) +{ + LPVOID lpMsgBuf; + int status; + static const WCHAR colonsW[] = { ':', ' ', 0 }; + static const WCHAR newlineW[] = { '\n', 0 }; + + output(msg); + output(colonsW); + status = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, (LPWSTR) & lpMsgBuf, 0, NULL); + if (!status) + { + WINE_ERR("FormatMessage failed\n"); + } else + { + output(lpMsgBuf); + LocalFree((HLOCAL) lpMsgBuf); + output(newlineW); + } + ExitProcess(1); +} + static void fatal_string_error(int which, DWORD error_code) { - char msg[2048]; + WCHAR msg[2048]; - if (!LoadString(GetModuleHandle(NULL), which, - msg, sizeof(msg))) - fatal_error("LoadString failed", GetLastError()); + if (!LoadStringW(GetModuleHandle(NULL), which, + msg, sizeof(msg)/sizeof(WCHAR))) + WINE_ERR("LoadString failed, error %d\n", GetLastError()); fatal_error(msg, error_code); } static void fatal_string(int which) { - char msg[2048]; + WCHAR msg[2048]; - if (!LoadString(GetModuleHandle(NULL), which, - msg, sizeof(msg))) - fatal_error("LoadString failed", GetLastError()); + if (!LoadStringW(GetModuleHandle(NULL), which, + msg, sizeof(msg)/sizeof(WCHAR))) + WINE_ERR("LoadString failed, error %d\n", GetLastError()); output(msg); ExitProcess(1); @@ -101,39 +125,43 @@ static void license(void) fatal_string(STRING_LICENSE); } -static char *build_args( int argc, char **argv ) +static WCHAR *build_args( int argc, WCHAR **argvW ) { - int i, len = 1; - char *ret, *p; + int i, wlen = 1; + WCHAR *ret, *p; + static const WCHAR FormatQuotesW[] = { ' ', '\"', '%', 's', '\"', 0 }; + static const WCHAR FormatW[] = { ' ', '%', 's', 0 }; for (i = 0; i < argc; i++ ) { - len += strlen(argv[i]) + 1; - if (strchr(argv[i], ' ')) - len += 2; + wlen += strlenW(argvW[i]) + 1; + if (strchrW(argvW[i], ' ')) + wlen += 2; } - ret = HeapAlloc( GetProcessHeap(), 0, len ); + ret = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); ret[0] = 0; for (i = 0, p = ret; i < argc; i++ ) { - if (strchr(argv[i], ' ')) - p += sprintf(p, " \"%s\"", argv[i]); + if (strchrW(argvW[i], ' ')) + p += sprintfW(p, FormatQuotesW, argvW[i]); else - p += sprintf(p, " %s", argv[i]); + p += sprintfW(p, FormatW, argvW[i]); } return ret; } -int main(int argc, char *argv[]) +int wmain (int argc, WCHAR *argv[]) { - SHELLEXECUTEINFO sei; - char *args; + SHELLEXECUTEINFOW sei; + WCHAR *args = NULL; int i; + static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 }; + memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); - sei.lpVerb = "open"; + sei.lpVerb = openW; sei.nShow = SW_SHOWNORMAL; /* Dunno what these mean, but it looks like winMe's start uses them */ sei.fMask = SEE_MASK_FLAG_DDEWAIT| @@ -175,7 +203,7 @@ int main(int argc, char *argv[]) sei.fMask |= SEE_MASK_NOCLOSEPROCESS; break; default: - printf("Option '%s' not recognized\n", argv[i]+ci-1); + WINE_ERR("Option '%s' not recognized\n", wine_dbgstr_w( argv[i]+ci-1)); usage(); } /* Skip to next slash */ @@ -192,20 +220,15 @@ int main(int argc, char *argv[]) args = build_args( argc - i, &argv[i] ); sei.lpParameters = args; - if (!ShellExecuteEx(&sei)) + if (!ShellExecuteExW(&sei)) fatal_string_error(STRING_EXECFAIL, GetLastError()); HeapFree( GetProcessHeap(), 0, args ); if (sei.fMask & SEE_MASK_NOCLOSEPROCESS) { DWORD exitcode; - DWORD waitcode; - waitcode = WaitForSingleObject(sei.hProcess, INFINITE); - if (waitcode) - fatal_error("WaitForSingleObject", GetLastError()); - if (!GetExitCodeProcess(sei.hProcess, &exitcode)) - fatal_error("GetExitCodeProcess", GetLastError()); - /* fixme: haven't tested whether exit code works properly */ + WaitForSingleObject(sei.hProcess, INFINITE); + GetExitCodeProcess(sei.hProcess, &exitcode); ExitProcess(exitcode); }
1
0
0
0
Vitaly Lipatov : winecfg: Updated Russian translation.
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: b3caf3685867aebf9211c180038fcd943923cc41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3caf3685867aebf9211c1800…
Author: Vitaly Lipatov <lav(a)etersoft.ru> Date: Sun Dec 9 15:53:54 2007 +0300 winecfg: Updated Russian translation. --- programs/winecfg/Ru.rc | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/programs/winecfg/Ru.rc b/programs/winecfg/Ru.rc index 94ddec9..6163efa 100644 --- a/programs/winecfg/Ru.rc +++ b/programs/winecfg/Ru.rc @@ -50,7 +50,7 @@ STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN GROUPBOX " ��������� ���������� ",IDC_STATIC, 8,4,244,240 - LTEXT "Wine ����� ����������� ������ ������ Windows ��� ������ ����������. ��� ������� ������� � ��������� ���������� � �������, ��� ���� ����� ��������� ��� �������� ���������� ��������� ��� ��������� ������ ��� ������������ ���������� ����� � � ���� ��������.", + LTEXT "Wine ����� ����������� ����� ������ Windows ��� ������� ����������. ��� ������� ������� � ��������� ���������� � �������, ��� ��������� ��������� �������� � ���� �������� ��� ��� ������������ ����������, ��� � ���������.", IDC_STATIC,15,20,227,60 CONTROL "����������",IDC_APP_LISTVIEW,"SysListView32",WS_BORDER | WS_TABSTOP | LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS, 15,65,230,134 @@ -85,7 +85,7 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,120,197,125,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "�������� Pixel Shader (���� �������������� �������������)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 - GROUPBOX " Screen Resolution ",IDC_STATIC,8,242,244,25 + GROUPBOX " ���������� ������ ",IDC_STATIC,8,242,244,25 CONTROL "", IDC_RES_TRACKBAR, "msctls_trackbar32",WS_TABSTOP,12,250,187,15 EDITTEXT IDC_RES_DPIEDIT,204,250,23,13,ES_NUMBER|WS_TABSTOP LTEXT "dpi",IDC_STATIC,235,252,10,8 @@ -96,7 +96,7 @@ STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN GROUPBOX " ��������� DLL ",IDC_STATIC,8,4,244,240 - LTEXT "����������� ������������ ���������� ����� ���� ����������� builtin (��������������� Wine) ��� ������� native (������� �� Windows ��� ��������������� �����������)." + LTEXT "����� �����������, ����� ����������� ������������ ���������� (DLL) ������������: ���������� � Wine ��� ��������� (�� Windows)." ,IDC_STATIC,16,16,220,32 LTEXT "����� ��������� ��� ����������:",IDC_STATIC,16,58,160,8 COMBOBOX IDC_DLLCOMBO,16,68,140,14,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_SORT | CBS_LOWERCASE @@ -107,16 +107,16 @@ BEGIN PUSHBUTTON "&�������",IDC_DLLS_REMOVEDLL,164,114,82,14 END -IDD_LOADORDER DIALOG DISCARDABLE 80, 90, 130, 92 +IDD_LOADORDER DIALOG DISCARDABLE 80, 90, 150, 92 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "������������� ���������" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " ������� �������� ",IDC_STATIC,8,4,115,66 + GROUPBOX " ������� �������� ",IDC_STATIC,8,4,135,66 CONTROL "&���������� (Wine)",IDC_RAD_BUILTIN,"Button", BS_AUTORADIOBUTTON | WS_GROUP,16,14,105,10 - CONTROL "&������ (Windows)",IDC_RAD_NATIVE,"Button", BS_AUTORADIOBUTTON,16,24,105,10 - CONTROL "�&��������� ����� ������",IDC_RAD_BUILTIN_NATIVE,"Button", BS_AUTORADIOBUTTON,16,34,105,10 - CONTROL "���&��� ����� ����������",IDC_RAD_NATIVE_BUILTIN,"Button", BS_AUTORADIOBUTTON,16,44,105,10 + CONTROL "�&�������� (Windows)",IDC_RAD_NATIVE,"Button", BS_AUTORADIOBUTTON,16,24,105,10 + CONTROL "�&���������, ����� ���������",IDC_RAD_BUILTIN_NATIVE,"Button", BS_AUTORADIOBUTTON,16,34,115,10 + CONTROL "��&�������, ����� ����������",IDC_RAD_NATIVE_BUILTIN,"Button", BS_AUTORADIOBUTTON,16,44,115,10 CONTROL "&�����������",IDC_RAD_DISABLE,"Button", BS_AUTORADIOBUTTON,16,54,105,10 DEFPUSHBUTTON "OK",IDOK,8,74,45,14,WS_GROUP PUSHBUTTON "������",IDCANCEL,57,74,45,14,WS_GROUP @@ -166,7 +166,7 @@ BEGIN GROUPBOX " ����� �������� ",IDC_STATIC,8,4,244,195 LTEXT "�������� �������: ",IDC_STATIC,15,20,227,30 CONTROL "Devices",IDC_AUDIO_TREE,"SysTreeView32",WS_BORDER | WS_TABSTOP,15,50,140,140 - PUSHBUTTON "&Test Sound",IDC_AUDIO_TEST,170,50,59,14 + PUSHBUTTON "&��������� ����",IDC_AUDIO_TEST,170,50,59,14 PUSHBUTTON "������ ����������",IDC_AUDIO_CONTROL_PANEL,170,70,80,14 GROUPBOX " DirectSound ",IDC_STATIC,8,205,244,60 LTEXT "���������� ���������: ",IDC_STATIC,15,215,90,10 @@ -212,7 +212,7 @@ BEGIN IDS_TAB_APPLICATIONS "����������" IDS_TAB_DLLS "����������" IDS_TAB_DRIVES "�����" - IDS_CHOOSE_PATH "�������� ������� ������� � �������." + IDS_CHOOSE_PATH "�������� ������� ������� � �������:" IDS_HIDE_ADVANCED "������ ��������������" IDS_SHOW_ADVANCED "�������� ��������������" IDS_NOTHEME "(��� ����)" @@ -224,7 +224,7 @@ BEGIN IDS_WINECFG_TITLE_APP "��������� Wine ��� %s" IDS_THEMEFILE "����� ���" IDS_THEMEFILE_SELECT "�������� ���� � �����" - IDS_AUDIO_MISSING "������������ ��������� �������� �� �������.\n\n������ ������� �� ���������. ���� ����������, �� ������ ������� ������ �� ������ ��������� ���������.\n\n��� ���������� ��������� ������� ������ ���������." + IDS_AUDIO_MISSING "������������ ��������� �������� �� �������.\n\n������ ������� �� ���������. ��� ������������� ����� ������� ������ ������� �� ������ ���������.\n\n��� ���������� ��������� ������� ������ ���������." IDS_SHELL_FOLDER "����������� �����" IDS_LINKS_TO "������� �" END @@ -233,10 +233,10 @@ STRINGTABLE DISCARDABLE BEGIN IDS_DLL_WARNING "��������� ������� �������� ���� ���������� �� �������������.\n�� ������������� ������ �������� �������?" IDS_DLL_WARNING_CAPTION "��������: ��������� ����������" - IDS_DLL_NATIVE "������" + IDS_DLL_NATIVE "���������" IDS_DLL_BUILTIN "����������" - IDS_DLL_NATIVE_BUILTIN "������, ����������" - IDS_DLL_BUILTIN_NATIVE "����������, ������" + IDS_DLL_NATIVE_BUILTIN "���������, ����������" + IDS_DLL_BUILTIN_NATIVE "����������, ���������" IDS_DLL_DISABLED "���������" IDS_DEFAULT_SETTINGS "��������� �� ���������" IDS_EXECUTABLE_FILTER "��������� Wine (*.exe,*.exe.so)\0*.exe;*.exe.so\0" @@ -252,14 +252,14 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_DRIVE_UNKNOWN "��������������" - IDS_DRIVE_FIXED "������� ����" + IDS_DRIVE_UNKNOWN "���������������" + IDS_DRIVE_FIXED "Ƹ����� ����" IDS_DRIVE_REMOTE "������� ����" IDS_DRIVE_REMOVABLE "��������" IDS_DRIVE_CDROM "CD-ROM" IDS_DRIVE_LETTERS_EXCEEDED "���������� ������� ����� ����.\n\n� ������� ����� ������ ���� ����� - �� A �� Z, � � ��� ��� 26 ������." IDS_SYSTEM_DRIVE_LABEL "��������� ����" - IDS_CONFIRM_DELETE_C "�� ������������� ������ ������� ���� C?\n\n����������� Windows �������� ���������� �������� ��� ����� C. ���� �� ��� �� ������ ������� ����, �� �������� ������� �����!" + IDS_CONFIRM_DELETE_C "������������� ������� ���� C?\n\n����������� Windows-�������� ���������� �������� ��� ����� C. ���� �� �� �� ������ ������� ����, �� �������� ������� �����!" IDS_COL_DRIVELETTER "����" IDS_COL_DRIVEMAPPING "����" IDS_NO_DRIVE_C "�� �� ��������� ���� C.\n\n�� �������� ��� �������!\n" @@ -308,5 +308,5 @@ BEGIN IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "�������� ���� - �����" IDC_SYSPARAMS_INACTIVE_TITLE "��������� ����" IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "��������� ���� - �����" - IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text" + IDC_SYSPARAMS_MSGBOX_TEXT "���� ��������� - �����" END
1
0
0
0
Lionel Debroux : winhelp: Fix memory leaks (found by Smatch).
by Alexandre Julliard
13 Dec '07
13 Dec '07
Module: wine Branch: master Commit: 14bed07c99843f2d196fd6b3481492f3a28c7adc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14bed07c99843f2d196fd6b34…
Author: Lionel Debroux <lionel_debroux(a)yahoo.fr> Date: Sun Dec 9 09:47:42 2007 +0100 winhelp: Fix memory leaks (found by Smatch). --- programs/winhelp/hlpfile.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index ff041ec..3a9717a 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1613,7 +1613,12 @@ static BOOL HLPFILE_UncompressLZ77_Phrases(HLPFILE* hlpfile) phrases.offsets = HeapAlloc(GetProcessHeap(), 0, sizeof(unsigned) * (num + 1)); phrases.buffer = HeapAlloc(GetProcessHeap(), 0, dec_size); - if (!phrases.offsets || !phrases.buffer) return FALSE; + if (!phrases.offsets || !phrases.buffer) + { + HeapFree(GetProcessHeap(), 0, phrases.offsets); + HeapFree(GetProcessHeap(), 0, phrases.buffer); + return FALSE; + } for (i = 0; i <= num; i++) phrases.offsets[i] = GET_USHORT(buf, head_size + 2 * i) - 2 * num - 2; @@ -1672,7 +1677,12 @@ static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE* hlpfile) phrases.offsets = HeapAlloc(GetProcessHeap(), 0, sizeof(unsigned) * (num + 1)); phrases.buffer = HeapAlloc(GetProcessHeap(), 0, dec_size); - if (!phrases.offsets || !phrases.buffer) return FALSE; + if (!phrases.offsets || !phrases.buffer) + { + HeapFree(GetProcessHeap(), 0, phrases.offsets); + HeapFree(GetProcessHeap(), 0, phrases.buffer); + return FALSE; + } #define getbit() (ptr += (mask < 0), mask = mask*2 + (mask<=0), (*ptr & mask) != 0)
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
83
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
Results per page:
10
25
50
100
200