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
February 2009
----- 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
965 discussions
Start a n
N
ew thread
Michael Stefaniuc : msacm32: Split out the 16bit parts of the private header.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: a6f512ffc64fca2267c88a3e3d44aa72213a2816 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6f512ffc64fca2267c88a3e3…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Feb 17 22:05:24 2009 +0100 msacm32: Split out the 16bit parts of the private header. --- dlls/msacm32/msacm_main.c | 2 +- dlls/msacm32/wineacm.h | 261 ----------------------------------------- dlls/msacm32/wineacm16.h | 282 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+), 262 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a6f512ffc64fca2267c88…
1
0
0
0
Michael Stefaniuc : msacm32.drv: dwInstance, dwParam1, dwParam2 and dwUser are DWORD_PTRs.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: a2c91446301e7472f7edb207b4b00786a928097b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2c91446301e7472f7edb207b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Feb 17 22:04:58 2009 +0100 msacm32.drv: dwInstance, dwParam1, dwParam2 and dwUser are DWORD_PTRs. Fixes 63 Win64 compile warnings. --- dlls/msacm32.drv/wavemap.c | 64 +++++++++++++++++++++++-------------------- 1 files changed, 34 insertions(+), 30 deletions(-) diff --git a/dlls/msacm32.drv/wavemap.c b/dlls/msacm32.drv/wavemap.c index 96f4626..a9d84af 100644 --- a/dlls/msacm32.drv/wavemap.c +++ b/dlls/msacm32.drv/wavemap.c @@ -77,7 +77,7 @@ static BOOL WAVEMAP_IsData(const WAVEMAPDATA* wm) *======================================================================*/ static void CALLBACK wodCallback(HWAVEOUT hWave, UINT uMsg, DWORD_PTR dwInstance, - LPARAM dwParam1, LPARAM dwParam2) + DWORD_PTR dwParam1, DWORD_PTR dwParam2) { WAVEMAPDATA* wom = (WAVEMAPDATA*)dwInstance; @@ -104,7 +104,7 @@ static void CALLBACK wodCallback(HWAVEOUT hWave, UINT uMsg, DWORD_PTR dwInstance lpWaveHdrSrc->dwFlags &= ~WHDR_INQUEUE; lpWaveHdrSrc->dwFlags |= WHDR_DONE; - dwParam1 = (DWORD)lpWaveHdrSrc; + dwParam1 = (DWORD_PTR)lpWaveHdrSrc; } break; default: @@ -137,8 +137,9 @@ static DWORD wodOpenHelper(WAVEMAPDATA* wom, UINT idx, ret = acmStreamOpen(&wom->hAcmStream, 0, lpDesc->lpFormat, lpwfx, NULL, 0L, 0L, 0L); } if (ret == MMSYSERR_NOERROR) { - ret = waveOutOpen(&wom->u.out.hInnerWave, idx, lpwfx, (DWORD)wodCallback, - (DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION); + ret = waveOutOpen(&wom->u.out.hInnerWave, idx, lpwfx, + (DWORD_PTR)wodCallback, (DWORD_PTR)wom, + (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION); if (ret != MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY)) { acmStreamClose(wom->hAcmStream, 0); wom->hAcmStream = 0; @@ -187,8 +188,9 @@ static DWORD wodOpen(LPDWORD lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags) /* if no ACM stuff is involved, no need to handle callbacks at this * level, this will be done transparently */ - if (waveOutOpen(&wom->u.out.hInnerWave, i, lpDesc->lpFormat, (DWORD)wodCallback, - (DWORD)wom, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) { + if (waveOutOpen(&wom->u.out.hInnerWave, i, lpDesc->lpFormat, + (DWORD_PTR)wodCallback, (DWORD_PTR)wom, + (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) { wom->hAcmStream = 0; goto found; } @@ -278,7 +280,7 @@ found: *lpdwUser = 0L; HeapFree(GetProcessHeap(), 0, wom); } else { - *lpdwUser = (DWORD)wom; + *lpdwUser = (DWORD_PTR)wom; } return MMSYSERR_NOERROR; error: @@ -369,7 +371,7 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2 ash->cbStruct = sizeof(*ash); ash->fdwStatus = 0L; - ash->dwUser = (DWORD)lpWaveHdrSrc; + ash->dwUser = (DWORD_PTR)lpWaveHdrSrc; ash->pbSrc = (LPBYTE)lpWaveHdrSrc->lpData; ash->cbSrcLength = lpWaveHdrSrc->dwBufferLength; /* ash->cbSrcLengthUsed */ @@ -395,7 +397,7 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2 goto errCleanUp; } - lpWaveHdrSrc->reserved = (DWORD)ash; + lpWaveHdrSrc->reserved = (DWORD_PTR)ash; lpWaveHdrSrc->dwFlags = WHDR_PREPARED; TRACE("=> (0)\n"); return MMSYSERR_NOERROR; @@ -498,7 +500,7 @@ static DWORD wodGetDevCaps(UINT wDevID, WAVEMAPDATA* wom, LPWAVEOUTCAPSW lpWaveC /* if opened low driver, forward message */ if (WAVEMAP_IsData(wom)) - return waveOutGetDevCapsW((UINT)wom->u.out.hInnerWave, lpWaveCaps, dwParam2); + return waveOutGetDevCapsW((UINT_PTR)wom->u.out.hInnerWave, lpWaveCaps, dwParam2); /* else if no drivers, nothing to map so return bad device */ if (waveOutGetNumDevs() == 0) { WARN("bad device id\n"); @@ -612,10 +614,10 @@ static DWORD wodMapperReconfigure(WAVEMAPDATA* wom, DWORD dwParam1, DWORD dwP /************************************************************************** * wodMessage (MSACM.@) */ -DWORD WINAPI WAVEMAP_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, - DWORD dwParam1, DWORD dwParam2) +DWORD WINAPI WAVEMAP_wodMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, + DWORD_PTR dwParam1, DWORD_PTR dwParam2) { - TRACE("(%u, %04X, %08X, %08X, %08X);\n", + TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); switch (wMsg) { @@ -659,12 +661,12 @@ DWORD WINAPI WAVEMAP_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser, * WAVE IN part * *======================================================================*/ -static void CALLBACK widCallback(HWAVEIN hWave, UINT uMsg, DWORD dwInstance, - DWORD dwParam1, DWORD dwParam2) +static void CALLBACK widCallback(HWAVEIN hWave, UINT uMsg, DWORD_PTR dwInstance, + DWORD_PTR dwParam1, DWORD_PTR dwParam2) { - WAVEMAPDATA* wim = (WAVEMAPDATA*)dwInstance; + WAVEMAPDATA* wim = (WAVEMAPDATA*)dwInstance; - TRACE("(%p %u %d %x %x);\n", hWave, uMsg, dwInstance, dwParam1, dwParam2); + TRACE("(%p %u %lx %lx %lx);\n", hWave, uMsg, dwInstance, dwParam1, dwParam2); if (!WAVEMAP_IsData(wim)) { ERR("Bad data\n"); @@ -696,7 +698,7 @@ static void CALLBACK widCallback(HWAVEIN hWave, UINT uMsg, DWORD dwInstance, lpWaveHdrDst->dwFlags &= ~WHDR_INQUEUE; lpWaveHdrDst->dwFlags |= WHDR_DONE; lpWaveHdrDst->dwBytesRecorded = ash->cbDstLengthUsed; - dwParam1 = (DWORD)lpWaveHdrDst; + dwParam1 = (DWORD_PTR)lpWaveHdrDst; } break; default: @@ -724,8 +726,9 @@ static DWORD widOpenHelper(WAVEMAPDATA* wim, UINT idx, ret = acmStreamOpen(&wim->hAcmStream, 0, lpwfx, lpDesc->lpFormat, NULL, 0L, 0L, 0L); } if (ret == MMSYSERR_NOERROR) { - ret = waveInOpen(&wim->u.in.hInnerWave, idx, lpwfx, (DWORD)widCallback, - (DWORD)wim, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION); + ret = waveInOpen(&wim->u.in.hInnerWave, idx, lpwfx, + (DWORD_PTR)widCallback, (DWORD_PTR)wim, + (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION); if (ret != MMSYSERR_NOERROR && !(dwFlags & WAVE_FORMAT_QUERY)) { acmStreamClose(wim->hAcmStream, 0); wim->hAcmStream = 0; @@ -769,8 +772,9 @@ static DWORD widOpen(LPDWORD lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wim->nSamplesPerSecOuter = wim->nSamplesPerSecInner = lpDesc->lpFormat->nSamplesPerSec; for (i = ndlo; i < ndhi; i++) { - if (waveInOpen(&wim->u.in.hInnerWave, i, lpDesc->lpFormat, (DWORD)widCallback, - (DWORD)wim, (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) { + if (waveInOpen(&wim->u.in.hInnerWave, i, lpDesc->lpFormat, + (DWORD_PTR)widCallback, (DWORD_PTR)wim, + (dwFlags & ~CALLBACK_TYPEMASK) | CALLBACK_FUNCTION | WAVE_FORMAT_DIRECT) == MMSYSERR_NOERROR) { wim->hAcmStream = 0; goto found; } @@ -847,9 +851,9 @@ found: *lpdwUser = 0L; HeapFree(GetProcessHeap(), 0, wim); } else { - *lpdwUser = (DWORD)wim; + *lpdwUser = (DWORD_PTR)wim; } - TRACE("Ok (stream=%08x)\n", (DWORD)wim->hAcmStream); + TRACE("Ok (stream=%p)\n", wim->hAcmStream); return MMSYSERR_NOERROR; error: HeapFree(GetProcessHeap(), 0, wim); @@ -923,7 +927,7 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2 ash->cbStruct = sizeof(*ash); ash->fdwStatus = 0L; - ash->dwUser = (DWORD)lpWaveHdrDst; + ash->dwUser = (DWORD_PTR)lpWaveHdrDst; ash->pbSrc = (LPBYTE)ash + sizeof(ACMSTREAMHEADER) + sizeof(WAVEHDR); ash->cbSrcLength = size; /* ash->cbSrcLengthUsed */ @@ -949,7 +953,7 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2 goto errCleanUp; } - lpWaveHdrDst->reserved = (DWORD)ash; + lpWaveHdrDst->reserved = (DWORD_PTR)ash; lpWaveHdrDst->dwFlags = WHDR_PREPARED; TRACE("=> (0)\n"); return MMSYSERR_NOERROR; @@ -1050,7 +1054,7 @@ static DWORD widGetDevCaps(UINT wDevID, WAVEMAPDATA* wim, LPWAVEINCAPSW lpWaveCa /* if opened low driver, forward message */ if (WAVEMAP_IsData(wim)) - return waveInGetDevCapsW((UINT)wim->u.in.hInnerWave, lpWaveCaps, dwParam2); + return waveInGetDevCapsW((UINT_PTR)wim->u.in.hInnerWave, lpWaveCaps, dwParam2); /* else if no drivers, nothing to map so return bad device */ if (waveInGetNumDevs() == 0) { WARN("bad device id\n"); @@ -1139,10 +1143,10 @@ static DWORD widMapperReconfigure(WAVEMAPDATA* wim, DWORD dwParam1, DWORD dwP /************************************************************************** * widMessage (MSACM.@) */ -DWORD WINAPI WAVEMAP_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser, - DWORD dwParam1, DWORD dwParam2) +DWORD WINAPI WAVEMAP_widMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser, + DWORD_PTR dwParam1, DWORD_PTR dwParam2) { - TRACE("(%u, %04X, %08X, %08X, %08X);\n", + TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n", wDevID, wMsg, dwUser, dwParam1, dwParam2); switch (wMsg) {
1
0
0
0
Huw Davies : gdi32: The special handling of the character codes metrics for symbol fonts should be based on the presence of the MS symbol charmap rather than whether the font is enumerated as SYMBOL_CHARSET .
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 2c6ddb8030cd8e90a43c8291c7720229d3354582 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c6ddb8030cd8e90a43c8291c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 18 10:33:12 2009 +0000 gdi32: The special handling of the character codes metrics for symbol fonts should be based on the presence of the MS symbol charmap rather than whether the font is enumerated as SYMBOL_CHARSET. --- dlls/gdi32/freetype.c | 14 +++++++++++++- dlls/gdi32/tests/font.c | 46 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 409c92f..57bb40b 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5257,6 +5257,17 @@ BOOL WineEngGetTextMetrics(GdiFont *font, LPTEXTMETRICW ptm) return TRUE; } +static BOOL face_has_symbol_charmap(FT_Face ft_face) +{ + int i; + + for(i = 0; i < ft_face->num_charmaps; i++) + { + if(ft_face->charmaps[i]->encoding == FT_ENCODING_MS_SYMBOL) + return TRUE; + } + return FALSE; +} /************************************************************* * WineEngGetOutlineTextMetrics @@ -5396,7 +5407,8 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize, /* It appears that for fonts with SYMBOL_CHARSET Windows always sets * symbol range to 0 - f0ff */ - if (font->charset == SYMBOL_CHARSET || (pOS2->usFirstCharIndex >= 0xf000 && pOS2->usFirstCharIndex < 0xf100)) + + if (face_has_symbol_charmap(ft_face) || (pOS2->usFirstCharIndex >= 0xf000 && pOS2->usFirstCharIndex < 0xf100)) { TM.tmFirstChar = 0; switch(GetACP()) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 8c0cc67..bc9d64c 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2182,7 +2182,14 @@ static void *get_cmap(cmap_header *header, USHORT plat_id, USHORT enc_id) return NULL; } -static BOOL get_first_last_from_cmap(HDC hdc, DWORD *first, DWORD *last) +typedef enum +{ + cmap_none, + cmap_ms_unicode, + cmap_ms_symbol +} cmap_type; + +static BOOL get_first_last_from_cmap(HDC hdc, DWORD *first, DWORD *last, cmap_type *cmap_type) { LONG size, ret; cmap_header *header; @@ -2200,8 +2207,18 @@ static BOOL get_first_last_from_cmap(HDC hdc, DWORD *first, DWORD *last) ok(GET_BE_WORD(header->version) == 0, "got cmap version %d\n", GET_BE_WORD(header->version)); cmap = get_cmap(header, 3, 1); - if(!cmap) cmap = get_cmap(header, 3, 0); - if(!cmap) goto end; + if(cmap) + *cmap_type = cmap_ms_unicode; + else + { + cmap = get_cmap(header, 3, 0); + if(cmap) *cmap_type = cmap_ms_symbol; + } + if(!cmap) + { + *cmap_type = cmap_none; + goto end; + } format = GET_BE_WORD(*(WORD *)cmap); switch(format) @@ -2231,6 +2248,7 @@ static void test_text_metrics(const LOGFONTA *lf) LONG size, ret; const char *font_name = lf->lfFaceName; DWORD cmap_first = 0, cmap_last = 0; + cmap_type cmap_type; hdc = GetDC(0); @@ -2260,7 +2278,7 @@ static void test_text_metrics(const LOGFONTA *lf) ret = GetTextMetricsA(hdc, &tmA); ok(ret, "GetTextMetricsA error %u\n", GetLastError()); - if(!get_first_last_from_cmap(hdc, &cmap_first, &cmap_last)) + if(!get_first_last_from_cmap(hdc, &cmap_first, &cmap_last, &cmap_type)) { skip("Unable to retrieve first and last glyphs from cmap\n"); } @@ -2283,7 +2301,7 @@ static void test_text_metrics(const LOGFONTA *lf) font_name, lf->lfCharSet, os2_first_char, os2_last_char, cmap_first, cmap_last, default_char, break_char, version, (LPCSTR)&tt_os2.achVendID); - if (lf->lfCharSet == SYMBOL_CHARSET || (cmap_first >= 0xf000 && cmap_first < 0xf100)) + if (cmap_type == cmap_ms_symbol || (cmap_first >= 0xf000 && cmap_first < 0xf100)) { expect_first_W = 0; switch(GetACP()) @@ -2316,9 +2334,15 @@ static void test_text_metrics(const LOGFONTA *lf) expect_break_A = expect_break_W; expect_default_A = expect_default_W; - ok(tmA.tmFirstChar == expect_first_A || - tmA.tmFirstChar == expect_first_A + 1 /* win9x */, - "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); + /* Wine currently uses SYMBOL_CHARSET to identify whether the ANSI metrics need special handling */ + if(cmap_type != cmap_ms_symbol && tmA.tmCharSet == SYMBOL_CHARSET && expect_first_A != 0x1e) + todo_wine ok(tmA.tmFirstChar == expect_first_A || + tmA.tmFirstChar == expect_first_A + 1 /* win9x */, + "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); + else + ok(tmA.tmFirstChar == expect_first_A || + tmA.tmFirstChar == expect_first_A + 1 /* win9x */, + "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); ok(tmA.tmLastChar == expect_last_A || tmA.tmLastChar == 0xff /* win9x */, "A: tmLastChar for %s got %02x expected %02x\n", font_name, tmA.tmLastChar, expect_last_A); @@ -2334,14 +2358,16 @@ static void test_text_metrics(const LOGFONTA *lf) "GetTextMetricsW error %u\n", GetLastError()); if (ret) { - if(cmap_first != os2_first_char && tmW.tmCharSet != SYMBOL_CHARSET) + /* Wine uses the os2 first char */ + if(cmap_first != os2_first_char && cmap_type != cmap_ms_symbol) todo_wine ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", font_name, tmW.tmFirstChar, expect_first_W); else ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", font_name, tmW.tmFirstChar, expect_first_W); - if(expect_last_W != os2_last_char && tmW.tmCharSet != SYMBOL_CHARSET) + /* Wine uses the os2 last char */ + if(expect_last_W != os2_last_char && cmap_type != cmap_ms_symbol) todo_wine ok(tmW.tmLastChar == expect_last_W, "W: tmLastChar for %s got %02x expected %02x\n", font_name, tmW.tmLastChar, expect_last_W); else
1
0
0
0
Huw Davies : gdi32/tests: Win9x truncates the LONG elements of LOGFONT to 16 bit values.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: c40b43417258d89bf019075741a43fae88100224 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c40b43417258d89bf01907574…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Feb 17 16:35:34 2009 +0000 gdi32/tests: Win9x truncates the LONG elements of LOGFONT to 16 bit values. --- dlls/gdi32/tests/font.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 89a7225..8c0cc67 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -106,11 +106,21 @@ static void check_font(const char* test, const LOGFONTA* lf, HFONT hfont) minlen++; minlen += FIELD_OFFSET(LOGFONTA, lfFaceName) + 1; ok(ret == sizeof(LOGFONTA) || ret == minlen, "%s: GetObject returned %d\n", test, ret); - ok(lf->lfHeight == getobj_lf.lfHeight, "lfHeight: expect %08x got %08x\n", lf->lfHeight, getobj_lf.lfHeight); - ok(lf->lfWidth == getobj_lf.lfWidth, "lfWidth: expect %08x got %08x\n", lf->lfWidth, getobj_lf.lfWidth); - ok(lf->lfEscapement == getobj_lf.lfEscapement, "lfEscapement: expect %08x got %08x\n", lf->lfEscapement, getobj_lf.lfEscapement); - ok(lf->lfOrientation == getobj_lf.lfOrientation, "lfOrientation: expect %08x got %08x\n", lf->lfOrientation, getobj_lf.lfOrientation); - ok(lf->lfWeight == getobj_lf.lfWeight, "lfWeight: expect %08x got %08x\n", lf->lfWeight, getobj_lf.lfWeight); + ok(lf->lfHeight == getobj_lf.lfHeight || + broken((SHORT)lf->lfHeight == getobj_lf.lfHeight), /* win9x */ + "lfHeight: expect %08x got %08x\n", lf->lfHeight, getobj_lf.lfHeight); + ok(lf->lfWidth == getobj_lf.lfWidth || + broken((SHORT)lf->lfWidth == getobj_lf.lfWidth), /* win9x */ + "lfWidth: expect %08x got %08x\n", lf->lfWidth, getobj_lf.lfWidth); + ok(lf->lfEscapement == getobj_lf.lfEscapement || + broken((SHORT)lf->lfEscapement == getobj_lf.lfEscapement), /* win9x */ + "lfEscapement: expect %08x got %08x\n", lf->lfEscapement, getobj_lf.lfEscapement); + ok(lf->lfOrientation == getobj_lf.lfOrientation || + broken((SHORT)lf->lfOrientation == getobj_lf.lfOrientation), /* win9x */ + "lfOrientation: expect %08x got %08x\n", lf->lfOrientation, getobj_lf.lfOrientation); + ok(lf->lfWeight == getobj_lf.lfWeight || + broken((SHORT)lf->lfWeight == getobj_lf.lfWeight), /* win9x */ + "lfWeight: expect %08x got %08x\n", lf->lfWeight, getobj_lf.lfWeight); ok(lf->lfItalic == getobj_lf.lfItalic, "lfItalic: expect %02x got %02x\n", lf->lfItalic, getobj_lf.lfItalic); ok(lf->lfUnderline == getobj_lf.lfUnderline, "lfUnderline: expect %02x got %02x\n", lf->lfUnderline, getobj_lf.lfUnderline); ok(lf->lfStrikeOut == getobj_lf.lfStrikeOut, "lfStrikeOut: expect %02x got %02x\n", lf->lfStrikeOut, getobj_lf.lfStrikeOut);
1
0
0
0
Rein Klazes : user32: Do not handle WM_ENDSESSION in DefWindowProc() with test.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: d69340cd6bb6e0385f9461efb72af360d1d94947 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d69340cd6bb6e0385f9461efb…
Author: Rein Klazes <wijn(a)online.nl> Date: Wed Feb 18 07:49:15 2009 +0100 user32: Do not handle WM_ENDSESSION in DefWindowProc() with test. --- dlls/user32/defwnd.c | 5 ----- dlls/user32/tests/msg.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index c4951df..38d8def 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -662,11 +662,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_QUERYENDSESSION: return 1; - case WM_ENDSESSION: - if (wParam) - PostQuitMessage(0); - return 0; - case WM_SETICON: { HICON ret; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 584cc4f..147f5b7 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11351,6 +11351,22 @@ static void test_paintingloop(void) DestroyWindow(hwnd); } +static void test_defwinproc(void) +{ + HWND hwnd; + MSG msg; + int gotwmquit = FALSE; + hwnd = CreateWindowExA(0, "static", "test_defwndproc", WS_POPUP, 0,0,0,0,0,0,0, NULL); + assert(hwnd); + DefWindowProcA( hwnd, WM_ENDSESSION, 1, 0); + while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) { + if( msg.message == WM_QUIT) gotwmquit = TRUE; + DispatchMessageA( &msg ); + } + ok( gotwmquit == FALSE, "Unexpected WM_QUIT message!\n"); + DestroyWindow( hwnd); +} + START_TEST(msg) { BOOL ret; @@ -11432,6 +11448,7 @@ START_TEST(msg) test_dbcs_wm_char(); test_menu_messages(); test_paintingloop(); + test_defwinproc(); /* keep it the last test, under Windows it tends to break the tests * which rely on active/foreground windows being correct. */
1
0
0
0
Alexandre Julliard : ntdll: Move the CPU-specific handling of current TEB to the respective signal files .
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 66255772fc4116f192413d56d13a49f79700ea9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66255772fc4116f192413d56d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 18 13:04:50 2009 +0100 ntdll: Move the CPU-specific handling of current TEB to the respective signal files. --- dlls/ntdll/ntdll_misc.h | 5 ++++- dlls/ntdll/signal_i386.c | 23 +++++++++++++++-------- dlls/ntdll/signal_powerpc.c | 21 +++++++++++++++++++-- dlls/ntdll/signal_sparc.c | 21 ++++++++++++++++++++- dlls/ntdll/signal_x86_64.c | 11 +++++++++-- dlls/ntdll/thread.c | 32 ++------------------------------ 6 files changed, 69 insertions(+), 44 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index b42303c..90c74a9 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -22,6 +22,9 @@ #include <stdarg.h> #include <signal.h> #include <sys/types.h> +#ifdef HAVE_PTHREAD_H +# include <pthread.h> +#endif #include "windef.h" #include "winnt.h" @@ -52,7 +55,7 @@ extern NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handl const LARGE_INTEGER *timeout, HANDLE signal_object ); /* init routines */ -extern void signal_init_thread(void); +extern void signal_init_thread( TEB *teb ); extern void signal_init_process(void); extern size_t get_signal_stack_total_size(void); extern void version_init( const WCHAR *appname ); diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index ffa60ad..790d9ca 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -372,6 +372,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); typedef int (*wine_signal_handler)(unsigned int sig); +static const size_t teb_size = 4096; /* we reserve one page for the TEB */ static size_t signal_stack_mask; static size_t signal_stack_size; @@ -1578,8 +1579,6 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ size_t get_signal_stack_total_size(void) { - static const size_t teb_size = 4096; /* we reserve one page for the TEB */ - if (!signal_stack_size) { size_t size = 8192, min_size = teb_size + max( MINSIGSTKSZ, 8192 ); @@ -1607,9 +1606,10 @@ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) /********************************************************************** * signal_init_thread */ -void signal_init_thread(void) +void signal_init_thread( TEB *teb ) { -#ifdef HAVE_SIGALTSTACK + struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; + LDT_ENTRY fs_entry; stack_t ss; #ifdef __APPLE__ @@ -1620,13 +1620,16 @@ void signal_init_thread(void) sysctl( mib, 2, NULL, NULL, &val, sizeof(val) ); #endif - ss.ss_sp = get_signal_stack(); + ss.ss_sp = (char *)teb + teb_size; ss.ss_size = signal_stack_size; ss.ss_flags = 0; if (sigaltstack(&ss, NULL) == -1) perror( "sigaltstack" ); -#endif /* HAVE_SIGALTSTACK */ - ntdll_get_thread_data()->gs = wine_get_gs(); + wine_ldt_set_base( &fs_entry, teb ); + wine_ldt_set_limit( &fs_entry, teb_size - 1 ); + wine_ldt_set_flags( &fs_entry, WINE_LDT_FLAGS_DATA|WINE_LDT_FLAGS_32BIT ); + wine_ldt_init_fs( thread_data->fs, &fs_entry ); + thread_data->gs = wine_get_gs(); } /********************************************************************** @@ -1670,7 +1673,6 @@ void signal_init_process(void) if (sigaction( SIGUSR2, &sig_act, NULL ) == -1) goto error; #endif - signal_init_thread(); return; error: @@ -1775,6 +1777,11 @@ __ASM_GLOBAL_FUNC( DbgBreakPoint, "int $3; ret") */ __ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int $3; ret") +/********************************************************************** + * NtCurrentTeb (NTDLL.@) + */ +__ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" ) + /********************************************************************** * EXC_CallHandler (internal) diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c index c790f84..084c351 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c @@ -60,6 +60,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); +static pthread_key_t teb_key; /*********************************************************************** * signal context platform-specific definitions @@ -646,10 +647,19 @@ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) /********************************************************************** * signal_init_thread */ -void signal_init_thread(void) +void signal_init_thread( TEB *teb ) { + static int init_done; + + if (!init_done) + { + pthread_key_create( &teb_key, NULL ); + init_done = 1; + } + pthread_setspecific( teb_key, teb ); } + /********************************************************************** * signal_init_process */ @@ -668,7 +678,6 @@ void signal_init_process(void) #ifdef SIGTRAP if (set_handler( SIGTRAP, (void (*)())trap_handler ) == -1) goto error; #endif - signal_init_thread(); return; error: @@ -701,4 +710,12 @@ void WINAPI DbgUserBreakPoint(void) kill(getpid(), SIGTRAP); } +/********************************************************************** + * NtCurrentTeb (NTDLL.@) + */ +TEB * WINAPI NtCurrentTeb(void) +{ + return pthread_getspecific( teb_key ); +} + #endif /* __powerpc__ */ diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c index 54165ee..dddc183 100644 --- a/dlls/ntdll/signal_sparc.c +++ b/dlls/ntdll/signal_sparc.c @@ -44,6 +44,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); +static pthread_key_t teb_key; + #define HANDLER_DEF(name) void name( int __signal, struct siginfo *__siginfo, ucontext_t *__context ) #define HANDLER_CONTEXT (__context) @@ -459,10 +461,19 @@ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) /********************************************************************** * signal_init_thread */ -void signal_init_thread(void) +void signal_init_thread( TEB *teb ) { + static int init_done; + + if (!init_done) + { + pthread_key_create( &teb_key, NULL ); + init_done = 1; + } + pthread_setspecific( teb_key, teb ); } + /********************************************************************** * signal_init_process */ @@ -516,4 +527,12 @@ void WINAPI DbgUserBreakPoint(void) kill(getpid(), SIGTRAP); } +/********************************************************************** + * NtCurrentTeb (NTDLL.@) + */ +TEB * WINAPI NtCurrentTeb(void) +{ + return pthread_getspecific( teb_key ); +} + #endif /* __sparc__ */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 4a57099..86f2f37 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -55,6 +55,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); */ #ifdef linux +#include <asm/prctl.h> +extern int arch_prctl(int func, void *ptr); + typedef struct ucontext SIGCONTEXT; # define HANDLER_DEF(name) void name( int __signal, struct siginfo *__siginfo, SIGCONTEXT *__context ) @@ -532,8 +535,13 @@ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) /********************************************************************** * signal_init_thread */ -void signal_init_thread(void) +void signal_init_thread( TEB *teb ) { +#ifdef __linux__ + arch_prctl( ARCH_SET_GS, teb ); +#else +# error Please define setting %gs for your architecture +#endif } /********************************************************************** @@ -554,7 +562,6 @@ void signal_init_process(void) #ifdef SIGTRAP if (set_handler( SIGTRAP, (void (*)())trap_handler ) == -1) goto error; #endif - signal_init_thread(); return; error: diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index f2806d9..7c66660 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -296,7 +296,7 @@ HANDLE thread_init(void) thread_info.teb_base = teb; thread_info.teb_sel = thread_data->fs; wine_pthread_get_functions( &pthread_functions, sizeof(pthread_functions) ); - pthread_functions.init_current_teb( &thread_info ); + signal_init_thread( teb ); pthread_functions.init_thread( &thread_info ); virtual_init_threading(); @@ -424,8 +424,7 @@ static void start_thread( struct wine_pthread_thread_info *info ) debug_info.out_pos = debug_info.output; thread_data->debug_info = &debug_info; - pthread_functions.init_current_teb( info ); - signal_init_thread(); + signal_init_thread( teb ); server_init_thread( func ); pthread_functions.init_thread( info ); virtual_alloc_thread_stack( info->stack_base, info->stack_size ); @@ -1471,30 +1470,3 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, return STATUS_NOT_IMPLEMENTED; } } - - -/********************************************************************** - * NtCurrentTeb (NTDLL.@) - */ -#if defined(__i386__) && defined(__GNUC__) - -__ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" ) - -#elif defined(__i386__) && defined(_MSC_VER) - -/* Nothing needs to be done. MS C "magically" exports the inline version from winnt.h */ - -#elif defined(__x86_64__) && defined(__GNUC__) - -/* not exported on x86_64 */ - -#else - -/**********************************************************************/ - -TEB * WINAPI NtCurrentTeb(void) -{ - return pthread_functions.get_current_teb(); -} - -#endif /* __i386__ */
1
0
0
0
Alexandre Julliard : ntdll: Determine the Unix tid for the server directly in ntdll.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 5adfec2883bc4eebf31e096f695bd915e932d5af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5adfec2883bc4eebf31e096f6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 18 12:30:01 2009 +0100 ntdll: Determine the Unix tid for the server directly in ntdll. --- dlls/ntdll/Makefile.in | 2 +- dlls/ntdll/ntdll_misc.h | 2 +- dlls/ntdll/server.c | 36 +++++++++++++++++++++++++++++++++--- dlls/ntdll/thread.c | 4 ++-- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index ac85587..98fe921 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -5,7 +5,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = ntdll.dll IMPORTLIB = ntdll -EXTRALIBS = @IOKITLIB@ +EXTRALIBS = @IOKITLIB@ @LIBPTHREAD@ EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000 C_SRCS = \ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 444a211..b42303c 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -67,7 +67,7 @@ extern void virtual_init_threading(void); extern timeout_t server_start_time; extern void server_init_process(void); extern NTSTATUS server_init_process_done(void); -extern size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ); +extern size_t server_init_thread( void *entry_point ); extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... ); extern void DECLSPEC_NORETURN server_protocol_perror( const char *err ); extern void DECLSPEC_NORETURN server_exit_thread( int status ); diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 145540f..2a0b3e0 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -51,6 +51,10 @@ #ifdef HAVE_SYS_UIO_H #include <sys/uio.h> #endif +#ifdef HAVE_SYS_THR_H +#include <sys/ucontext.h> +#include <sys/thr.h> +#endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif @@ -927,6 +931,32 @@ static void send_server_task_port(void) } #endif /* __APPLE__ */ + +/*********************************************************************** + * get_unix_tid + * + * Retrieve the Unix tid to use on the server side for the current thread. + */ +static int get_unix_tid(void) +{ + int ret = -1; +#if defined(linux) && defined(__i386__) + __asm__("int $0x80" : "=a" (ret) : "0" (224) /* SYS_gettid */); +#elif defined(linux) && defined(__x86_64__) + __asm__("syscall" : "=a" (ret) : "0" (186) /* SYS_gettid */); +#elif defined(__sun) + ret = pthread_self(); +#elif defined(__APPLE__) + ret = mach_thread_self(); +#elif defined(__FreeBSD__) + long lwpid; + thr_self( &lwpid ); + ret = lwpid; +#endif + return ret; +} + + /*********************************************************************** * server_init_process * @@ -1012,7 +1042,7 @@ NTSTATUS server_init_process_done(void) * * Send an init thread request. Return 0 if OK. */ -size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ) +size_t server_init_thread( void *entry_point ) { int ret; int reply_pipe[2]; @@ -1046,8 +1076,8 @@ size_t server_init_thread( int unix_pid, int unix_tid, void *entry_point ) SERVER_START_REQ( init_thread ) { - req->unix_pid = unix_pid; - req->unix_tid = unix_tid; + req->unix_pid = getpid(); + req->unix_tid = get_unix_tid(); req->teb = wine_server_client_ptr( NtCurrentTeb() ); req->peb = wine_server_client_ptr( NtCurrentTeb()->Peb ); req->entry = wine_server_client_ptr( entry_point ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 56d742d..f2806d9 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -306,7 +306,7 @@ HANDLE thread_init(void) /* setup the server connection */ server_init_process(); - info_size = server_init_thread( thread_info.pid, thread_info.tid, NULL ); + info_size = server_init_thread( NULL ); /* create the process heap */ if (!(peb->ProcessHeap = RtlCreateHeap( HEAP_GROWABLE, NULL, 0, 0, NULL, NULL ))) @@ -426,7 +426,7 @@ static void start_thread( struct wine_pthread_thread_info *info ) pthread_functions.init_current_teb( info ); signal_init_thread(); - server_init_thread( info->pid, info->tid, func ); + server_init_thread( func ); pthread_functions.init_thread( info ); virtual_alloc_thread_stack( info->stack_base, info->stack_size ); pthread_functions.sigprocmask( SIG_UNBLOCK, &server_block_set, NULL );
1
0
0
0
Vincent Povirk : gdiplus: Fix GdipCreateBitmapFromHBITMAP flipping images vertically.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: f365ef46f0d8a38aebf13aac0cfdb302ebbaa840 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f365ef46f0d8a38aebf13aac0…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Feb 17 14:39:17 2009 -0600 gdiplus: Fix GdipCreateBitmapFromHBITMAP flipping images vertically. GdipCreateBitmapFromHBITMAP currently assumes that all bitmaps are top-down, even though a positive height (which it also assumes) signals a bottom-up DIB. The net result is that GdipCreateBitmapFromHBITMAP flips images vertically. --- dlls/gdiplus/image.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index ab70354..a229f8b 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1499,6 +1499,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi BITMAP bm; GpStatus retval; PixelFormat format; + BYTE* bits; TRACE("%p %p %p\n", hbm, hpal, bitmap); @@ -1539,8 +1540,16 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi return InvalidParameter; } - retval = GdipCreateBitmapFromScan0(bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, - format, bm.bmBits, bitmap); + if (bm.bmBits) + bits = (BYTE*)bm.bmBits + (bm.bmHeight - 1) * bm.bmWidthBytes; + else + { + FIXME("can only get image data from DIB sections\n"); + bits = NULL; + } + + retval = GdipCreateBitmapFromScan0(bm.bmWidth, bm.bmHeight, -bm.bmWidthBytes, + format, bits, bitmap); return retval; }
1
0
0
0
Vincent Povirk : gdiplus: Handle negative stride in GdipCreateBitmapFromScan0.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 65750fabbb5c14df136b50b8b41d202852fbc561 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65750fabbb5c14df136b50b8b…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Feb 17 14:05:37 2009 -0600 gdiplus: Handle negative stride in GdipCreateBitmapFromScan0. --- dlls/gdiplus/image.c | 25 ++++++++++++++++--------- dlls/gdiplus/tests/image.c | 6 ++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 9944322..ab70354 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -496,12 +496,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, if(scan0 && !stride) return InvalidParameter; - /* FIXME: windows allows negative stride (reads backwards from scan0) */ - if(stride < 0){ - FIXME("negative stride\n"); - return InvalidParameter; - } - *bitmap = GdipAlloc(sizeof(GpBitmap)); if(!*bitmap) return OutOfMemory; @@ -527,16 +521,29 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, bmih->biSize = sizeof(BITMAPINFOHEADER); bmih->biWidth = width; - bmih->biHeight = -height; /* FIXME: use the rest of the data from format */ bmih->biBitCount = PIXELFORMATBPP(format); bmih->biCompression = BI_RGB; bmih->biSizeImage = datalen; - if(scan0) - memcpy(bmih + 1, scan0, datalen); + if (scan0) + { + if (stride > 0) + { + bmih->biHeight = -height; + memcpy(bmih + 1, scan0, datalen); + } + else + { + bmih->biHeight = height; + memcpy(bmih + 1, scan0 + stride * (height - 1), datalen); + } + } else + { + bmih->biHeight = height; memset(bmih + 1, 0, datalen); + } if(CreateStreamOnHGlobal(buff, TRUE, &stream) != S_OK){ ERR("could not make stream\n"); diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index f6a3bab..12fab7c 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -129,10 +129,8 @@ static void test_Scan0(void) bm = NULL; stat = GdipCreateBitmapFromScan0(10, 10, -8, PixelFormat24bppRGB, buff, &bm); - todo_wine{ - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - } + expect(Ok, stat); + ok(NULL != bm, "Expected bitmap to be initialized\n"); if (stat == Ok) GdipDisposeImage((GpImage*)bm);
1
0
0
0
Francois Gouget : kernel32: Fix an off-by-one error in build_envp().
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 4a8e1feeb400227c9dc02c15ada62a3e9bd7acb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a8e1feeb400227c9dc02c15a…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Feb 17 18:56:22 2009 +0100 kernel32: Fix an off-by-one error in build_envp(). We need to take into account the trailing NULL in envp. --- dlls/kernel32/process.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 56e23b8..bb8c428 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -1185,7 +1185,7 @@ static char **build_envp( const WCHAR *envW ) const WCHAR *end; char **envp; char *env, *p; - int count = 0, length; + int count = 1, length; unsigned int i; for (end = envW; *end; count++) end += strlenW(end) + 1;
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
97
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
Results per page:
10
25
50
100
200