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
September 2011
----- 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
996 discussions
Start a n
N
ew thread
Juan Lang : wintrust: Correct ObjectTrust error with empty files.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: c0a8694bbcae10ebecbca540e3a571193af75697 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0a8694bbcae10ebecbca540e…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Sep 14 08:45:10 2011 -0700 wintrust: Correct ObjectTrust error with empty files. --- dlls/wintrust/softpub.c | 15 +++++++- dlls/wintrust/tests/softpub.c | 81 ++++++++++++++++++++++++++++------------- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c index fc1bc13..0f54c0b 100644 --- a/dlls/wintrust/softpub.c +++ b/dlls/wintrust/softpub.c @@ -117,7 +117,20 @@ static DWORD SOFTPUB_GetFileSubject(CRYPT_PROVIDER_DATA *data) data->pWintrustData->u.pFile->pcwszFilePath, data->pWintrustData->u.pFile->hFile, &data->u.pPDSip->gSubject)) - err = GetLastError(); + { + LARGE_INTEGER fileSize; + DWORD sipError = GetLastError(); + + /* Special case for empty files: the error is expected to be + * TRUST_E_SUBJECT_FORM_UNKNOWN, rather than whatever + * CryptSIPRetrieveSubjectGuid returns. + */ + if (GetFileSizeEx(data->pWintrustData->u.pFile->hFile, &fileSize) + && !fileSize.QuadPart) + err = TRUST_E_SUBJECT_FORM_UNKNOWN; + else + err = sipError; + } } else data->u.pPDSip->gSubject = *data->pWintrustData->u.pFile->pgKnownSubject; diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c index 7ec24a9..8f23085 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -276,6 +276,25 @@ static void getNotepadPath(WCHAR *notepadPathW, DWORD size) MultiByteToWideChar(0, 0, notepadPath, -1, notepadPathW, size); } +/* Creates a test file and returns a handle to it. The file's path is returned + * in temp_file, which must be at least MAX_PATH characters in length. + */ +static HANDLE create_temp_file(WCHAR *temp_file) +{ + HANDLE file = INVALID_HANDLE_VALUE; + WCHAR temp_path[MAX_PATH]; + + if (GetTempPathW(sizeof(temp_path) / sizeof(temp_path[0]), temp_path)) + { + static const WCHAR img[] = { 'i','m','g',0 }; + + if (GetTempFileNameW(temp_path, img, 0, temp_file)) + file = CreateFileW(temp_file, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + } + return file; +} + static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) { HRESULT ret; @@ -298,7 +317,7 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD)); if (data.padwTrustStepErrors) { - WCHAR notepadPathW[MAX_PATH]; + WCHAR pathW[MAX_PATH]; PROVDATA_SIP provDataSIP = { 0 }; static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47, 0x00,0xC0,0x4F,0xC2,0x95,0xEE } }; @@ -333,14 +352,34 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) /* Crashes ret = funcs->pfnObjectTrust(&data); */ - getNotepadPath(notepadPathW, MAX_PATH); - fileInfo.pcwszFilePath = notepadPathW; + /* Create and test with an empty file */ + fileInfo.hFile = create_temp_file(pathW); /* pfnObjectTrust now crashes unless both pPDSip and psPfns are set */ U(data).pPDSip = &provDataSIP; data.psPfns = (CRYPT_PROVIDER_FUNCTIONS *)funcs; ret = funcs->pfnObjectTrust(&data); ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret); ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] == + TRUST_E_SUBJECT_FORM_UNKNOWN, + "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n", + data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]); + CloseHandle(fileInfo.hFile); + fileInfo.hFile = NULL; + fileInfo.pcwszFilePath = pathW; + ret = funcs->pfnObjectTrust(&data); + ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret); + ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] == + TRUST_E_SUBJECT_FORM_UNKNOWN, + "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n", + data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]); + DeleteFileW(pathW); + /* Test again with a file we expect to exist, and to contain no + * signature. + */ + getNotepadPath(pathW, MAX_PATH); + ret = funcs->pfnObjectTrust(&data); + ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret); + ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] == TRUST_E_NOSIGNATURE || data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] == TRUST_E_SUBJECT_FORM_UNKNOWN, @@ -598,23 +637,6 @@ static struct _PeImage { }; #include <poppack.h> -/* Creates a test file and returns a handle to it. The file's path is returned - * in temp_file, which must be at least MAX_PATH characters in length. - */ -static HANDLE create_temp_file(char *temp_file) -{ - HANDLE file = INVALID_HANDLE_VALUE; - char temp_path[MAX_PATH]; - - if (GetTempPathA(sizeof(temp_path), temp_path)) - { - if (GetTempFileNameA(temp_path, "img", 0, temp_file)) - file = CreateFileA(temp_file, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - } - return file; -} - static void test_sip_create_indirect_data(void) { static GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47, @@ -622,7 +644,7 @@ static void test_sip_create_indirect_data(void) static char oid_sha1[] = szOID_OIWSEC_sha1; BOOL ret; SIP_SUBJECTINFO subjinfo = { 0 }; - char temp_file[MAX_PATH]; + WCHAR temp_file[MAX_PATH]; HANDLE file; DWORD count; @@ -708,7 +730,7 @@ static void test_sip_create_indirect_data(void) HeapFree(GetProcessHeap(), 0, indirect); } CloseHandle(file); - DeleteFileA(temp_file); + DeleteFileW(temp_file); } static void test_wintrust(void) @@ -718,7 +740,7 @@ static void test_wintrust(void) WINTRUST_FILE_INFO file; LONG r; HRESULT hr; - WCHAR notepadPathW[MAX_PATH]; + WCHAR pathW[MAX_PATH]; memset(&wtd, 0, sizeof(wtd)); wtd.cbStruct = sizeof(wtd); @@ -729,8 +751,17 @@ static void test_wintrust(void) wtd.dwStateAction = WTD_STATEACTION_VERIFY; memset(&file, 0, sizeof(file)); file.cbStruct = sizeof(file); - getNotepadPath(notepadPathW, MAX_PATH); - file.pcwszFilePath = notepadPathW; + file.pcwszFilePath = pathW; + /* Test with an empty file */ + file.hFile = create_temp_file(pathW); + r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd); + ok(r == TRUST_E_SUBJECT_FORM_UNKNOWN, + "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n", r); + CloseHandle(file.hFile); + DeleteFileW(pathW); + file.hFile = NULL; + /* Test with a known file path, which we expect not have a signature */ + getNotepadPath(pathW, MAX_PATH); r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd); ok(r == TRUST_E_NOSIGNATURE || r == CRYPT_E_FILE_ERROR, "expected TRUST_E_NOSIGNATURE or CRYPT_E_FILE_ERROR, got %08x\n", r);
1
0
0
0
Alexandre Julliard : winex11: Remove the XRender support in the X11 driver StretchBlt implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 498e3cf2a1653a5519ab77b8022f3ac23d11ce10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=498e3cf2a1653a5519ab77b80…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 13:22:31 2011 +0200 winex11: Remove the XRender support in the X11 driver StretchBlt implementation. --- dlls/winex11.drv/bitblt.c | 11 ++--- dlls/winex11.drv/x11drv.h | 3 - dlls/winex11.drv/xrender.c | 106 -------------------------------------------- 3 files changed, 4 insertions(+), 116 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index ebd3f38..baf5f89 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1404,13 +1404,10 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, if (physDevDst != physDevSrc) X11DRV_CoerceDIBSection( physDevSrc, DIB_Status_GdiMod ); - if(!X11DRV_XRender_GetSrcAreaStretch( physDevSrc, physDevDst, src_pixmap, tmpGC, src, dst )) - { - if (fStretch) - BITBLT_GetSrcAreaStretch( physDevSrc, physDevDst, src_pixmap, tmpGC, src, dst ); - else - BITBLT_GetSrcArea( physDevSrc, physDevDst, src_pixmap, tmpGC, &src->visrect ); - } + if (fStretch) + BITBLT_GetSrcAreaStretch( physDevSrc, physDevDst, src_pixmap, tmpGC, src, dst ); + else + BITBLT_GetSrcArea( physDevSrc, physDevDst, src_pixmap, tmpGC, &src->visrect ); execute_rop( physDevDst, src_pixmap, tmpGC, &dst->visrect, rop ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index c38ed78..b7b99e8 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -305,9 +305,6 @@ extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void) DECLSPEC_HIDDEN; extern void X11DRV_XRender_Finalize(void) DECLSPEC_HIDDEN; extern void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap, int width, int height) DECLSPEC_HIDDEN; extern BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, const DIBSECTION *dib) DECLSPEC_HIDDEN; -BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst, - Pixmap pixmap, GC gc, - const struct bitblt_coords *src, const struct bitblt_coords *dst ) DECLSPEC_HIDDEN; extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN; extern BOOL destroy_glxpixmap(Display *display, XID glxpixmap) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 036ab39..ae3940d 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2662,106 +2662,6 @@ void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap, wine_tsx11_unlock(); } -BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst, - Pixmap pixmap, GC gc, - const struct bitblt_coords *src, const struct bitblt_coords *dst ) -{ - BOOL stretch = (src->width != dst->width) || (src->height != dst->height); - int width = dst->visrect.right - dst->visrect.left; - int height = dst->visrect.bottom - dst->visrect.top; - int x_src = physDevSrc->dc_rect.left + src->visrect.left; - int y_src = physDevSrc->dc_rect.top + src->visrect.top; - struct xrender_info *src_info = get_xrender_info(physDevSrc); - const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDevDst->depth, physDevDst->color_shifts); - Picture src_pict=0, dst_pict=0, mask_pict=0; - BOOL use_repeat; - double xscale, yscale; - - XRenderPictureAttributes pa; - pa.subwindow_mode = IncludeInferiors; - pa.repeat = RepeatNone; - - TRACE("src depth=%d widthSrc=%d heightSrc=%d xSrc=%d ySrc=%d\n", - physDevSrc->depth, src->width, src->height, x_src, y_src); - TRACE("dst depth=%d widthDst=%d heightDst=%d\n", physDevDst->depth, dst->width, dst->height); - - if(!X11DRV_XRender_Installed) - { - TRACE("Not using XRender since it is not available or disabled\n"); - return FALSE; - } - - /* XRender can't handle palettes, so abort */ - if(X11DRV_PALETTE_XPixelToPalette) - return FALSE; - - /* XRender is of no use in this case */ - if((physDevDst->depth == 1) && (physDevSrc->depth > 1)) - return FALSE; - - /* Just use traditional X copy when the formats match and we don't need stretching */ - if((src_info->format->format == dst_format->format) && !stretch) - { - TRACE("Source and destination depth match and no stretching needed falling back to XCopyArea\n"); - wine_tsx11_lock(); - XCopyArea( gdi_display, physDevSrc->drawable, pixmap, gc, x_src, y_src, width, height, 0, 0); - wine_tsx11_unlock(); - return TRUE; - } - - use_repeat = use_source_repeat( physDevSrc ); - if (!use_repeat) - { - xscale = src->width / (double)dst->width; - yscale = src->height / (double)dst->height; - } - else xscale = yscale = 1; /* no scaling needed with a repeating source */ - - /* mono -> color */ - if(physDevSrc->depth == 1 && physDevDst->depth > 1) - { - XRenderColor fg, bg; - get_xrender_color(dst_format, physDevDst->textPixel, &fg); - get_xrender_color(dst_format, physDevDst->backgroundPixel, &bg); - - /* We use the source drawable as a mask */ - mask_pict = get_xrender_picture_source( physDevSrc, use_repeat ); - - /* Use backgroundPixel as the foreground color */ - EnterCriticalSection( &xrender_cs ); - src_pict = get_tile_pict(dst_format, &bg); - - /* Create a destination picture and fill it with textPixel color as the background color */ - wine_tsx11_lock(); - dst_pict = pXRenderCreatePicture(gdi_display, pixmap, dst_format->pict_format, CPSubwindowMode|CPRepeat, &pa); - pXRenderFillRectangle(gdi_display, PictOpSrc, dst_pict, &fg, 0, 0, width, height); - - xrender_mono_blit(src_pict, mask_pict, dst_pict, x_src, y_src, 0, 0, - xscale, yscale, width, height); - - if(dst_pict) pXRenderFreePicture(gdi_display, dst_pict); - wine_tsx11_unlock(); - LeaveCriticalSection( &xrender_cs ); - } - else /* color -> color (can be at different depths) or mono -> mono */ - { - if (physDevDst->depth == 32 && physDevSrc->depth < 32) mask_pict = get_no_alpha_mask(); - src_pict = get_xrender_picture_source( physDevSrc, use_repeat ); - - wine_tsx11_lock(); - dst_pict = pXRenderCreatePicture(gdi_display, - pixmap, dst_format->pict_format, - CPSubwindowMode|CPRepeat, &pa); - - xrender_blit(PictOpSrc, src_pict, mask_pict, dst_pict, - x_src, y_src, 0, 0, xscale, yscale, width, height); - - if(dst_pict) pXRenderFreePicture(gdi_display, dst_pict); - wine_tsx11_unlock(); - } - return TRUE; -} - static const struct gdi_dc_funcs xrender_funcs = { NULL, /* pAbortDoc */ @@ -2913,10 +2813,4 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, return FALSE; } -BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst, - Pixmap pixmap, GC gc, - const struct bitblt_coords *src, const struct bitblt_coords *dst ) -{ - return FALSE; -} #endif /* SONAME_LIBXRENDER */
1
0
0
0
Alexandre Julliard : winex11: Avoid an intermediate pixmap copy when stretching with SRCCOPY through XRender .
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 14f6c42708a56a47c4e827fc815118d0ff496dc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14f6c42708a56a47c4e827fc8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 13:12:54 2011 +0200 winex11: Avoid an intermediate pixmap copy when stretching with SRCCOPY through XRender. --- dlls/winex11.drv/xrender.c | 52 ++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 23 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 5b5a451..036ab39 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2411,13 +2411,15 @@ static void get_colors( struct xrender_physdev *physdev_src, struct xrender_phys } static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xrender_physdev *physdev_dst, - Pixmap pixmap, const struct bitblt_coords *src, + Drawable drawable, const struct bitblt_coords *src, const struct bitblt_coords *dst ) { int width = dst->visrect.right - dst->visrect.left; int height = dst->visrect.bottom - dst->visrect.top; int x_src = physdev_src->x11dev->dc_rect.left + src->visrect.left; int y_src = physdev_src->x11dev->dc_rect.top + src->visrect.top; + int x_dst = physdev_dst->x11dev->dc_rect.left + dst->visrect.left; + int y_dst = physdev_dst->x11dev->dc_rect.top + dst->visrect.top; Picture src_pict=0, dst_pict=0, mask_pict=0; BOOL use_repeat; double xscale, yscale; @@ -2434,6 +2436,8 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr } else xscale = yscale = 1; /* no scaling needed with a repeating source */ + if (drawable != physdev_dst->x11dev->drawable) x_dst = y_dst = 0; /* using an intermediate pixmap */ + /* mono -> color */ if (physdev_src->info.format->format == WXR_FORMAT_MONO && physdev_dst->info.format->format != WXR_FORMAT_MONO) @@ -2452,12 +2456,12 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr /* Create a destination picture and fill it with textPixel color as the background color */ wine_tsx11_lock(); - dst_pict = pXRenderCreatePicture( gdi_display, pixmap, physdev_dst->info.format->pict_format, + dst_pict = pXRenderCreatePicture( gdi_display, drawable, physdev_dst->info.format->pict_format, CPSubwindowMode|CPRepeat, &pa ); - pXRenderFillRectangle(gdi_display, PictOpSrc, dst_pict, &fg, 0, 0, width, height); + pXRenderFillRectangle( gdi_display, PictOpSrc, dst_pict, &fg, x_dst, y_dst, width, height ); xrender_mono_blit( src_pict, mask_pict, dst_pict, x_src, y_src, - 0, 0, xscale, yscale, width, height ); + x_dst, y_dst, xscale, yscale, width, height ); if (dst_pict) pXRenderFreePicture(gdi_display, dst_pict); wine_tsx11_unlock(); @@ -2470,11 +2474,11 @@ static void xrender_stretch_blit( struct xrender_physdev *physdev_src, struct xr src_pict = get_xrender_picture_source( physdev_src->x11dev, use_repeat ); wine_tsx11_lock(); - dst_pict = pXRenderCreatePicture( gdi_display, pixmap, physdev_dst->info.format->pict_format, + dst_pict = pXRenderCreatePicture( gdi_display, drawable, physdev_dst->info.format->pict_format, CPSubwindowMode|CPRepeat, &pa ); xrender_blit( PictOpSrc, src_pict, mask_pict, dst_pict, - x_src, y_src, 0, 0, xscale, yscale, width, height ); + x_src, y_src, x_dst, y_dst, xscale, yscale, width, height ); if (dst_pict) pXRenderFreePicture(gdi_display, dst_pict); wine_tsx11_unlock(); @@ -2490,10 +2494,7 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, { struct xrender_physdev *physdev_dst = get_xrender_dev( dst_dev ); struct xrender_physdev *physdev_src = get_xrender_dev( src_dev ); - INT width, height; INT sSrc, sDst; - Pixmap src_pixmap; - GC tmpGC; BOOL stretch = (src->width != dst->width) || (src->height != dst->height); if (src_dev->funcs != dst_dev->funcs) @@ -2525,23 +2526,28 @@ static BOOL xrenderdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, X11DRV_CoerceDIBSection( physdev_dst->x11dev, DIB_Status_GdiMod ); if (physdev_dst != physdev_src) X11DRV_CoerceDIBSection( physdev_src->x11dev, DIB_Status_GdiMod ); - width = dst->visrect.right - dst->visrect.left; - height = dst->visrect.bottom - dst->visrect.top; + if (rop != SRCCOPY) + { + GC tmpGC; + Pixmap tmp_pixmap; - wine_tsx11_lock(); - tmpGC = XCreateGC( gdi_display, physdev_dst->x11dev->drawable, 0, NULL ); - XSetSubwindowMode( gdi_display, tmpGC, IncludeInferiors ); - XSetGraphicsExposures( gdi_display, tmpGC, False ); - src_pixmap = XCreatePixmap( gdi_display, root_window, width, height, physdev_dst->x11dev->depth ); - wine_tsx11_unlock(); + wine_tsx11_lock(); + tmpGC = XCreateGC( gdi_display, physdev_dst->x11dev->drawable, 0, NULL ); + XSetSubwindowMode( gdi_display, tmpGC, IncludeInferiors ); + XSetGraphicsExposures( gdi_display, tmpGC, False ); + tmp_pixmap = XCreatePixmap( gdi_display, root_window, dst->visrect.right - dst->visrect.left, + dst->visrect.bottom - dst->visrect.top, physdev_dst->x11dev->depth ); + wine_tsx11_unlock(); - xrender_stretch_blit( physdev_src, physdev_dst, src_pixmap, src, dst ); - execute_rop( physdev_dst->x11dev, src_pixmap, tmpGC, &dst->visrect, rop ); + xrender_stretch_blit( physdev_src, physdev_dst, tmp_pixmap, src, dst ); + execute_rop( physdev_dst->x11dev, tmp_pixmap, tmpGC, &dst->visrect, rop ); - wine_tsx11_lock(); - XFreePixmap( gdi_display, src_pixmap ); - XFreeGC( gdi_display, tmpGC ); - wine_tsx11_unlock(); + wine_tsx11_lock(); + XFreePixmap( gdi_display, tmp_pixmap ); + XFreeGC( gdi_display, tmpGC ); + wine_tsx11_unlock(); + } + else xrender_stretch_blit( physdev_src, physdev_dst, physdev_dst->x11dev->drawable, src, dst ); if (physdev_dst != physdev_src) X11DRV_UnlockDIBSection( physdev_src->x11dev, FALSE ); X11DRV_UnlockDIBSection( physdev_dst->x11dev, TRUE );
1
0
0
0
Alexandre Julliard : winex11: Add a StretchBlt entry point to the XRender driver.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: dc9a218a00e3abd48536e1c9d976ba52745a221e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc9a218a00e3abd48536e1c9d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 12:49:08 2011 +0200 winex11: Add a StretchBlt entry point to the XRender driver. --- dlls/winex11.drv/bitblt.c | 13 +++- dlls/winex11.drv/x11drv.h | 2 + dlls/winex11.drv/xrender.c | 164 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 174 insertions(+), 5 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dc9a218a00e3abd48536e…
1
0
0
0
Alexandre Julliard : winex11: Pass destination coordinates to xrender_mono_blit.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: beb71ad9d1b647c0780a809a9d129cb3dbdd5e94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=beb71ad9d1b647c0780a809a9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 12:51:57 2011 +0200 winex11: Pass destination coordinates to xrender_mono_blit. --- dlls/winex11.drv/xrender.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 66f8cc3..5cb2b36 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2357,12 +2357,13 @@ static void xrender_blit( int op, Picture src_pict, Picture mask_pict, Picture d /* Helper function for (stretched) mono->color blitting using xrender */ static void xrender_mono_blit( Picture src_pict, Picture mask_pict, Picture dst_pict, - int x_src, int y_src, double xscale, double yscale, int width, int height ) + int x_src, int y_src, int x_dst, int y_dst, + double xscale, double yscale, int width, int height ) { int x_offset, y_offset; /* When doing a mono->color blit, 'src_pict' contains a 1x1 picture for tiling, the actual - * source data is in mask_pict. The 'src_pict' data effectively acts as an alpha channel to the + * source data is in mask_pict. The 'mask_pict' data effectively acts as an alpha channel to the * tile data. We need PictOpOver for correct rendering. * Note since the 'source data' is in the mask picture, we have to pass x_src / y_src using * mask_x / mask_y @@ -2383,7 +2384,7 @@ static void xrender_mono_blit( Picture src_pict, Picture mask_pict, Picture dst_ set_xrender_transformation(mask_pict, 1, 1, 0, 0); } pXRenderComposite(gdi_display, PictOpOver, src_pict, mask_pict, dst_pict, - 0, 0, x_offset, y_offset, 0, 0, width, height); + 0, 0, x_offset, y_offset, x_dst, y_dst, width, height ); } /*********************************************************************** @@ -2567,7 +2568,8 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE dst_pict = pXRenderCreatePicture(gdi_display, pixmap, dst_format->pict_format, CPSubwindowMode|CPRepeat, &pa); pXRenderFillRectangle(gdi_display, PictOpSrc, dst_pict, &fg, 0, 0, width, height); - xrender_mono_blit(src_pict, mask_pict, dst_pict, x_src, y_src, xscale, yscale, width, height); + xrender_mono_blit(src_pict, mask_pict, dst_pict, x_src, y_src, 0, 0, + xscale, yscale, width, height); if(dst_pict) pXRenderFreePicture(gdi_display, dst_pict); wine_tsx11_unlock();
1
0
0
0
Alexandre Julliard : winex11: Move the pixel-> color conversion out of the get_tile_pict function.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 85a6967f8dd791c6a6640fc984d3363df2f43897 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85a6967f8dd791c6a6640fc98…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 15 12:51:08 2011 +0200 winex11: Move the pixel->color conversion out of the get_tile_pict function. --- dlls/winex11.drv/xrender.c | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index e525d5f..66f8cc3 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1869,15 +1869,14 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf * Returns an appropriate Picture for tiling the text colour. * Call and use result within the xrender_cs */ -static Picture get_tile_pict(const WineXRenderFormat *wxr_format, int text_pixel) +static Picture get_tile_pict(const WineXRenderFormat *wxr_format, const XRenderColor *color) { static struct { Pixmap xpm; Picture pict; - int current_color; + XRenderColor current_color; } tiles[WXR_NB_FORMATS], *tile; - XRenderColor col; tile = &tiles[wxr_format->format]; @@ -1893,11 +1892,13 @@ static Picture get_tile_pict(const WineXRenderFormat *wxr_format, int text_pixel wine_tsx11_unlock(); /* init current_color to something different from text_pixel */ - tile->current_color = ~text_pixel; + tile->current_color = *color; + tile->current_color.red ^= 0xffff; if(wxr_format->format == WXR_FORMAT_MONO) { /* for a 1bpp bitmap we always need a 1 in the tile */ + XRenderColor col; col.red = col.green = col.blue = 0; col.alpha = 0xffff; wine_tsx11_lock(); @@ -1906,13 +1907,12 @@ static Picture get_tile_pict(const WineXRenderFormat *wxr_format, int text_pixel } } - if(text_pixel != tile->current_color && wxr_format->format != WXR_FORMAT_MONO) + if (memcmp( color, &tile->current_color, sizeof(*color) ) && wxr_format->format != WXR_FORMAT_MONO) { - get_xrender_color(wxr_format, text_pixel, &col); wine_tsx11_lock(); - pXRenderFillRectangle(gdi_display, PictOpSrc, tile->pict, &col, 0, 0, 1, 1); + pXRenderFillRectangle(gdi_display, PictOpSrc, tile->pict, color, 0, 0, 1, 1); wine_tsx11_unlock(); - tile->current_color = text_pixel; + tile->current_color = *color; } return tile->pict; } @@ -2080,6 +2080,7 @@ BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, POINT desired, current; int render_op = PictOpOver; Picture pict = get_xrender_picture(physdev->x11dev); + XRenderColor col; /* There's a bug in XRenderCompositeText that ignores the xDst and yDst parameters. So we pass zeros to the function and move to our starting position using the first @@ -2089,7 +2090,8 @@ BOOL xrenderdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, desired.y = physdev->x11dev->dc_rect.top + y; current.x = current.y = 0; - tile_pict = get_tile_pict(physdev->info.format, physdev->x11dev->textPixel); + get_xrender_color(physdev->info.format, physdev->x11dev->textPixel, &col); + tile_pict = get_tile_pict(physdev->info.format, &col); /* FIXME the mapping of Text/BkColor onto 1 or 0 needs investigation. */ @@ -2549,20 +2551,21 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE /* mono -> color */ if(physDevSrc->depth == 1 && physDevDst->depth > 1) { - XRenderColor col; - get_xrender_color(dst_format, physDevDst->textPixel, &col); + XRenderColor fg, bg; + get_xrender_color(dst_format, physDevDst->textPixel, &fg); + get_xrender_color(dst_format, physDevDst->backgroundPixel, &bg); /* We use the source drawable as a mask */ mask_pict = get_xrender_picture_source( physDevSrc, use_repeat ); /* Use backgroundPixel as the foreground color */ EnterCriticalSection( &xrender_cs ); - src_pict = get_tile_pict(dst_format, physDevDst->backgroundPixel); + src_pict = get_tile_pict(dst_format, &bg); /* Create a destination picture and fill it with textPixel color as the background color */ wine_tsx11_lock(); dst_pict = pXRenderCreatePicture(gdi_display, pixmap, dst_format->pict_format, CPSubwindowMode|CPRepeat, &pa); - pXRenderFillRectangle(gdi_display, PictOpSrc, dst_pict, &col, 0, 0, width, height); + pXRenderFillRectangle(gdi_display, PictOpSrc, dst_pict, &fg, 0, 0, width, height); xrender_mono_blit(src_pict, mask_pict, dst_pict, x_src, y_src, xscale, yscale, width, height);
1
0
0
0
Aurimas Fišeras : po: Update Lithuanian translation.
by Alexandre Julliard
14 Sep '11
14 Sep '11
Module: wine Branch: master Commit: 90e3bc51c3b55ede36080e67274e2fcb6ce21a26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90e3bc51c3b55ede36080e672…
Author: Aurimas Fišeras <aurimas(a)gmail.com> Date: Wed Sep 14 18:06:12 2011 +0300 po: Update Lithuanian translation. --- po/lt.po | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 deletions(-) diff --git a/po/lt.po b/po/lt.po index 0594730..bc88a82 100644 --- a/po/lt.po +++ b/po/lt.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2011-09-08 19:21+0300\n" +"PO-Revision-Date: 2011-09-14 18:03+0300\n" "Last-Translator: Aurimas Fišeras <aurimas(a)members.fsf.org>\n" "Language-Team: komp_lt(a)konf.lt\n" "Language: Lithuanian\n" @@ -7692,7 +7692,6 @@ msgid "%s: File Not Found\n" msgstr "%s: failas nerastas\n" #: attrib.rc:47 -#, fuzzy msgid "" "ATTRIB - Displays or changes file attributes.\n" "\n" @@ -7717,21 +7716,20 @@ msgstr "" "\n" "Sintaksė:\n" "ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [diskas:][kelias][failas]\n" -"\t [/S [/D]]\n" +" [/S [/D]]\n" "\n" "Kur:\n" "\n" -"+ Nustato atributą.\n" -"- Išvalo atributą.\n" -"R Atributas „tik skaitomas“.\n" -"A Atributas „archyvuotinasis“.\n" -"S Atributas „sisteminis“.\n" -"H Atributas „slepiamasis“.\n" -"[diskas:][kelias][failas]\n" -"Nurodo failą ar failus attrib apdorojimui.\n" -"/S Apdoroja atitinkančius failus dabartiniame\n" -"aplanke ir poaplankiuose.\n" -"/D Taip pat apdoroja aplankus.\n" +" + Nustato atributą.\n" +" - Išvalo atributą.\n" +" R Atributas „tik skaitomas“.\n" +" A Atributas „archyvuotinasis“.\n" +" S Atributas „sisteminis“.\n" +" H Atributas „slepiamasis“.\n" +" [diskas:][kelias][failas]\n" +" Nurodo failą ar failus attrib apdorojimui.\n" +" /S Apdoroja atitinkančius failus dabartiniame aplanke ir poaplankiuose.\n" +" /D Taip pat apdoroja aplankus.\n" #: clock.rc:29 msgid "Ana&log" @@ -8248,7 +8246,6 @@ msgstr "" "ar apvalkalą iš kur CMD buvo iškviestas.\n" #: cmd.rc:288 -#, fuzzy msgid "" "CMD built-in commands are:\n" "ASSOC\t\tShow or modify file extension associations\n" @@ -8319,6 +8316,7 @@ msgstr "" "TYPE\t\tIšvesti tekstinio failo turinį\n" "VER\t\tParodyti dabartinę CMD versiją\n" "VOL\t\tParodyti tomo vardą\n" +"XCOPY\t\tKopijuoja šaltinio failus ar katalogų medį į paskirtį\n" "EXIT\t\tUžveria CMD\n" "\n" "Įveskite HELP <komanda> platesnei informacijai apie išvardintas komandas " @@ -10876,9 +10874,8 @@ msgid "Tile &Vertically\tCtrl+F4" msgstr "Iškloti &stačiai\tVald+F4" #: winefile.rc:87 -#, fuzzy msgid "&About Wine File Manager" -msgstr "Wine failų tvarkytuvė" +msgstr "&Apie Wine failų tvarkytuvę" #: winefile.rc:93 msgid "Applying font settings"
1
0
0
0
Bernhard Loos : rpcrt4: The named pipe can be used for multiple operations at the same time, so use overlapped operations for ReadFile and WriteFile.
by Alexandre Julliard
14 Sep '11
14 Sep '11
Module: wine Branch: master Commit: a57312d8735eb5ae10ab52de042d046a73d1f827 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a57312d8735eb5ae10ab52de0…
Author: Bernhard Loos <bernhardloos(a)googlemail.com> Date: Wed Sep 14 14:19:29 2011 +0200 rpcrt4: The named pipe can be used for multiple operations at the same time, so use overlapped operations for ReadFile and WriteFile. --- dlls/rpcrt4/rpc_transport.c | 53 +++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 24 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 8f54575..c2dac67 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -111,19 +111,14 @@ typedef struct _RpcConnection_np { RpcConnection common; HANDLE pipe; - OVERLAPPED ovl; + OVERLAPPED read_ovl; + OVERLAPPED write_ovl; BOOL listening; } RpcConnection_np; static RpcConnection *rpcrt4_conn_np_alloc(void) { - RpcConnection_np *npc = HeapAlloc(GetProcessHeap(), 0, sizeof(RpcConnection_np)); - if (npc) - { - npc->pipe = NULL; - memset(&npc->ovl, 0, sizeof(npc->ovl)); - npc->listening = FALSE; - } + RpcConnection_np *npc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcConnection_np)); return &npc->common; } @@ -135,13 +130,13 @@ static RPC_STATUS rpcrt4_conn_listen_pipe(RpcConnection_np *npc) npc->listening = TRUE; for (;;) { - if (ConnectNamedPipe(npc->pipe, &npc->ovl)) + if (ConnectNamedPipe(npc->pipe, &npc->read_ovl)) return RPC_S_OK; switch(GetLastError()) { case ERROR_PIPE_CONNECTED: - SetEvent(npc->ovl.hEvent); + SetEvent(npc->read_ovl.hEvent); return RPC_S_OK; case ERROR_IO_PENDING: /* will be completed in rpcrt4_protseq_np_wait_for_new_connection */ @@ -175,8 +170,8 @@ static RPC_STATUS rpcrt4_conn_create_pipe(RpcConnection *Connection, LPCSTR pnam return RPC_S_CANT_CREATE_ENDPOINT; } - memset(&npc->ovl, 0, sizeof(npc->ovl)); - npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + npc->read_ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + npc->write_ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); /* Note: we don't call ConnectNamedPipe here because it must be done in the * server thread as the thread must be alertable */ @@ -233,11 +228,11 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname, } /* success */ - memset(&npc->ovl, 0, sizeof(npc->ovl)); /* pipe is connected; change to message-read mode. */ dwMode = PIPE_READMODE_MESSAGE; SetNamedPipeHandleState(pipe, &dwMode, NULL, NULL); - npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + npc->read_ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); + npc->write_ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); npc->pipe = pipe; return RPC_S_OK; @@ -365,9 +360,11 @@ static void rpcrt4_conn_np_handoff(RpcConnection_np *old_npc, RpcConnection_np * * to the child, then reopen the server binding to continue listening */ new_npc->pipe = old_npc->pipe; - new_npc->ovl = old_npc->ovl; + new_npc->read_ovl = old_npc->read_ovl; + new_npc->write_ovl = old_npc->write_ovl; old_npc->pipe = 0; - memset(&old_npc->ovl, 0, sizeof(old_npc->ovl)); + memset(&old_npc->read_ovl, 0, sizeof(old_npc->read_ovl)); + memset(&old_npc->write_ovl, 0, sizeof(old_npc->write_ovl)); old_npc->listening = FALSE; } @@ -416,7 +413,9 @@ static int rpcrt4_conn_np_read(RpcConnection *Connection, while (bytes_left) { DWORD bytes_read; - ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, NULL); + ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, &npc->read_ovl); + if (!ret && GetLastError() == ERROR_IO_PENDING) + ret = GetOverlappedResult(npc->pipe, &npc->read_ovl, &bytes_read, TRUE); if (!ret && GetLastError() == ERROR_MORE_DATA) ret = TRUE; if (!ret || !bytes_read) @@ -438,7 +437,9 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection, while (bytes_left) { DWORD bytes_written; - ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL); + ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, &npc->write_ovl); + if (!ret && GetLastError() == ERROR_IO_PENDING) + ret = GetOverlappedResult(npc->pipe, &npc->write_ovl, &bytes_written, TRUE); if (!ret || !bytes_written) break; bytes_left -= bytes_written; @@ -455,9 +456,13 @@ static int rpcrt4_conn_np_close(RpcConnection *Connection) CloseHandle(npc->pipe); npc->pipe = 0; } - if (npc->ovl.hEvent) { - CloseHandle(npc->ovl.hEvent); - npc->ovl.hEvent = 0; + if (npc->read_ovl.hEvent) { + CloseHandle(npc->read_ovl.hEvent); + npc->read_ovl.hEvent = 0; + } + if (npc->write_ovl.hEvent) { + CloseHandle(npc->write_ovl.hEvent); + npc->write_ovl.hEvent = 0; } return 0; } @@ -661,7 +666,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common); while (conn) { rpcrt4_conn_listen_pipe(conn); - if (conn->ovl.hEvent) + if (conn->read_ovl.hEvent) (*count)++; conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common); } @@ -682,7 +687,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p *count = 1; conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common); while (conn) { - if ((objs[*count] = conn->ovl.hEvent)) + if ((objs[*count] = conn->read_ovl.hEvent)) (*count)++; conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common); } @@ -729,7 +734,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq, EnterCriticalSection(&protseq->cs); conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common); while (conn) { - if (b_handle == conn->ovl.hEvent) break; + if (b_handle == conn->read_ovl.hEvent) break; conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common); } cconn = NULL;
1
0
0
0
Frédéric Delanoy : cmd/tests: Add tests for SHIFT builtin.
by Alexandre Julliard
14 Sep '11
14 Sep '11
Module: wine Branch: master Commit: ad064b44ed7a773e4fdf6dab9cda240ae6172c5b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad064b44ed7a773e4fdf6dab9…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Sep 13 12:06:45 2011 +0200 cmd/tests: Add tests for SHIFT builtin. --- programs/cmd/tests/test_builtins.cmd | 20 ++++++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 7 +++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 7551e57..cd30e4f 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -1256,6 +1256,26 @@ echo echo non-builtin dir> dir.cmd call dir /b cd .. & rd /s/q foobar +echo ------------ Testing SHIFT ------------ + +call :shiftFun p1 p2 p3 p4 p5 +goto :endShiftFun + +:shiftFun +echo '%1' '%2' '%3' '%4' '%5' +shift +echo '%1' '%2' '%3' '%4' '%5' +shift@tab@ /1 +echo '%1' '%2' '%3' '%4' '%5' +shift /2 +echo '%1' '%2' '%3' '%4' '%5' +shift /-1 +echo '%1' '%2' '%3' '%4' '%5' +shift /0 +echo '%1' '%2' '%3' '%4' '%5' +goto :eof +:endShiftFun + echo ------------ Testing cmd invocation ------------ rem FIXME: only a stub ATM echo ... a batch file can delete itself ... diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 733e1d5..19536fe 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -729,6 +729,13 @@ foo '' @todo_wine@1 @todo_wine@1 non-builtin dir +------------ Testing SHIFT ------------ +'p1' 'p2' 'p3' 'p4' 'p5' +'p2' 'p3' 'p4' 'p5' '' +'p3' 'p4' 'p5' '' '' +'p3' 'p5' '' '' '' +'p3' 'p5' '' '' '' +'p5' '' '' '' '' ------------ Testing cmd invocation ------------ ... a batch file can delete itself ... file correctly deleted
1
0
0
0
Frédéric Delanoy : cmd: Make some variables static.
by Alexandre Julliard
14 Sep '11
14 Sep '11
Module: wine Branch: master Commit: 9bf515974dc2f5c0328d2af341639b62b146d99f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9bf515974dc2f5c0328d2af34…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Sep 13 10:33:47 2011 +0200 cmd: Make some variables static. --- programs/cmd/builtins.c | 2 +- programs/cmd/wcmdmain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 716db4b..1e3defa 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -45,7 +45,7 @@ static void WCMD_part_execute(CMD_LIST **commands, const WCHAR *firstcmd, const WCHAR *variable, const WCHAR *value, BOOL isIF, BOOL conditionTRUE); -struct env_stack *saved_environment; +static struct env_stack *saved_environment; struct env_stack *pushd_directories; extern HINSTANCE hinst; diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 840c5da..02260e3 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -99,7 +99,7 @@ extern struct env_stack *pushd_directories; static const WCHAR *pagedMessage = NULL; static char *output_bufA = NULL; #define MAX_WRITECONSOLE_SIZE 65535 -BOOL unicodePipes = FALSE; +static BOOL unicodePipes = FALSE; /*******************************************************************
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
100
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
Results per page:
10
25
50
100
200