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
July 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
838 discussions
Start a n
N
ew thread
Bernhard Loos : server: Check for STATUS_OBJECT_TYPE_MISMATCH before STATUS_ACCESS_DENIED in get_handle_obj .
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: bf3c2a06f58a32cd58a019eff95774eea8305ee2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf3c2a06f58a32cd58a019eff…
Author: Bernhard Loos <bernhardloos(a)googlemail.com> Date: Tue Jul 19 13:20:39 2011 +0200 server: Check for STATUS_OBJECT_TYPE_MISMATCH before STATUS_ACCESS_DENIED in get_handle_obj. --- server/handle.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/handle.c b/server/handle.c index 9d91f16..c7cd417 100644 --- a/server/handle.c +++ b/server/handle.c @@ -403,14 +403,19 @@ struct object *get_handle_obj( struct process *process, obj_handle_t handle, set_error( STATUS_INVALID_HANDLE ); return NULL; } + obj = entry->ptr; + if (ops && (obj->ops != ops)) + { + set_error( STATUS_OBJECT_TYPE_MISMATCH ); /* not the right type */ + return NULL; + } if ((entry->access & access) != access) { set_error( STATUS_ACCESS_DENIED ); return NULL; } - obj = entry->ptr; } - if (ops && (obj->ops != ops)) + else if (ops && (obj->ops != ops)) { set_error( STATUS_OBJECT_TYPE_MISMATCH ); /* not the right type */ return NULL;
1
0
0
0
Jay Yang : shell32: Make ISFHelper_fnCopyItems actually copy the items.
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: 872c07a967f374e5216911f28863e5166e245bd0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=872c07a967f374e5216911f28…
Author: Jay Yang <jkelleyy(a)gmail.com> Date: Tue Jul 19 12:25:15 2011 -0400 shell32: Make ISFHelper_fnCopyItems actually copy the items. --- dlls/shell32/shfldr_fs.c | 48 +++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index c0e9ae5..969f18d 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -1383,13 +1383,15 @@ static HRESULT WINAPI ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) { - UINT i; + HRESULT ret=E_FAIL; IPersistFolder2 *ppf2 = NULL; - char szSrcPath[MAX_PATH], - szDstPath[MAX_PATH]; - + WCHAR wszSrcPathRoot[MAX_PATH], + wszDstPath[MAX_PATH+1]; + WCHAR *wszSrcPathsList; IGenericSFImpl *This = impl_from_ISFHelper(iface); + SHFILEOPSTRUCTW fop; + TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, @@ -1398,24 +1400,32 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPITEMIDLIST pidl; if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) { - for (i = 0; i < cidl; i++) { - SHGetPathFromIDListA (pidl, szSrcPath); - PathAddBackslashA (szSrcPath); - _ILSimpleGetText (apidl[i], szSrcPath + strlen (szSrcPath), - MAX_PATH); - - if (!WideCharToMultiByte(CP_ACP, 0, This->sPathTarget, -1, szDstPath, MAX_PATH, NULL, NULL)) - szDstPath[0] = '\0'; - PathAddBackslashA (szDstPath); - _ILSimpleGetText (apidl[i], szDstPath + strlen (szDstPath), - MAX_PATH); - MESSAGE ("would copy %s to %s\n", szSrcPath, szDstPath); + SHGetPathFromIDListW (pidl, wszSrcPathRoot); + ZeroMemory(wszDstPath, MAX_PATH+1); + if (This->sPathTarget) + lstrcpynW(wszDstPath, This->sPathTarget, MAX_PATH); + PathAddBackslashW(wszSrcPathRoot); + PathAddBackslashW(wszDstPath); + wszSrcPathsList = build_paths_list(wszSrcPathRoot, cidl, apidl); + ZeroMemory(&fop, sizeof(fop)); + fop.hwnd = GetActiveWindow(); + fop.wFunc = FO_COPY; + fop.pFrom = wszSrcPathsList; + fop.pTo = wszDstPath; + fop.fFlags = FOF_ALLOWUNDO; + ret = S_OK; + if(SHFileOperationW(&fop)) + { + WARN("Copy failed\n"); + ret = E_FAIL; } - SHFree (pidl); + HeapFree(GetProcessHeap(), 0, wszSrcPathsList); + } - IPersistFolder2_Release (ppf2); + SHFree(pidl); + IPersistFolder2_Release(ppf2); } - return S_OK; + return ret; } static const ISFHelperVtbl shvt =
1
0
0
0
Alexandre Julliard : gdi32: Move the checks for empty visible rects in PatBlt/StretchBlt back to gdi32 .
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: 01e12ec9f99489ecbf54b21f290dc3d633328c54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=01e12ec9f99489ecbf54b21f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 20 12:17:09 2011 +0200 gdi32: Move the checks for empty visible rects in PatBlt/StretchBlt back to gdi32. --- dlls/gdi32/bitblt.c | 27 ++++++++++++++------------- dlls/gdi32/gdi_private.h | 7 ++++++- dlls/winex11.drv/bitblt.c | 5 ----- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index 0b61729..0f266ec 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -47,7 +47,7 @@ static inline void swap_ints( int *i, int *j ) *j = tmp; } -static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, +static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, DC *dc_src, struct bitblt_coords *src ) { RECT rect, clip; @@ -79,7 +79,7 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, /* get the source visible rectangle */ - if (!src) return; + if (!src) return !is_rect_empty( &dst->visrect ); rect.left = src->log_x; rect.top = src->log_y; @@ -105,6 +105,9 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, else src->visrect = rect; /* FIXME: clip to device size */ + if (is_rect_empty( &src->visrect )) return FALSE; + if (is_rect_empty( &dst->visrect )) return FALSE; + /* intersect the rectangles */ if ((src->width == dst->width) && (src->height == dst->height)) /* no stretching */ @@ -129,10 +132,9 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, rect.top--; rect.right++; rect.bottom++; - if (!intersect_rect( &dst->visrect, &rect, &dst->visrect )) return; + if (!intersect_rect( &dst->visrect, &rect, &dst->visrect )) return FALSE; /* map destination rectangle back to source coordinates */ - rect = dst->visrect; rect.left = src->x + (dst->visrect.left - dst->x)*src->width/dst->width; rect.top = src->y + (dst->visrect.top - dst->y)*src->height/dst->height; rect.right = src->x + (dst->visrect.right - dst->x)*src->width/dst->width; @@ -145,8 +147,9 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst, rect.top--; rect.right++; rect.bottom++; - intersect_rect( &src->visrect, &rect, &src->visrect ); + if (!intersect_rect( &src->visrect, &rect, &src->visrect )) return FALSE; } + return TRUE; } static void free_heap_bits( struct gdi_image_bits *bits ) @@ -170,8 +173,6 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, LPVOID bits; INT lines; - if (dst->visrect.left >= dst->visrect.right || dst->visrect.top >= dst->visrect.bottom) return TRUE; - /* make sure we have a real implementation for StretchDIBits */ if (GET_DC_PHYSDEV( dc_dst, pStretchDIBits ) == dst_dev) goto try_get_image; @@ -300,13 +301,13 @@ BOOL WINAPI PatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop dst.layout |= LAYOUT_BITMAPORIENTATIONPRESERVED; rop &= ~NOMIRRORBITMAP; } - get_vis_rectangles( dc, &dst, NULL, NULL ); + ret = !get_vis_rectangles( dc, &dst, NULL, NULL ); TRACE("dst %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s rop=%06x\n", hdc, dst.log_x, dst.log_y, dst.log_width, dst.log_height, dst.x, dst.y, dst.width, dst.height, wine_dbgstr_rect(&dst.visrect), rop ); - ret = physdev->funcs->pPatBlt( physdev, &dst, rop ); + if (!ret) ret = physdev->funcs->pPatBlt( physdev, &dst, rop ); release_dc_ptr( dc ); } @@ -364,7 +365,7 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst, INT widthDst, INT height dst.layout |= LAYOUT_BITMAPORIENTATIONPRESERVED; rop &= ~NOMIRRORBITMAP; } - get_vis_rectangles( dcDst, &dst, dcSrc, &src ); + ret = !get_vis_rectangles( dcDst, &dst, dcSrc, &src ); TRACE("src %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s dst %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s rop=%06x\n", hdcSrc, src.log_x, src.log_y, src.log_width, src.log_height, @@ -372,7 +373,7 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst, INT widthDst, INT height hdcDst, dst.log_x, dst.log_y, dst.log_width, dst.log_height, dst.x, dst.y, dst.width, dst.height, wine_dbgstr_rect(&dst.visrect), rop ); - ret = dst_dev->funcs->pStretchBlt( dst_dev, &dst, src_dev, &src, rop ); + if (!ret) ret = dst_dev->funcs->pStretchBlt( dst_dev, &dst, src_dev, &src, rop ); release_dc_ptr( dcSrc ); } release_dc_ptr( dcDst ); @@ -695,7 +696,7 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig dst.log_width = widthDst; dst.log_height = heightDst; dst.layout = GetLayout( dst_dev->hdc ); - get_vis_rectangles( dcDst, &dst, dcSrc, &src ); + ret = !get_vis_rectangles( dcDst, &dst, dcSrc, &src ); TRACE("src %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s dst %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s blend=%02x/%02x/%02x/%02x\n", hdcSrc, src.log_x, src.log_y, src.log_width, src.log_height, @@ -705,7 +706,7 @@ BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heig blendFunction.BlendOp, blendFunction.BlendFlags, blendFunction.SourceConstantAlpha, blendFunction.AlphaFormat ); - ret = dst_dev->funcs->pAlphaBlend( dst_dev, &dst, src_dev, &src, blendFunction ); + if (!ret) ret = dst_dev->funcs->pAlphaBlend( dst_dev, &dst, src_dev, &src, blendFunction ); release_dc_ptr( dcDst ); } release_dc_ptr( dcSrc ); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 92fe8a9..4c8ed58 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -527,13 +527,18 @@ BOOL WINAPI FontIsLinked(HDC); BOOL WINAPI SetVirtualResolution(HDC hdc, DWORD horz_res, DWORD vert_res, DWORD horz_size, DWORD vert_size); +static inline BOOL is_rect_empty( const RECT *rect ) +{ + return (rect->left >= rect->right || rect->top >= rect->bottom); +} + static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 ) { dst->left = max( src1->left, src2->left ); dst->top = max( src1->top, src2->top ); dst->right = min( src1->right, src2->right ); dst->bottom = min( src1->bottom, src2->bottom ); - return (dst->left < dst->right && dst->top < dst->bottom); + return !is_rect_empty( dst ); } static inline void offset_rect( RECT *rect, int offset_x, int offset_y ) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index d186687..92765c5 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1401,7 +1401,6 @@ BOOL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) BOOL usePat = (((rop >> 4) & 0x0f0000) != (rop & 0x0f0000)); const BYTE *opcode = BITBLT_Opcodes[(rop >> 16) & 0xff]; - if (IsRectEmpty( &dst->visrect )) return TRUE; if (usePat && !X11DRV_SetupGCForBrush( physDev )) return TRUE; X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod ); @@ -1465,9 +1464,6 @@ BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, Pixmap src_pixmap; GC tmpGC; - if (IsRectEmpty( &dst->visrect )) return TRUE; - if (IsRectEmpty( &src->visrect )) return TRUE; - fStretch = (src->width != dst->width) || (src->height != dst->height); if (physDevDst != physDevSrc) @@ -1595,7 +1591,6 @@ BOOL X11DRV_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; } - if (IsRectEmpty( &dst->visrect )) return TRUE; return XRender_AlphaBlend( physDevDst, dst, physDevSrc, src, blendfn ); }
1
0
0
0
Alexandre Julliard : gdi32: Set the color maps to the destination DC colors for 1-bpp images.
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: 414fe85c8a99af38599cc4815fb855b10bfa77a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=414fe85c8a99af38599cc4815…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 19 14:11:04 2011 +0200 gdi32: Set the color maps to the destination DC colors for 1-bpp images. --- dlls/gdi32/bitblt.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index e87ecfd..0b61729 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -224,6 +224,34 @@ try_get_image: { RECT src_rect = src->visrect; + /* 1-bpp source without a color table uses the destination DC colors */ + if (src_info->bmiHeader.biBitCount == 1 && !src_info->bmiHeader.biClrUsed) + { + COLORREF color = GetTextColor( dst_dev->hdc ); + src_info->bmiColors[0].rgbRed = GetRValue( color ); + src_info->bmiColors[0].rgbGreen = GetGValue( color ); + src_info->bmiColors[0].rgbBlue = GetBValue( color ); + src_info->bmiColors[0].rgbReserved = 0; + color = GetBkColor( dst_dev->hdc ); + src_info->bmiColors[1].rgbRed = GetRValue( color ); + src_info->bmiColors[1].rgbGreen = GetGValue( color ); + src_info->bmiColors[1].rgbBlue = GetBValue( color ); + src_info->bmiColors[1].rgbReserved = 0; + src_info->bmiHeader.biClrUsed = 2; + } + + /* 1-bpp destination without a color table requires a fake 1-entry table + * that contains only the background color */ + if (dst_info->bmiHeader.biBitCount == 1 && !dst_info->bmiHeader.biClrUsed) + { + COLORREF color = GetBkColor( src_dev->hdc ); + dst_info->bmiColors[0].rgbRed = GetRValue( color ); + dst_info->bmiColors[0].rgbGreen = GetGValue( color ); + dst_info->bmiColors[0].rgbBlue = GetBValue( color ); + dst_info->bmiColors[0].rgbReserved = 0; + dst_info->bmiHeader.biClrUsed = 1; + } + offset_rect( &src_rect, src_bits.offset - src->visrect.left, -src->visrect.top ); dst_info->bmiHeader.biWidth = src_rect.right - src_rect.left; dst_bits.ptr = HeapAlloc( GetProcessHeap(), 0, get_dib_image_size( dst_info )); @@ -233,7 +261,11 @@ try_get_image: dst_bits.offset = 0; dst_bits.free = free_heap_bits; if (!(err = convert_bitmapinfo( src_info, src_bits.ptr, &src_rect, dst_info, dst_bits.ptr ))) + { + /* get rid of the fake 1-bpp table */ + if (dst_info->bmiHeader.biClrUsed == 1) dst_info->bmiHeader.biClrUsed = 0; err = dst_dev->funcs->pPutImage( dst_dev, 0, dst_info, &dst_bits, &dst->visrect, rop ); + } if (dst_bits.free) dst_bits.free( &dst_bits ); } else err = ERROR_OUTOFMEMORY;
1
0
0
0
Alexandre Julliard : gdi32: Add a special case for converting dibs to 1-bpp using the background color .
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: 07528a24b9d93caf7fcac068a97d9971b144a515 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07528a24b9d93caf7fcac068a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 19 20:06:32 2011 +0200 gdi32: Add a special case for converting dibs to 1-bpp using the background color. --- dlls/gdi32/dibdrv/primitives.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c index f2908e8..e1e9aca 100644 --- a/dlls/gdi32/dibdrv/primitives.c +++ b/dlls/gdi32/dibdrv/primitives.c @@ -692,6 +692,14 @@ static DWORD colorref_to_pixel_colortable(const dib_info *dib, COLORREF color) rgb.rgbGreen = GetGValue(color); rgb.rgbBlue = GetBValue(color); + /* special case for conversion to 1-bpp without a color table: + * we get a 1-entry table containing the background color + */ + if (dib->bit_count == 1 && dib->color_table_size == 1) + return (rgb.rgbRed == dib->color_table[0].rgbRed && + rgb.rgbGreen == dib->color_table[0].rgbGreen && + rgb.rgbBlue == dib->color_table[0].rgbBlue); + for(i = 0; i < dib->color_table_size; i++) { RGBQUAD *cur = dib->color_table + i;
1
0
0
0
Alexandre Julliard : winex11: Verify that the color map matches in PutImage for 4 and 8 bpp.
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: be835e2d9b1b3671974c42b9610261f8bd3fe152 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be835e2d9b1b3671974c42b96…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 20 11:42:17 2011 +0200 winex11: Verify that the color map matches in PutImage for 4 and 8 bpp. --- dlls/winex11.drv/bitblt.c | 89 +++++++++++++++++++++++++++++---------------- 1 files changed, 57 insertions(+), 32 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 3e1a4ce..d186687 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1659,6 +1659,60 @@ static void set_color_info( PHYSDEV dev, const ColorShifts *color_shifts, BITMAP } } +/* check if the specified color info is suitable for PutImage */ +static BOOL matching_color_info( PHYSDEV dev, const ColorShifts *color_shifts, const BITMAPINFO *info ) +{ + DWORD *colors = (DWORD *)((char *)info + info->bmiHeader.biSize); + + switch (info->bmiHeader.biBitCount) + { + case 1: + if (info->bmiHeader.biCompression != BI_RGB) return FALSE; + return !info->bmiHeader.biClrUsed; /* color map not allowed */ + case 4: + case 8: + { + RGBQUAD *rgb = (RGBQUAD *)colors; + PALETTEENTRY palette[256]; + UINT i, count; + + if (info->bmiHeader.biCompression != BI_RGB) return FALSE; + count = X11DRV_GetSystemPaletteEntries( dev, 0, 1 << info->bmiHeader.biBitCount, palette ); + if (count != info->bmiHeader.biClrUsed) return FALSE; + for (i = 0; i < count; i++) + { + if (rgb[i].rgbRed != palette[i].peRed || + rgb[i].rgbGreen != palette[i].peGreen || + rgb[i].rgbBlue != palette[i].peBlue) return FALSE; + } + return TRUE; + } + case 16: + if (info->bmiHeader.biCompression == BI_BITFIELDS) + return (color_shifts->logicalRed.max << color_shifts->logicalRed.shift == colors[0] && + color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift == colors[1] && + color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift == colors[2]); + if (info->bmiHeader.biCompression == BI_RGB) + return (color_shifts->logicalRed.max << color_shifts->logicalRed.shift == 0x7c00 && + color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift == 0x03e0 && + color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift == 0x001f); + break; + case 32: + if (info->bmiHeader.biCompression == BI_BITFIELDS) + return (color_shifts->logicalRed.max << color_shifts->logicalRed.shift == colors[0] && + color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift == colors[1] && + color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift == colors[2]); + /* fall through */ + case 24: + if (info->bmiHeader.biCompression == BI_RGB) + return (color_shifts->logicalRed.max << color_shifts->logicalRed.shift == 0xff0000 && + color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift == 0x00ff00 && + color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift == 0x0000ff); + break; + } + return FALSE; +} + /* copy the image bits, fixing up alignment and byte swapping as necessary */ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, XImage *image, const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits, @@ -1814,7 +1868,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str { X11DRV_PDEVICE *physdev; X_PHYSBITMAP *bitmap; - DWORD ret = ERROR_SUCCESS; + DWORD ret; XImage *image; int depth; struct gdi_image_bits dst_bits; @@ -1842,37 +1896,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str if (info->bmiHeader.biPlanes != 1) goto update_format; if (info->bmiHeader.biBitCount != format->bits_per_pixel) goto update_format; /* FIXME: could try to handle 1-bpp using XCopyPlane */ - - if (info->bmiHeader.biCompression == BI_BITFIELDS) - { - DWORD *masks = (DWORD *)((char *)info + info->bmiHeader.biSize); - if (color_shifts->logicalRed.max << color_shifts->logicalRed.shift != masks[0] || - color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift != masks[1] || - color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift != masks[2]) - goto update_format; - } - else if (info->bmiHeader.biCompression == BI_RGB) - { - switch (info->bmiHeader.biBitCount) - { - case 16: - if (color_shifts->logicalRed.max << color_shifts->logicalRed.shift != 0x7c00 || - color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift != 0x03e0 || - color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift != 0x001f) - goto update_format; - break; - case 24: - case 32: - if (color_shifts->logicalRed.max << color_shifts->logicalRed.shift != 0xff0000 || - color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift != 0x00ff00 || - color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift != 0x0000ff) - goto update_format; - break; - } - } - else goto update_format; - - if (!bits) return ret; /* just querying the format */ + if (!matching_color_info( dev, color_shifts, info )) goto update_format; + if (!bits) return ERROR_SUCCESS; /* just querying the format */ wine_tsx11_lock(); image = XCreateImage( gdi_display, visual, depth, ZPixmap, 0, NULL,
1
0
0
0
Alexandre Julliard : winex11: Fill in the color table in Get/ PutImage for 4 and 8 bpp.
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: 476a1fa1fbdb5f770fb5a676463452e87791ceab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=476a1fa1fbdb5f770fb5a6764…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 11 22:45:05 2011 +0200 winex11: Fill in the color table in Get/PutImage for 4 and 8 bpp. --- dlls/winex11.drv/bitblt.c | 41 ++++++++++++++++++++++++++++++----------- 1 files changed, 30 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 836e251..3e1a4ce 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1614,27 +1614,47 @@ static void free_ximage_bits( struct gdi_image_bits *bits ) } /* store the palette or color mask data in the bitmap info structure */ -static void set_color_info( const ColorShifts *color_shifts, BITMAPINFO *info ) +static void set_color_info( PHYSDEV dev, const ColorShifts *color_shifts, BITMAPINFO *info ) { DWORD *colors = (DWORD *)((char *)info + info->bmiHeader.biSize); + info->bmiHeader.biCompression = BI_RGB; + info->bmiHeader.biClrUsed = 0; + switch (info->bmiHeader.biBitCount) { - case 1: case 4: case 8: - info->bmiHeader.biCompression = BI_RGB; - /* FIXME: set color palette */ + { + RGBQUAD *rgb = (RGBQUAD *)colors; + PALETTEENTRY palette[256]; + UINT i, count; + + info->bmiHeader.biClrUsed = 1 << info->bmiHeader.biBitCount; + count = X11DRV_GetSystemPaletteEntries( dev, 0, info->bmiHeader.biClrUsed, palette ); + for (i = 0; i < count; i++) + { + rgb[i].rgbRed = palette[i].peRed; + rgb[i].rgbGreen = palette[i].peGreen; + rgb[i].rgbBlue = palette[i].peBlue; + rgb[i].rgbReserved = 0; + } + memset( &rgb[count], 0, (info->bmiHeader.biClrUsed - count) * sizeof(*rgb) ); break; + } case 16: - case 32: - info->bmiHeader.biCompression = BI_BITFIELDS; colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift; colors[1] = color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift; colors[2] = color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift; + if (colors[0] != 0x7c00 || colors[1] != 0x03e0 || colors[2] != 0x001f) + info->bmiHeader.biCompression = BI_BITFIELDS; break; - case 24: - info->bmiHeader.biCompression = BI_RGB; + case 32: + colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift; + colors[1] = color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift; + colors[2] = color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift; + if (colors[0] != 0xff0000 || colors[1] != 0x00ff00 || colors[2] != 0x0000ff) + info->bmiHeader.biCompression = BI_BITFIELDS; break; } } @@ -1931,7 +1951,7 @@ update_format: info->bmiHeader.biPlanes = 1; info->bmiHeader.biBitCount = format->bits_per_pixel; if (info->bmiHeader.biHeight > 0) info->bmiHeader.biHeight = -info->bmiHeader.biHeight; - set_color_info( physdev->color_shifts, info ); + set_color_info( dev, physdev->color_shifts, info ); return ERROR_BAD_FORMAT; } @@ -2035,9 +2055,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, info->bmiHeader.biSizeImage = height * image->bytes_per_line; info->bmiHeader.biXPelsPerMeter = 0; info->bmiHeader.biYPelsPerMeter = 0; - info->bmiHeader.biClrUsed = 0; info->bmiHeader.biClrImportant = 0; - set_color_info( color_shifts, info ); + set_color_info( dev, color_shifts, info ); src_bits.ptr = image->data; src_bits.is_copy = TRUE;
1
0
0
0
Alexandre Julliard : winex11: Remap pixels to system palette in Get/ PutImage for 4 and 8 bpp.
by Alexandre Julliard
20 Jul '11
20 Jul '11
Module: wine Branch: master Commit: be74c47e867da6f767b911cc4678af00f9b00b55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be74c47e867da6f767b911cc4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 18 14:48:01 2011 +0200 winex11: Remap pixels to system palette in Get/PutImage for 4 and 8 bpp. --- dlls/winex11.drv/bitblt.c | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 7a36b8b..836e251 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1642,7 +1642,7 @@ static void set_color_info( const ColorShifts *color_shifts, BITMAPINFO *info ) /* copy the image bits, fixing up alignment and byte swapping as necessary */ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, XImage *image, const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits, - unsigned int zeropad_mask ) + const int *mapping, unsigned int zeropad_mask ) { #ifdef WORDS_BIGENDIAN static const int client_byte_order = MSBFirst; @@ -1678,6 +1678,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, if ((need_byteswap && !src_bits->is_copy) || /* need to swap bytes */ (zeropad_mask != ~0u && !src_bits->is_copy) || /* need to clear padding bytes */ + (mapping && !src_bits->is_copy) || /* need to remap pixels */ (width_bytes & 3) || /* need to fixup line alignment */ (info->bmiHeader.biHeight > 0)) /* need to flip vertically */ { @@ -1696,7 +1697,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, dst_bits->offset = src_bits->offset; dst_bits->is_copy = src_bits->is_copy; dst_bits->free = NULL; - if (!need_byteswap && zeropad_mask == ~0u) return ERROR_SUCCESS; /* nothing to do */ + if (!need_byteswap && zeropad_mask == ~0u && !mapping) return ERROR_SUCCESS; /* nothing to do */ } src = src_bits->ptr; @@ -1709,7 +1710,7 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, width_bytes = -width_bytes; } - if (need_byteswap) + if (need_byteswap || mapping) { switch (info->bmiHeader.biBitCount) { @@ -1724,8 +1725,20 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, case 4: for (y = 0; y < height; y++, src += image->bytes_per_line, dst += width_bytes) { + if (mapping) + for (x = 0; x < image->bytes_per_line; x++) + dst[x] = (mapping[src[x] & 0x0f] << 4) | mapping[src[x] >> 4]; + else + for (x = 0; x < image->bytes_per_line; x++) + dst[x] = (src[x] << 4) | (src[x] >> 4); + ((unsigned int *)dst)[padding_pos] &= zeropad_mask; + } + break; + case 8: + for (y = 0; y < height; y++, src += image->bytes_per_line, dst += width_bytes) + { for (x = 0; x < image->bytes_per_line; x++) - dst[x] = (src[x] << 4) | (src[x] >> 4); + dst[x] = mapping[src[x]]; ((unsigned int *)dst)[padding_pos] &= zeropad_mask; } break; @@ -1787,6 +1800,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str struct gdi_image_bits dst_bits; const XPixmapFormatValues *format; const ColorShifts *color_shifts; + const BYTE *opcode = BITBLT_Opcodes[(rop >> 16) & 0xff]; + const int *mapping = NULL; if (hbitmap) { @@ -1845,7 +1860,13 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str wine_tsx11_unlock(); if (!image) return ERROR_OUTOFMEMORY; - ret = copy_image_bits( info, color_shifts, image, bits, &dst_bits, ~0u ); + if (image->bits_per_pixel == 4 || image->bits_per_pixel == 8) + { + if (bitmap || (!opcode[1] && OP_SRCDST(opcode[0]) == OP_ARGS(SRC,DST))) + mapping = X11DRV_PALETTE_PaletteToXPixel; + } + + ret = copy_image_bits( info, color_shifts, image, bits, &dst_bits, mapping, ~0u ); if (!ret) { @@ -1862,8 +1883,6 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str } else { - const BYTE *opcode = BITBLT_Opcodes[(rop >> 16) & 0xff]; - X11DRV_LockDIBSection( physdev, DIB_Status_GdiMod ); /* optimization for single-op ROPs */ @@ -1931,6 +1950,7 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, struct gdi_image_bits src_bits; const XPixmapFormatValues *format; const ColorShifts *color_shifts; + const int *mapping = NULL; if (hbitmap) { @@ -1952,8 +1972,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, switch (format->bits_per_pixel) { case 1: align = 32; break; - case 4: align = 8; break; - case 8: align = 4; break; + case 4: align = 8; mapping = X11DRV_PALETTE_XPixelToPalette; break; + case 8: align = 4; mapping = X11DRV_PALETTE_XPixelToPalette; break; case 16: align = 2; break; case 24: align = 4; break; case 32: align = 1; break; @@ -2021,7 +2041,7 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, src_bits.ptr = image->data; src_bits.is_copy = TRUE; - ret = copy_image_bits( info, color_shifts, image, &src_bits, bits, + ret = copy_image_bits( info, color_shifts, image, &src_bits, bits, mapping, zeropad_masks[(width * image->bits_per_pixel) & 31] ); if (!ret && bits->ptr == image->data)
1
0
0
0
Frédéric Delanoy : cmd/tests: Add tests for NUL handling.
by Alexandre Julliard
19 Jul '11
19 Jul '11
Module: wine Branch: master Commit: 5d22f3aa145795af0137f580959671c046f3d37a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d22f3aa145795af0137f5809…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Jul 19 09:49:24 2011 +0200 cmd/tests: Add tests for NUL handling. --- programs/cmd/tests/test_builtins.cmd | 31 ++++++++++++++++++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 6 +++++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 764697b..195afca 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -104,6 +104,37 @@ type foobaz echo *** del foobaz +echo ------------ Testing NUL ------------ +md foobar && cd foobar +rem NUL file (non) creation + case insensitivity +rem Note: "if exist" does not work with NUL, so to check for file existence we use a kludgy workaround +echo > bar +echo foo > NUL +dir /b /a-d +echo foo > nul +dir /b /a-d +echo foo > NuL +dir /b /a-d +del bar +rem NUL not special everywhere +call :setError 123 +echo NUL> foo +if not exist foo (echo foo should have been created) else ( + type foo + del foo +) +rem Empty file creation +copy nul foo > nul +if exist foo ( + echo foo created + del foo + type foo +) else ( + echo *** +) +cd .. +rd foobar + echo ------------ Testing if/else -------------- echo if/else should work with blocks if 0 == 0 ( diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 07a503ec..67f25a4 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -99,6 +99,12 @@ bar *** bar *** +------------ Testing NUL ------------ +bar +bar +bar +NUL +@todo_wine@foo created ------------ Testing if/else -------------- if/else should work with blocks if seems to work
1
0
0
0
Grazvydas Ignotas : ntdll/tests: Test NtQueryDirectoryFile with RestartScan set to FALSE.
by Alexandre Julliard
19 Jul '11
19 Jul '11
Module: wine Branch: master Commit: 5ae558bac71ccd9dca3c0b86a825493b834aae3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ae558bac71ccd9dca3c0b86a…
Author: Grazvydas Ignotas <notasas(a)gmail.com> Date: Sun Jul 17 02:48:15 2011 +0300 ntdll/tests: Test NtQueryDirectoryFile with RestartScan set to FALSE. --- dlls/ntdll/tests/directory.c | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index be8dd13..56840b5 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -63,6 +63,8 @@ static struct testfile_s { { 1, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" }, { 1, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" }, { 0, FILE_ATTRIBUTE_DIRECTORY, "d.tmp", NULL, "directory" }, + { 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" }, + { 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" }, { 0, 0, NULL } }; static const int max_test_dir_size = 20; /* size of above plus some for .. etc */ @@ -80,8 +82,10 @@ static void set_up_attribute_test(const char *testdirA) char buf[MAX_PATH]; pRtlMultiByteToUnicodeN(testfiles[i].nameW, sizeof(testfiles[i].nameW), NULL, testfiles[i].name, strlen(testfiles[i].name)+1); - sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); testfiles[i].nfound = 0; + if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) + continue; + sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) { ret = CreateDirectoryA(buf, NULL); ok(ret, "couldn't create dir '%s', error %d\n", buf, GetLastError()); @@ -104,6 +108,8 @@ static void tear_down_attribute_test(const char *testdirA) for (i=0; testfiles[i].name; i++) { int ret; char buf[MAX_PATH]; + if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) + continue; sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) { ret = RemoveDirectory(buf); @@ -128,9 +134,6 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info) WCHAR *nameW = dir_info->FileName; int namelen = dir_info->FileNameLength / sizeof(WCHAR); - if (nameW[0] == '.') - return; - for (i=0; testfiles[i].name; i++) { int len = strlen(testfiles[i].name); if (namelen != len || memcmp(nameW, testfiles[i].nameW, len*sizeof(WCHAR))) @@ -187,7 +190,7 @@ static void test_NtQueryDirectoryFile(void) } pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, sizeof(data), - FileBothDirectoryInformation, FALSE, NULL, TRUE ); + FileBothDirectoryInformation, FALSE, NULL, FALSE ); ok (U(io).Status == STATUS_SUCCESS, "filed to query directory; status %x\n", U(io).Status); data_len = io.Information; ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n"); @@ -216,9 +219,16 @@ static void test_NtQueryDirectoryFile(void) } ok(numfiles < max_test_dir_size, "too many loops\n"); - for (i=0; testfiles[i].name; i++) - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found\n", - testfiles[i].nfound, testfiles[i].description); + for (i=0; testfiles[i].name; i++) { + if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) { + todo_wine + ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found\n", + testfiles[i].nfound, testfiles[i].description); + } else { + ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found\n", + testfiles[i].nfound, testfiles[i].description); + } + } pNtClose(dirh); done:
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
84
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
Results per page:
10
25
50
100
200