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
March 2008
----- 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
4 participants
1001 discussions
Start a n
N
ew thread
Andrew Talbot : wineoss.drv: Assign to structs instead of using memcpy.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: d2c602b27a952cb392bb9f4b5bf13660431b6ad1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2c602b27a952cb392bb9f4b5…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Mar 26 21:56:41 2008 +0000 wineoss.drv: Assign to structs instead of using memcpy. --- dlls/wineoss.drv/audio.c | 4 ++-- dlls/wineoss.drv/dscapture.c | 4 ++-- dlls/wineoss.drv/dsrender.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wineoss.drv/audio.c b/dlls/wineoss.drv/audio.c index ebd785e..2e22d14 100644 --- a/dlls/wineoss.drv/audio.c +++ b/dlls/wineoss.drv/audio.c @@ -2056,7 +2056,7 @@ DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + wwo->waveDesc = *lpDesc; copy_format(lpDesc->lpFormat, &wwo->waveFormat); if (wwo->waveFormat.Format.wBitsPerSample == 0) { @@ -2943,7 +2943,7 @@ DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwi->dwTotalRead = 0; wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + wwi->waveDesc = *lpDesc; copy_format(lpDesc->lpFormat, &wwi->waveFormat); if (wwi->waveFormat.Format.wBitsPerSample == 0) { diff --git a/dlls/wineoss.drv/dscapture.c b/dlls/wineoss.drv/dscapture.c index 0724ea8..a2157ec 100644 --- a/dlls/wineoss.drv/dscapture.c +++ b/dlls/wineoss.drv/dscapture.c @@ -769,7 +769,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_GetDriverDesc( } /* copy version from driver */ - memcpy(pDesc, &(WInDev[This->wDevID].ossdev.ds_desc), sizeof(DSDRIVERDESC)); + *pDesc = WInDev[This->wDevID].ossdev.ds_desc; pDesc->dnDevNode = WInDev[This->wDevID].waveDesc.dnDevNode; pDesc->wVxdId = 0; @@ -809,7 +809,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_GetCaps( { IDsCaptureDriverImpl *This = (IDsCaptureDriverImpl *)iface; TRACE("(%p,%p)\n",This,pCaps); - memcpy(pCaps, &(WInDev[This->wDevID].ossdev.dsc_caps), sizeof(DSCDRIVERCAPS)); + *pCaps = WInDev[This->wDevID].ossdev.dsc_caps; return DS_OK; } diff --git a/dlls/wineoss.drv/dsrender.c b/dlls/wineoss.drv/dsrender.c index 55712c7..dfc636a 100644 --- a/dlls/wineoss.drv/dsrender.c +++ b/dlls/wineoss.drv/dsrender.c @@ -710,7 +710,7 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, TRACE("(%p,%p)\n",iface,pDesc); /* copy version from driver */ - memcpy(pDesc, &(WOutDev[This->wDevID].ossdev.ds_desc), sizeof(DSDRIVERDESC)); + *pDesc = WOutDev[This->wDevID].ossdev.ds_desc; pDesc->dwFlags |= DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT | DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK | @@ -761,7 +761,7 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap { IDsDriverImpl *This = (IDsDriverImpl *)iface; TRACE("(%p,%p)\n",iface,pCaps); - memcpy(pCaps, &(WOutDev[This->wDevID].ossdev.ds_caps), sizeof(DSDRIVERCAPS)); + *pCaps = WOutDev[This->wDevID].ossdev.ds_caps; return DS_OK; } @@ -960,7 +960,7 @@ DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv) DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) { TRACE("(%d,%p)\n",wDevID,desc); - memcpy(desc, &(WOutDev[wDevID].ossdev.ds_desc), sizeof(DSDRIVERDESC)); + *desc = WOutDev[wDevID].ossdev.ds_desc; return MMSYSERR_NOERROR; }
1
0
0
0
Andrew Talbot : winejack.drv: Assign to structs instead of using memcpy.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: f100b142f468d9ec09e456b8fb797334d5665737 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f100b142f468d9ec09e456b8f…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Mar 26 21:56:33 2008 +0000 winejack.drv: Assign to structs instead of using memcpy. --- dlls/winejack.drv/audio.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/winejack.drv/audio.c b/dlls/winejack.drv/audio.c index 00daf80..0e742f4 100644 --- a/dlls/winejack.drv/audio.c +++ b/dlls/winejack.drv/audio.c @@ -1307,9 +1307,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) dwFlags &= ~WAVE_DIRECTSOUND; /* direct sound not supported, ignore the flag */ - wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - - memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + + wwo->waveDesc = *lpDesc; memcpy(&wwo->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); /* open up jack ports for this device */ @@ -2111,8 +2110,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) dwFlags &= ~WAVE_DIRECTSOUND; /* direct sound not supported, ignore the flag */ wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - - memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + + wwi->waveDesc = *lpDesc; memcpy(&wwi->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); LeaveCriticalSection(&wwi->access_crst);
1
0
0
0
Andrew Talbot : winenas.drv: Assign to struct instead of using memcpy.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: ddf9697433ae991d34318e6ac58f4226e7e2df09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ddf9697433ae991d34318e6ac…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Mar 26 21:56:37 2008 +0000 winenas.drv: Assign to struct instead of using memcpy. --- dlls/winenas.drv/audio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winenas.drv/audio.c b/dlls/winenas.drv/audio.c index 4d94935..3efe3b4 100644 --- a/dlls/winenas.drv/audio.c +++ b/dlls/winenas.drv/audio.c @@ -941,7 +941,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + wwo->waveDesc = *lpDesc; memcpy(&wwo->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); if (wwo->format.wBitsPerSample == 0) {
1
0
0
0
Andrew Talbot : wineesd.drv: Assign to structs instead of using memcpy.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 52f6018c73c9b8844a377bcf804d6034258f077f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52f6018c73c9b8844a377bcf8…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Mar 26 21:56:30 2008 +0000 wineesd.drv: Assign to structs instead of using memcpy. --- dlls/wineesd.drv/audio.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wineesd.drv/audio.c b/dlls/wineesd.drv/audio.c index a5a04db..b57191c 100644 --- a/dlls/wineesd.drv/audio.c +++ b/dlls/wineesd.drv/audio.c @@ -1227,7 +1227,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + wwo->waveDesc = *lpDesc; copy_format(lpDesc->lpFormat, &wwo->waveFormat); if (wwo->waveFormat.Format.wBitsPerSample == 0) { @@ -1881,8 +1881,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) dwFlags &= ~WAVE_DIRECTSOUND; wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); - - memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); + + wwi->waveDesc = *lpDesc; copy_format(lpDesc->lpFormat, &wwi->waveFormat); if (wwi->waveFormat.Format.wBitsPerSample == 0) {
1
0
0
0
Hans Leidekker : wininet: Support chunked reads in InternetReadFileEx too.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 058761fa34a87ee22d8a2355ca28de4ebb8accb5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=058761fa34a87ee22d8a2355c…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Wed Mar 26 22:22:04 2008 +0100 wininet: Support chunked reads in InternetReadFileEx too. --- dlls/wininet/http.c | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 3bb8a76..016a8f0 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1564,7 +1564,7 @@ static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buf return ERROR_INTERNET_INVALID_OPTION; } -static DWORD HTTPREQ_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *read, BOOL sync) +static DWORD HTTP_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *read, BOOL sync) { int bytes_read; @@ -1611,7 +1611,7 @@ static DWORD get_chunk_size(const char *buffer) return size; } -static DWORD HTTPREQ_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *read, BOOL sync) +static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *read, BOOL sync) { char reply[MAX_REPLY_LEN], *p = buffer; DWORD buflen, to_write = size; @@ -1677,20 +1677,25 @@ static DWORD HTTPREQ_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, return ERROR_SUCCESS; } -static DWORD HTTPREQ_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read) +static DWORD HTTPREQ_Read(WININETHTTPREQW *req, void *buffer, DWORD size, DWORD *read, BOOL sync) { - WININETHTTPREQW *req = (WININETHTTPREQW*)hdr; - static WCHAR encoding[20]; + WCHAR encoding[20]; DWORD buflen = sizeof(encoding); static const WCHAR szChunked[] = {'c','h','u','n','k','e','d',0}; if (HTTP_HttpQueryInfoW(req, HTTP_QUERY_TRANSFER_ENCODING, encoding, &buflen, NULL) && !strcmpiW(encoding, szChunked)) { - return HTTPREQ_ReadChunked(req, buffer, size, read, TRUE); + return HTTP_ReadChunked(req, buffer, size, read, sync); } else - return HTTPREQ_Read(req, buffer, size, read, TRUE); + return HTTP_Read(req, buffer, size, read, sync); +} + +static DWORD HTTPREQ_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read) +{ + WININETHTTPREQW *req = (WININETHTTPREQW*)hdr; + return HTTPREQ_Read(req, buffer, size, read, TRUE); } static void HTTPREQ_AsyncReadFileExProc(WORKREQUEST *workRequest) @@ -2018,7 +2023,7 @@ static void HTTP_DrainContent(WININETHTTPREQW *req) do { char buffer[2048]; - if (HTTPREQ_Read(req, buffer, sizeof(buffer), &bytes_read, TRUE) != ERROR_SUCCESS) + if (HTTP_Read(req, buffer, sizeof(buffer), &bytes_read, TRUE) != ERROR_SUCCESS) return; } while (bytes_read); }
1
0
0
0
Herve Chanal : winefile: A nicer icon.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: fb2e9a3aba15a930e120aa49b42e835b6409b3a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb2e9a3aba15a930e120aa49b…
Author: Herve Chanal <chanal_herve(a)yahoo.fr> Date: Wed Mar 26 19:19:57 2008 +0100 winefile: A nicer icon. --- programs/winefile/Makefile.in | 2 + programs/winefile/winefile.ico | Bin 766 -> 15086 bytes programs/winefile/winefile.svg | 762 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 764 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fb2e9a3aba15a930e120a…
1
0
0
0
Alexandre Julliard : gdi32: Store the return value separately in StretchDIBits instead of overwriting heightSrc .
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 6e387f34c588fa6f2e634cdb1e215dda056bb270 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e387f34c588fa6f2e634cdb1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 20:51:58 2008 +0100 gdi32: Store the return value separately in StretchDIBits instead of overwriting heightSrc. --- dlls/gdi32/dib.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 3205d0d..2b5ae37 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -188,18 +188,19 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, const BITMAPINFO *info, UINT wUsage, DWORD dwRop ) { DC *dc; + INT ret; if (!bits || !info) return 0; - if (!(dc = get_dc_ptr( hdc ))) return FALSE; + if (!(dc = get_dc_ptr( hdc ))) return 0; if(dc->funcs->pStretchDIBits) { update_dc( dc ); - heightSrc = dc->funcs->pStretchDIBits(dc->physDev, xDst, yDst, widthDst, - heightDst, xSrc, ySrc, widthSrc, - heightSrc, bits, info, wUsage, dwRop); + ret = dc->funcs->pStretchDIBits(dc->physDev, xDst, yDst, widthDst, + heightDst, xSrc, ySrc, widthSrc, + heightSrc, bits, info, wUsage, dwRop); release_dc_ptr( dc ); } else /* use StretchBlt */ @@ -248,7 +249,7 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, { /* fast path */ TRACE("using fast path\n"); - heightSrc = SetDIBits( hdc, hBitmap, 0, height, bits, info, wUsage); + ret = SetDIBits( hdc, hBitmap, 0, height, bits, info, wUsage); } else { @@ -290,13 +291,13 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, dwRop ); } - heightSrc = SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage); + ret = SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage); /* Origin for DIBitmap may be bottom left (positive biHeight) or top left (negative biHeight) */ - if (heightSrc) StretchBlt( hdc, xDst, yDst, widthDst, heightDst, - hdcMem, xSrc, abs(height) - heightSrc - ySrc, - widthSrc, heightSrc, dwRop ); + if (ret) StretchBlt( hdc, xDst, yDst, widthDst, heightDst, + hdcMem, xSrc, abs(height) - heightSrc - ySrc, + widthSrc, heightSrc, dwRop ); if(hpal) SelectPalette(hdcMem, hpal, FALSE); SelectObject( hdcMem, hOldBitmap ); @@ -304,7 +305,7 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, DeleteObject( hBitmap ); } } - return heightSrc; + return ret; }
1
0
0
0
Alexandre Julliard : shell32: Add a license message box and a build id to the About dialog. Clean things up a little.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: 12ae8ff814e47ee194191cae3879e7a29a578f59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12ae8ff814e47ee194191cae3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 20:51:12 2008 +0100 shell32: Add a license message box and a build id to the About dialog. Clean things up a little. --- dlls/shell32/shell32_En.rc | 29 +++++++++++++++--- dlls/shell32/shell32_main.c | 67 +++++++++++++++++++++++++----------------- dlls/shell32/shresdef.h | 5 +++ 3 files changed, 69 insertions(+), 32 deletions(-) diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index e4fdea9..68263ce 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -136,17 +136,19 @@ FONT 8, "MS Shell Dlg" LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 } -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 220, 152 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "About %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, 153, 133, 60, 12, WS_TABSTOP + PUSHBUTTON "Wine &license...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER ICON "", stc1, 10, 10, 30, 30 - LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 137, 10 - LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10 - LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT1, 42, 10, 170, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT2, 42, 22, 170, 10 + LTEXT "Running on %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10 + LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 54, 204, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -248,3 +250,20 @@ STRINGTABLE IDS_NEWFOLDER "New Folder" } + +STRINGTABLE +{ +IDS_LICENSE_CAPTION, "Wine License" +IDS_LICENSE, +"Wine 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.\n\n\ +Wine 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.\n\n\ +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." +} diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 4163168..3026582 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -851,21 +851,19 @@ typedef struct HFONT hFont; } ABOUT_INFO; -#define DROP_FIELD_TOP (-15) -#define DROP_FIELD_HEIGHT 15 +#define DROP_FIELD_TOP (-12) -static BOOL __get_dropline( HWND hWnd, LPRECT lprect ) +static void paint_dropline( HDC hdc, HWND hWnd ) { HWND hWndCtl = GetDlgItem(hWnd, IDC_ABOUT_WINE_TEXT); - - if( hWndCtl ) - { - GetWindowRect( hWndCtl, lprect ); - MapWindowPoints( 0, hWnd, (LPPOINT)lprect, 2 ); - lprect->bottom = (lprect->top += DROP_FIELD_TOP); - return TRUE; - } - return FALSE; + RECT rect; + + if (!hWndCtl) return; + GetWindowRect( hWndCtl, &rect ); + MapWindowPoints( 0, hWnd, (LPPOINT)&rect, 2 ); + rect.top += DROP_FIELD_TOP; + rect.bottom = rect.top + 2; + DrawEdge( hdc, &rect, BDR_SUNKENOUTER, BF_RECT ); } /************************************************************************* @@ -979,26 +977,32 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, case WM_INITDIALOG: { ABOUT_INFO *info = (ABOUT_INFO *)lParam; - WCHAR Template[512], AppTitle[512]; + WCHAR template[512], buffer[512], version[64]; + extern const char *wine_get_build_id(void); if (info) { const char* const *pstr = SHELL_Authors; SendDlgItemMessageW(hWnd, stc1, STM_SETICON,(WPARAM)info->hIcon, 0); - GetWindowTextW( hWnd, Template, sizeof(Template)/sizeof(WCHAR) ); - sprintfW( AppTitle, Template, info->szApp ); - SetWindowTextW( hWnd, AppTitle ); + GetWindowTextW( hWnd, template, sizeof(template)/sizeof(WCHAR) ); + sprintfW( buffer, template, info->szApp ); + SetWindowTextW( hWnd, buffer ); SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT1), info->szApp ); SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT2), info->szOtherStuff ); + GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), + template, sizeof(template)/sizeof(WCHAR) ); + MultiByteToWideChar( CP_UTF8, 0, wine_get_build_id(), -1, + version, sizeof(version)/sizeof(WCHAR) ); + sprintfW( buffer, template, version ); + SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), buffer ); hWndCtl = GetDlgItem(hWnd, IDC_ABOUT_LISTBOX); SendMessageW( hWndCtl, WM_SETREDRAW, 0, 0 ); SendMessageW( hWndCtl, WM_SETFONT, (WPARAM)info->hFont, 0 ); while (*pstr) { - WCHAR name[64]; /* authors list is in utf-8 format */ - MultiByteToWideChar( CP_UTF8, 0, *pstr, -1, name, sizeof(name)/sizeof(WCHAR) ); - SendMessageW( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)name ); + MultiByteToWideChar( CP_UTF8, 0, *pstr, -1, buffer, sizeof(buffer)/sizeof(WCHAR) ); + SendMessageW( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)buffer ); pstr++; } SendMessageW( hWndCtl, WM_SETREDRAW, 1, 0 ); @@ -1008,16 +1012,9 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, case WM_PAINT: { - RECT rect; PAINTSTRUCT ps; HDC hDC = BeginPaint( hWnd, &ps ); - - if (__get_dropline( hWnd, &rect )) - { - SelectObject( hDC, GetStockObject( BLACK_PEN ) ); - MoveToEx( hDC, rect.left, rect.top, NULL ); - LineTo( hDC, rect.right, rect.bottom ); - } + paint_dropline( hDC, hWnd ); EndPaint( hWnd, &ps ); } break; @@ -1028,6 +1025,22 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, EndDialog(hWnd, TRUE); return TRUE; } + if (wParam == IDC_ABOUT_LICENSE) + { + MSGBOXPARAMSW params; + + params.cbSize = sizeof(params); + params.hwndOwner = hWnd; + params.hInstance = shell32_hInstance; + params.lpszText = MAKEINTRESOURCEW(IDS_LICENSE); + params.lpszCaption = MAKEINTRESOURCEW(IDS_LICENSE_CAPTION); + params.dwStyle = MB_ICONINFORMATION | MB_OK; + params.lpszIcon = 0; + params.dwContextHelpId = 0; + params.lpfnMsgBoxCallback = NULL; + params.dwLanguageId = LANG_NEUTRAL; + MessageBoxIndirectW( ¶ms ); + } break; case WM_CLOSE: EndDialog(hWnd, TRUE); diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index 211bcfe..24373b7 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -96,6 +96,9 @@ #define IDS_NEWFOLDER 142 +#define IDS_LICENSE 256 +#define IDS_LICENSE_CAPTION 257 + #define MENU_SHV_FILE 144 /* Note: this string is referenced from the registry*/ @@ -161,9 +164,11 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi #define IDR_AVI_FILEDELETE 164 /* about box */ +#define IDC_ABOUT_LICENSE 97 #define IDC_ABOUT_WINE_TEXT 98 #define IDC_ABOUT_LISTBOX 99 #define IDC_ABOUT_STATIC_TEXT1 100 #define IDC_ABOUT_STATIC_TEXT2 101 +#define IDC_ABOUT_STATIC_TEXT3 102 #endif
1
0
0
0
Alexandre Julliard : user32: Allow arbitrary text size for loaded strings in message boxes.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: f29b5757d5865bea86a744dab755edd60dffb63d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f29b5757d5865bea86a744dab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 19:42:50 2008 +0100 user32: Allow arbitrary text size for loaded strings in message boxes. --- dlls/user32/msgbox.c | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/dlls/user32/msgbox.c b/dlls/user32/msgbox.c index 1d34449..d9cec53 100644 --- a/dlls/user32/msgbox.c +++ b/dlls/user32/msgbox.c @@ -74,7 +74,9 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) HMONITOR monitor = 0; MONITORINFO mon_info; LPCWSTR lpszText; - WCHAR buf[256]; + WCHAR *buffer = NULL; + const WCHAR *ptr; + /* Index the order the buttons need to appear to an ID* constant */ static const int buttonOrder[10] = { 6, 7, 1, 3, 4, 2, 5, 10, 11, 9 }; @@ -93,26 +95,30 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) if (HIWORD(lpmb->lpszCaption)) { SetWindowTextW(hwnd, lpmb->lpszCaption); } else { - UINT res_id = LOWORD(lpmb->lpszCaption); - if (res_id) - { - if (LoadStringW(lpmb->hInstance, res_id, buf, 256)) - SetWindowTextW(hwnd, buf); - } - else - { - if (LoadStringW(user32_module, IDS_ERROR, buf, 256)) - SetWindowTextW(hwnd, buf); - } + UINT len = LoadStringW( lpmb->hInstance, LOWORD(lpmb->lpszCaption), (LPWSTR)&ptr, 0 ); + if (!len) len = LoadStringW( user32_module, IDS_ERROR, (LPWSTR)&ptr, 0 ); + buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); + if (buffer) + { + memcpy( buffer, ptr, len * sizeof(WCHAR) ); + buffer[len] = 0; + SetWindowTextW( hwnd, buffer ); + HeapFree( GetProcessHeap(), 0, buffer ); + buffer = NULL; + } } if (HIWORD(lpmb->lpszText)) { lpszText = lpmb->lpszText; } else { - lpszText = buf; - if (!LoadStringW(lpmb->hInstance, LOWORD(lpmb->lpszText), buf, 256)) - *buf = 0; /* FIXME ?? */ + UINT len = LoadStringW( lpmb->hInstance, LOWORD(lpmb->lpszText), (LPWSTR)&ptr, 0 ); + lpszText = buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); + if (buffer) + { + memcpy( buffer, ptr, len * sizeof(WCHAR) ); + buffer[len] = 0; + } } - + TRACE_(msgbox)("%s\n", debugstr_w(lpszText)); SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText); @@ -310,6 +316,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb) if (((lpmb->dwStyle & MB_TASKMODAL) && (lpmb->hwndOwner==NULL)) || (lpmb->dwStyle & MB_SYSTEMMODAL)) SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); + HeapFree( GetProcessHeap(), 0, buffer ); return hFont; }
1
0
0
0
Alexandre Julliard : ntdll: Export the libwine version functions from ntdll too.
by Alexandre Julliard
27 Mar '08
27 Mar '08
Module: wine Branch: master Commit: ccd0d6259d07fa08926ff22c9517c1c8db3574b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccd0d6259d07fa08926ff22c9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 26 19:41:54 2008 +0100 ntdll: Export the libwine version functions from ntdll too. --- dlls/ntdll/misc.c | 17 +++++++++++++++++ dlls/ntdll/ntdll.spec | 4 ++++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index d5e8c1d..218c289 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -23,6 +23,7 @@ #include <time.h> #include <math.h> +#include "wine/library.h" #include "wine/debug.h" #include "ntdll_misc.h" @@ -139,6 +140,22 @@ double CDECL NTDLL__CIpow(double x,double y) /********************************************************************* + * wine_get_version (NTDLL.@) + */ +const char * CDECL NTDLL_wine_get_version(void) +{ + return wine_get_version(); +} + +/********************************************************************* + * wine_get_build_id (NTDLL.@) + */ +const char * CDECL NTDLL_wine_get_build_id(void) +{ + return wine_get_build_id(); +} + +/********************************************************************* * abs (NTDLL.@) */ int CDECL NTDLL_abs( int i ) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 0c9bfd4..2d27d61 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1382,6 +1382,10 @@ @ cdecl wine_server_send_fd(long) @ cdecl __wine_make_process_system() +# Version +@ cdecl wine_get_version() NTDLL_wine_get_version +@ cdecl wine_get_build_id() NTDLL_wine_get_build_id + # Codepages @ cdecl __wine_init_codepages(ptr ptr ptr)
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
101
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Results per page:
10
25
50
100
200