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 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
839 discussions
Start a n
N
ew thread
Roy Shea : mstask: Activate conformance test.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 75e043ee5f7b5fbf43d74ce561cd0764e51d806a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75e043ee5f7b5fbf43d74ce56…
Author: Roy Shea <royshea(a)gmail.com> Date: Mon Aug 18 17:23:10 2008 -0700 mstask: Activate conformance test. --- dlls/mstask/tests/task_scheduler.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/mstask/tests/task_scheduler.c b/dlls/mstask/tests/task_scheduler.c index 5292a3c..d115dd2 100644 --- a/dlls/mstask/tests/task_scheduler.c +++ b/dlls/mstask/tests/task_scheduler.c @@ -20,6 +20,8 @@ #define COBJMACROS +#include "corerror.h" + #include "initguid.h" #include "mstask.h" #include "wine/test.h" @@ -74,9 +76,36 @@ static void test_NewWorkItem(void) return; } +static void test_Activate(void) +{ + HRESULT hres; + ITask *task = NULL; + const WCHAR not_task_name[] = + {'N', 'o', 'S', 'u', 'c', 'h', 'T', 'a', 's', 'k', 0}; + + /* Create TaskScheduler */ + hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, + &IID_ITaskScheduler, (void **) &test_task_scheduler); + ok(hres == S_OK, "CTaskScheduler CoCreateInstance failed: %08x\n", hres); + if (hres != S_OK) + { + skip("Failed to create task scheduler. Skipping tests.\n"); + return; + } + + /* Attempt to Activate a non-existant task */ + hres = ITaskScheduler_Activate(test_task_scheduler, not_task_name, + &IID_ITask, (IUnknown**)&task); + todo_wine ok(hres == COR_E_FILENOTFOUND, "Expected COR_E_FILENOTFOUND: %08x\n", hres); + + ITaskScheduler_Release(test_task_scheduler); + return; +} + START_TEST(task_scheduler) { CoInitialize(NULL); test_NewWorkItem(); + test_Activate(); CoUninitialize(); }
1
0
0
0
Christian Costa : d3dxof: Add text format support to RegisterTemplates and fix corresponding test.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: dd5908224ea3ec27b91d438c88acbfea70117408 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd5908224ea3ec27b91d438c8…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Tue Aug 19 14:00:32 2008 +0200 d3dxof: Add text format support to RegisterTemplates and fix corresponding test. --- dlls/d3dxof/d3dxof.c | 296 +++++++++++++++++++++++++++++++++++++++++--- dlls/d3dxof/tests/d3dxof.c | 4 +- 2 files changed, 281 insertions(+), 19 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index dff299d..f16dce1 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -85,6 +85,7 @@ typedef struct { char* dump; DWORD pos; DWORD size; + BOOL txt; } parse_buffer; @@ -264,28 +265,239 @@ static void dump_TOKEN(WORD token) #undef DUMP_TOKEN } -static WORD check_TOKEN(parse_buffer * buf) +static BOOL is_space(char c) { - WORD token; + switch (c) + { + case 0x00: + case 0x0D: + case 0x0A: + case ' ': + case '\t': + return TRUE; + break; + } + return FALSE; +} - if (!read_bytes(buf, &token, 2)) - return 0; - buf->buffer -= 2; - buf->rem_bytes += 2; - if (0) +static BOOL is_operator(char c) +{ + switch(c) { - TRACE("check: "); - dump_TOKEN(token); + case '{': + case '}': + case '[': + case ']': + case '(': + case ')': + case '<': + case '>': + case ',': + case ';': + return TRUE; + break; } - return token; + return FALSE; } -static WORD parse_TOKEN(parse_buffer * buf) +static inline BOOL is_separator(char c) +{ + return is_space(c) || is_operator(c); +} + +static WORD get_operator_token(char c) +{ + switch(c) + { + case '{': + return TOKEN_OBRACE; + break; + case '}': + return TOKEN_CBRACE; + break; + case '[': + return TOKEN_OBRACKET; + break; + case ']': + return TOKEN_CBRACKET; + break; + case '(': + return TOKEN_OPAREN; + break; + case ')': + return TOKEN_CPAREN; + break; + case '<': + return TOKEN_OANGLE; + break; + case '>': + return TOKEN_CANGLE; + break; + case ',': + return TOKEN_COMMA; + break; + case ';': + return TOKEN_SEMICOLON; + break; + } + return 0; +} + +static BOOL is_keyword(parse_buffer* buf, const char* keyword) +{ + DWORD len = strlen(keyword); + if (!strncmp((char*)buf->buffer, keyword,len) && is_separator(*(buf->buffer+len))) + { + buf->buffer += len; + buf->rem_bytes -= len; + return TRUE; + } + return FALSE; +} + +static WORD get_keyword_token(parse_buffer* buf) +{ + if (is_keyword(buf, "template")) + return TOKEN_TEMPLATE; + if (is_keyword(buf, "WORD")) + return TOKEN_WORD; + if (is_keyword(buf, "DWORD")) + return TOKEN_DWORD; + if (is_keyword(buf, "FLOAT")) + return TOKEN_FLOAT; + if (is_keyword(buf, "DOUBLE")) + return TOKEN_DOUBLE; + if (is_keyword(buf, "CHAR")) + return TOKEN_CHAR; + if (is_keyword(buf, "UCHAR")) + return TOKEN_UCHAR; + if (is_keyword(buf, "SWORD")) + return TOKEN_SWORD; + if (is_keyword(buf, "SDWORD")) + return TOKEN_SDWORD; + if (is_keyword(buf, "VOID")) + return TOKEN_VOID; + if (is_keyword(buf, "LPSTR")) + return TOKEN_LPSTR; + if (is_keyword(buf, "UNICODE")) + return TOKEN_UNICODE; + if (is_keyword(buf, "CSTRING")) + return TOKEN_CSTRING; + if (is_keyword(buf, "array")) + return TOKEN_ARRAY; + + return 0; +} + +static BOOL is_guid(parse_buffer* buf) +{ + static char tmp[50]; + DWORD pos = 1; + + if (*buf->buffer != '<') + return FALSE; + tmp[0] = '<'; + while (*(buf->buffer+pos) != '>') + { + tmp[pos] = *(buf->buffer+pos); + pos++; + } + tmp[pos++] = '>'; + tmp[pos] = 0; + if (pos != 37 /* <+35+> */) + { + TRACE("Wrong guid %s (%d) \n", tmp, pos); + return FALSE; + } + TRACE("Found guid %s (%d) \n", tmp, pos); + buf->buffer += pos; + buf->rem_bytes -= pos; + + return TRUE; +} + +static BOOL is_name(parse_buffer* buf) +{ + static char tmp[50]; + DWORD pos = 0; + char c; + BOOL error = 0; + while (!is_separator(c = *(buf->buffer+pos))) + { + if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')))) + error = 1; + tmp[pos++] = c; + } + tmp[pos] = 0; + + if (error) + { + TRACE("Wrong name %s\n", tmp); + return FALSE; + } + + buf->buffer += pos; + buf->rem_bytes -= pos; + + TRACE("Found name %s\n", tmp); + + return TRUE; +} + +static WORD parse_TOKEN_dbg_opt(parse_buffer * buf, BOOL show_token) { WORD token; - if (!read_bytes(buf, &token, 2)) - return 0; + if (buf->txt) + { + while(1) + { + char c; + if (!read_bytes(buf, &c, 1)) + return 0; + /*TRACE("char = '%c'\n", is_space(c) ? ' ' : c);*/ + if (is_space(c)) + continue; + if (is_operator(c) && (c != '<')) + { + token = get_operator_token(c); + break; + } + else if (c == '.') + { + token = TOKEN_DOT; + break; + } + else + { + buf->buffer -= 1; + buf->rem_bytes += 1; + + if ((token = get_keyword_token(buf))) + break; + + if (is_guid(buf)) + { + token = TOKEN_GUID; + break; + } + + if (is_name(buf)) + { + token = TOKEN_NAME; + break; + } + + FIXME("Unrecognize element\n"); + return 0; + } + } + } + else + { + if (!read_bytes(buf, &token, 2)) + return 0; + } switch(token) { @@ -375,12 +587,42 @@ static WORD parse_TOKEN(parse_buffer * buf) return 0; } - if (0) + if (show_token) dump_TOKEN(token); return token; } +static inline WORD parse_TOKEN(parse_buffer * buf) +{ + return parse_TOKEN_dbg_opt(buf, TRUE); +} + +static WORD check_TOKEN(parse_buffer * buf) +{ + WORD token; + + if (buf->txt) + { + parse_buffer save = *buf; + /*TRACE("check: ");*/ + token = parse_TOKEN_dbg_opt(buf, FALSE); + *buf = save; + return token; + } + + if (!read_bytes(buf, &token, 2)) + return 0; + buf->buffer -= 2; + buf->rem_bytes += 2; + if (0) + { + TRACE("check: "); + dump_TOKEN(token); + } + return token; +} + static inline BOOL is_primitive_type(WORD token) { BOOL ret; @@ -413,6 +655,8 @@ static BOOL parse_name(parse_buffer * buf) if (parse_TOKEN(buf) != TOKEN_NAME) return FALSE; + if (buf->txt) + return TRUE; if (!read_bytes(buf, &count, 4)) return FALSE; if (!read_bytes(buf, strname, count)) @@ -432,6 +676,8 @@ static BOOL parse_class_id(parse_buffer * buf) if (parse_TOKEN(buf) != TOKEN_GUID) return FALSE; + if (buf->txt) + return TRUE; if (!read_bytes(buf, &class_id, 16)) return FALSE; sprintf(strguid, "<%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X>", class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0], @@ -605,6 +851,18 @@ static BOOL parse_template(parse_buffer * buf) if (parse_TOKEN(buf) != TOKEN_CBRACE) return FALSE; add_string(buf, "\n\n"); + if (buf->txt) + { + /* Go to the next template */ + while (buf->rem_bytes) + { + if (is_space(*buf->buffer)) + { + buf->buffer++; + buf->rem_bytes--; + } + } + } return TRUE; } @@ -618,6 +876,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP buf.rem_bytes = cbSize; buf.dump = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 500); buf.size = 500; + buf.txt = FALSE; FIXME("(%p/%p)->(%p,%d) partial stub!\n", This, iface, pvData, cbSize); @@ -652,8 +911,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP if (token_header == XOFFILE_FORMAT_TEXT) { - FIXME("Text format not supported yet"); - return DXFILEERR_BADVALUE; + buf.txt = TRUE; } if (token_header == XOFFILE_FORMAT_COMPRESSED) @@ -667,6 +925,8 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP if ((token_header != XOFFILE_FORMAT_FLOAT_BITS_32) && (token_header != XOFFILE_FORMAT_FLOAT_BITS_64)) return DXFILEERR_BADFILEFLOATSIZE; + TRACE("Header is correct\n"); + while (buf.rem_bytes) { buf.pos = 0; @@ -678,7 +938,9 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP else TRACE("Template successfully parsed:\n"); if (TRACE_ON(d3dxof)) - DPRINTF(buf.dump); + /* Only dump in binary format */ + if (!buf.txt) + DPRINTF(buf.dump); } HeapFree(GetProcessHeap(), 0, buf.dump); diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c index e9ee9f2..8ee58b3 100644 --- a/dlls/d3dxof/tests/d3dxof.c +++ b/dlls/d3dxof/tests/d3dxof.c @@ -24,7 +24,7 @@ #include "dxfile.h" char template[] = -"xof 0302 txt 064\n" +"xof 0302txt 0064\n" "template Header\n" "{\n" "<3D82AB43-62DA-11CF-AB390020AF71E433>\n" @@ -63,7 +63,7 @@ static void test_d3dxof(void) /* RegisterTemplates does not support txt format yet */ hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, strlen(template)); - todo_wine ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); + ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); ref = IDirectXFile_Release(lpDirectXFile); ok(ref == 0, "Got refcount %ld, expected 1\n", ref);
1
0
0
0
Christian Costa : d3dxof: Add basic tests.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 04d72cdd6ff1ce286ea3c9bc3d5948a67f343669 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04d72cdd6ff1ce286ea3c9bc3…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Tue Aug 19 00:30:44 2008 +0200 d3dxof: Add basic tests. --- .gitignore | 1 + Makefile.in | 2 + configure | 3 ++ configure.ac | 1 + dlls/Makefile.in | 1 + dlls/d3dxof/tests/Makefile.in | 13 +++++++ dlls/d3dxof/tests/d3dxof.c | 75 +++++++++++++++++++++++++++++++++++++++++ programs/winetest/Makefile.in | 3 ++ programs/winetest/winetest.rc | 1 + 9 files changed, 100 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index f3206c6..e5de4c9 100644 --- a/.gitignore +++ b/.gitignore @@ -270,6 +270,7 @@ programs/winetest/d3d9_test.exe programs/winetest/d3drm_test.exe programs/winetest/d3dx8_test.exe programs/winetest/d3dx9_36_test.exe +programs/winetest/d3dxof_test.exe programs/winetest/ddraw_test.exe programs/winetest/dinput_test.exe programs/winetest/dnsapi_test.exe diff --git a/Makefile.in b/Makefile.in index 8d19779..fd34e31 100644 --- a/Makefile.in +++ b/Makefile.in @@ -231,6 +231,7 @@ ALL_MAKEFILES = \ dlls/d3dx9_36/tests/Makefile \ dlls/d3dx9_37/Makefile \ dlls/d3dxof/Makefile \ + dlls/d3dxof/tests/Makefile \ dlls/dbghelp/Makefile \ dlls/dciman32/Makefile \ dlls/ddraw/Makefile \ @@ -666,6 +667,7 @@ dlls/d3dx9_36/Makefile: dlls/d3dx9_36/Makefile.in dlls/Makedll.rules dlls/d3dx9_36/tests/Makefile: dlls/d3dx9_36/tests/Makefile.in dlls/Maketest.rules dlls/d3dx9_37/Makefile: dlls/d3dx9_37/Makefile.in dlls/Makedll.rules dlls/d3dxof/Makefile: dlls/d3dxof/Makefile.in dlls/Makedll.rules +dlls/d3dxof/tests/Makefile: dlls/d3dxof/tests/Makefile.in dlls/Maketest.rules dlls/dbghelp/Makefile: dlls/dbghelp/Makefile.in dlls/Makedll.rules dlls/dciman32/Makefile: dlls/dciman32/Makefile.in dlls/Makedll.rules dlls/ddraw/Makefile: dlls/ddraw/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index 5a191c9..422f585 100755 --- a/configure +++ b/configure @@ -22041,6 +22041,8 @@ ac_config_files="$ac_config_files dlls/d3dx9_37/Makefile" ac_config_files="$ac_config_files dlls/d3dxof/Makefile" +ac_config_files="$ac_config_files dlls/d3dxof/tests/Makefile" + ac_config_files="$ac_config_files dlls/dbghelp/Makefile" ac_config_files="$ac_config_files dlls/dciman32/Makefile" @@ -23382,6 +23384,7 @@ do "dlls/d3dx9_36/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3dx9_36/tests/Makefile" ;; "dlls/d3dx9_37/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3dx9_37/Makefile" ;; "dlls/d3dxof/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3dxof/Makefile" ;; + "dlls/d3dxof/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3dxof/tests/Makefile" ;; "dlls/dbghelp/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dbghelp/Makefile" ;; "dlls/dciman32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dciman32/Makefile" ;; "dlls/ddraw/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ddraw/Makefile" ;; diff --git a/configure.ac b/configure.ac index bc2d118..fb8de88 100644 --- a/configure.ac +++ b/configure.ac @@ -1783,6 +1783,7 @@ AC_CONFIG_FILES([dlls/d3dx9_36/Makefile]) AC_CONFIG_FILES([dlls/d3dx9_36/tests/Makefile]) AC_CONFIG_FILES([dlls/d3dx9_37/Makefile]) AC_CONFIG_FILES([dlls/d3dxof/Makefile]) +AC_CONFIG_FILES([dlls/d3dxof/tests/Makefile]) AC_CONFIG_FILES([dlls/dbghelp/Makefile]) AC_CONFIG_FILES([dlls/dciman32/Makefile]) AC_CONFIG_FILES([dlls/ddraw/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 581276c..5a50ce7 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -304,6 +304,7 @@ TESTSUBDIRS = \ d3drm/tests \ d3dx8/tests \ d3dx9_36/tests \ + d3dxof/tests \ ddraw/tests \ dinput/tests \ dnsapi/tests \ diff --git a/dlls/d3dxof/tests/Makefile.in b/dlls/d3dxof/tests/Makefile.in new file mode 100644 index 0000000..91776c6 --- /dev/null +++ b/dlls/d3dxof/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = d3dxof.dll +IMPORTS = d3dxof kernel32 + +CTESTS = \ + d3dxof.c + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c new file mode 100644 index 0000000..e9ee9f2 --- /dev/null +++ b/dlls/d3dxof/tests/d3dxof.c @@ -0,0 +1,75 @@ +/* + * Some unit tests for d3dxof + * + * Copyright (C) 2008 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#define COBJMACROS + +#include <assert.h> +#include "wine/test.h" +#include "dxfile.h" + +char template[] = +"xof 0302 txt 064\n" +"template Header\n" +"{\n" +"<3D82AB43-62DA-11CF-AB390020AF71E433>\n" +"WORD major ;\n" +"WORD minor ;\n" +"DWORD flags ;\n" +"}\n"; + +static unsigned long getRefcount(IUnknown *iface) +{ + IUnknown_AddRef(iface); + return IUnknown_Release(iface); +} + +static void test_d3dxof(void) +{ + HRESULT hr; + unsigned long ref; + LPDIRECTXFILE lpDirectXFile = NULL; + hr = DirectXFileCreate(&lpDirectXFile); + ok(hr == DXFILE_OK, "DirectXFileCreate: %x\n", hr); + if(!lpDirectXFile) + { + trace("Couldn't create DirectXFile interface, skipping tests\n"); + return; + } + + ref = getRefcount( (IUnknown *) lpDirectXFile); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); + + ref = IDirectXFile_AddRef(lpDirectXFile); + ok(ref == 2, "Got refcount %ld, expected 1\n", ref); + + ref = IDirectXFile_Release(lpDirectXFile); + ok(ref == 1, "Got refcount %ld, expected 1\n", ref); + + /* RegisterTemplates does not support txt format yet */ + hr = IDirectXFile_RegisterTemplates(lpDirectXFile, template, strlen(template)); + todo_wine ok(hr == DXFILE_OK, "IDirectXFileImpl_RegisterTemplates: %x\n", hr); + + ref = IDirectXFile_Release(lpDirectXFile); + ok(ref == 0, "Got refcount %ld, expected 1\n", ref); +} + +START_TEST(d3dxof) +{ + test_d3dxof(); +} diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 9defc7c..2c06b11 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -39,6 +39,7 @@ TESTBINS = \ d3drm_test.exe \ d3dx8_test.exe \ d3dx9_36_test.exe \ + d3dxof_test.exe \ ddraw_test.exe \ dinput_test.exe \ dnsapi_test.exe \ @@ -139,6 +140,8 @@ d3dx8_test.exe: $(DLLDIR)/d3dx8/tests/d3dx8_test.exe$(DLLEXT) cp $(DLLDIR)/d3dx8/tests/d3dx8_test.exe$(DLLEXT) $@ && $(STRIP) $@ d3dx9_36_test.exe: $(DLLDIR)/d3dx9_36/tests/d3dx9_36_test.exe$(DLLEXT) cp $(DLLDIR)/d3dx9_36/tests/d3dx9_36_test.exe$(DLLEXT) $@ && $(STRIP) $@ +d3dxof_test.exe: $(DLLDIR)/d3dxof/tests/d3dxof_test.exe$(DLLEXT) + cp $(DLLDIR)/d3dxof/tests/d3dxof_test.exe$(DLLEXT) $@ && $(STRIP) $@ ddraw_test.exe: $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT) cp $(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT) $@ && $(STRIP) $@ dinput_test.exe: $(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT) diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index fb00c50..4aaa099 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -100,6 +100,7 @@ d3d9_test.exe TESTRES "d3d9_test.exe" d3drm_test.exe TESTRES "d3drm_test.exe" d3dx8_test.exe TESTRES "d3dx8_test.exe" d3dx9_36_test.exe TESTRES "d3dx9_36_test.exe" +d3dxof_test.exe TESTRES "d3dxof_test.exe" ddraw_test.exe TESTRES "ddraw_test.exe" dinput_test.exe TESTRES "dinput_test.exe" dnsapi_test.exe TESTRES "dnsapi_test.exe"
1
0
0
0
Christian Costa : d3dxof: Create FileData object using its constructor. Fix return value of CreateEnumObject.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: c6b2529fd2f8b470162876cda257e060f42955e1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6b2529fd2f8b470162876cda…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Tue Aug 19 00:29:09 2008 +0200 d3dxof: Create FileData object using its constructor. Fix return value of CreateEnumObject. --- dlls/d3dxof/d3dxof.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index c141c42..dff299d 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -156,7 +156,6 @@ static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile* iface) /*** IDirectXFile methods ***/ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT* ppEnumObj) - { IDirectXFileImpl *This = (IDirectXFileImpl *)iface; IDirectXFileEnumObjectImpl* object; @@ -1126,17 +1125,17 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE { IDirectXFileEnumObjectImpl *This = (IDirectXFileEnumObjectImpl *)iface; IDirectXFileDataImpl* object; + HRESULT hr; FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj); - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl)); - - object->lpVtbl.lpVtbl = &IDirectXFileData_Vtbl; - object->ref = 1; + hr = IDirectXFileDataImpl_Create(&object); + if (!SUCCEEDED(hr)) + return hr; *ppDataObj = (LPDIRECTXFILEDATA)object; - return DXFILEERR_BADVALUE; + return DXFILE_OK; } static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById(IDirectXFileEnumObject* iface, REFGUID rguid, LPDIRECTXFILEDATA* ppDataObj)
1
0
0
0
Christian Costa : d3dxof: Create FileEnumObject using its constructor.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 1b1f8aa89190716b1269103681303f40db8afc21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1b1f8aa89190716b126910368…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Tue Aug 19 00:28:03 2008 +0200 d3dxof: Create FileEnumObject using its constructor. --- dlls/d3dxof/d3dxof.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 9c438c5..c141c42 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -159,7 +159,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV { IDirectXFileImpl *This = (IDirectXFileImpl *)iface; - IDirectXFileEnumObjectImpl* object; + IDirectXFileEnumObjectImpl* object; + HRESULT hr; FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, pvSource, dwLoadOptions, ppEnumObj); @@ -180,13 +181,12 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV FIXME("Source type %d is not handled yet\n", dwLoadOptions); } - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl)); - - object->lpVtbl.lpVtbl = &IDirectXFileEnumObject_Vtbl; - object->ref = 1; + hr = IDirectXFileEnumObjectImpl_Create(&object); + if (!SUCCEEDED(hr)) + return hr; *ppEnumObj = (LPDIRECTXFILEENUMOBJECT)object; - + return DXFILE_OK; }
1
0
0
0
Christian Costa : d3dxof: Implement some parsing in RegisterTemplates.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 2bc401ef89efa1d72c939caa2db6ce8bad8b90fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bc401ef89efa1d72c939caa2…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Aug 18 15:10:25 2008 +0200 d3dxof: Implement some parsing in RegisterTemplates. --- dlls/d3dxof/d3dxof.c | 555 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 550 insertions(+), 5 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2bc401ef89efa1d72c939…
1
0
0
0
Alexandre Julliard : makefiles: Add missing entries for mstask tests.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 3842ab09f14116642c5c5b10a86328a244af06e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3842ab09f14116642c5c5b10a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 19 15:30:25 2008 +0200 makefiles: Add missing entries for mstask tests. --- .gitignore | 1 + Makefile.in | 2 ++ configure | 3 +++ configure.ac | 1 + dlls/Makefile.in | 1 + programs/winetest/Makefile.in | 3 +++ programs/winetest/winetest.rc | 1 + 7 files changed, 12 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 72a2fdb..f3206c6 100644 --- a/.gitignore +++ b/.gitignore @@ -296,6 +296,7 @@ programs/winetest/msacm32_test.exe programs/winetest/mscms_test.exe programs/winetest/mshtml_test.exe programs/winetest/msi_test.exe +programs/winetest/mstask_test.exe programs/winetest/msvcrt_test.exe programs/winetest/msvcrtd_test.exe programs/winetest/msxml3_test.exe diff --git a/Makefile.in b/Makefile.in index 3cd9452..8d19779 100644 --- a/Makefile.in +++ b/Makefile.in @@ -353,6 +353,7 @@ ALL_MAKEFILES = \ dlls/msrle32/Makefile \ dlls/mssip32/Makefile \ dlls/mstask/Makefile \ + dlls/mstask/tests/Makefile \ dlls/msvcirt/Makefile \ dlls/msvcr71/Makefile \ dlls/msvcrt/Makefile \ @@ -787,6 +788,7 @@ dlls/msnet32/Makefile: dlls/msnet32/Makefile.in dlls/Makedll.rules dlls/msrle32/Makefile: dlls/msrle32/Makefile.in dlls/Makedll.rules dlls/mssip32/Makefile: dlls/mssip32/Makefile.in dlls/Makedll.rules dlls/mstask/Makefile: dlls/mstask/Makefile.in dlls/Makedll.rules +dlls/mstask/tests/Makefile: dlls/mstask/tests/Makefile.in dlls/Maketest.rules dlls/msvcirt/Makefile: dlls/msvcirt/Makefile.in dlls/Makedll.rules dlls/msvcr71/Makefile: dlls/msvcr71/Makefile.in dlls/Makedll.rules dlls/msvcrt/Makefile: dlls/msvcrt/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index 76d3fc0..5a191c9 100755 --- a/configure +++ b/configure @@ -22285,6 +22285,8 @@ ac_config_files="$ac_config_files dlls/mssip32/Makefile" ac_config_files="$ac_config_files dlls/mstask/Makefile" +ac_config_files="$ac_config_files dlls/mstask/tests/Makefile" + ac_config_files="$ac_config_files dlls/msvcirt/Makefile" ac_config_files="$ac_config_files dlls/msvcr71/Makefile" @@ -23502,6 +23504,7 @@ do "dlls/msrle32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msrle32/Makefile" ;; "dlls/mssip32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mssip32/Makefile" ;; "dlls/mstask/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mstask/Makefile" ;; + "dlls/mstask/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mstask/tests/Makefile" ;; "dlls/msvcirt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcirt/Makefile" ;; "dlls/msvcr71/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcr71/Makefile" ;; "dlls/msvcrt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msvcrt/Makefile" ;; diff --git a/configure.ac b/configure.ac index 4ea3a18..bc2d118 100644 --- a/configure.ac +++ b/configure.ac @@ -1905,6 +1905,7 @@ AC_CONFIG_FILES([dlls/msnet32/Makefile]) AC_CONFIG_FILES([dlls/msrle32/Makefile]) AC_CONFIG_FILES([dlls/mssip32/Makefile]) AC_CONFIG_FILES([dlls/mstask/Makefile]) +AC_CONFIG_FILES([dlls/mstask/tests/Makefile]) AC_CONFIG_FILES([dlls/msvcirt/Makefile]) AC_CONFIG_FILES([dlls/msvcr71/Makefile]) AC_CONFIG_FILES([dlls/msvcrt/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index b7428fb..581276c 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -330,6 +330,7 @@ TESTSUBDIRS = \ mscms/tests \ mshtml/tests \ msi/tests \ + mstask/tests \ msvcrt/tests \ msvcrtd/tests \ msxml3/tests \ diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 5ab9840..9defc7c 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -65,6 +65,7 @@ TESTBINS = \ mscms_test.exe \ mshtml_test.exe \ msi_test.exe \ + mstask_test.exe \ msvcrt_test.exe \ msvcrtd_test.exe \ msxml3_test.exe \ @@ -190,6 +191,8 @@ mshtml_test.exe: $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT) cp $(DLLDIR)/mshtml/tests/mshtml_test.exe$(DLLEXT) $@ && $(STRIP) $@ msi_test.exe: $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT) cp $(DLLDIR)/msi/tests/msi_test.exe$(DLLEXT) $@ && $(STRIP) $@ +mstask_test.exe: $(DLLDIR)/mstask/tests/mstask_test.exe$(DLLEXT) + cp $(DLLDIR)/mstask/tests/mstask_test.exe$(DLLEXT) $@ && $(STRIP) $@ msvcrt_test.exe: $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) cp $(DLLDIR)/msvcrt/tests/msvcrt_test.exe$(DLLEXT) $@ && $(STRIP) $@ msvcrtd_test.exe: $(DLLDIR)/msvcrtd/tests/msvcrtd_test.exe$(DLLEXT) diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index 1a2ba33..fb00c50 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -126,6 +126,7 @@ msacm32_test.exe TESTRES "msacm32_test.exe" mscms_test.exe TESTRES "mscms_test.exe" mshtml_test.exe TESTRES "mshtml_test.exe" msi_test.exe TESTRES "msi_test.exe" +mstask_test.exe TESTRES "mstask_test.exe" msvcrt_test.exe TESTRES "msvcrt_test.exe" msvcrtd_test.exe TESTRES "msvcrtd_test.exe" msxml3_test.exe TESTRES "msxml3_test.exe"
1
0
0
0
Michael Karcher : kernel32/tests: Fix profile crash on NT and up.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: c2a26cee16471b86f4d6aeb0f935cf746ba677b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c2a26cee16471b86f4d6aeb0f…
Author: Michael Karcher <wine(a)mkarcher.dialup.fu-berlin.de> Date: Sun Aug 17 19:03:03 2008 +0200 kernel32/tests: Fix profile crash on NT and up. --- dlls/kernel32/tests/profile.c | 47 ++++++++++++++++++++++++++++++++-------- 1 files changed, 37 insertions(+), 10 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 47b1ac1..4463f50 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -380,6 +380,20 @@ static void create_test_file(LPCSTR name, LPCSTR data, DWORD size) CloseHandle(hfile); } +static BOOL emptystr_ok(CHAR emptystr[MAX_PATH]) +{ + int i; + + for(i = 0;i < MAX_PATH;++i) + if(emptystr[i] != 0) + { + trace("emptystr[%d] = %d\n",i,emptystr[i]); + return FALSE; + } + + return TRUE; +} + static void test_GetPrivateProfileString(void) { DWORD ret; @@ -387,6 +401,9 @@ static void test_GetPrivateProfileString(void) CHAR def_val[MAX_PATH]; CHAR path[MAX_PATH]; CHAR windir[MAX_PATH]; + /* NT series crashes on r/o empty strings, so pass an r/w + empty string and check for modification */ + CHAR emptystr[MAX_PATH] = ""; LPSTR tempfile; static const char filename[] = ".\\winetest.ini"; @@ -410,10 +427,11 @@ static void test_GetPrivateProfileString(void) /* lpAppName is empty */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("", "name1", "default", + ret = GetPrivateProfileStringA(emptystr, "name1", "default", buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpAppName is missing */ lstrcpyA(buf, "kumquat"); @@ -424,42 +442,47 @@ static void test_GetPrivateProfileString(void) /* lpAppName is empty, lpDefault is NULL */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("", "name1", NULL, + ret = GetPrivateProfileStringA(emptystr, "name1", NULL, buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpAppName is empty, lpDefault is empty */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("", "name1", "", + ret = GetPrivateProfileStringA(emptystr, "name1", "", buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpAppName is empty, lpDefault has trailing blank characters */ lstrcpyA(buf, "kumquat"); /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ lstrcpyA(def_val, "default "); - ret = GetPrivateProfileStringA("", "name1", def_val, + ret = GetPrivateProfileStringA(emptystr, "name1", def_val, buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpAppName is empty, many blank characters in lpDefault */ lstrcpyA(buf, "kumquat"); /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ lstrcpyA(def_val, "one two "); - ret = GetPrivateProfileStringA("", "name1", def_val, + ret = GetPrivateProfileStringA(emptystr, "name1", def_val, buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "one two"), "Expected \"one two\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpAppName is empty, blank character but not trailing in lpDefault */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("", "name1", "one two", + ret = GetPrivateProfileStringA(emptystr, "name1", "one two", buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "one two"), "Expected \"one two\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "AppName modified\n"); /* lpKeyName is NULL */ lstrcpyA(buf, "kumquat"); @@ -471,10 +494,11 @@ static void test_GetPrivateProfileString(void) /* lpKeyName is empty */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "", "default", + ret = GetPrivateProfileStringA("section1", emptystr, "default", buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "KeyName modified\n"); /* lpKeyName is missing */ lstrcpyA(buf, "kumquat"); @@ -485,26 +509,29 @@ static void test_GetPrivateProfileString(void) /* lpKeyName is empty, lpDefault is NULL */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "", NULL, + ret = GetPrivateProfileStringA("section1", emptystr, NULL, buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "KeyName modified\n"); /* lpKeyName is empty, lpDefault is empty */ lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "", "", + ret = GetPrivateProfileStringA("section1", emptystr, "", buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "KeyName modified\n"); /* lpKeyName is empty, lpDefault has trailing blank characters */ lstrcpyA(buf, "kumquat"); /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ lstrcpyA(def_val, "default "); - ret = GetPrivateProfileStringA("section1", "", def_val, + ret = GetPrivateProfileStringA("section1", emptystr, def_val, buf, MAX_PATH, filename); ok(ret == 7, "Expected 7, got %d\n", ret); ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); + ok(emptystr_ok(emptystr), "KeyName modified\n"); if (0) /* crashes */ {
1
0
0
0
Detlef Riekenberg : spoolss/tests: Fix a test on vista/w2k8.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: f4a99193041295fce8e64b949c081e6297076d45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4a99193041295fce8e64b949…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sat Aug 9 23:59:47 2008 +0200 spoolss/tests: Fix a test on vista/w2k8. --- dlls/spoolss/tests/spoolss.c | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/spoolss/tests/spoolss.c b/dlls/spoolss/tests/spoolss.c index b0b544c..d65f101 100644 --- a/dlls/spoolss/tests/spoolss.c +++ b/dlls/spoolss/tests/spoolss.c @@ -41,6 +41,7 @@ static DWORD (WINAPI * pSplInitializeWinSpoolDrv)(LPVOID *); static LPVOID fn_spl[WINSPOOL_TABLESIZE]; static LPVOID fn_w2k[WINSPOOL_TABLESIZE]; static LPVOID fn_xp[WINSPOOL_TABLESIZE]; +static LPVOID fn_v[WINSPOOL_TABLESIZE]; /* ########################### */ @@ -89,6 +90,18 @@ static LPCSTR load_functions(void) fn_xp[7] = (void *) GetProcAddress(hwinspool, (LPSTR) 214); /* RefCntUnloadDriver */ fn_xp[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 215); /* ForceUnloadDriver */ + memset(fn_v, 0xff, sizeof(fn_v)); + fn_v[0] = (void *) GetProcAddress(hwinspool, "OpenPrinterW"); + fn_v[1] = (void *) GetProcAddress(hwinspool, "ClosePrinter"); + fn_v[2] = (void *) GetProcAddress(hwinspool, "SpoolerDevQueryPrintW"); + fn_v[3] = (void *) GetProcAddress(hwinspool, "SpoolerPrinterEvent"); + fn_v[4] = (void *) GetProcAddress(hwinspool, "DocumentPropertiesW"); + fn_v[5] = (void *) GetProcAddress(hwinspool, (LPSTR) 212); /* LoadPrinterDriver */ + fn_v[6] = (void *) GetProcAddress(hwinspool, (LPSTR) 213); /* RefCntLoadDriver */ + fn_v[7] = (void *) GetProcAddress(hwinspool, (LPSTR) 214); /* RefCntUnloadDriver */ + fn_v[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 215); /* ForceUnloadDriver */ + fn_v[9] = (void *) GetProcAddress(hwinspool, (LPSTR) 251); /* 0xfb */ + return NULL; } @@ -124,21 +137,28 @@ static void test_BuildOtherNamesFromMachineName(void) static void test_SplInitializeWinSpoolDrv(VOID) { + LPVOID *fn_ref = fn_xp; DWORD res; LONG id; - BOOL is_xp; memset(fn_spl, 0xff, sizeof(fn_spl)); SetLastError(0xdeadbeef); res = pSplInitializeWinSpoolDrv(fn_spl); ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - /* functions 0 to 5 are the same with "spoolss.dll" from w2k and xp */ - is_xp = (fn_spl[6] == fn_xp[6]); + /* functions 0 to 5 are the same in "spoolss.dll" from w2k and above */ + if (fn_spl[6] == fn_w2k[6]) { + fn_ref = fn_w2k; + } + if (fn_spl[9] == fn_v[9]) { + fn_ref = fn_v; + } + id = 0; while (id < WINSPOOL_TABLESIZE) { - ok( fn_spl[id] == (is_xp ? fn_xp[id] : fn_w2k[id]), - "(#%02u) spoolss: %p, xp: %p, w2k: %p\n", id, fn_spl[id], fn_xp[id], fn_w2k[id]); + ok( fn_spl[id] == fn_ref[id], + "(#%02u) spoolss: %p (vista: %p, xp: %p, w2k: %p)\n", + id, fn_spl[id], fn_v[id], fn_xp[id], fn_w2k[id]); id++; } }
1
0
0
0
Kirill K. Smirnov : winhlp32: Use TopicOffset mapping and get rid of unused function.
by Alexandre Julliard
19 Aug '08
19 Aug '08
Module: wine Branch: master Commit: 2bca1c86ada7820065179eb757743c36206edd50 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bca1c86ada7820065179eb75…
Author: Kirill K. Smirnov <lich(a)math.spbu.ru> Date: Wed Aug 6 19:50:22 2008 +0400 winhlp32: Use TopicOffset mapping and get rid of unused function. --- programs/winhlp32/hlpfile.c | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 deletions(-) diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index e54d3bf..99043ac 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -71,23 +71,6 @@ static BOOL HLPFILE_Uncompress3(HLPFILE*, char*, const char*, const BYTE*, cons static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE* dst, unsigned dstsz); static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile); -/*********************************************************************** - * - * HLPFILE_PageByNumber - */ -static HLPFILE_PAGE *HLPFILE_PageByNumber(HLPFILE* hlpfile, UINT wNum) -{ - HLPFILE_PAGE *page; - UINT temp = wNum; - - WINE_TRACE("<%s>[%u]\n", hlpfile->lpszPath, wNum); - - for (page = hlpfile->first_page; page && temp; page = page->next) temp--; - if (!page) - WINE_ERR("Page of number %u not found in file %s\n", wNum, hlpfile->lpszPath); - return page; -} - /****************************************************************** * HLPFILE_PageByOffset * @@ -154,8 +137,8 @@ HLPFILE_PAGE *HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash, ULONG* relative) /* For win 3.0 files hash values are really page numbers */ if (hlpfile->version <= 16) { - *relative = 0; - return HLPFILE_PageByNumber(hlpfile, lHash); + if (lHash >= hlpfile->wTOMapLen) return NULL; + return HLPFILE_PageByOffset(hlpfile, hlpfile->TOMap[lHash], relative); } ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), comp_PageByHash); @@ -438,6 +421,19 @@ static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end, page->browse_bwd = GET_UINT(buf, 0x19); page->browse_fwd = GET_UINT(buf, 0x1D); + if (hlpfile->version <= 16) + { + if (page->browse_bwd == 0xFFFF || page->browse_bwd == 0xFFFFFFFF) + page->browse_bwd = 0xFFFFFFFF; + else + page->browse_bwd = hlpfile->TOMap[page->browse_bwd]; + + if (page->browse_fwd == 0xFFFF || page->browse_fwd == 0xFFFFFFFF) + page->browse_fwd = 0xFFFFFFFF; + else + page->browse_fwd = hlpfile->TOMap[page->browse_fwd]; + } + WINE_TRACE("Added page[%d]: title='%s' %08x << %08x >> %08x\n", page->wNumber, page->lpszTitle, page->browse_bwd, page->offset, page->browse_fwd); @@ -1439,7 +1435,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, case 0xE1: WINE_WARN("jump topic 1 => %u\n", GET_UINT(format, 1)); HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup, - page->file->lpszPath, -1, GET_UINT(format, 1)-16, 1, -1); + page->file->lpszPath, -1, GET_UINT(format, 1), 1, -1); format += 5;
1
0
0
0
← Newer
1
...
47
48
49
50
51
52
53
...
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