winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2024
----- 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
519 discussions
Start a n
N
ew thread
Hans Leidekker : odbc32: Implement SQLGetInfo(SQL_ODBC_VER).
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: ea2dfd1c14942ada174b3e425f90fd13721183d6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ea2dfd1c14942ada174b3e425f90fd…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 14:02:23 2024 +0200 odbc32: Implement SQLGetInfo(SQL_ODBC_VER). --- dlls/odbc32/proxyodbc.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/odbc32/tests/odbc32.c | 22 ++++++++++++---------- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 925abcfc063..c48e9c60917 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -1823,6 +1823,25 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL if (!handle) return SQL_INVALID_HANDLE; + switch (InfoType) + { + case SQL_ODBC_VER: + { + const char version[] = "03.80.0000"; + int len = sizeof(version); + char *value = InfoValue; + + if (StringLength) *StringLength = len; + if (value && BufferLength >= len) + { + strcpy( value, version ); + if (StringLength) *StringLength = len - 1; + } + return SQL_SUCCESS; + } + default: break; + } + if (handle->unix_handle) { struct SQLGetInfo_params params = { handle->unix_handle, InfoType, InfoValue, BufferLength, StringLength }; @@ -4122,6 +4141,25 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ if (!handle) return SQL_INVALID_HANDLE; + switch (InfoType) + { + case SQL_ODBC_VER: + { + const WCHAR version[] = L"03.80.0000"; + int len = ARRAY_SIZE(version); + WCHAR *value = InfoValue; + + if (StringLength) *StringLength = len; + if (value && BufferLength >= len) + { + wcscpy( value, version ); + if (StringLength) *StringLength = len - 1; + } + return SQL_SUCCESS; + } + default: break; + } + if (handle->unix_handle) { struct SQLGetInfoW_params params = { handle->unix_handle, InfoType, InfoValue, BufferLength, StringLength }; diff --git a/dlls/odbc32/tests/odbc32.c b/dlls/odbc32/tests/odbc32.c index 01b8795e86e..8282e5a47ea 100644 --- a/dlls/odbc32/tests/odbc32.c +++ b/dlls/odbc32/tests/odbc32.c @@ -107,6 +107,18 @@ static void test_SQLConnect( void ) ret = SQLAllocConnect( env, &con ); ok( ret == SQL_SUCCESS, "got %d\n", ret ); + len = -1; + ret = SQLGetInfo( con, SQL_ODBC_VER, NULL, 0, &len ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( len != -1, "len not set\n" ); + + memset( str, 0, sizeof(str) ); + ret = SQLGetInfo( con, SQL_ODBC_VER, str, sizeof(str), &len ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( str[0], "empty string\n" ); + ok( len == strlen(str), "got %d\n", len ); + trace( "version %s\n", str ); + ret = SQLConnect( con, (SQLCHAR *)"winetest", 8, (SQLCHAR *)"winetest", 8, (SQLCHAR *)"winetest", 8 ); if (ret == SQL_ERROR) diag( con, SQL_HANDLE_DBC ); if (ret != SQL_SUCCESS) @@ -124,16 +136,6 @@ static void test_SQLConnect( void ) ok( timeout != 0xdeadbeef, "timeout not set\n" ); ok( size == -1, "size set\n" ); - len = -1; - memset( str, 0, sizeof(str) ); - ret = SQLGetInfo( con, SQL_ODBC_VER, str, sizeof(str), &len ); - if (ret == SQL_SUCCESS) - { - ok( str[0], "empty string\n" ); - ok( len != -1, "len not set\n" ); - trace( "version %s\n", str ); - } - ret = SQLDisconnect( con ); ok( ret == SQL_SUCCESS, "got %d\n", ret );
1
0
0
0
Hans Leidekker : odbc32: Default to ODBC version 2.
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: 54aea36777b952fed8f43f2ad1426aa235ada14f URL:
https://gitlab.winehq.org/wine/wine/-/commit/54aea36777b952fed8f43f2ad1426a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 12:50:02 2024 +0200 odbc32: Default to ODBC version 2. --- dlls/odbc32/proxyodbc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 5dc8e8649ce..925abcfc063 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -385,6 +385,7 @@ static struct handle *create_handle( struct handle *parent ) struct handle *ret; if (!(ret = calloc( 1, sizeof(*ret) ))) return NULL; ret->parent = parent; + ret->env_attr_version = SQL_OV_ODBC2; ret->row_count = 1; return ret; }
1
0
0
0
Hans Leidekker : odbc32: Handle options in SQLFreeStmt().
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: 63718306e92e7415dcf483192ed35555ae059596 URL:
https://gitlab.winehq.org/wine/wine/-/commit/63718306e92e7415dcf483192ed355…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 12:03:44 2024 +0200 odbc32: Handle options in SQLFreeStmt(). --- dlls/odbc32/proxyodbc.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index d1c1a7cfadd..5dc8e8649ce 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -1377,17 +1377,23 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) return ret; } -static void free_bindings( struct handle *handle ) +static void free_col_bindings( struct handle *handle ) { if (handle->bind_col.param) { free( handle->bind_col.param->len ); free( handle->bind_col.param ); + handle->bind_col.param = NULL; } +} + +static void free_param_bindings( struct handle *handle ) +{ if (handle->bind_parameter.param) { free( handle->bind_parameter.param->len ); free( handle->bind_parameter.param ); + handle->bind_parameter.param = NULL; } } @@ -1407,7 +1413,6 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) { struct SQLFreeHandle_params params = { HandleType, handle->unix_handle }; ret = ODBC_CALL( SQLFreeHandle, ¶ms ); - free_bindings( handle ); } else if (handle->win32_handle) { @@ -1416,6 +1421,8 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) RegCloseKey( handle->drivers_key ); RegCloseKey( handle->sources_key ); + free_col_bindings( handle ); + free_param_bindings( handle ); free( handle ); TRACE("Returning %d\n", ret); @@ -1438,14 +1445,32 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) { struct SQLFreeStmt_params params = { handle->unix_handle, Option }; ret = ODBC_CALL( SQLFreeStmt, ¶ms ); - free_bindings( handle ); } else if (handle->win32_handle) { ret = handle->win32_funcs->SQLFreeStmt( handle->win32_handle, Option ); } - free( handle ); + switch (Option) + { + case SQL_CLOSE: + break; + + case SQL_UNBIND: + free_col_bindings( handle ); + break; + + case SQL_RESET_PARAMS: + free_param_bindings( handle ); + break; + + case SQL_DROP: + default: + free_col_bindings( handle ); + free_param_bindings( handle ); + free( handle ); + break; + } TRACE("Returning %d\n", ret); return ret;
1
0
0
0
Hans Leidekker : odbc32: Stub SQLGetEnvAttr(SQL_ATTR_CONNECTION_POOLING).
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: dc8f4729114eb2c548df5ca1083d673e3525bca7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/dc8f4729114eb2c548df5ca1083d67…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 11:47:16 2024 +0200 odbc32: Stub SQLGetEnvAttr(SQL_ATTR_CONNECTION_POOLING). --- dlls/odbc32/proxyodbc.c | 4 ++++ dlls/odbc32/tests/odbc32.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index c9db219c203..d1c1a7cfadd 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -1738,6 +1738,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, { switch (Attribute) { + case SQL_ATTR_CONNECTION_POOLING: + *(SQLINTEGER *)Value = SQL_CP_OFF; + break; + case SQL_ATTR_ODBC_VERSION: *(SQLINTEGER *)Value = handle->env_attr_version; break; diff --git a/dlls/odbc32/tests/odbc32.c b/dlls/odbc32/tests/odbc32.c index 0288260d3d3..01b8795e86e 100644 --- a/dlls/odbc32/tests/odbc32.c +++ b/dlls/odbc32/tests/odbc32.c @@ -82,7 +82,7 @@ static void test_SQLConnect( void ) SQLHENV env; SQLHDBC con; SQLRETURN ret; - SQLINTEGER size, version; + SQLINTEGER size, version, pooling; SQLUINTEGER timeout; SQLSMALLINT len; char str[32]; @@ -99,6 +99,11 @@ static void test_SQLConnect( void ) ok( size == -1, "size set\n" ); trace( "ODBC version %d\n", version ); + pooling = -1; + ret = SQLGetEnvAttr( env, SQL_ATTR_CONNECTION_POOLING, &pooling, sizeof(pooling), NULL ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( !pooling, "got %d\n", pooling ); + ret = SQLAllocConnect( env, &con ); ok( ret == SQL_SUCCESS, "got %d\n", ret );
1
0
0
0
Hans Leidekker : odbc32: Implement SQLGet/SetConnectAttr(SQL_ATTR_CONNECTION_TIMEOUT).
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: 58bfc9ce7b0c5bdc68f28e60811901cb5869b681 URL:
https://gitlab.winehq.org/wine/wine/-/commit/58bfc9ce7b0c5bdc68f28e60811901…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 11:33:13 2024 +0200 odbc32: Implement SQLGet/SetConnectAttr(SQL_ATTR_CONNECTION_TIMEOUT). --- dlls/odbc32/proxyodbc.c | 24 +++++++++++++++++++++--- dlls/odbc32/unixlib.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 1e2bd0db2f6..c9db219c203 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -816,10 +816,11 @@ static SQLRETURN set_env_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTE return ret; } +#define INT_PTR(val) (SQLPOINTER)(ULONG_PTR)val static SQLRETURN prepare_env( struct handle *handle ) { SQLRETURN ret; - if ((ret = set_env_attr( handle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)(ULONG_PTR)handle->env_attr_version, 0 ))) + if ((ret = set_env_attr( handle, SQL_ATTR_ODBC_VERSION, INT_PTR(handle->env_attr_version), 0 ))) return ret; return SQL_SUCCESS; } @@ -843,8 +844,9 @@ static SQLRETURN set_con_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTE static SQLRETURN prepare_con( struct handle *handle ) { SQLRETURN ret; - if ((ret = set_con_attr( handle, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER)(ULONG_PTR)handle->con_attr_login_timeout, 0 ))) - return ret; + + if ((ret = set_con_attr( handle, SQL_ATTR_CONNECTION_TIMEOUT, INT_PTR(handle->con_attr_con_timeout), 0 ))) return ret; + if ((ret = set_con_attr( handle, SQL_ATTR_LOGIN_TIMEOUT, INT_PTR(handle->con_attr_login_timeout), 0 ))) return ret; return SQL_SUCCESS; } @@ -1478,6 +1480,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut { switch (Attribute) { + case SQL_ATTR_CONNECTION_TIMEOUT: + *(SQLINTEGER *)Value = handle->con_attr_con_timeout; + break; + case SQL_ATTR_LOGIN_TIMEOUT: *(SQLINTEGER *)Value = handle->con_attr_login_timeout; break; @@ -2050,6 +2056,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut { switch (Attribute) { + case SQL_ATTR_CONNECTION_TIMEOUT: + handle->con_attr_con_timeout = (UINT32)(ULONG_PTR)Value; + break; + case SQL_ATTR_LOGIN_TIMEOUT: handle->con_attr_login_timeout = (UINT32)(ULONG_PTR)Value; break; @@ -3706,6 +3716,10 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu { switch (Attribute) { + case SQL_ATTR_CONNECTION_TIMEOUT: + *(SQLINTEGER *)Value = handle->con_attr_con_timeout; + break; + case SQL_ATTR_LOGIN_TIMEOUT: *(SQLINTEGER *)Value = handle->con_attr_login_timeout; break; @@ -3909,6 +3923,10 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu { switch (Attribute) { + case SQL_ATTR_CONNECTION_TIMEOUT: + handle->con_attr_con_timeout = (UINT32)(ULONG_PTR)Value; + break; + case SQL_ATTR_LOGIN_TIMEOUT: handle->con_attr_login_timeout = (UINT32)(ULONG_PTR)Value; break; diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h index c26317012b5..4241d06c892 100644 --- a/dlls/odbc32/unixlib.h +++ b/dlls/odbc32/unixlib.h @@ -192,6 +192,7 @@ struct handle struct handle *parent; /* attributes */ UINT32 env_attr_version; + UINT32 con_attr_con_timeout; UINT32 con_attr_login_timeout; /* drivers and data sources */ UINT32 drivers_idx;
1
0
0
0
Hans Leidekker : odbc32: Implement SQLGet/SetConnectAttr(SQL_ATTR_LOGIN_TIMEOUT).
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: 6cecc4e029a485bf291c16717de360a10bf275c5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6cecc4e029a485bf291c16717de360…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jul 10 11:13:45 2024 +0200 odbc32: Implement SQLGet/SetConnectAttr(SQL_ATTR_LOGIN_TIMEOUT). --- dlls/odbc32/proxyodbc.c | 98 ++++++++++++++++++++++++++++++++++++++++++++-- dlls/odbc32/tests/odbc32.c | 30 ++++++++++++++ dlls/odbc32/unixlib.h | 1 + 3 files changed, 126 insertions(+), 3 deletions(-)
1
0
0
0
Matthias Gorzellik : winebus.sys: Align logical max of angles to physical max defined in dinput.
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: b32fa2364314bfa38910719e3fae7605b8db94e1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b32fa2364314bfa38910719e3fae76…
Author: Matthias Gorzellik <matthias.gorzellik(a)gmail.com> Date: Wed Jul 10 16:34:02 2024 +0200 winebus.sys: Align logical max of angles to physical max defined in dinput. --- dlls/winebus.sys/hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index d31718c6293..78efe6116ce 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -600,7 +600,7 @@ static BOOL hid_descriptor_add_set_periodic(struct unix_device *iface) UNIT(1, 0x14), /* Eng Rot:Angular Pos */ UNIT_EXPONENT(1, -2), LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(4, 36000), + LOGICAL_MAXIMUM(4, 35900), REPORT_SIZE(1, 16), REPORT_COUNT(1, 1), OUTPUT(1, Data|Var|Abs), @@ -960,7 +960,7 @@ BOOL hid_device_add_physical(struct unix_device *iface, USAGE *usages, USHORT co UNIT(1, 0x14), /* Eng Rot:Angular Pos */ UNIT_EXPONENT(1, -2), LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(4, 36000), + LOGICAL_MAXIMUM(4, 35900), REPORT_SIZE(1, 16), REPORT_COUNT(1, 2), OUTPUT(1, Data|Var|Abs),
1
0
0
0
Matthias Gorzellik : winebus.sys: Fix rotation for angles < 90deg.
by Alexandre Julliard
12 Jul '24
12 Jul '24
Module: wine Branch: master Commit: 415d7098febfbc80b6239c0873837e94552de90b URL:
https://gitlab.winehq.org/wine/wine/-/commit/415d7098febfbc80b6239c0873837e…
Author: Matthias Gorzellik <matthias.gorzellik(a)gmail.com> Date: Wed Jul 10 15:57:32 2024 +0200 winebus.sys: Fix rotation for angles < 90deg. --- dlls/winebus.sys/bus_sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 2a60f112a83..71f91162fb1 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -661,7 +661,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT struct sdl_device *impl = impl_from_unix_device(iface); int id = impl->effect_ids[index]; SDL_HapticEffect effect = {0}; - UINT16 direction; + INT16 direction; NTSTATUS status; TRACE("iface %p, index %u, params %p.\n", iface, index, params); @@ -672,6 +672,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT /* The first direction we get from PID is in polar coordinate space, so we need to * remove 90° to make it match SDL spherical coordinates. */ direction = (params->direction[0] - 9000) % 36000; + if (direction < 0) direction += 36000; switch (params->effect_type) {
1
0
0
0
Eric Pouech : cmd: Fix a couple of issues with redirections.
by Alexandre Julliard
11 Jul '24
11 Jul '24
Module: wine Branch: master Commit: 957995c1c6e608b449a94c7c0bee7485a7eb174d URL:
https://gitlab.winehq.org/wine/wine/-/commit/957995c1c6e608b449a94c7c0bee74…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Thu Jul 11 09:46:16 2024 +0200 cmd: Fix a couple of issues with redirections. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/tests/test_builtins.cmd | 14 ++++++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 6 ++++-- programs/cmd/wcmdmain.c | 30 +++++++++++++++++++----------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 66d5e894662..c67fc84988a 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -217,6 +217,20 @@ type C (if 1==0 (echo A) else echo B) > C type C (if 1==0 (echo A > B) else echo C) +echo --- multiredirections +erase /q a b & (echo >a >b) +if exist a echo a shouldn't exist +if not exist b echo b should exist +erase /q a b & (echo >a >>b) +if exist a echo a shouldn't exist +if not exist b echo b should exist +erase /q a b & (echo >a | (echo b > b)) +if not exist a echo a should exist +if not exist b echo b should exist +erase /q a b & (echo cc1 2>a 1>&2 2>b) +if exist a echo a shouldn't exist +if not exist b (echo b should exist) else (echo cc2 & type b) + cd .. & rd /s/q foobar echo ------------ Testing circumflex escape character ------------ diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index a96c7dde10b..84bcdcdf581 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -202,8 +202,8 @@ fooc@space@ food1 food2 food21 -@todo_wine@foo7@space@@space@@or_broken@not supported@space@ -@todo_wine@foo@or_broken@not supported +foo7@space@@space@@or_broken@not supported@space@ +foo@or_broken@not supported --- redirect at beginning of line foo foo1 @@ -229,6 +229,8 @@ foo A B C +--- multiredirections +cc2@space@ ------------ Testing circumflex escape character ------------ hello, world hello, world diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index eee9270582c..5f55e4c8d9e 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1649,12 +1649,6 @@ RETURN_CODE WCMD_run_program(WCHAR *command, BOOL called) return ERROR_INVALID_FUNCTION; } -/* this is obviously wrong... will require more work to be fixed */ -static inline unsigned clamp_fd(unsigned fd) -{ - return fd <= 2 ? fd : 1; -} - static BOOL set_std_redirections(CMD_REDIRECTION *redir) { static DWORD std_index[3] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE}; @@ -1664,6 +1658,12 @@ static BOOL set_std_redirections(CMD_REDIRECTION *redir) for (; redir; redir = redir->next) { + CMD_REDIRECTION *next; + + /* if we have several elements changing same std stream, only use last one */ + for (next = redir->next; next; next = next->next) + if (redir->fd == next->fd) break; + if (next) continue; switch (redir->kind) { case REDIR_READ_FROM: @@ -1697,17 +1697,26 @@ static BOOL set_std_redirections(CMD_REDIRECTION *redir) } break; case REDIR_WRITE_CLONE: + if (redir->clone > 2 || redir->clone == redir->fd) + { + WARN("Can't duplicate %d from %d\n", redir->fd, redir->clone); + return FALSE; + } if (!DuplicateHandle(GetCurrentProcess(), - GetStdHandle(std_index[clamp_fd(redir->clone)]), + GetStdHandle(std_index[redir->clone]), GetCurrentProcess(), &h, 0, TRUE, DUPLICATE_SAME_ACCESS)) { WARN("Duplicating handle failed with gle %ld\n", GetLastError()); + return FALSE; } break; } - SetStdHandle(std_index[clamp_fd(redir->fd)], h); + if (redir->fd > 2) + CloseHandle(h); + else + SetStdHandle(std_index[redir->fd], h); } return TRUE; } @@ -3654,10 +3663,9 @@ RETURN_CODE node_execute(CMD_NODE *node) if (!set_std_redirections(node->redirects)) { WCMD_print_error(); - /* FIXME potentially leaking here (if first redir created ok, and second failed */ - return ERROR_INVALID_FUNCTION; + return_code = ERROR_INVALID_FUNCTION; } - switch (node->op) + else switch (node->op) { case CMD_SINGLE: if (node->command[0] != ':')
1
0
0
0
Eric Pouech : cmd: When parsing, dispose created objects on error path.
by Alexandre Julliard
11 Jul '24
11 Jul '24
Module: wine Branch: master Commit: f1bbe6f252d44dbac93da507bd7a6631f2e73c3a URL:
https://gitlab.winehq.org/wine/wine/-/commit/f1bbe6f252d44dbac93da507bd7a66…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Jul 10 15:37:30 2024 +0200 cmd: When parsing, dispose created objects on error path. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/wcmdmain.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 66ae1c145d9..eee9270582c 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2316,6 +2316,7 @@ static BOOL node_builder_parse(struct node_builder *builder, unsigned precedence CMD_REDIRECTION *redir = NULL; unsigned bogus_line; CMD_NODE *left = NULL, *right; + CMD_FOR_CONTROL *for_ctrl = NULL; union token_parameter pmt; enum builder_token tkn; BOOL done; @@ -2326,7 +2327,7 @@ static BOOL node_builder_parse(struct node_builder *builder, unsigned precedence tkn = node_builder_peek_next_token(builder, &pmt); done = FALSE; - TRACE("\t%u/%u) %s", builder->pos, builder->num, debugstr_token(tkn, pmt)); + TRACE("\t%u/%u) %s\n", builder->pos, builder->num, debugstr_token(tkn, pmt)); switch (tkn) { case TKN_EOF: @@ -2470,7 +2471,6 @@ static BOOL node_builder_parse(struct node_builder *builder, unsigned precedence ERROR_IF(left); ERROR_IF(redir); { - CMD_FOR_CONTROL *for_ctrl; CMD_NODE *do_block; node_builder_consume(builder); @@ -2506,13 +2506,10 @@ static BOOL node_builder_parse(struct node_builder *builder, unsigned precedence } node_builder_consume(builder); } while (tkn != TKN_CLOSEPAR); - if (!node_builder_expect_token(builder, TKN_DO) || - !node_builder_parse(builder, 0, &do_block)) - { - for_control_dispose(for_ctrl); - ERROR_IF(TRUE); - } + ERROR_IF(!node_builder_expect_token(builder, TKN_DO)); + ERROR_IF(!node_builder_parse(builder, 0, &do_block)); left = node_create_for(for_ctrl, do_block); + for_ctrl = NULL; } break; case TKN_REDIRECTION: @@ -2529,6 +2526,7 @@ error_handling: TRACE("Parser failed at line %u:token %s\n", bogus_line, debugstr_token(tkn, pmt)); node_dispose_tree(left); redirection_dispose_list(redir); + if (for_ctrl) for_control_dispose(for_ctrl); return FALSE; }
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
52
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
Results per page:
10
25
50
100
200