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
August 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
770 discussions
Start a n
N
ew thread
André Hentschel : winex11: Reject too bright gamma ramps.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 56e804eea4c5976b59cb6adc94baa67dd83886c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56e804eea4c5976b59cb6adc9…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Tue Aug 23 23:16:26 2011 +0200 winex11: Reject too bright gamma ramps. --- dlls/gdi32/tests/dc.c | 7 +++++++ dlls/winex11.drv/xvidmode.c | 5 +++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 0bc218c..9f26f41 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -644,6 +644,13 @@ static void test_gamma(void) ret = SetDeviceGammaRamp(hdc, &ramp); ok(ret, "SetDeviceGammaRamp failed\n"); + /* try a bright gamma ramp */ + ramp[0][0] = 0; + ramp[0][1] = 0x7FFF; + for (i = 2; i < 256; i++) ramp[0][i] = 0xFFFF; + ret = SetDeviceGammaRamp(hdc, &ramp); + ok(!ret, "SetDeviceGammaRamp succeeded\n"); + /* cleanup: set old ramp again */ ret = SetDeviceGammaRamp(hdc, &oldramp); ok(ret, "SetDeviceGammaRamp failed\n"); diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c index 732a2d7..2d8a4eb 100644 --- a/dlls/winex11.drv/xvidmode.c +++ b/dlls/winex11.drv/xvidmode.c @@ -339,6 +339,11 @@ static BOOL ComputeGammaFromRamp(WORD ramp[256], float *gamma) ERR("ramp not uniform (max=%f, min=%f, avg=%f), rejected\n", g_max, g_min, g_avg); return FALSE; } + /* check that the gamma is not too bright */ + if (g_avg < 0.2) { + ERR("too bright gamma ( %5.3f), rejected\n", g_avg); + return FALSE; + } /* ok, now we're pretty sure we can set the desired gamma ramp, * so go for it */ *gamma = 1/g_avg;
1
0
0
0
Frédéric Delanoy : cmd: Fix FOR tab handling.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 20fa3fe8021a6ac667e542160e0ffdfdf379c16b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20fa3fe8021a6ac667e542160…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Aug 23 22:54:50 2011 +0200 cmd: Fix FOR tab handling. --- programs/cmd/builtins.c | 30 ++++++++++++++++++------------ programs/cmd/tests/test_builtins.cmd | 1 + programs/cmd/tests/test_builtins.cmd.exp | 11 +++++++---- programs/cmd/wcmdmain.c | 24 +++++++++++++++++------- 4 files changed, 43 insertions(+), 23 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index c4ad231..7aaa900 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -902,8 +902,10 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { WIN32_FIND_DATAW fd; HANDLE hff; int i; - const WCHAR inW[] = {'i', 'n', ' ', '\0'}; - const WCHAR doW[] = {'d', 'o', ' ', '\0'}; + const WCHAR inW[] = {'i', 'n', ' ', '\0'}; + const WCHAR inTabW[] = {'i', 'n', '\t', '\0'}; + const WCHAR doW[] = {'d', 'o', ' ', '\0'}; + const WCHAR doTabW[] = {'d', 'o', '\t', '\0'}; CMD_LIST *setStart, *thisSet, *cmdStart, *cmdEnd; WCHAR variable[4]; WCHAR *firstCmd; @@ -938,7 +940,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { /* Skip whitespace */ curPos++; - while (*curPos && *curPos==' ') curPos++; + while (*curPos && (*curPos==' ' || *curPos=='\t')) curPos++; /* Next parm is either qualifier, path/options or variable - only care about it if it is the path/options */ @@ -954,11 +956,11 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { } /* Skip whitespace between qualifiers */ - while (*curPos && *curPos==' ') curPos++; + while (*curPos && (*curPos==' ' || *curPos=='\t')) curPos++; } /* Skip whitespace before variable */ - while (*curPos && *curPos==' ') curPos++; + while (*curPos && (*curPos==' ' || *curPos=='\t')) curPos++; /* Ensure line continues with variable */ if (!*curPos || *curPos != '%') { @@ -968,19 +970,21 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { /* Variable should follow */ i = 0; - while (curPos[i] && curPos[i]!=' ') i++; + while (curPos[i] && curPos[i]!=' ' && curPos[i]!='\t') i++; memcpy(&variable[0], curPos, i*sizeof(WCHAR)); variable[i] = 0x00; WINE_TRACE("Variable identified as %s\n", wine_dbgstr_w(variable)); curPos = &curPos[i]; /* Skip whitespace before IN */ - while (*curPos && *curPos==' ') curPos++; + while (*curPos && (*curPos==' ' || *curPos=='\t')) curPos++; /* Ensure line continues with IN */ if (!*curPos - || CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, inW, -1) != CSTR_EQUAL) { + || (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, inW, -1) != CSTR_EQUAL + && CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, inTabW, -1) != CSTR_EQUAL)) { WCMD_output (WCMD_LoadMessage(WCMD_SYNTAXERR)); return; } @@ -1005,9 +1009,11 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { /* Syntax error if missing close bracket, or nothing following it and once we have the complete set, we expect a DO */ WINE_TRACE("Looking for 'do' in %p\n", *cmdList); - if ((*cmdList == NULL) || - (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - (*cmdList)->command, 3, doW, -1) != CSTR_EQUAL)) { + if ((*cmdList == NULL) + || (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + (*cmdList)->command, 3, doW, -1) != CSTR_EQUAL + && CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + (*cmdList)->command, 3, doTabW, -1) != CSTR_EQUAL)) { WCMD_output (WCMD_LoadMessage(WCMD_SYNTAXERR)); return; } diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index b815e77..0d2f983 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -386,6 +386,7 @@ for %%i in@tab@(X3) do echo %%i for %%i in (@tab@ foo@tab@) do echo %%i for@tab@ %%i in@tab@(@tab@M) do echo %%i for %%i@tab@in (X)@tab@do@tab@echo %%i +for@tab@ %%j in@tab@(@tab@M, N, O@tab@) do echo %%j goto :endForTestFun1 :forTestFun1 echo %1 diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index b86c012..1138485 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -275,11 +275,14 @@ A B C X -@todo_wine@X2 -@todo_wine@X3 +X2 +X3 foo -@todo_wine@M -@todo_wine@X +M +X +M +N +O ...imbricated FORs @todo_wine@X Y @todo_wine@X Y diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index d758857..67b6ef4 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1742,7 +1742,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE CMD_DELIMITERS prevDelim = CMD_NONE; static WCHAR *extraSpace = NULL; /* Deliberately never freed */ const WCHAR remCmd[] = {'r','e','m',' ','\0'}; - const WCHAR forCmd[] = {'f','o','r',' ','\0'}; + const WCHAR forCmd[] = {'f','o','r',' ' ,'\0'}; + const WCHAR forTabCmd[] = {'f','o','r','\t','\0'}; const WCHAR ifCmd[] = {'i','f',' ','\0'}; const WCHAR ifElse[] = {'e','l','s','e',' ','\0'}; BOOL inRem = FALSE; @@ -1826,7 +1827,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE /* Certain commands need special handling */ if (curStringLen == 0 && curCopyTo == curString) { - const WCHAR forDO[] = {'d','o',' ','\0'}; + const WCHAR forDO[] = {'d','o',' ' ,'\0'}; + const WCHAR forDOTab[] = {'d','o','\t','\0'}; /* If command starts with 'rem', ignore any &&, ( etc */ if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, @@ -1835,7 +1837,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE /* If command starts with 'for', handle ('s mid line after IN or DO */ } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 4, forCmd, -1) == CSTR_EQUAL) { + curPos, 4, forCmd, -1) == CSTR_EQUAL + || CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 4, forTabCmd, -1) == CSTR_EQUAL) { inFor = TRUE; /* If command starts with 'if' or 'else', handle ('s mid line. We should ensure this @@ -1863,7 +1867,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE is then 0, and all whitespace is skipped */ } else if (inFor && (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, forDO, -1) == CSTR_EQUAL)) { + curPos, 3, forDO, -1) == CSTR_EQUAL + || CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, forDOTab, -1) == CSTR_EQUAL)) { WINE_TRACE("Found DO\n"); lastWasDo = TRUE; onlyWhiteSpace = TRUE; @@ -1876,12 +1882,15 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE /* Special handling for the 'FOR' command */ if (inFor && lastWasWhiteSpace) { - const WCHAR forIN[] = {'i','n',' ','\0'}; + const WCHAR forIN[] = {'i','n',' ' ,'\0'}; + const WCHAR forINTab[] = {'i','n','\t','\0'}; WINE_TRACE("Found 'FOR', comparing next parm: '%s'\n", wine_dbgstr_w(curPos)); if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - curPos, 3, forIN, -1) == CSTR_EQUAL) { + curPos, 3, forIN, -1) == CSTR_EQUAL + || CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + curPos, 3, forINTab, -1) == CSTR_EQUAL) { WINE_TRACE("Found IN\n"); lastWasIn = TRUE; onlyWhiteSpace = TRUE; @@ -2106,7 +2115,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE /* At various times we need to know if we have only skipped whitespace, so reset this variable and then it will remain true until a non whitespace is found */ - if ((thisChar != ' ') && (thisChar != '\n')) onlyWhiteSpace = FALSE; + if ((thisChar != ' ') && (thisChar != '\t') && (thisChar != '\n')) + onlyWhiteSpace = FALSE; /* Flag end of interest in FOR DO and IN parms once something has been processed */ if (!lastWasWhiteSpace) {
1
0
0
0
Frédéric Delanoy : cmd: Fix ECHO tab issues.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 6572de3cfa5099f90bc1f6376f05f60828960711 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6572de3cfa5099f90bc1f6376…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Aug 23 22:54:49 2011 +0200 cmd: Fix ECHO tab issues. --- programs/cmd/builtins.c | 2 +- programs/cmd/tests/test_builtins.cmd.exp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index cc3f5f6..c4ad231 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -864,7 +864,7 @@ void WCMD_echo (const WCHAR *command) { int count; const WCHAR *origcommand = command; - if (command[0]==' ' || command[0]=='.' || command[0]==':') + if (command[0]==' ' || command[0]=='\t' || command[0]=='.' || command[0]==':') command++; count = strlenW(command); if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':') { diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 18ba102..b86c012 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -52,13 +52,13 @@ word@space@@space@ word @pwd@>echo@tab@word@space@ -@todo_wine@word +word @pwd@>echo@tab@word@space@@tab@@space@ -@todo_wine@word@space@@tab@ +word@space@@tab@ @pwd@>echo@tab@word@tab@@space@@space@ -@todo_wine@word@tab@@space@ +word@tab@@space@ @todo_wine@@pwd@>echo word@space@ word @@ -70,7 +70,7 @@ word @space@@tab@word @pwd@>echo@tab@@tab@word@space@ -@todo_wine@@tab@word +@tab@word ------------ Testing 'echo' [OFF] -------------- word 'singlequotedword' @@ -88,13 +88,13 @@ word word@space@ word@space@@space@ word -@todo_wine@word -@todo_wine@word@space@@tab@ -@todo_wine@word@tab@@space@ +word +word@space@@tab@ +word@tab@@space@ word @tab@word @space@@tab@word -@todo_wine@@tab@word +@tab@word ------------ Testing redirection operators -------------- ...stdout redirection foo
1
0
0
0
Grazvydas Ignotas : ntdll: Use swapping method to return . and .. as first entries.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 006413afe495fbf73542154462885e4fdbf12a2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=006413afe495fbf7354215446…
Author: Grazvydas Ignotas <notasas(a)gmail.com> Date: Thu Aug 4 23:24:49 2011 +0300 ntdll: Use swapping method to return . and .. as first entries. --- dlls/ntdll/directory.c | 134 ++++++++++++++++++++++++++++-------------- dlls/ntdll/tests/directory.c | 13 +--- 2 files changed, 92 insertions(+), 55 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 42b3639..548189c 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1486,22 +1486,56 @@ static int read_directory_vfat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG #endif /* VFAT_IOCTL_READDIR_BOTH */ +#ifdef USE_GETDENTS +/*********************************************************************** + * read_first_dent_name + * + * reads name of first or second dentry (if they have inodes). + */ +static char *read_first_dent_name( int which, int fd, off_t second_offs, KERNEL_DIRENT64 *de_first_two, + char *buffer, size_t size, BOOL *buffer_changed ) +{ + KERNEL_DIRENT64 *de; + int res; + + de = de_first_two; + if (de != NULL) + { + if (which == 1) + de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen); + + return de->d_ino ? de->d_name : NULL; + } + + *buffer_changed = TRUE; + lseek( fd, which == 1 ? second_offs : 0, SEEK_SET ); + res = getdents64( fd, buffer, size ); + if (res <= 0) + return NULL; + + de = (KERNEL_DIRENT64 *)buffer; + return de->d_ino ? de->d_name : NULL; +} + /*********************************************************************** * read_directory_getdents * * Read a directory using the Linux getdents64 system call; helper for NtQueryDirectoryFile. */ -#ifdef USE_GETDENTS static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG length, BOOLEAN single_entry, const UNICODE_STRING *mask, BOOLEAN restart_scan, FILE_INFORMATION_CLASS class ) { - off_t old_pos = 0; + static off_t second_entry_pos; + static struct file_identity last_dir_id; + off_t old_pos = 0, next_pos; size_t size = length; - int res, fake_dot_dot = 1; char *data, local_buffer[8192]; - KERNEL_DIRENT64 *de; + KERNEL_DIRENT64 *de, *de_first_two = NULL; union file_directory_info *info, *last_info = NULL; + const char *filename; + BOOL data_buffer_changed; + int res, swap_to; if (size <= sizeof(local_buffer) || !(data = RtlAllocateHeap( GetProcessHeap(), 0, size ))) { @@ -1510,7 +1544,7 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U } if (restart_scan) lseek( fd, 0, SEEK_SET ); - else if (length < max_dir_info_size(class)) /* we may have to return a partial entry here */ + else { old_pos = lseek( fd, 0, SEEK_CUR ); if (old_pos == -1 && errno == ENOENT) @@ -1522,6 +1556,21 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U } io->u.Status = STATUS_SUCCESS; + de = (KERNEL_DIRENT64 *)data; + + /* if old_pos is not 0 we don't know how many entries have been returned already, + * so maintain second_entry_pos to know when to return '..' */ + if (old_pos != 0 && (last_dir_id.dev != curdir.dev || last_dir_id.ino != curdir.ino)) + { + lseek( fd, 0, SEEK_SET ); + res = getdents64( fd, data, size ); + if (res > 0) + { + second_entry_pos = de->d_off; + last_dir_id = curdir; + } + lseek( fd, old_pos, SEEK_SET ); + } res = getdents64( fd, data, size ); if (res == -1) @@ -1534,52 +1583,46 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U goto done; } - de = (KERNEL_DIRENT64 *)data; + if (old_pos == 0 && res > 0) + { + second_entry_pos = de->d_off; + last_dir_id = curdir; + if (res > de->d_reclen) + de_first_two = de; + } - if (restart_scan) + while (res > 0) { - /* check if we got . and .. from getdents */ - if (res > 0) - { - if (!strcmp( de->d_name, "." ) && res > de->d_reclen) - { - KERNEL_DIRENT64 *next_de = (KERNEL_DIRENT64 *)(data + de->d_reclen); - if (!strcmp( next_de->d_name, ".." )) fake_dot_dot = 0; - } - } - /* make sure we have enough room for both entries */ - if (fake_dot_dot) - { - const ULONG min_info_size = dir_info_size( class, 1 ) + dir_info_size( class, 2 ); - if (length < min_info_size || single_entry) - { - FIXME( "not enough room %u/%u for fake . and .. entries\n", length, single_entry ); - fake_dot_dot = 0; - } - } + res -= de->d_reclen; + next_pos = de->d_off; + filename = NULL; - if (fake_dot_dot) + /* we must return first 2 entries as "." and "..", but getdents64() + * can return them anywhere, so swap first entries with "." and ".." */ + if (old_pos == 0) + filename = "."; + else if (old_pos == second_entry_pos) + filename = ".."; + else if (!strcmp( de->d_name, "." ) || !strcmp( de->d_name, ".." )) { - if ((info = append_entry( buffer, io, length, ".", NULL, mask, class ))) - last_info = info; - if ((info = append_entry( buffer, io, length, "..", NULL, mask, class ))) - last_info = info; - - /* check if we still have enough space for the largest possible entry */ - if (last_info && io->Information + max_dir_info_size(class) > length) + swap_to = !strcmp( de->d_name, "." ) ? 0 : 1; + data_buffer_changed = FALSE; + + filename = read_first_dent_name( swap_to, fd, second_entry_pos, de_first_two, + data, size, &data_buffer_changed ); + if (filename != NULL && (!strcmp( filename, "." ) || !strcmp( filename, ".." ))) + filename = read_first_dent_name( swap_to ^ 1, fd, second_entry_pos, NULL, + data, size, &data_buffer_changed ); + if (data_buffer_changed) { - lseek( fd, 0, SEEK_SET ); /* reset pos to first entry */ + lseek( fd, next_pos, SEEK_SET ); res = 0; } } - } + else if (de->d_ino) + filename = de->d_name; - while (res > 0) - { - res -= de->d_reclen; - if (de->d_ino && - !(fake_dot_dot && (!strcmp( de->d_name, "." ) || !strcmp( de->d_name, ".." ))) && - (info = append_entry( buffer, io, length, de->d_name, NULL, mask, class ))) + if (filename && (info = append_entry( buffer, io, length, filename, NULL, mask, class ))) { last_info = info; if (io->u.Status == STATUS_BUFFER_OVERFLOW) @@ -1590,17 +1633,18 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U /* check if we still have enough space for the largest possible entry */ if (single_entry || io->Information + max_dir_info_size(class) > length) { - if (res > 0) lseek( fd, de->d_off, SEEK_SET ); /* set pos to next entry */ + if (res > 0) lseek( fd, next_pos, SEEK_SET ); /* set pos to next entry */ break; } } - old_pos = de->d_off; + old_pos = next_pos; /* move on to the next entry */ if (res > 0) de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen); else { res = getdents64( fd, data, size ); de = (KERNEL_DIRENT64 *)data; + de_first_two = NULL; } } diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index b32c22a..c74bf34 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -215,16 +215,9 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char } ok(numfiles < max_test_dir_size, "too many loops\n"); - for (i=0; testfiles[i].name; i++) { - if ((strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) && (single_entry || !restart_flag)) { - todo_wine - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", - testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); - } else { - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", - testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); - } - } + for (i=0; testfiles[i].name; i++) + ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", + testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); pNtClose(dirh); }
1
0
0
0
Grazvydas Ignotas : ntdll/tests: Test NtQueryDirectoryFile with different ReturnSingleEntry and RestartScan flags .
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: fbf537fb60841118697490bcf96fc622efe286bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbf537fb60841118697490bcf…
Author: Grazvydas Ignotas <notasas(a)gmail.com> Date: Thu Aug 4 23:24:48 2011 +0300 ntdll/tests: Test NtQueryDirectoryFile with different ReturnSingleEntry and RestartScan flags. --- dlls/ntdll/tests/directory.c | 106 +++++++++++++++++++++++++---------------- 1 files changed, 65 insertions(+), 41 deletions(-) diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index 56840b5..b32c22a 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -51,7 +51,8 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG * /* The attribute sets to test */ static struct testfile_s { - int todo; /* set if it doesn't work on wine yet */ + BOOL todo; /* set if it doesn't work on wine yet */ + BOOL attr_done; /* set if attributes were tested for this file already */ const DWORD attr; /* desired attribute */ const char *name; /* filename to use */ const char *target; /* what to point to (only for reparse pts) */ @@ -59,13 +60,13 @@ static struct testfile_s { int nfound; /* How many were found (expect 1) */ WCHAR nameW[20]; /* unicode version of name (filled in later) */ } testfiles[] = { - { 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" }, - { 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 } + { 0, 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" }, + { 1, 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" }, + { 1, 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" }, + { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "d.tmp", NULL, "directory" }, + { 0, 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" }, + { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" }, + { 0, 0, 0, NULL } }; static const int max_test_dir_size = 20; /* size of above plus some for .. etc */ @@ -82,7 +83,6 @@ 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); - testfiles[i].nfound = 0; if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) continue; sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); @@ -100,6 +100,14 @@ static void set_up_attribute_test(const char *testdirA) } } +static void reset_found_files(void) +{ + int i; + + for (i = 0; testfiles[i].name; i++) + testfiles[i].nfound = 0; +} + /* Remove the given test directory and the attribute test files, if any */ static void tear_down_attribute_test(const char *testdirA) { @@ -138,11 +146,14 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info) int len = strlen(testfiles[i].name); if (namelen != len || memcmp(nameW, testfiles[i].nameW, len*sizeof(WCHAR))) continue; - if (testfiles[i].todo) { - todo_wine - ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); - } else { - ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); + if (!testfiles[i].attr_done) { + if (testfiles[i].todo) { + todo_wine + ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); + } else { + ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); + } + testfiles[i].attr_done = TRUE; } testfiles[i].nfound++; break; @@ -150,12 +161,9 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info) ok(testfiles[i].name != NULL, "unexpected file found\n"); } -static void test_NtQueryDirectoryFile(void) +static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char *testdirA, + BOOLEAN single_entry, BOOLEAN restart_flag) { - OBJECT_ATTRIBUTES attr; - UNICODE_STRING ntdirname; - char testdirA[MAX_PATH]; - WCHAR testdirW[MAX_PATH]; HANDLE dirh; IO_STATUS_BLOCK io; UINT data_pos; @@ -166,31 +174,19 @@ static void test_NtQueryDirectoryFile(void) int numfiles; int i; - /* Clean up from prior aborted run, if any, then set up test files */ - ok(GetTempPathA(MAX_PATH, testdirA), "couldn't get temp dir\n"); - strcat(testdirA, "NtQueryDirectoryFile.tmp"); - tear_down_attribute_test(testdirA); - set_up_attribute_test(testdirA); + reset_found_files(); /* Read the directory and note which files are found */ - pRtlMultiByteToUnicodeN(testdirW, sizeof(testdirW), NULL, testdirA, strlen(testdirA)+1); - if (!pRtlDosPathNameToNtPathName_U(testdirW, &ntdirname, NULL, NULL)) - { - ok(0,"RtlDosPathNametoNtPathName_U failed\n"); - goto done; - } - InitializeObjectAttributes(&attr, &ntdirname, OBJ_CASE_INSENSITIVE, 0, NULL); - status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, &attr, &io, - FILE_OPEN, + status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE); ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA, status, GetLastError()); if (status != STATUS_SUCCESS) { skip("can't test if we can't open the directory\n"); - goto done; + return; } pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, sizeof(data), - FileBothDirectoryInformation, FALSE, NULL, FALSE ); + FileBothDirectoryInformation, single_entry, NULL, restart_flag ); 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"); @@ -204,7 +200,7 @@ static void test_NtQueryDirectoryFile(void) if (dir_info->NextEntryOffset == 0) { pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, sizeof(data), - FileBothDirectoryInformation, FALSE, NULL, FALSE ); + FileBothDirectoryInformation, single_entry, NULL, FALSE ); if (U(io).Status == STATUS_NO_MORE_FILES) break; ok (U(io).Status == STATUS_SUCCESS, "filed to query directory; status %x\n", U(io).Status); @@ -220,17 +216,45 @@ static void test_NtQueryDirectoryFile(void) ok(numfiles < max_test_dir_size, "too many loops\n"); for (i=0; testfiles[i].name; i++) { - if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) { + if ((strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) && (single_entry || !restart_flag)) { todo_wine - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found\n", - testfiles[i].nfound, testfiles[i].description); + ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", + testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); } else { - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found\n", - testfiles[i].nfound, testfiles[i].description); + ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", + testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); } } pNtClose(dirh); +} + +static void test_NtQueryDirectoryFile(void) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING ntdirname; + char testdirA[MAX_PATH]; + WCHAR testdirW[MAX_PATH]; + + /* Clean up from prior aborted run, if any, then set up test files */ + ok(GetTempPathA(MAX_PATH, testdirA), "couldn't get temp dir\n"); + strcat(testdirA, "NtQueryDirectoryFile.tmp"); + tear_down_attribute_test(testdirA); + set_up_attribute_test(testdirA); + + pRtlMultiByteToUnicodeN(testdirW, sizeof(testdirW), NULL, testdirA, strlen(testdirA)+1); + if (!pRtlDosPathNameToNtPathName_U(testdirW, &ntdirname, NULL, NULL)) + { + ok(0, "RtlDosPathNametoNtPathName_U failed\n"); + goto done; + } + InitializeObjectAttributes(&attr, &ntdirname, OBJ_CASE_INSENSITIVE, 0, NULL); + + test_flags_NtQueryDirectoryFile(&attr, testdirA, FALSE, TRUE); + test_flags_NtQueryDirectoryFile(&attr, testdirA, FALSE, FALSE); + test_flags_NtQueryDirectoryFile(&attr, testdirA, TRUE, TRUE); + test_flags_NtQueryDirectoryFile(&attr, testdirA, TRUE, FALSE); + done: tear_down_attribute_test(testdirA); pRtlFreeUnicodeString(&ntdirname);
1
0
0
0
Scott Ritchie : shlwapi/tests: Fix an errant comment.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: d38909dade16571fa22033e499b305f18807b073 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d38909dade16571fa22033e49…
Author: Scott Ritchie <scott(a)open-vote.org> Date: Tue Aug 23 06:51:31 2011 -0700 shlwapi/tests: Fix an errant comment. --- dlls/shlwapi/tests/string.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 3628f86..1488e58 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -135,7 +135,7 @@ static const StrFormatSizeResult StrFormatSize_results[] = { { 0, NULL, NULL } }; -/* StrFormatByteSize64/StrFormatKBSize results */ +/* StrFromTimeIntervalA/StrFromTimeIntervalW results */ typedef struct tagStrFromTimeIntervalResult { DWORD ms;
1
0
0
0
Thomas Faber : user32/tests: Fix build with MSVC.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 37f12af5c84bc8ddca793b2623353ce122b8ca3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37f12af5c84bc8ddca793b262…
Author: Thomas Faber <thfabba(a)gmx.de> Date: Wed Aug 24 10:46:54 2011 +0200 user32/tests: Fix build with MSVC. --- dlls/user32/tests/cursoricon.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index ddf37ef..c874924 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -185,8 +185,8 @@ typedef struct { 0, /* biYPelsPerMeter */ \ 0, /* biClrUsed */ \ 0 /* biClrImportant */ \ - }, \ - { /* DIB data: left uninitialized */ } \ + } \ + /* DIB data: left uninitialized */ \ } \ }
1
0
0
0
Hans Leidekker : winhttp: Support setting the WinHttpRequestOption_EnableRedirects option.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 1d0397d1516876d240eba7f399b261605e70b410 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d0397d1516876d240eba7f39…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Aug 24 10:53:22 2011 +0200 winhttp: Support setting the WinHttpRequestOption_EnableRedirects option. --- dlls/winhttp/request.c | 41 ++++++++++++++++++++++++++++++++--------- 1 files changed, 32 insertions(+), 9 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 97d10a3..a3c2207 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -2175,6 +2175,7 @@ struct winhttp_request DWORD bytes_read; DWORD error; DWORD logon_policy; + DWORD disable_feature; LONG resolve_timeout; LONG connect_timeout; LONG send_timeout; @@ -2479,6 +2480,8 @@ static void initialize_request( struct winhttp_request *request ) request->bytes_available = 0; request->bytes_read = 0; request->error = ERROR_SUCCESS; + request->logon_policy = WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM; + request->disable_feature = WINHTTP_DISABLE_AUTHENTICATION; request->proxy.dwAccessType = WINHTTP_ACCESS_TYPE_DEFAULT_PROXY; request->proxy.lpszProxy = NULL; request->proxy.lpszProxyBypass = NULL; @@ -2507,7 +2510,7 @@ static HRESULT WINAPI winhttp_request_Open( HINTERNET hsession = NULL, hconnect = NULL, hrequest; URL_COMPONENTS uc; WCHAR *hostname, *path = NULL, *verb = NULL; - DWORD err = ERROR_OUTOFMEMORY, len, flags = 0, request_flags = 0, disable_flags; + DWORD err = ERROR_OUTOFMEMORY, len, flags = 0, request_flags = 0; TRACE("%p, %s, %s, %s\n", request, debugstr_w(method), debugstr_w(url), debugstr_variant(&async)); @@ -2559,12 +2562,6 @@ static HRESULT WINAPI winhttp_request_Open( err = get_last_error(); goto error; } - disable_flags = WINHTTP_DISABLE_AUTHENTICATION; - if (!WinHttpSetOption( hrequest, WINHTTP_OPTION_DISABLE_FEATURE, &disable_flags, sizeof(disable_flags) )) - { - err = get_last_error(); - goto error; - } if (flags & WINHTTP_FLAG_ASYNC) { request->wait = CreateEventW( NULL, FALSE, FALSE, NULL ); @@ -2851,6 +2848,11 @@ static HRESULT request_send( struct winhttp_request *request ) { return HRESULT_FROM_WIN32( get_last_error() ); } + if (!WinHttpSetOption( request->hrequest, WINHTTP_OPTION_DISABLE_FEATURE, &request->disable_feature, + sizeof(request->disable_feature) )) + { + return HRESULT_FROM_WIN32( get_last_error() ); + } if (!WinHttpSetTimeouts( request->hrequest, request->resolve_timeout, request->connect_timeout, @@ -3127,8 +3129,29 @@ static HRESULT WINAPI winhttp_request_put_Option( WinHttpRequestOption option, VARIANT value ) { - FIXME("\n"); - return E_NOTIMPL; + struct winhttp_request *request = impl_from_IWinHttpRequest( iface ); + HRESULT hr = S_OK; + + TRACE("%p, %u, %s\n", request, option, debugstr_variant(&value)); + + EnterCriticalSection( &request->cs ); + switch (option) + { + case WinHttpRequestOption_EnableRedirects: + { + if (V_BOOL( &value )) + request->disable_feature &= ~WINHTTP_DISABLE_REDIRECTS; + else + request->disable_feature |= WINHTTP_DISABLE_REDIRECTS; + break; + } + default: + FIXME("unimplemented option %u\n", option); + hr = E_NOTIMPL; + break; + } + LeaveCriticalSection( &request->cs ); + return hr; } /* critical section must be held */
1
0
0
0
Hans Leidekker : gdi32/tests: Accept one more return value from EnumICMProfilesA.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 58cdb6405f9bb4f203fb4deb7cee823637509b35 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58cdb6405f9bb4f203fb4deb7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Aug 24 10:23:21 2011 +0200 gdi32/tests: Accept one more return value from EnumICMProfilesA. --- dlls/gdi32/tests/icm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/tests/icm.c b/dlls/gdi32/tests/icm.c index 86f173a..65ce208 100644 --- a/dlls/gdi32/tests/icm.c +++ b/dlls/gdi32/tests/icm.c @@ -184,8 +184,8 @@ static void test_EnumICMProfilesA( HDC dc ) ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); ret = EnumICMProfilesA( dc, enum_profiles_callbackA, 0 ); - ok(ret == -1 || broken(ret == 0) /* nt4 */, - "expected -1, got %d\n", ret); + ok(ret == -1 || ret == 1 || broken(ret == 0) /* nt4 */, + "expected -1 or 1, got %d\n", ret); ret = EnumICMProfilesA( dc, NULL, 0 ); ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); @@ -207,7 +207,7 @@ static void test_EnumICMProfilesW( HDC dc ) ok(ret == -1 || broken(ret == 0) /* NT4 */, "expected -1, got %d\n", ret); ret = EnumICMProfilesW( dc, enum_profiles_callbackW, 0 ); - ok(ret == -1 || ret == 1 || broken(ret == 0) /* NT4 */, "expected -1, got %d\n", ret); + ok(ret == -1 || ret == 1 || broken(ret == 0) /* NT4 */, "expected -1 or 1, got %d\n", ret); } static void test_SetICMProfileA( HDC dc )
1
0
0
0
Hans Leidekker : dnsapi: Implement DnsFree.
by Alexandre Julliard
24 Aug '11
24 Aug '11
Module: wine Branch: master Commit: 8a29a4a66776a1d8bb963d4092cb7d6a9af0b932 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a29a4a66776a1d8bb963d409…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Aug 24 10:23:04 2011 +0200 dnsapi: Implement DnsFree. --- dlls/dnsapi/dnsapi.spec | 1 + dlls/dnsapi/record.c | 9 +++++++++ include/windns.h | 1 + 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/dnsapi/dnsapi.spec b/dlls/dnsapi/dnsapi.spec index bb14f4b..2fb6846 100644 --- a/dlls/dnsapi/dnsapi.spec +++ b/dlls/dnsapi/dnsapi.spec @@ -35,6 +35,7 @@ @ stub DnsFlushResolverCacheEntry_A @ stub DnsFlushResolverCacheEntry_UTF8 @ stub DnsFlushResolverCacheEntry_W +@ stdcall DnsFree(ptr long) @ stub DnsFreeAdapterInformation @ stub DnsFreeNetworkInformation @ stub DnsFreeSearchInformation diff --git a/dlls/dnsapi/record.c b/dlls/dnsapi/record.c index 15efbf1..e9252ef 100644 --- a/dlls/dnsapi/record.c +++ b/dlls/dnsapi/record.c @@ -640,6 +640,15 @@ VOID WINAPI DnsRecordListFree( PDNS_RECORD list, DNS_FREE_TYPE type ) } /****************************************************************************** + * DnsFree [DNSAPI.@] + * + */ +void WINAPI DnsFree( PVOID data, DNS_FREE_TYPE type ) +{ + return DnsRecordListFree( data, type ); +} + +/****************************************************************************** * DnsRecordSetCompare [DNSAPI.@] * */ diff --git a/include/windns.h b/include/windns.h index 205f30d..b8a3e09 100644 --- a/include/windns.h +++ b/include/windns.h @@ -619,6 +619,7 @@ DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,PHANDLE); #define DnsAcquireContextHandle WINELIB_NAME_AW(DnsAcquireContextHandle_) DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDW*); DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORDA*); +VOID WINAPI DnsFree(PVOID,DNS_FREE_TYPE); DNS_STATUS WINAPI DnsModifyRecordsInSet_A(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID); DNS_STATUS WINAPI DnsModifyRecordsInSet_W(PDNS_RECORDW,PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID); DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8(PDNS_RECORDA,PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID);
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
77
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
Results per page:
10
25
50
100
200