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
February 2009
----- 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
965 discussions
Start a n
N
ew thread
James Hawkins : msi: Add tests for field zero of a record.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 7d7f14c10136839c6246e8a84734ab0905ea1d54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d7f14c10136839c6246e8a84…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed Feb 25 19:44:01 2009 -0800 msi: Add tests for field zero of a record. --- dlls/msi/tests/record.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 148 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c index 29a57a0..567f110 100644 --- a/dlls/msi/tests/record.c +++ b/dlls/msi/tests/record.c @@ -24,6 +24,8 @@ #include "wine/test.h" +static const char *msifile = "winetest.msi"; + static BOOL create_temp_file(char *name) { UINT r; @@ -443,9 +445,155 @@ static void test_MsiRecordGetInteger(void) MsiCloseHandle(rec); } +static void test_fieldzero(void) +{ + MSIHANDLE hdb, hview, rec; + CHAR buf[MAX_PATH]; + LPCSTR query; + DWORD sz; + UINT r; + + rec = MsiCreateRecord(1); + ok(rec != 0, "Expected a valid handle\n"); + + r = MsiRecordGetInteger(rec, 0); + ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); + + sz = MAX_PATH; + lstrcpyA(buf, "apple"); + r = MsiRecordGetString(rec, 0, buf, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(sz == 0, "Expectd 0, got %d\n", sz); + + r = MsiRecordIsNull(rec, 0); + ok(r == TRUE, "Expected TRUE, got %d\n", r); + + r = MsiRecordGetInteger(rec, 1); + ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); + + r = MsiRecordSetInteger(rec, 1, 42); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = MsiRecordGetInteger(rec, 0); + ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); + + sz = MAX_PATH; + lstrcpyA(buf, "apple"); + r = MsiRecordGetString(rec, 0, buf, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(sz == 0, "Expectd 0, got %d\n", sz); + + r = MsiRecordIsNull(rec, 0); + ok(r == TRUE, "Expected TRUE, got %d\n", r); + + r = MsiRecordGetInteger(rec, 1); + ok(r == 42, "Expected 42, got %d\n", r); + + r = MsiRecordSetString(rec, 1, "bologna"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = MsiRecordGetInteger(rec, 0); + ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); + + sz = MAX_PATH; + lstrcpyA(buf, "apple"); + r = MsiRecordGetString(rec, 0, buf, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); + ok(sz == 0, "Expectd 0, got %d\n", sz); + + r = MsiRecordIsNull(rec, 0); + ok(r == TRUE, "Expected TRUE, got %d\n", r); + + sz = MAX_PATH; + lstrcpyA(buf, "apple"); + r = MsiRecordGetString(rec, 1, buf, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buf, "bologna"), "Expected \"bologna\", got \"%s\"\n", buf); + ok(sz == 7, "Expectd 7, got %d\n", sz); + + MsiCloseHandle(rec); + + r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); + ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); + + query = "CREATE TABLE `drone` ( " + "`id` INT, `name` CHAR(32), `number` CHAR(32) " + "PRIMARY KEY `id`)"; + r = MsiDatabaseOpenView(hdb, query, &hview); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiViewExecute(hview, 0); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiViewClose(hview); + ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); + r = MsiCloseHandle(hview); + ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); + + query = "INSERT INTO `drone` ( `id`, `name`, `number` )" + "VALUES('1', 'Abe', '8675309')"; + r = MsiDatabaseOpenView(hdb, query, &hview); + ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); + r = MsiViewExecute(hview, 0); + ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); + r = MsiViewClose(hview); + ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); + r = MsiCloseHandle(hview); + ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); + + r = MsiDatabaseGetPrimaryKeysA(hdb, "drone", &rec); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = MsiRecordGetInteger(rec, 0); + ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); + + sz = MAX_PATH; + lstrcpyA(buf, "apple"); + r = MsiRecordGetString(rec, 0, buf, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!lstrcmpA(buf, "drone"), "Expected \"drone\", got \"%s\"\n", buf); + ok(sz == 5, "Expectd 5, got %d\n", sz); + } + + r = MsiRecordIsNull(rec, 0); + todo_wine + { + ok(r == FALSE, "Expected FALSE, got %d\n", r); + } + + MsiCloseHandle(rec); + + query = "SELECT * FROM `drone` WHERE `id` = 1"; + r = MsiDatabaseOpenView(hdb, query, &hview); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiViewExecute(hview, 0); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiViewFetch(hview, &rec); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = MsiRecordGetInteger(rec, 0); + todo_wine + { + ok(r != MSI_NULL_INTEGER && r != 0, "Expected non-NULL value, got %d\n", r); + } + + r = MsiRecordIsNull(rec, 0); + todo_wine + { + ok(r == FALSE, "Expected FALSE, got %d\n", r); + } + + MsiCloseHandle(hdb); + DeleteFileA(msifile); +} + START_TEST(record) { test_msirecord(); test_MsiRecordGetString(); test_MsiRecordGetInteger(); + test_fieldzero(); }
1
0
0
0
James Hawkins : msi: Make sure a constant string's quotes match up.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 60ad75eade5b613b23f22f295d58d8450533a8c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60ad75eade5b613b23f22f295…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed Feb 25 19:43:54 2009 -0800 msi: Make sure a constant string's quotes match up. --- dlls/msi/sql.y | 31 +++++++++++++++++++------------ dlls/msi/tests/db.c | 5 ++++- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index 7deae21..0ddbc64 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -49,7 +49,7 @@ typedef struct tag_SQL_input struct list *mem; } SQL_input; -static LPWSTR SQL_getstring( void *info, const struct sql_str *str ); +static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str ); static INT SQL_getint( void *info ); static int sql_lex( void *SQL_lval, SQL_input *info ); @@ -677,8 +677,7 @@ table: id: TK_ID { - $$ = SQL_getstring( info, &$1 ); - if( !$$ ) + if ( SQL_getstring( info, &$1, &$$ ) != ERROR_SUCCESS || !$$ ) YYABORT; } ; @@ -757,11 +756,15 @@ static int sql_lex( void *SQL_lval, SQL_input *sql ) return token; } -LPWSTR SQL_getstring( void *info, const struct sql_str *strdata ) +UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str ) { LPCWSTR p = strdata->data; UINT len = strdata->len; - LPWSTR str; + + /* match quotes */ + if( ( (p[0]=='`') && (p[len-1]!='`') ) || + ( (p[0]=='\'') && (p[len-1]!='\'') ) ) + return ERROR_FUNCTION_FAILED; /* if there's quotes, remove them */ if( ( (p[0]=='`') && (p[len-1]=='`') ) || @@ -770,13 +773,13 @@ LPWSTR SQL_getstring( void *info, const struct sql_str *strdata ) p++; len -= 2; } - str = parser_alloc( info, (len + 1)*sizeof(WCHAR) ); - if( !str ) - return str; - memcpy( str, p, len*sizeof(WCHAR) ); - str[len]=0; + *str = parser_alloc( info, (len + 1)*sizeof(WCHAR) ); + if( !*str ) + return ERROR_OUTOFMEMORY; + memcpy( *str, p, len*sizeof(WCHAR) ); + (*str)[len]=0; - return str; + return ERROR_SUCCESS; } INT SQL_getint( void *info ) @@ -867,7 +870,11 @@ static struct expr * EXPR_sval( void *info, const struct sql_str *str ) if( e ) { e->type = EXPR_SVAL; - e->u.sval = SQL_getstring( info, str ); + if( SQL_getstring( info, str, (LPWSTR *)&e->u.sval ) != ERROR_SUCCESS ) + { + msi_free( e ); + return NULL; + } } return e; } diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index cb58de0..7629bc3 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -651,7 +651,10 @@ static void test_msibadqueries(void) ok(r == ERROR_SUCCESS , "query failed\n"); r = try_query( hdb, "select * from c where b = 'x"); - todo_wine ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); + ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); + + r = try_query( hdb, "select * from c where b = 'x'"); + ok(r == ERROR_SUCCESS, "query failed\n"); r = try_query( hdb, "select * from 'c'"); ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n");
1
0
0
0
Alexandre Julliard : makefiles: Avoid nested variable expansion that doesn' t work on BSD make.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: a67d80b4a6107f7301f399f1b14d19e277fa022c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a67d80b4a6107f7301f399f1b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 26 12:12:55 2009 +0100 makefiles: Avoid nested variable expansion that doesn't work on BSD make. --- dlls/Makedll.rules.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index c318bf2..ca9e972 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -10,7 +10,6 @@ DLLFLAGS = @DLLFLAGS@ DLLEXT = @DLLEXT@ -IMPLIBEXT = @IMPLIBEXT@ MINGWAR = @MINGWAR@ DEFS = -D__WINESRC__ $(EXTRADEFS) BASEMODULE = $(MODULE:%.dll=%) @@ -20,7 +19,7 @@ WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) ALL_OBJS = @WIN16_FILES@ $(OBJS) $(RC_SRCS:.rc=.res) ALL_LIBS = $(LIBPORT) $(EXTRALIBS) $(LDFLAGS) $(LIBS) IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o) -IMPORTLIBFILE = $(IMPORTLIB:%=lib%.$(IMPLIBEXT)) +IMPORTLIBFILE = $(IMPORTLIB:%=lib%.@IMPLIBEXT@) STATICIMPLIB = $(IMPORTLIBFILE:.def=.def.a) DLL_LDPATH = -L$(DLLDIR) $(DELAYIMPORTS:%=-L$(DLLDIR)/%) $(IMPORTS:%=-L$(DLLDIR)/%) INSTALLDIRS = $(DESTDIR)$(dlldir) $(DESTDIR)$(datadir)/wine
1
0
0
0
Jeremy White : sane.ds: Revise to match identity structures with partial information.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 3d0d1250247e238efd6b7c28dff120be596d61d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d0d1250247e238efd6b7c28d…
Author: Jeremy White <jwhite(a)codeweavers.com> Date: Wed Feb 25 20:58:51 2009 -0600 sane.ds: Revise to match identity structures with partial information. --- dlls/sane.ds/sane_main.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/sane.ds/sane_main.c b/dlls/sane.ds/sane_main.c index 413649e..3bd231e 100644 --- a/dlls/sane.ds/sane_main.c +++ b/dlls/sane.ds/sane_main.c @@ -645,19 +645,19 @@ static TW_UINT16 SANE_OpenDS( pTW_IDENTITY pOrigin, pTW_IDENTITY self) { /* To make string as short as above */ lstrcpynA(name, sane_devlist[i]->vendor, sizeof(name)-1); - if (strcmp(name, self->Manufacturer)) + if (self->Manufacturer && *self->Manufacturer && strcmp(name, self->Manufacturer)) continue; lstrcpynA(name, sane_devlist[i]->model, sizeof(name)-1); - if (strcmp(name, self->ProductFamily)) + if (self->ProductFamily && *self->ProductFamily && strcmp(name, self->ProductFamily)) continue; copy_sane_short_name(sane_devlist[i]->name, name, sizeof(name) - 1); - if (strcmp(name, self->ProductName)) + if (self->ProductName && *self->ProductName && strcmp(name, self->ProductName)) continue; break; } if (!sane_devlist[i]) { - FIXME("Scanner not found? Using first one!\n"); - i=0; + FIXME("Scanner not found.\n"); + return TWRC_FAILURE; } status = psane_open(sane_devlist[i]->name,&activeDS.deviceHandle); if (status == SANE_STATUS_GOOD) {
1
0
0
0
Jeremy White : sane.ds: Fully support ICAP_PIXELTYPE.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 00f9ef0f4fb1603a5b6d1c2019358f090c4dac2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00f9ef0f4fb1603a5b6d1c201…
Author: Jeremy White <jwhite(a)codeweavers.com> Date: Wed Feb 25 20:58:42 2009 -0600 sane.ds: Fully support ICAP_PIXELTYPE. --- dlls/sane.ds/capability.c | 144 ++++++++++++++++++++++++++++++++++++++++++--- dlls/sane.ds/options.c | 40 +++++++++++++ dlls/sane.ds/sane_i.h | 6 ++- 3 files changed, 180 insertions(+), 10 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=00f9ef0f4fb1603a5b6d1…
1
0
0
0
Jeremy White : sane.ds: Added support for ICAP_UNITS.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: f75b5ebba6f4caf24ca69a91a6a5bf283e7380d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f75b5ebba6f4caf24ca69a91a…
Author: Jeremy White <jwhite(a)codeweavers.com> Date: Wed Feb 25 20:58:34 2009 -0600 sane.ds: Added support for ICAP_UNITS. --- dlls/sane.ds/capability.c | 49 ++++++++++++++++++++++++++++++++++++++++++++- dlls/twain_32/tests/dsm.c | 7 +++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c index bbd0590..f8a300c 100644 --- a/dlls/sane.ds/capability.c +++ b/dlls/sane.ds/capability.c @@ -154,7 +154,7 @@ static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability) { TW_ARRAY *a; static const UINT16 supported_caps[] = { CAP_SUPPORTEDCAPS, CAP_XFERCOUNT, CAP_UICONTROLLABLE, - ICAP_XFERMECH, ICAP_PIXELTYPE, ICAP_BITDEPTH, ICAP_COMPRESSION, ICAP_PIXELFLAVOR, + ICAP_XFERMECH, ICAP_PIXELTYPE, ICAP_UNITS, ICAP_BITDEPTH, ICAP_COMPRESSION, ICAP_PIXELFLAVOR, ICAP_XRESOLUTION, ICAP_YRESOLUTION }; pCapability->hContainer = GlobalAlloc (0, FIELD_OFFSET( TW_ARRAY, ItemList[sizeof(supported_caps)] )); @@ -311,6 +311,49 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio return twCC; } +/* ICAP_UNITS */ +static TW_UINT16 SANE_ICAPUnits (pTW_CAPABILITY pCapability, TW_UINT16 action) +{ + TW_UINT32 val; + TW_UINT16 twCC = TWCC_BADCAP; + + TRACE("ICAP_UNITS\n"); + + switch (action) + { + case MSG_QUERYSUPPORT: + twCC = set_onevalue(pCapability, TWTY_INT32, + TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET ); + break; + + case MSG_GET: + twCC = set_onevalue(pCapability, TWTY_UINT16, TWUN_INCHES); + break; + + case MSG_SET: + twCC = msg_set(pCapability, &val); + if (twCC == TWCC_SUCCESS) + { + if (val != TWUN_INCHES) + { + ERR("Sane supports only SANE_UNIT_DPI\n"); + twCC = TWCC_BADVALUE; + } + } + break; + + case MSG_GETDEFAULT: + case MSG_RESET: + /* .. fall through intentional .. */ + + case MSG_GETCURRENT: + twCC = set_onevalue(pCapability, TWTY_UINT16, TWUN_INCHES); + break; + } + + return twCC; +} + /* ICAP_BITDEPTH */ static TW_UINT16 SANE_ICAPBitDepth(pTW_CAPABILITY pCapability, TW_UINT16 action) { @@ -581,6 +624,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) twCC = SANE_ICAPPixelType (pCapability, action); break; + case ICAP_UNITS: + twCC = SANE_ICAPUnits (pCapability, action); + break; + case ICAP_BITDEPTH: twCC = SANE_ICAPBitDepth(pCapability, action); break; diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c index 9e7dd8d..fb438ab 100644 --- a/dlls/twain_32/tests/dsm.c +++ b/dlls/twain_32/tests/dsm.c @@ -109,6 +109,9 @@ static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, TW_ONEVALUE *onev = (TW_ONEVALUE *) p; ok(onev->Item == orig_value || !(actual_support & TWQC_GETCURRENT), "MSG_GET of 0x%x returned 0x%x, expecting 0x%x\n", pCapability->Cap, onev->Item, orig_value); + trace("MSG_GET of 0x%x returned val 0x%x, type %d\n", pCapability->Cap, onev->Item, onev->ItemType); + if (suggested_set_value) + *suggested_set_value = onev->Item; } else if (pCapability->ConType == TWON_ENUMERATION) { @@ -473,8 +476,10 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) if (capabilities[ICAP_PIXELTYPE]) test_onevalue_cap(appid, source, ICAP_PIXELTYPE, TWTY_UINT16, TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - todo_wine ok(capabilities[ICAP_UNITS], "ICAP_UNITS not supported\n"); + if (capabilities[ICAP_UNITS]) + test_onevalue_cap(appid, source, ICAP_UNITS, TWTY_UINT16, + TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); ok(capabilities[ICAP_XFERMECH], "ICAP_XFERMECH not supported\n"); if (capabilities[ICAP_XFERMECH]) test_onevalue_cap(appid, source, ICAP_XFERMECH, TWTY_UINT16,
1
0
0
0
Jeremy White : sane.ds: Add support for ICAP_BITDEPTH.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 982482e7e8129197a509c4152facd61d8f9b5822 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=982482e7e8129197a509c4152…
Author: Jeremy White <jwhite(a)codeweavers.com> Date: Wed Feb 25 20:58:25 2009 -0600 sane.ds: Add support for ICAP_BITDEPTH. --- dlls/sane.ds/capability.c | 40 +++++++++++++++++++++++++++++++++++++++- dlls/twain_32/tests/dsm.c | 4 +++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c index 1d574e3..bbd0590 100644 --- a/dlls/sane.ds/capability.c +++ b/dlls/sane.ds/capability.c @@ -154,7 +154,7 @@ static TW_UINT16 TWAIN_GetSupportedCaps(pTW_CAPABILITY pCapability) { TW_ARRAY *a; static const UINT16 supported_caps[] = { CAP_SUPPORTEDCAPS, CAP_XFERCOUNT, CAP_UICONTROLLABLE, - ICAP_XFERMECH, ICAP_PIXELTYPE, ICAP_COMPRESSION, ICAP_PIXELFLAVOR, + ICAP_XFERMECH, ICAP_PIXELTYPE, ICAP_BITDEPTH, ICAP_COMPRESSION, ICAP_PIXELFLAVOR, ICAP_XRESOLUTION, ICAP_YRESOLUTION }; pCapability->hContainer = GlobalAlloc (0, FIELD_OFFSET( TW_ARRAY, ItemList[sizeof(supported_caps)] )); @@ -311,6 +311,40 @@ static TW_UINT16 SANE_ICAPPixelType (pTW_CAPABILITY pCapability, TW_UINT16 actio return twCC; } +/* ICAP_BITDEPTH */ +static TW_UINT16 SANE_ICAPBitDepth(pTW_CAPABILITY pCapability, TW_UINT16 action) +{ + TW_UINT16 twCC = TWCC_BADCAP; +#ifdef SONAME_LIBSANE + TW_UINT32 possible_values[1]; + + TRACE("ICAP_BITDEPTH\n"); + + possible_values[0] = activeDS.sane_param.depth; + + switch (action) + { + case MSG_QUERYSUPPORT: + twCC = set_onevalue(pCapability, TWTY_INT32, + TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT ); + break; + + case MSG_GET: + twCC = msg_get_enum(pCapability, possible_values, sizeof(possible_values) / sizeof(possible_values[0]), + TWTY_UINT16, activeDS.sane_param.depth, activeDS.sane_param.depth); + break; + + case MSG_GETDEFAULT: + /* .. Fall through intentional .. */ + + case MSG_GETCURRENT: + twCC = set_onevalue(pCapability, TWTY_UINT16, activeDS.sane_param.depth); + break; + } +#endif + return twCC; +} + /* CAP_UICONTROLLABLE */ static TW_UINT16 SANE_CAPUiControllable(pTW_CAPABILITY pCapability, TW_UINT16 action) { @@ -547,6 +581,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) twCC = SANE_ICAPPixelType (pCapability, action); break; + case ICAP_BITDEPTH: + twCC = SANE_ICAPBitDepth(pCapability, action); + break; + case ICAP_XFERMECH: twCC = SANE_ICAPXferMech (pCapability, action); break; diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c index 54641c1..9e7dd8d 100644 --- a/dlls/twain_32/tests/dsm.c +++ b/dlls/twain_32/tests/dsm.c @@ -463,8 +463,10 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) Sources that supply image information must support DG_CONTROL / DAT_CAPABILITY / MSG_GET, MSG_GETCURRENT, MSG_GETDEFAULT, MSG_RESET and MSG_SET on: */ - todo_wine ok(capabilities[ICAP_BITDEPTH], "ICAP_BITDEPTH not supported\n"); + if (capabilities[ICAP_BITDEPTH]) + test_onevalue_cap(appid, source, ICAP_BITDEPTH, TWTY_UINT16, + TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT ); todo_wine ok(capabilities[ICAP_BITORDER], "ICAP_BITORDER not supported\n"); ok(capabilities[ICAP_PIXELTYPE], "ICAP_PIXELTYPE not supported\n");
1
0
0
0
Vincent Povirk : shell32: Add a message for opening files with no association.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 8e4aff7a4d7c8bc8c710d1c3347025a83daf19f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e4aff7a4d7c8bc8c710d1c33…
Author: Vincent Povirk <madewokherd+8cd9(a)gmail.com> Date: Wed Feb 25 19:14:30 2009 -0600 shell32: Add a message for opening files with no association. --- dlls/shell32/shell32_En.rc | 2 ++ dlls/shell32/shlexec.c | 6 +++++- dlls/shell32/shresdef.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index f752e6d..d7fa7c3 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -282,6 +282,8 @@ STRINGTABLE IDS_CPANEL_TITLE "Wine Control Panel" IDS_CPANEL_NAME "Name" IDS_CPANEL_DESCRIPTION "Description" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." } STRINGTABLE diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 1fbaabb..67815ca 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -45,6 +45,7 @@ #include "wine/winbase16.h" #include "shell32_main.h" #include "pidl.h" +#include "shresdef.h" #include "wine/debug.h" @@ -1454,7 +1455,10 @@ static void do_error_dialog( UINT_PTR retval, HWND hwnd ) WCHAR msg[2048]; int error_code=GetLastError(); - FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL); + if (retval == SE_ERR_NOASSOC) + LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, sizeof(msg)/sizeof(WCHAR)); + else + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL); MessageBoxW(hwnd, msg, NULL, MB_ICONERROR); } diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index 6353623..01ec977 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -106,6 +106,8 @@ #define IDS_RUNDLG_BROWSE_CAPTION 162 #define IDS_RUNDLG_BROWSE_FILTER 163 +#define IDS_SHLEXEC_NOASSOC 164 + #define IDS_LICENSE 256 #define IDS_LICENSE_CAPTION 257
1
0
0
0
Jacek Caban : urlmon: Make HttpProtocol implementation vtbl offset independent.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 6e5c2f961d7b883bc8f696bad280e1e239635102 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e5c2f961d7b883bc8f696bad…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 26 01:47:24 2009 +0100 urlmon: Make HttpProtocol implementation vtbl offset independent. --- dlls/urlmon/http.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c index 9bb4ffa..bbad056 100644 --- a/dlls/urlmon/http.c +++ b/dlls/urlmon/http.c @@ -77,6 +77,9 @@ typedef struct { LONG ref; } HttpProtocol; +#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) +#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) + /* Default headers from native */ static const WCHAR wszHeaders[] = {'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g', ':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0}; @@ -186,10 +189,10 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback( if (This->grfBINDF & BINDF_FROMURLMON) IInternetProtocolSink_Switch(This->protocol_sink, &data); else - IInternetProtocol_Continue((IInternetProtocol *)This, &data); + IInternetProtocol_Continue(PROTOCOL(This), &data); return; case INTERNET_STATUS_HANDLE_CREATED: - IInternetProtocol_AddRef((IInternetProtocol *)This); + IInternetProtocol_AddRef(PROTOCOL(This)); return; case INTERNET_STATUS_HANDLE_CLOSING: if (*(HINTERNET *)lpvStatusInformation == This->connect) @@ -210,7 +213,7 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback( memset(&This->bind_info, 0, sizeof(This->bind_info)); } } - IInternetProtocol_Release((IInternetProtocol *)This); + IInternetProtocol_Release(PROTOCOL(This)); return; default: WARN("Unhandled Internet status callback %d\n", dwInternetStatus); @@ -236,9 +239,6 @@ static inline LPWSTR strndupW(LPCWSTR string, int len) * Interface implementations */ -#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) -#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) - #define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, InternetProtocol, iface) static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
1
0
0
0
Detlef Riekenberg : shdocvw/tests: Dump the guid for additional interfaces.
by Alexandre Julliard
26 Feb '09
26 Feb '09
Module: wine Branch: master Commit: 6b505e14255ce24369bc1265563b6c365dc3a3aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b505e14255ce24369bc12655…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Feb 26 00:20:00 2009 +0100 shdocvw/tests: Dump the guid for additional interfaces. --- dlls/shdocvw/tests/webbrowser.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 2f1c7d7..c6c204a 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -1290,6 +1290,9 @@ static HRESULT QueryInterface(REFIID riid, void **ppv) if(*ppv) return S_OK; + /* are there more interfaces, that a host can support? */ + trace("%s: interface not supported\n", debugstr_guid(riid)); + return E_NOINTERFACE; }
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
97
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
Results per page:
10
25
50
100
200