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
October 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
3 participants
1216 discussions
Start a n
N
ew thread
Dylan Smith : richedit: Account for selection bar in calculating available width.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: a32f1f2c1c434c31436941414fead711223b926d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a32f1f2c1c434c31436941414…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Fri Oct 10 17:50:40 2008 -0400 richedit: Account for selection bar in calculating available width. --- dlls/riched20/wrap.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index d6a2492..e03f398 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -75,7 +75,8 @@ static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para) - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; } else if (wc->context->editor->bWordWrap) { wc->nAvailWidth = wc->context->rcView.right - wc->context->rcView.left - - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; + - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin + - wc->context->editor->selofs; } else { wc->nAvailWidth = ~0u >> 1; }
1
0
0
0
Dylan Smith : richedit: Fixed centering and right align with word wrap disabled.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 1ed84f0dcc475db75ba54250407065e0b0dffd42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ed84f0dcc475db75ba542504…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Fri Oct 10 17:50:44 2008 -0400 richedit: Fixed centering and right align with word wrap disabled. --- dlls/riched20/editstr.h | 2 +- dlls/riched20/wrap.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index edbeb13..7299ab3 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -401,7 +401,7 @@ typedef struct tagME_WrapContext int nAvailWidth; int nRow; POINT pt; - BOOL bOverflown; + BOOL bOverflown, bWordWrap; ME_DisplayItem *pRowStart; ME_DisplayItem *pLastSplittableRun; diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index e03f398..53f0bfb 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -50,8 +50,10 @@ static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para) wc->pRowStart = NULL; wc->bOverflown = FALSE; wc->pLastSplittableRun = NULL; + wc->bWordWrap = wc->context->editor->bWordWrap; if (para->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) { wc->nAvailWidth = 0; + wc->bWordWrap = FALSE; if (para->member.para.nFlags & MEPF_ROWEND) { ME_Cell *cell = &ME_FindItemBack(para, diCell)->member.cell; @@ -73,12 +75,11 @@ static void ME_BeginRow(ME_WrapContext *wc, ME_DisplayItem *para) wc->nAvailWidth = cell->nWidth - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin; - } else if (wc->context->editor->bWordWrap) { + wc->bWordWrap = TRUE; + } else { wc->nAvailWidth = wc->context->rcView.right - wc->context->rcView.left - (wc->nRow ? wc->nLeftMargin : wc->nFirstMargin) - wc->nRightMargin - wc->context->editor->selofs; - } else { - wc->nAvailWidth = ~0u >> 1; } wc->pt.x = wc->context->pt.x; if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ @@ -149,9 +150,9 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) assert(para->member.para.pFmt->dwMask & PFM_ALIGNMENT); align = para->member.para.pFmt->wAlignment; if (align == PFA_CENTER) - shift = (wc->nAvailWidth-width)/2; + shift = max((wc->nAvailWidth-width)/2, 0); if (align == PFA_RIGHT) - shift = wc->nAvailWidth-width; + shift = max(wc->nAvailWidth-width, 0); for (p = wc->pRowStart; p!=pEnd; p = p->next) { if (p->type==diRun) { /* FIXME add more run types */ @@ -378,7 +379,8 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) } /* will current run fit? */ - if (wc->pt.x + run->nWidth - wc->context->pt.x > wc->nAvailWidth) + if (wc->bWordWrap && + wc->pt.x + run->nWidth - wc->context->pt.x > wc->nAvailWidth) { int loc = wc->context->pt.x + wc->nAvailWidth - wc->pt.x; /* total white run ? */
1
0
0
0
James Hawkins : msi: Add tests for the DrLocator part of the AppSearch action.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 701c2a2728982d6278ed851e2e53976fe50909ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=701c2a2728982d6278ed851e2…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Oct 13 03:57:29 2008 -0500 msi: Add tests for the DrLocator part of the AppSearch action. --- dlls/msi/tests/package.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 182 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index c585cae..e52c931 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -6672,6 +6672,187 @@ static void test_appsearch_inilocator(void) DeleteFileA(msifile); } +static void test_appsearch_drlocator(void) +{ + MSIHANDLE hpkg, hdb; + CHAR path[MAX_PATH]; + CHAR prop[MAX_PATH]; + LPCSTR str; + DWORD size; + UINT r; + + create_test_file("FileName1"); + CreateDirectoryA("one", NULL); + CreateDirectoryA("one\\two", NULL); + CreateDirectoryA("one\\two\\three", NULL); + create_test_file("one\\two\\three\\FileName2"); + CreateDirectoryA("another", NULL); + + hdb = create_package_db(); + ok(hdb, "Expected a valid database handle\n"); + + r = create_appsearch_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = create_drlocator_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, full path, depth 0, signature */ + sprintf(path, "'NewSignature1', '', '%s', 0", CURR_DIR); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, full path, depth 0, no signature */ + sprintf(path, "'NewSignature2', '', '%s', 0", CURR_DIR); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, relative path, depth 0, no signature */ + sprintf(path, "'NewSignature3', '', '%s', 0", CURR_DIR + 3); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, full path, depth 2, signature */ + sprintf(path, "'NewSignature4', '', '%s', 2", CURR_DIR); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, full path, depth 3, signature */ + sprintf(path, "'NewSignature5', '', '%s', 3", CURR_DIR); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* no parent, full path, depth 1, signature is dir */ + sprintf(path, "'NewSignature6', '', '%s', 1", CURR_DIR); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* parent is in DrLocator, relative path, depth 0, signature */ + sprintf(path, "'NewSignature7', 'NewSignature1', 'one\\two\\three', 1"); + r = add_drlocator_entry(hdb, path); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = create_signature_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + str = "'NewSignature1', 'FileName1', '', '', '', '', '', '', ''"; + r = add_signature_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + str = "'NewSignature4', 'FileName2', '', '', '', '', '', '', ''"; + r = add_signature_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + str = "'NewSignature5', 'FileName2', '', '', '', '', '', '', ''"; + r = add_signature_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + str = "'NewSignature6', 'another', '', '', '', '', '', '', ''"; + r = add_signature_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + str = "'NewSignature7', 'FileName2', '', '', '', '', '', '', ''"; + r = add_signature_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + hpkg = package_from_db(hdb); + ok(hpkg, "Expected a valid package handle\n"); + + r = MsiDoAction(hpkg, "AppSearch"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + size = MAX_PATH; + sprintf(path, "%s\\FileName1", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + sprintf(path, "%s\\", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + sprintf(path, "%s\\", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); + } + + size = MAX_PATH; + sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); + } + + size = MAX_PATH; + sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + DeleteFileA("FileName1"); + DeleteFileA("one\\two\\three\\FileName2"); + RemoveDirectoryA("one\\two\\three"); + RemoveDirectoryA("one\\two"); + RemoveDirectoryA("one"); + RemoveDirectoryA("another"); + MsiCloseHandle(hpkg); + DeleteFileA(msifile); +} + static void test_featureparents(void) { MSIHANDLE hpkg; @@ -9055,6 +9236,7 @@ START_TEST(package) test_appsearch_complocator(); test_appsearch_reglocator(); test_appsearch_inilocator(); + test_appsearch_drlocator(); test_featureparents(); test_installprops(); test_launchconditions();
1
0
0
0
James Hawkins : msi: Add tests for the IniLocator part of the AppSearch action.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 3e76ade6c8a28ef77eb305aad9fe6123444e4a38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e76ade6c8a28ef77eb305aad…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Oct 13 03:57:22 2008 -0500 msi: Add tests for the IniLocator part of the AppSearch action. --- dlls/msi/tests/package.c | 234 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 234 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 870998d..803c9cd 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -470,6 +470,19 @@ static UINT create_complocator_table( MSIHANDLE hdb ) "PRIMARY KEY `Signature_`)" ); } +static UINT create_inilocator_table( MSIHANDLE hdb ) +{ + return run_query( hdb, + "CREATE TABLE `IniLocator` (" + "`Signature_` CHAR(72) NOT NULL, " + "`FileName` CHAR(255) NOT NULL, " + "`Section` CHAR(96)NOT NULL, " + "`Key` CHAR(128)NOT NULL, " + "`Field` SHORT, " + "`Type` SHORT " + "PRIMARY KEY `Signature_`)" ); +} + static UINT add_component_entry( MSIHANDLE hdb, const char *values ) { char insert[] = "INSERT INTO `Component` " @@ -706,6 +719,22 @@ static UINT add_complocator_entry( MSIHANDLE hdb, const char *values ) return r; } +static UINT add_inilocator_entry( MSIHANDLE hdb, const char *values ) +{ + char insert[] = "INSERT INTO `IniLocator` " + "(`Signature_`, `FileName`, `Section`, `Key`, `Field`, `Type`) " + "VALUES( %s )"; + char *query; + UINT sz, r; + + sz = strlen(values) + sizeof insert; + query = HeapAlloc(GetProcessHeap(),0,sz); + sprintf(query,insert,values); + r = run_query( hdb, query ); + HeapFree(GetProcessHeap(), 0, query); + return r; +} + static UINT set_summary_info(MSIHANDLE hdb) { UINT res; @@ -5985,6 +6014,210 @@ static void test_appsearch_complocator(void) DeleteFileA(msifile); } +static void delete_win_ini(LPCSTR file) +{ + CHAR path[MAX_PATH]; + + GetWindowsDirectoryA(path, MAX_PATH); + lstrcatA(path, "\\"); + lstrcatA(path, file); + + DeleteFileA(path); +} + +static void test_appsearch_inilocator(void) +{ + MSIHANDLE hpkg, hdb; + CHAR path[MAX_PATH]; + CHAR prop[MAX_PATH]; + LPCSTR str; + LPSTR ptr; + DWORD size; + UINT r; + + WritePrivateProfileStringA("Section", "Key", "keydata,field2", "IniFile.ini"); + + create_test_file("FileName1"); + sprintf(path, "%s\\FileName1", CURR_DIR); + WritePrivateProfileStringA("Section", "Key2", path, "IniFile.ini"); + + WritePrivateProfileStringA("Section", "Key3", CURR_DIR, "IniFile.ini"); + + sprintf(path, "%s\\IDontExist", CURR_DIR); + WritePrivateProfileStringA("Section", "Key4", path, "IniFile.ini"); + + hdb = create_package_db(); + ok(hdb, "Expected a valid database handle\n"); + + r = create_appsearch_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP8', 'NewSignature8'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_appsearch_entry(hdb, "'SIGPROP9', 'NewSignature9'"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = create_inilocator_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeRawValue, field 1 */ + str = "'NewSignature1', 'IniFile.ini', 'Section', 'Key', 1, 2"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeRawValue, field 2 */ + str = "'NewSignature2', 'IniFile.ini', 'Section', 'Key', 2, 2"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeRawValue, entire field */ + str = "'NewSignature3', 'IniFile.ini', 'Section', 'Key', 0, 2"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeFile */ + str = "'NewSignature4', 'IniFile.ini', 'Section', 'Key2', 1, 1"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeDirectory, file */ + str = "'NewSignature5', 'IniFile.ini', 'Section', 'Key2', 1, 0"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeDirectory, directory */ + str = "'NewSignature6', 'IniFile.ini', 'Section', 'Key3', 1, 0"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeFile, file, no signature */ + str = "'NewSignature7', 'IniFile.ini', 'Section', 'Key2', 1, 1"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeFile, dir, no signature */ + str = "'NewSignature8', 'IniFile.ini', 'Section', 'Key3', 1, 1"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + /* msidbLocatorTypeFile, file does not exist */ + str = "'NewSignature9', 'IniFile.ini', 'Section', 'Key4', 1, 1"; + r = add_inilocator_entry(hdb, str); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = create_signature_table(hdb); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_signature_entry(hdb, "'NewSignature4', 'FileName1', '', '', '', '', '', '', ''"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = add_signature_entry(hdb, "'NewSignature9', 'IDontExist', '', '', '', '', '', '', ''"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + hpkg = package_from_db(hdb); + ok(hpkg, "Expected a valid package handle\n"); + + r = MsiDoAction(hpkg, "AppSearch"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, "keydata"), "Expected \"keydata\", got \"%s\"\n", prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, "field2"), "Expected \"field2\", got \"%s\"\n", prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(prop, "keydata,field2"), + "Expected \"keydata,field2\", got \"%s\"\n", prop); + + size = MAX_PATH; + sprintf(path, "%s\\FileName1", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); + + size = MAX_PATH; + sprintf(path, "%s\\", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + sprintf(path, "%s\\", CURR_DIR); + r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + lstrcpyA(path, CURR_DIR); + ptr = strrchr(path, '\\'); + *(ptr + 1) = '\0'; + r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); + } + + size = MAX_PATH; + r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); + + delete_win_ini("IniFile.ini"); + DeleteFileA("FileName1"); + MsiCloseHandle(hpkg); + DeleteFileA(msifile); +} + static void test_featureparents(void) { MSIHANDLE hpkg; @@ -8366,6 +8599,7 @@ START_TEST(package) test_removefiles(); test_appsearch(); test_appsearch_complocator(); + test_appsearch_inilocator(); test_featureparents(); test_installprops(); test_launchconditions();
1
0
0
0
Jeremy White : gdi32/tests: Make the comparison of the enumerated and returned logfont structures actually work .
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 484add22201569568773ae67e4633b828cc4e840 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=484add22201569568773ae67e…
Author: Jeremy White <jwhite(a)winehq.org> Date: Sun Oct 12 15:36:14 2008 -0500 gdi32/tests: Make the comparison of the enumerated and returned logfont structures actually work. --- dlls/gdi32/tests/font.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 06ef26d..48a8fe5 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -106,7 +106,7 @@ static void check_font(const char* test, const LOGFONTA* lf, HFONT hfont) minlen++; minlen += FIELD_OFFSET(LOGFONTA, lfFaceName) + 1; ok(ret == sizeof(LOGFONTA) || ret == minlen, "%s: GetObject returned %d\n", test, ret); - ok(!memcmp(&lf, &lf, FIELD_OFFSET(LOGFONTA, lfFaceName)), "%s: fonts don't match\n", test); + ok(!memcmp(lf, &getobj_lf, FIELD_OFFSET(LOGFONTA, lfFaceName)), "%s: fonts don't match\n", test); ok(!lstrcmpA(lf->lfFaceName, getobj_lf.lfFaceName), "%s: font names don't match: %s != %s\n", test, lf->lfFaceName, getobj_lf.lfFaceName); }
1
0
0
0
Jeremy White : gdi32: Expand maximum font count to 4096, warn when we go over that limit.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: fed3d50663e36935cd12b367f926b7fe0bc55791 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fed3d50663e36935cd12b367f…
Author: Jeremy White <jwhite(a)winehq.org> Date: Sun Oct 12 14:18:14 2008 -0500 gdi32: Expand maximum font count to 4096, warn when we go over that limit. --- dlls/gdi32/tests/font.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index bbcdf0b..06ef26d 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1571,7 +1571,7 @@ static void test_GetFontUnicodeRanges(void) ReleaseDC(NULL, hdc); } -#define MAX_ENUM_FONTS 256 +#define MAX_ENUM_FONTS 4096 struct enum_font_data { @@ -1596,6 +1596,8 @@ static INT CALLBACK arial_enum_proc(const LOGFONT *lf, const TEXTMETRIC *tm, DWO #endif if (efd->total < MAX_ENUM_FONTS) efd->lf[efd->total++] = *lf; + else + trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); return 1; } @@ -1608,6 +1610,8 @@ static INT CALLBACK arial_enum_procw(const LOGFONTW *lf, const TEXTMETRICW *tm, if (efd->total < MAX_ENUM_FONTS) efd->lf[efd->total++] = *lf; + else + trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); return 1; }
1
0
0
0
James Hawkins : msi: Add more tests for the CompLocator part of the AppSearch action.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 41c8bc8ae6434f54c401aedf283bfe9e760d09cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41c8bc8ae6434f54c401aedf2…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Oct 13 03:57:17 2008 -0500 msi: Add more tests for the CompLocator part of the AppSearch action. --- dlls/msi/tests/package.c | 526 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 421 insertions(+), 105 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=41c8bc8ae6434f54c401a…
1
0
0
0
James Hawkins : msi: Add tests for the RegLocator part of the AppSearch action.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 33c9e80be51002be1dedca1ccbbab47bfb3bc500 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33c9e80be51002be1dedca1cc…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Oct 13 03:57:26 2008 -0500 msi: Add tests for the RegLocator part of the AppSearch action. --- dlls/msi/tests/package.c | 455 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 455 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=33c9e80be51002be1dedc…
1
0
0
0
Andrew Talbot : gdi32: Sign-compare warnings fix.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 3a02030d54affb80dff8922c6ac335d9d0c14ba7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a02030d54affb80dff8922c6…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Fri Oct 10 20:00:41 2008 +0100 gdi32: Sign-compare warnings fix. --- dlls/gdi32/freetype.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 0ab4c7a..8b0d672 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1077,7 +1077,7 @@ static WCHAR *get_familyname(FT_Face ft_face) if(get_name_table_entry(ft_face, &name)) { - int i; + FT_UInt i; /* String is not nul terminated and string_len is a byte length. */ family = HeapAlloc(GetProcessHeap(), 0, name.string_len + 2); @@ -2883,7 +2883,7 @@ static GdiFont *alloc_font(void) static void free_font(GdiFont *font) { struct list *cursor, *cursor2; - int i; + DWORD i; LIST_FOR_EACH_SAFE(cursor, cursor2, &font->child_fonts) {
1
0
0
0
Marcus Meissner : Fixed RegEnumKey(Ex)W buffer sizes.
by Alexandre Julliard
13 Oct '08
13 Oct '08
Module: wine Branch: master Commit: 0ff2c06c1d26bf3b6f717140d5753ba3c82295a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ff2c06c1d26bf3b6f717140d…
Author: Marcus Meissner <meissner(a)suse.de> Date: Sun Oct 12 19:50:20 2008 +0200 Fixed RegEnumKey(Ex)W buffer sizes. --- dlls/msdmo/dmoreg.c | 4 ++-- dlls/shell32/classes.c | 2 +- dlls/shell32/shlexec.c | 2 +- dlls/winmm/mci.c | 2 +- dlls/wnaspi32/aspi.c | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c index 22789d9..743f0bb 100644 --- a/dlls/msdmo/dmoreg.c +++ b/dlls/msdmo/dmoreg.c @@ -737,7 +737,7 @@ HRESULT read_types(HKEY root, LPCWSTR key, ULONG *supplied, ULONG requested, DMO while (rc == ERROR_SUCCESS) { - len = MAX_PATH * sizeof(WCHAR); + len = MAX_PATH; rc = RegEnumKeyExW(hkey, index, szNextKey, &len, NULL, NULL, NULL, NULL); if (rc == ERROR_SUCCESS) { @@ -749,7 +749,7 @@ HRESULT read_types(HKEY root, LPCWSTR key, ULONG *supplied, ULONG requested, DMO RegOpenKeyExW(hkey, szNextKey, 0, KEY_READ, &subk); while (rcs == ERROR_SUCCESS) { - len = MAX_PATH * sizeof(WCHAR); + len = MAX_PATH; rcs = RegEnumKeyExW(subk, sub_index, szSubKey, &len, NULL, NULL, NULL, NULL); if (rcs == ERROR_SUCCESS) { diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c index d6e9864..73c8822 100644 --- a/dlls/shell32/classes.c +++ b/dlls/shell32/classes.c @@ -187,7 +187,7 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP return FALSE; ret = FALSE; - if (HCR_GetDefaultVerbW(hkeyClass, szVerb, sTempVerb, sizeof(sTempVerb))) + if (HCR_GetDefaultVerbW(hkeyClass, szVerb, sTempVerb, sizeof(sTempVerb)/sizeof(sTempVerb[0]))) { WCHAR sTemp[MAX_PATH]; lstrcpyW(sTemp, swShell); diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index bf820ca..5b5785b 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -472,7 +472,7 @@ static UINT SHELL_FindExecutableByOperation(LPCWSTR lpOperation, LPWSTR key, LPW if (RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, 0x02000000, &hkeyClass)) return SE_ERR_NOASSOC; - if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb))) + if (!HCR_GetDefaultVerbW(hkeyClass, lpOperation, verb, sizeof(verb)/sizeof(verb[0]))) return SE_ERR_NOASSOC; RegCloseKey(hkeyClass); diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 0053619..cb58896 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -1899,7 +1899,7 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm if (RegQueryInfoKeyW( hKey, 0, 0, 0, &cnt, 0, 0, 0, 0, 0, 0, 0) == ERROR_SUCCESS && lpParms->dwNumber <= cnt) { - DWORD bufLen = sizeof(buf); + DWORD bufLen = sizeof(buf)/sizeof(buf[0]); if (RegEnumKeyExW(hKey, lpParms->dwNumber - 1, buf, &bufLen, 0, 0, 0, 0) == ERROR_SUCCESS) s = buf; diff --git a/dlls/wnaspi32/aspi.c b/dlls/wnaspi32/aspi.c index 11c3f3b..196b968 100644 --- a/dlls/wnaspi32/aspi.c +++ b/dlls/wnaspi32/aspi.c @@ -128,7 +128,7 @@ int ASPI_GetNumControllers(void) ERR("Could not open HKLM\\%s\n", debugstr_w(wDevicemapScsi)); return 0; } - while (RegEnumKeyW(hkeyScsi, i++, wPortName, sizeof(wPortName)) == ERROR_SUCCESS) + while (RegEnumKeyW(hkeyScsi, i++, wPortName, sizeof(wPortName)/sizeof(wPortName[0])) == ERROR_SUCCESS) { if (RegOpenKeyExW(hkeyScsi, wPortName, 0, KEY_QUERY_VALUE, &hkeyPort) == ERROR_SUCCESS) { @@ -190,7 +190,7 @@ DWORD ASPI_GetHCforController( int controller ) ERR("Could not open HKLM\\%s\n", debugstr_w(wDevicemapScsi)); return 0xFFFFFFFF; } - while (RegEnumKeyW(hkeyScsi, i++, wPortName, sizeof(wPortName)) == ERROR_SUCCESS) + while (RegEnumKeyW(hkeyScsi, i++, wPortName, sizeof(wPortName)/sizeof(wPortName[0])) == ERROR_SUCCESS) { if (RegOpenKeyExW(hkeyScsi, wPortName, 0, KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, &hkeyPort) == ERROR_SUCCESS) @@ -213,7 +213,7 @@ DWORD ASPI_GetHCforController( int controller ) return 0xFFFFFFFF; } - if (RegEnumKeyW(hkeyPort, -num_ha, wBusName, sizeof(wBusName)) != ERROR_SUCCESS) + if (RegEnumKeyW(hkeyPort, -num_ha, wBusName, sizeof(wBusName)/sizeof(wBusName[0])) != ERROR_SUCCESS) { ERR("Failed to enumerate keys\n"); RegCloseKey(hkeyPort);
1
0
0
0
← Newer
1
...
62
63
64
65
66
67
68
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200