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
Francois Gouget : kernel32/tests: dll_capable() makes no sense since it' s only used on APIs we link with. So remove it.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: c43f61461fe6ff7b8d9510f7c0ff96c3c5523071 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c43f61461fe6ff7b8d9510f7c…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Dec 10 01:24:06 2007 +0100 kernel32/tests: dll_capable() makes no sense since it's only used on APIs we link with. So remove it. --- dlls/kernel32/tests/file.c | 45 ++++++++++++------------------------------- 1 files changed, 13 insertions(+), 32 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 0786964..8b8c5fa 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -28,14 +28,6 @@ #include "winbase.h" #include "winerror.h" -static int dll_capable(const char *dll, const char *function) -{ - HMODULE module = GetModuleHandleA(dll); - if (!module) return 0; - - return (GetProcAddress(module, function) != NULL); -} - /* keep filename and filenameW the same */ static const char filename[] = "testfile.xxx"; static const WCHAR filenameW[] = { 't','e','s','t','f','i','l','e','.','x','x','x',0 }; @@ -1031,7 +1023,6 @@ static void test_LockFile(void) OVERLAPPED overlapped; int limited_LockFile; int limited_UnLockFile; - int lockfileex_capable; handle = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, @@ -1068,16 +1059,12 @@ static void test_LockFile(void) S(U(overlapped)).OffsetHigh = 0; overlapped.hEvent = 0; - lockfileex_capable = dll_capable("kernel32", "LockFileEx"); - if (lockfileex_capable) + /* Test for broken LockFileEx a la Windows 95 OSR2. */ + if (LockFileEx( handle, 0, 0, 100, 0, &overlapped )) { - /* Test for broken LockFileEx a la Windows 95 OSR2. */ - if (LockFileEx( handle, 0, 0, 100, 0, &overlapped )) - { - /* LockFileEx is probably OK, test it more. */ - ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), - "LockFileEx 100,100 failed\n" ); - } + /* LockFileEx is probably OK, test it more. */ + ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), + "LockFileEx 100,100 failed\n" ); } /* overlapping shared locks are OK */ @@ -1085,20 +1072,14 @@ static void test_LockFile(void) limited_UnLockFile || ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), "LockFileEx 150,100 failed\n" ); /* but exclusive is not */ - if (lockfileex_capable) - { - ok( !LockFileEx( handle, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, - 0, 50, 0, &overlapped ), - "LockFileEx exclusive 150,50 succeeded\n" ); - if (dll_capable("kernel32.dll", "UnlockFileEx")) - { - if (!UnlockFileEx( handle, 0, 100, 0, &overlapped )) - { /* UnLockFile is capable. */ - S(U(overlapped)).Offset = 100; - ok( !UnlockFileEx( handle, 0, 100, 0, &overlapped ), - "UnlockFileEx 150,100 again succeeded\n" ); - } - } + ok( !LockFileEx( handle, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, + 0, 50, 0, &overlapped ), + "LockFileEx exclusive 150,50 succeeded\n" ); + if (!UnlockFileEx( handle, 0, 100, 0, &overlapped )) + { /* UnLockFile is capable. */ + S(U(overlapped)).Offset = 100; + ok( !UnlockFileEx( handle, 0, 100, 0, &overlapped ), + "UnlockFileEx 150,100 again succeeded\n" ); } ok( LockFile( handle, 0, 0x10000000, 0, 0xf0000000 ), "LockFile failed\n" );
1
0
0
0
Francois Gouget : winealsa.drv: Remove trailing spaces in Wine traces.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: f6bdd7dc6cad981b3ef1c1f751251c5e09160d22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6bdd7dc6cad981b3ef1c1f75…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Dec 10 01:23:19 2007 +0100 winealsa.drv: Remove trailing spaces in Wine traces. --- dlls/winealsa.drv/wavein.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winealsa.drv/wavein.c b/dlls/winealsa.drv/wavein.c index 200879b..277fa8c 100644 --- a/dlls/winealsa.drv/wavein.c +++ b/dlls/winealsa.drv/wavein.c @@ -201,7 +201,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt) read = wwi->read(wwi->pcm, lpWaveHdr->lpData + lpWaveHdr->dwBytesRecorded, frames); bytesRead = snd_pcm_frames_to_bytes(wwi->pcm, read); - TRACE("bytesRead=(%d(%d)/(%d)) -> (%d/%d) \n", bytesRead, read, frames, lpWaveHdr->dwBufferLength, lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded); + TRACE("bytesRead=(%d(%d)/(%d)) -> (%d/%d)\n", bytesRead, read, frames, lpWaveHdr->dwBufferLength, lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded); if (read != (DWORD) -1) { /* update number of bytes recorded in current buffer and by this device */
1
0
0
0
Alexandre Julliard : user32: Keep waiting for posted messages in peek_message after we get an ignored message .
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 55348e5667d6af31efb6261d2da055be5910d8e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55348e5667d6af31efb6261d2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 10 12:05:46 2007 +0100 user32: Keep waiting for posted messages in peek_message after we get an ignored message. --- dlls/user32/message.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 53d1c1d..d3f4a3a 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -2173,11 +2173,11 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags WMCHAR_MAP_RECVMESSAGE ); reply_message( &info, result, TRUE ); thread_info->receive_info = old_info; - next: - HeapFree( GetProcessHeap(), 0, buffer ); /* if some PM_QS* flags were specified, only handle sent messages from now on */ if (HIWORD(flags)) flags = PM_QS_SENDMESSAGE | LOWORD(flags); + next: + HeapFree( GetProcessHeap(), 0, buffer ); } }
1
0
0
0
Hans Leidekker : usp10: Don't trace char to glyph mappings.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: e19b2360f0d4652dd91b5adf0f9e0c35aa90edd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e19b2360f0d4652dd91b5adf0…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Sun Dec 9 21:39:44 2007 +0100 usp10: Don't trace char to glyph mappings. --- dlls/usp10/usp10.c | 32 +++----------------------------- 1 files changed, 3 insertions(+), 29 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index fb0d4da..5d77829 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1258,28 +1258,14 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, hfont = select_cached_font(psc); - TRACE("Before: "); - for (cnt = 0; cnt < cChars; cnt++) - TRACE("%4x",pwcChars[cnt]); - TRACE("\n"); - if (!psa->fNoGlyphIndex) { /* Glyph translate */ if (!(GetGlyphIndicesW(get_cache_hdc(psc), pwcChars, cChars, pwOutGlyphs, 0))) return S_FALSE; - - TRACE("After: "); - for (cnt = 0; cnt < cChars; cnt++) { - TRACE("%04x",pwOutGlyphs[cnt]); - } - TRACE("\n"); } else { - TRACE("After: "); for (cnt = 0; cnt < cChars; cnt++) { /* no translate so set up */ pwOutGlyphs[cnt] = pwcChars[cnt]; /* copy in to out and */ - TRACE("%04x",pwOutGlyphs[cnt]); } - TRACE("\n"); } /* Set up a valid SCRIPT_VISATTR and LogClust for each char in this run */ @@ -1396,7 +1382,6 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars, DWORD dwFlags, WORD *pwOutGlyphs) { - int cnt; HRESULT hr; HFONT hfont; @@ -1406,22 +1391,11 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars if ((hr = get_script_cache(hdc, psc))) return hr; hfont = select_cached_font(psc); - - TRACE("Before: "); - for (cnt = 0; cnt < cChars; cnt++) - TRACE("%4x",pwcInChars[cnt]); - TRACE("\n"); - - GetGlyphIndicesW(get_cache_hdc(psc), pwcInChars, cChars, pwOutGlyphs, 0); - - TRACE("After: "); - for (cnt = 0; cnt < cChars; cnt++) { - TRACE("%04x",pwOutGlyphs[cnt]); - } - TRACE("\n"); + if (GetGlyphIndicesW(get_cache_hdc(psc), pwcInChars, cChars, pwOutGlyphs, 0) == GDI_ERROR) + hr = S_FALSE; unselect_cached_font(psc, hfont); - return S_OK; + return hr; } /***********************************************************************
1
0
0
0
Hans Leidekker : usp10: Store original font in the script cache and reselect it on successive calls .
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 68efae1615aa2e40672bd0b1955c871a276cc64c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68efae1615aa2e40672bd0b19…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Sun Dec 9 21:39:19 2007 +0100 usp10: Store original font in the script cache and reselect it on successive calls. --- dlls/usp10/usp10.c | 59 ++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 48 insertions(+), 11 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index a7bbf16..fb0d4da 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -147,6 +147,7 @@ typedef struct { HDC hdc; LONG height; WCHAR default_char; + LOGFONTW lf; } ScriptCache; typedef struct { @@ -212,6 +213,8 @@ static HRESULT init_script_cache(const HDC hdc, ScriptCache *sc) TEXTMETRICW metric; if (!GetTextMetricsW(hdc, &metric)) return E_INVALIDARG; + if (!GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(LOGFONTW), &sc->lf)) return E_INVALIDARG; + sc->height = metric.tmHeight; sc->default_char = metric.tmDefaultChar; sc->hdc = hdc; @@ -239,6 +242,21 @@ static HRESULT get_script_cache(const HDC hdc, SCRIPT_CACHE *psc) return S_OK; } +static HFONT select_cached_font(SCRIPT_CACHE *psc) +{ + HFONT old_font; + ScriptCache *sc = *psc; + + old_font = SelectObject(sc->hdc, CreateFontIndirectW(&sc->lf)); + return old_font; +} + +static void unselect_cached_font(SCRIPT_CACHE *psc, HFONT old_font) +{ + ScriptCache *sc = *psc; + DeleteObject(SelectObject(sc->hdc, old_font)); +} + /*********************************************************************** * DllMain * @@ -1228,6 +1246,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, { int cnt; HRESULT hr; + HFONT hfont; *pcGlyphs = cChars; TRACE("(%p, %p, %p, %d, %d, %p)\n", hdc, psc, pwcChars, cChars, cMaxGlyphs, psa); @@ -1237,6 +1256,8 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, if (cChars > cMaxGlyphs) return E_OUTOFMEMORY; if ((hr = get_script_cache(hdc, psc))) return hr; + hfont = select_cached_font(psc); + TRACE("Before: "); for (cnt = 0; cnt < cChars; cnt++) TRACE("%4x",pwcChars[cnt]); @@ -1270,6 +1291,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, psva[cnt].fZeroWidth = 0; pwLogClust[cnt] = cnt; } + unselect_cached_font(psc, hfont); return S_OK; } @@ -1300,12 +1322,15 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, int wcnt; HRESULT hr; LPABC lpABC; + HFONT hfont; TRACE("(%p, %p, %p, %s, %d, %p, %p, %p)\n", hdc, psc, pwGlyphs, debugstr_wn(pwGlyphs, cGlyphs), cGlyphs, psva, psa, piAdvance); if ((hr = get_script_cache(hdc, psc))) return hr; + hfont = select_cached_font(psc); + /* Here we need to calculate the width of the run unit. At this point the input string * has been converted to glyphs and we still need to translate back to the original chars * to get the correct ABC widths. */ @@ -1315,8 +1340,8 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, memset(pABC, 0, sizeof(ABC)); /* FIXME: set pGoffset to more reasonable values */ - if (!GetCharABCWidthsI(get_cache_hdc(psc), 0, cGlyphs, (WORD *) pwGlyphs, lpABC )) - { + if (!GetCharABCWidthsI(get_cache_hdc(psc), 0, cGlyphs, (WORD *)pwGlyphs, lpABC)) + { WARN("Could not get ABC values\n"); for (wcnt = 0; wcnt < cGlyphs; wcnt++) { piAdvance[wcnt] = 0; @@ -1346,8 +1371,9 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs, if (pABC) TRACE("Total for run: abcA=%d, abcB=%d, abcC=%d\n", pABC->abcA, pABC->abcB, pABC->abcC); - usp_free(lpABC); - return S_OK; + usp_free(lpABC); + unselect_cached_font(psc, hfont); + return S_OK; } /*********************************************************************** @@ -1372,12 +1398,15 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars { int cnt; HRESULT hr; + HFONT hfont; TRACE("(%p,%p,%s,%d,0x%x,%p)\n", hdc, psc, debugstr_wn(pwcInChars, cChars), cChars, dwFlags, pwOutGlyphs); if ((hr = get_script_cache(hdc, psc))) return hr; + hfont = select_cached_font(psc); + TRACE("Before: "); for (cnt = 0; cnt < cChars; cnt++) TRACE("%4x",pwcInChars[cnt]); @@ -1391,6 +1420,7 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars } TRACE("\n"); + unselect_cached_font(psc, hfont); return S_OK; } @@ -1403,7 +1433,8 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN int iReserved, const WORD *pwGlyphs, int cGlyphs, const int *piAdvance, const int *piJustify, const GOFFSET *pGoffset) { - HRESULT hr; + HFONT hfont; + HRESULT hr = S_OK; TRACE("(%p, %p, %d, %d, %04x, %p, %p, %p, %d, %p, %d, %p, %p, %p)\n", hdc, psc, x, y, fuOptions, lprc, psa, pwcReserved, iReserved, pwGlyphs, cGlyphs, @@ -1413,14 +1444,17 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN if (!piAdvance || !psa || !pwGlyphs) return E_INVALIDARG; if ((hr = get_script_cache(hdc, psc))) return hr; + hfont = select_cached_font(psc); + fuOptions &= ETO_CLIPPED + ETO_OPAQUE; if (!psa->fNoGlyphIndex) /* Have Glyphs? */ fuOptions |= ETO_GLYPH_INDEX; /* Say don't do translation to glyph */ if (!ExtTextOutW(get_cache_hdc(psc), x, y, fuOptions, lprc, pwGlyphs, cGlyphs, NULL)) - return S_FALSE; + hr = S_FALSE; - return S_OK; + unselect_cached_font(psc, hfont); + return hr; } /*********************************************************************** @@ -1467,15 +1501,18 @@ HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, LONG *height) */ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, ABC *abc) { - HRESULT hr; + HFONT hfont; + HRESULT hr = S_OK; TRACE("(%p, %p, 0x%04x, %p)\n", hdc, psc, glyph, abc); if ((hr = get_script_cache(hdc, psc))) return hr; - /* FIXME: get this from the cache */ - if (!GetCharABCWidthsI(get_cache_hdc(psc), 0, 1, &glyph, abc)) return E_HANDLE; - return S_OK; + hfont = select_cached_font(psc); + if (!GetCharABCWidthsI(get_cache_hdc(psc), 0, 1, &glyph, abc)) hr = E_HANDLE; + + unselect_cached_font(psc, hfont); + return hr; } /***********************************************************************
1
0
0
0
Hans Leidekker : usp10: Use GetCharABCWidthsI to implement ScriptGetGlyphABCWidth.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 143f2421b67767847bca3c1cd8f9cd2d7e640407 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=143f2421b67767847bca3c1cd…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Sun Dec 9 21:39:02 2007 +0100 usp10: Use GetCharABCWidthsI to implement ScriptGetGlyphABCWidth. --- dlls/usp10/usp10.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 576b056..a7bbf16 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1474,7 +1474,7 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB if ((hr = get_script_cache(hdc, psc))) return hr; /* FIXME: get this from the cache */ - if (!GetCharABCWidthsW(get_cache_hdc(psc), glyph, glyph, abc)) return E_HANDLE; + if (!GetCharABCWidthsI(get_cache_hdc(psc), 0, 1, &glyph, abc)) return E_HANDLE; return S_OK; }
1
0
0
0
Rob Shearman : rpcrt4: Pass the USER_MARSHAL_CB structure into user marshal routines.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 766d8a17af4b8195b378c7fed2260372220fd549 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=766d8a17af4b8195b378c7fed…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sun Dec 9 18:22:57 2007 +0000 rpcrt4: Pass the USER_MARSHAL_CB structure into user marshal routines. --- dlls/rpcrt4/ndr_marshall.c | 42 +++++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 11 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 4e1d80b..66833df 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -3201,10 +3201,18 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg, pMemory = ComplexFree(pStubMsg, pMemory, pFormat, NULL); } -static ULONG UserMarshalFlags(const MIDL_STUB_MESSAGE *pStubMsg) +static void UserMarshalCB(PMIDL_STUB_MESSAGE pStubMsg, + USER_MARSHAL_CB_TYPE cbtype, PFORMAT_STRING pFormat, + USER_MARSHAL_CB *umcb) { - return MAKELONG(pStubMsg->dwDestContext, - pStubMsg->RpcMsg->DataRepresentation); + umcb->Flags = MAKELONG(pStubMsg->dwDestContext, + pStubMsg->RpcMsg->DataRepresentation); + umcb->pStubMsg = pStubMsg; + umcb->pReserve = NULL; + umcb->Signature = USER_MARSHAL_CB_SIGNATURE; + umcb->CBType = cbtype; + umcb->pFormat = pFormat; + umcb->pTypeFormat = NULL /* FIXME */; } #define USER_MARSHAL_PTR_PREFIX \ @@ -3221,10 +3229,13 @@ unsigned char * WINAPI NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned flags = pFormat[1]; unsigned index = *(const WORD*)&pFormat[2]; unsigned char *saved_buffer = NULL; - ULONG uflag = UserMarshalFlags(pStubMsg); + USER_MARSHAL_CB umcb; + TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); TRACE("index=%d\n", index); + UserMarshalCB(pStubMsg, USER_MARSHAL_CB_MARSHALL, pFormat, &umcb); + if (flags & USER_MARSHAL_POINTER) { ALIGN_POINTER(pStubMsg->Buffer, 4); @@ -3243,7 +3254,7 @@ unsigned char * WINAPI NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->Buffer = pStubMsg->StubDesc->aUserMarshalQuadruple[index].pfnMarshall( - &uflag, pStubMsg->Buffer, pMemory); + &umcb.Flags, pStubMsg->Buffer, pMemory); if (saved_buffer) { @@ -3269,10 +3280,13 @@ unsigned char * WINAPI NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned index = *(const WORD*)&pFormat[2]; DWORD memsize = *(const WORD*)&pFormat[4]; unsigned char *saved_buffer = NULL; - ULONG uflag = UserMarshalFlags(pStubMsg); + USER_MARSHAL_CB umcb; + TRACE("(%p,%p,%p,%d)\n", pStubMsg, ppMemory, pFormat, fMustAlloc); TRACE("index=%d\n", index); + UserMarshalCB(pStubMsg, USER_MARSHAL_CB_UNMARSHALL, pFormat, &umcb); + if (flags & USER_MARSHAL_POINTER) { ALIGN_POINTER(pStubMsg->Buffer, 4); @@ -3294,7 +3308,7 @@ unsigned char * WINAPI NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, pStubMsg->Buffer = pStubMsg->StubDesc->aUserMarshalQuadruple[index].pfnUnmarshall( - &uflag, pStubMsg->Buffer, *ppMemory); + &umcb.Flags, pStubMsg->Buffer, *ppMemory); if (saved_buffer) { @@ -3316,11 +3330,14 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned flags = pFormat[1]; unsigned index = *(const WORD*)&pFormat[2]; DWORD bufsize = *(const WORD*)&pFormat[6]; - ULONG uflag = UserMarshalFlags(pStubMsg); + USER_MARSHAL_CB umcb; unsigned long saved_buffer_length = 0; + TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); TRACE("index=%d\n", index); + UserMarshalCB(pStubMsg, USER_MARSHAL_CB_BUFFER_SIZE, pFormat, &umcb); + if (flags & USER_MARSHAL_POINTER) { ALIGN_LENGTH(pStubMsg->BufferLength, 4); @@ -3346,7 +3363,7 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg, else pStubMsg->BufferLength = pStubMsg->StubDesc->aUserMarshalQuadruple[index].pfnBufferSize( - &uflag, pStubMsg->BufferLength, pMemory); + &umcb.Flags, pStubMsg->BufferLength, pMemory); if (saved_buffer_length) { @@ -3401,12 +3418,15 @@ void WINAPI NdrUserMarshalFree(PMIDL_STUB_MESSAGE pStubMsg, { /* unsigned flags = pFormat[1]; */ unsigned index = *(const WORD*)&pFormat[2]; - ULONG uflag = UserMarshalFlags(pStubMsg); + USER_MARSHAL_CB umcb; + TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); TRACE("index=%d\n", index); + UserMarshalCB(pStubMsg, USER_MARSHAL_CB_FREE, pFormat, &umcb); + pStubMsg->StubDesc->aUserMarshalQuadruple[index].pfnFree( - &uflag, pMemory); + &umcb.Flags, pMemory); } /***********************************************************************
1
0
0
0
Rob Shearman : rpcrt4: NdrRangeUnmarshall is implemented so add it to the spec file.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: 80b8743aa20d8c53fdc244d0b49077242bc9e06e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80b8743aa20d8c53fdc244d0b…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sun Dec 9 18:22:36 2007 +0000 rpcrt4: NdrRangeUnmarshall is implemented so add it to the spec file. --- dlls/rpcrt4/rpcrt4.spec | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index 631d135..9005a4f 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -294,7 +294,7 @@ @ stdcall NdrProxyGetBuffer(ptr ptr) @ stdcall NdrProxyInitialize(ptr ptr ptr ptr long) @ stdcall NdrProxySendReceive(ptr ptr) -@ stub NdrRangeUnmarshall +@ stdcall NdrRangeUnmarshall(ptr ptr ptr long) @ stub NdrRpcSmClientAllocate @ stub NdrRpcSmClientFree @ stub NdrRpcSmSetClientToOsf
1
0
0
0
Rob Shearman : rpcrt4: Implement NdrConformantArrayMemorySize.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: a07afe7e06cfd594435ec9c018f226512a100dd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a07afe7e06cfd594435ec9c01…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Sun Dec 9 18:22:24 2007 +0000 rpcrt4: Implement NdrConformantArrayMemorySize. --- dlls/rpcrt4/ndr_marshall.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 7578221..4e1d80b 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2859,8 +2859,33 @@ void WINAPI NdrConformantVaryingArrayBufferSize( PMIDL_STUB_MESSAGE pStubMsg, ULONG WINAPI NdrConformantVaryingArrayMemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat ) { - FIXME( "stub\n" ); - return 0; + ULONG bufsize, memsize; + unsigned char alignment = pFormat[1] + 1; + DWORD esize = *(const WORD*)(pFormat+2); + + TRACE("(%p, %p)\n", pStubMsg, pFormat); + + if (pFormat[0] != RPC_FC_CVARRAY) + { + ERR("invalid format type %x\n", pFormat[0]); + RpcRaiseException(RPC_S_INTERNAL_ERROR); + return pStubMsg->MemorySize; + } + + pFormat = ReadConformance(pStubMsg, pFormat+4); + pFormat = ReadVariance(pStubMsg, pFormat, pStubMsg->MaxCount); + + ALIGN_POINTER(pStubMsg->Buffer, alignment); + + bufsize = safe_multiply(esize, pStubMsg->ActualCount); + memsize = safe_multiply(esize, pStubMsg->MaxCount); + + safe_buffer_increment(pStubMsg, bufsize); + pStubMsg->MemorySize += memsize; + + EmbeddedPointerMemorySize(pStubMsg, pFormat); + + return pStubMsg->MemorySize; }
1
0
0
0
Michael Stefaniuc : hlink: Rename the wrappers around HeapAlloc() &Co to use the standard names.
by Alexandre Julliard
10 Dec '07
10 Dec '07
Module: wine Branch: master Commit: e3bd2d5090dd7a01a20dcc676885391c76df9727 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3bd2d5090dd7a01a20dcc676…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Dec 9 16:29:51 2007 +0100 hlink: Rename the wrappers around HeapAlloc() &Co to use the standard names. --- dlls/hlink/browse_ctx.c | 10 +++++----- dlls/hlink/extserv.c | 10 +++++----- dlls/hlink/hlink_private.h | 8 ++++---- dlls/hlink/link.c | 28 ++++++++++++++-------------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/dlls/hlink/browse_ctx.c b/dlls/hlink/browse_ctx.c index 3b2f4b4..f0274b0 100644 --- a/dlls/hlink/browse_ctx.c +++ b/dlls/hlink/browse_ctx.c @@ -46,7 +46,7 @@ HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, if (pUnkOuter) return CLASS_E_NOAGGREGATION; - hl = hlink_alloc_zero(sizeof(HlinkBCImpl)); + hl = heap_alloc_zero(sizeof(HlinkBCImpl)); if (!hl) return E_OUTOFMEMORY; @@ -95,10 +95,10 @@ static ULONG WINAPI IHlinkBC_fnRelease (IHlinkBrowseContext* iface) return refCount; TRACE("-- destroying IHlinkBrowseContext (%p)\n", This); - hlink_free(This->BrowseWindowInfo); + heap_free(This->BrowseWindowInfo); if (This->CurrentPage) IHlink_Release(This->CurrentPage); - hlink_free(This); + heap_free(This); return 0; } @@ -155,8 +155,8 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface, HlinkBCImpl *This = (HlinkBCImpl*)iface; TRACE("(%p)->(%p)\n", This, phlbwi); - hlink_free(This->BrowseWindowInfo); - This->BrowseWindowInfo = hlink_alloc(phlbwi->cbSize); + heap_free(This->BrowseWindowInfo); + This->BrowseWindowInfo = heap_alloc(phlbwi->cbSize); memcpy(This->BrowseWindowInfo, phlbwi, phlbwi->cbSize); return S_OK; diff --git a/dlls/hlink/extserv.c b/dlls/hlink/extserv.c index b306d35..d58d1dd 100644 --- a/dlls/hlink/extserv.c +++ b/dlls/hlink/extserv.c @@ -89,9 +89,9 @@ static ULONG WINAPI ExtServUnk_Release(IUnknown *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) { - hlink_free(This->username); - hlink_free(This->password); - hlink_free(This); + heap_free(This->username); + heap_free(This->password); + heap_free(This); } return ref; @@ -220,7 +220,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, phwnd, debugstr_w(pszUsername), debugstr_w(pszPassword), punkOuter, debugstr_guid(riid), ppv); - ret = hlink_alloc(sizeof(*ret)); + ret = heap_alloc(sizeof(*ret)); ret->lpIUnknownVtbl = &ExtServUnkVtbl; ret->lpIAuthenticateVtbl = &AuthenticateVtbl; @@ -235,7 +235,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, if(len && pwzAdditionalHeaders[len-1] != '\n' && pwzAdditionalHeaders[len-1] != '\r') { static const WCHAR endlW[] = {'\r','\n',0}; - ret->headers = hlink_alloc(len*sizeof(WCHAR) + sizeof(endlW)); + ret->headers = heap_alloc(len*sizeof(WCHAR) + sizeof(endlW)); memcpy(ret->headers, pwzAdditionalHeaders, len*sizeof(WCHAR)); memcpy(ret->headers+len, endlW, sizeof(endlW)); }else { diff --git a/dlls/hlink/hlink_private.h b/dlls/hlink/hlink_private.h index ef381bd..0df374c 100644 --- a/dlls/hlink/hlink_private.h +++ b/dlls/hlink/hlink_private.h @@ -32,17 +32,17 @@ extern HRESULT WINAPI HLink_Constructor(IUnknown*,REFIID,void**); extern HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**); -static inline void *hlink_alloc(size_t len) +static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); } -static inline void *hlink_alloc_zero(size_t len) +static inline void *heap_alloc_zero(size_t len) { return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); } -static inline BOOL hlink_free(void *mem) +static inline BOOL heap_free(void *mem) { return HeapFree(GetProcessHeap(), 0, mem); } @@ -55,7 +55,7 @@ static inline LPWSTR hlink_strdupW(LPCWSTR str) DWORD size; size = (strlenW(str)+1)*sizeof(WCHAR); - ret = hlink_alloc(size); + ret = heap_alloc(size); memcpy(ret, str, size); } diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c index 179a179..1720006 100644 --- a/dlls/hlink/link.c +++ b/dlls/hlink/link.c @@ -98,7 +98,7 @@ HRESULT WINAPI HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, if (pUnkOuter) return CLASS_E_NOAGGREGATION; - hl = hlink_alloc_zero(sizeof(HlinkImpl)); + hl = heap_alloc_zero(sizeof(HlinkImpl)); if (!hl) return E_OUTOFMEMORY; @@ -155,15 +155,15 @@ static ULONG WINAPI IHlink_fnRelease (IHlink* iface) return refCount; TRACE("-- destroying IHlink (%p)\n", This); - hlink_free(This->FriendlyName); - hlink_free(This->Target); - hlink_free(This->TargetFrameName); - hlink_free(This->Location); + heap_free(This->FriendlyName); + heap_free(This->Target); + heap_free(This->TargetFrameName); + heap_free(This->Location); if (This->Moniker) IMoniker_Release(This->Moniker); if (This->Site) IHlinkSite_Release(This->Site); - hlink_free(This); + heap_free(This); return 0; } @@ -223,7 +223,7 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface, CoTaskMemFree(display_name); } - hlink_free(This->Location); + heap_free(This->Location); This->Location = hlink_strdupW( pwzLocation ); return S_OK; @@ -239,12 +239,12 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface, if (grfHLSETF & HLINKSETF_TARGET) { - hlink_free(This->Target); + heap_free(This->Target); This->Target = hlink_strdupW( pwzTarget ); } if (grfHLSETF & HLINKSETF_LOCATION) { - hlink_free(This->Location); + heap_free(This->Location); This->Location = hlink_strdupW( pwzLocation ); } @@ -313,7 +313,7 @@ static HRESULT WINAPI IHlink_fnSetFriendlyName (IHlink *iface, TRACE("(%p) -> (%s)\n", This, debugstr_w(pwzFriendlyName)); - hlink_free(This->FriendlyName); + heap_free(This->FriendlyName); This->FriendlyName = hlink_strdupW( pwzFriendlyName ); return S_OK; @@ -356,7 +356,7 @@ static HRESULT WINAPI IHlink_fnSetTargetFrameName(IHlink* iface, HlinkImpl *This = (HlinkImpl*)iface; TRACE("(%p)->(%s)\n", This, debugstr_w(pwzTargetFramename)); - hlink_free(This->TargetFrameName); + heap_free(This->TargetFrameName); This->TargetFrameName = hlink_strdupW( pwzTargetFramename ); return S_OK; @@ -648,18 +648,18 @@ static HRESULT read_hlink_string(IStream *pStm, LPWSTR *out_str) TRACE("read len %d\n", len); - str = hlink_alloc(len * sizeof(WCHAR)); + str = heap_alloc(len * sizeof(WCHAR)); if (!str) return E_OUTOFMEMORY; hr = IStream_Read(pStm, str, len * sizeof(WCHAR), &read); if (FAILED(hr)) { - hlink_free(str); + heap_free(str); return hr; } if (read != len * sizeof(WCHAR)) { - hlink_free(str); + heap_free(str); return STG_E_READFAULT; } TRACE("read string %s\n", debugstr_w(str));
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
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