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 2007
----- 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
957 discussions
Start a n
N
ew thread
Jacek Caban : mshtml.idl: Added some missing attributes.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: d221915037a8f73cae673b7e19054f83308ffa61 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d221915037a8f73cae673b7e1…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 29 21:21:18 2007 +0200 mshtml.idl: Added some missing attributes. --- include/mshtml.idl | 669 ++++++++++++++++++++++++++-------------------------- 1 files changed, 335 insertions(+), 334 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d221915037a8f73cae673…
1
0
0
0
Jacek Caban : widl: Reorder switch cases to keep alphabetical order.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: ae0beb224ba12b92b582f5eab31c5f16c5f84cd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae0beb224ba12b92b582f5eab…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 29 21:24:32 2007 +0200 widl: Reorder switch cases to keep alphabetical order. --- tools/widl/write_msft.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index c50378e..920ca2b 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1311,6 +1311,9 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int if (func->def->attrs) LIST_FOR_EACH_ENTRY( attr, func->def->attrs, const attr_t, entry ) { expr_t *expr = attr->u.pval; switch(attr->type) { + case ATTR_BINDABLE: + funcflags |= 0x4; /* FUNCFLAG_BINDABLE */ + break; case ATTR_DISPLAYBIND: funcflags |= 0x10; /* FUNCFLAG_DISPLAYBIND */ break; @@ -1358,9 +1361,6 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int case ATTR_RESTRICTED: funcflags |= 0x1; /* FUNCFLAG_FRESTRICTED */ break; - case ATTR_BINDABLE: - funcflags |= 0x4; /* FUNCFLAG_BINDABLE */ - break; case ATTR_VARARG: if (num_optional || num_defaults) warning("add_func_desc: ignoring vararg in function with optional or defaultvalue params\n");
1
0
0
0
Jacek Caban : widl: Added displaybind attribute handling.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 8fd971698531aadca65a802ccee225e8192d2c47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fd971698531aadca65a802cc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 29 21:23:53 2007 +0200 widl: Added displaybind attribute handling. --- tools/widl/write_msft.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index c32a5fb..c50378e 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1311,6 +1311,9 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int if (func->def->attrs) LIST_FOR_EACH_ENTRY( attr, func->def->attrs, const attr_t, entry ) { expr_t *expr = attr->u.pval; switch(attr->type) { + case ATTR_DISPLAYBIND: + funcflags |= 0x10; /* FUNCFLAG_DISPLAYBIND */ + break; case ATTR_ENTRY_ORDINAL: extra_attr = max(extra_attr, 3); entry = expr->cval;
1
0
0
0
Jacek Caban : widl: Added nonbrowsable attribute handling.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 1ad39a38e5a7c46201664c9b09963d9c5df2f133 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ad39a38e5a7c46201664c9b0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 29 21:23:18 2007 +0200 widl: Added nonbrowsable attribute handling. --- tools/widl/write_msft.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index da28803..c32a5fb 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1338,6 +1338,9 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int case ATTR_ID: id = expr->cval; break; + case ATTR_NONBROWSABLE: + funcflags |= 0x400; /* FUNCFLAG_NONBROWSABLE */ + break; case ATTR_OUT: break; case ATTR_PROPGET:
1
0
0
0
Jacek Caban : widl: Use correct bytes in write_value.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 4413e8c6f833f6c7c6ab8b549fb0a13422fd7dcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4413e8c6f833f6c7c6ab8b549…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 29 21:22:20 2007 +0200 widl: Use correct bytes in write_value. --- tools/widl/write_msft.c | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 358d1db..da28803 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1160,6 +1160,20 @@ static int encode_var( return 0; } +static unsigned long get_ulong_val(unsigned long val, int vt) +{ + switch(vt) { + case VT_I2: + case VT_BOOL: + case VT_UI2: + return val & 0xffff; + case VT_I1: + case VT_UI1: + return val & 0xff; + } + + return val; +} static void write_value(msft_typelib_t* typelib, int *out, int vt, void *value) { @@ -1177,11 +1191,11 @@ static void write_value(msft_typelib_t* typelib, int *out, int vt, void *value) case VT_HRESULT: case VT_PTR: { - unsigned long *lv = value; - if((*lv & 0x3ffffff) == *lv) { + const unsigned long lv = get_ulong_val(*(unsigned long*)value, vt); + if((lv & 0x3ffffff) == lv) { *out = 0x80000000; *out |= vt << 26; - *out |= *lv; + *out |= lv; } else { int offset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATA, 8, 0); *((unsigned short *)&typelib->typelib_segment_data[MSFT_SEG_CUSTDATA][offset]) = vt;
1
0
0
0
Dmitry Timoshkov : ntdll: Simplify TIME_GetBias.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 6119f4990d52dad826db4095bdcad6ffb3880778 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6119f4990d52dad826db4095b…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jul 29 21:33:23 2007 +0900 ntdll: Simplify TIME_GetBias. --- dlls/ntdll/time.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index b49d80c..497087c 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -607,20 +607,19 @@ static int TIME_GetBias(time_t utc, int *pdaylight) int ret; RtlEnterCriticalSection( &TIME_GetBias_section ); - if(utc == last_utc) - { - *pdaylight = last_daylight; - ret = last_bias; - } else + if (utc != last_utc) { ptm = localtime(&utc); - *pdaylight = last_daylight = - ptm->tm_isdst; /* daylight for local timezone */ + last_daylight = ptm->tm_isdst; /* daylight for local timezone */ ptm = gmtime(&utc); - ptm->tm_isdst = *pdaylight; /* use local daylight, not that of Greenwich */ + ptm->tm_isdst = last_daylight; /* use local daylight, not that of Greenwich */ last_utc = utc; - ret = last_bias = (int)(utc-mktime(ptm)); + last_bias = (int)(utc - mktime(ptm)); } + + *pdaylight = last_daylight; + ret = last_bias; + RtlLeaveCriticalSection( &TIME_GetBias_section ); return ret; }
1
0
0
0
Dmitry Timoshkov : ntdll: Add some traces to make debugging time zone related problems easier.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: a188662ea8412b7c98a0efff3d9b4c77fd6fcfdb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a188662ea8412b7c98a0efff3…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jul 29 21:31:00 2007 +0900 ntdll: Add some traces to make debugging time zone related problems easier. --- dlls/ntdll/time.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c index 256be42..b49d80c 100644 --- a/dlls/ntdll/time.c +++ b/dlls/ntdll/time.c @@ -27,6 +27,7 @@ #include <stdarg.h> #include <stdlib.h> +#include <errno.h> #include <string.h> #include <limits.h> #include <time.h> @@ -881,7 +882,10 @@ static const WCHAR* TIME_GetTZAsStr (time_t utc, int bias, int dst) unsigned int i; if (!strftime (psTZName, 7, "%Z", ptm)) - return (NULL); + { + WARN("strftime error %d\n", errno); + return NULL; + } for (i=0; i<(sizeof(TZ_INFO) / sizeof(struct tagTZ_INFO)); i++) { @@ -975,10 +979,13 @@ NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION *tzinfo) memset(tzinfo, 0, sizeof(RTL_TIME_ZONE_INFORMATION)); - if( !TIME_GetTimeZoneInfoFromReg(tzinfo)) { + if( !TIME_GetTimeZoneInfoFromReg(tzinfo)) + { + WARN("TIME_GetTimeZoneInfoFromReg failed\n"); gmt = time(NULL); bias = TIME_GetBias(gmt, &daylight); + TRACE("bias %d, daylight %d\n", -bias/60, daylight); tzinfo->Bias = -bias / 60; tzinfo->StandardBias = 0;
1
0
0
0
Dmitry Timoshkov : kernel32: Fix TIME_CompTimeZoneID return type.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: ae271f275c51d206e48d6c5e0e3f15e124e51f4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae271f275c51d206e48d6c5e0…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jul 29 21:27:41 2007 +0900 kernel32: Fix TIME_CompTimeZoneID return type. --- dlls/kernel32/time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index 08002af..90af803 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -148,7 +148,7 @@ static int TIME_DayLightCompareDate( const SYSTEMTIME *date, * TIME_ZONE_ID_STANDARD Current time is standard time * TIME_ZONE_ID_DAYLIGHT Current time is dayligh saving time */ -static BOOL TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, +static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, FILETIME *lpFileTime, BOOL islocal ) { int ret;
1
0
0
0
Dmitry Timoshkov : kernel32: Add more tests for time zone info.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: a68059f4b75278efb07dd888974d0840500958f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a68059f4b75278efb07dd8889…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jul 29 21:26:20 2007 +0900 kernel32: Add more tests for time zone info. --- dlls/kernel32/tests/time.c | 137 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 121 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c index 5f4c5b4..5bdb5a0 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -2,6 +2,7 @@ * Unit test suite for time functions * * Copyright 2004 Uwe Bonnes + * Copyright 2007 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,6 +22,9 @@ #include "wine/test.h" #include "winbase.h" +static BOOL (WINAPI *pTzSpecificLocalTimeToSystemTime)(LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); +static BOOL (WINAPI *pSystemTimeToTzSpecificLocalTime)(LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); + #define SECSPERMIN 60 #define SECSPERDAY 86400 /* 1601 to 1970 is 369 years plus 89 leap days */ @@ -181,12 +185,86 @@ static void test_invalid_arg(void) ok( !SystemTimeToFileTime(&st, &ft), "bad minute\n"); } + +static LONGLONG system_time_to_minutes(const SYSTEMTIME *st) +{ + BOOL ret; + FILETIME ft; + LONGLONG minutes; + + SetLastError(0xdeadbeef); + ret = SystemTimeToFileTime(st, &ft); + ok(ret, "SystemTimeToFileTime error %u\n", GetLastError()); + + minutes = ((LONGLONG)ft.dwHighDateTime << 32) + ft.dwLowDateTime; + minutes /= (LONGLONG)600000000; /* convert to minutes */ + return minutes; +} + +static LONG get_tz_bias(const TIME_ZONE_INFORMATION *tzinfo, DWORD tz_id) +{ + switch (tz_id) + { + case TIME_ZONE_ID_DAYLIGHT: + return tzinfo->DaylightBias; + + case TIME_ZONE_ID_STANDARD: + return tzinfo->StandardBias; + + default: + trace("unknown time zone id %d\n", tz_id); + /* fall through */ + case TIME_ZONE_ID_UNKNOWN: + return 0; + } +} static void test_GetTimeZoneInformation(void) { TIME_ZONE_INFORMATION tzinfo, tzinfo1; - DWORD res = GetTimeZoneInformation(&tzinfo); - ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); + BOOL res; + DWORD tz_id; + SYSTEMTIME st, current, utc, local; + FILETIME l_ft, s_ft; + LONGLONG l_time, s_time; + LONG diff; + + GetSystemTime(&st); + s_time = system_time_to_minutes(&st); + + SetLastError(0xdeadbeef); + res = SystemTimeToFileTime(&st, &s_ft); + ok(res, "SystemTimeToFileTime error %u\n", GetLastError()); + SetLastError(0xdeadbeef); + res = FileTimeToLocalFileTime(&s_ft, &l_ft); + ok(res, "FileTimeToLocalFileTime error %u\n", GetLastError()); + SetLastError(0xdeadbeef); + res = FileTimeToSystemTime(&l_ft, &local); + ok(res, "FileTimeToSystemTime error %u\n", GetLastError()); + l_time = system_time_to_minutes(&local); + + tz_id = GetTimeZoneInformation(&tzinfo); + ok(tz_id != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); + + trace("bias %d\n", tzinfo.Bias); + trace("standard (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n", + tzinfo.StandardDate.wDay, tzinfo.StandardDate.wMonth, + tzinfo.StandardDate.wYear, tzinfo.StandardDate.wDayOfWeek, + tzinfo.StandardDate.wHour, tzinfo.StandardDate.wMinute, + tzinfo.StandardDate.wSecond, tzinfo.StandardDate.wMilliseconds, + tzinfo.StandardBias); + trace("daylight (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n", + tzinfo.DaylightDate.wDay, tzinfo.DaylightDate.wMonth, + tzinfo.DaylightDate.wYear, tzinfo.DaylightDate.wDayOfWeek, + tzinfo.DaylightDate.wHour, tzinfo.DaylightDate.wMinute, + tzinfo.DaylightDate.wSecond, tzinfo.DaylightDate.wMilliseconds, + tzinfo.DaylightBias); + + diff = (LONG)(s_time - l_time); + ok(diff == tzinfo.Bias + get_tz_bias(&tzinfo, tz_id), + "system/local diff %d != tz bias %d\n", + diff, tzinfo.Bias + get_tz_bias(&tzinfo, tz_id)); + ok(SetEnvironmentVariableA("TZ","GMT0") != 0, "SetEnvironmentVariableA failed\n"); res = GetTimeZoneInformation(&tzinfo1); @@ -198,7 +276,37 @@ static void test_GetTimeZoneInformation(void) "Bias influenced by TZ variable\n"); ok(SetEnvironmentVariableA("TZ",NULL) != 0, "SetEnvironmentVariableA failed\n"); - + + diff = get_tz_bias(&tzinfo, tz_id); + + utc = st; + SetLastError(0xdeadbeef); + res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, ¤t); + ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); + s_time = system_time_to_minutes(¤t); + + tzinfo.StandardBias -= 123; + tzinfo.DaylightBias += 456; + + res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local); + ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); + l_time = system_time_to_minutes(&local); + ok(l_time - s_time == diff - get_tz_bias(&tzinfo, tz_id), "got %d, expected %d\n", + (LONG)(l_time - s_time), diff - get_tz_bias(&tzinfo, tz_id)); + + /* pretend that there is no transition dates */ + tzinfo.DaylightDate.wDay = 0; + tzinfo.DaylightDate.wMonth = 0; + tzinfo.DaylightDate.wYear = 0; + tzinfo.StandardDate.wDay = 0; + tzinfo.StandardDate.wMonth = 0; + tzinfo.StandardDate.wYear = 0; + + res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local); + ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); + l_time = system_time_to_minutes(&local); + ok(l_time - s_time == diff, "got %d, expected %d\n", + (LONG)(l_time - s_time), diff); } static void test_FileTimeToSystemTime(void) @@ -275,12 +383,6 @@ static void test_FileTimeToLocalFileTime(void) "SetEnvironmentVariableA failed\n"); } - -/* test TzSpecificLocalTimeToSystemTime and SystemTimeToTzSpecificLocalTime - * these are in winXP and later */ -typedef HANDLE (WINAPI *fnTzSpecificLocalTimeToSystemTime)( LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); -typedef HANDLE (WINAPI *fnSystemTimeToTzSpecificLocalTime)( LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); - typedef struct { int nr; /* test case number for easier lookup */ TIME_ZONE_INFORMATION *ptz; /* ptr to timezone */ @@ -290,17 +392,16 @@ typedef struct { static void test_TzSpecificLocalTimeToSystemTime(void) { - HMODULE hKernel = GetModuleHandle("kernel32"); - fnTzSpecificLocalTimeToSystemTime pTzSpecificLocalTimeToSystemTime; - fnSystemTimeToTzSpecificLocalTime pSystemTimeToTzSpecificLocalTime = NULL; TIME_ZONE_INFORMATION tzE, tzW, tzS; SYSTEMTIME result; int i, j, year; - pTzSpecificLocalTimeToSystemTime = (fnTzSpecificLocalTimeToSystemTime) GetProcAddress( hKernel, "TzSpecificLocalTimeToSystemTime"); - if(pTzSpecificLocalTimeToSystemTime) - pSystemTimeToTzSpecificLocalTime = (fnTzSpecificLocalTimeToSystemTime) GetProcAddress( hKernel, "SystemTimeToTzSpecificLocalTime"); - if( !pSystemTimeToTzSpecificLocalTime) + + if (!pTzSpecificLocalTimeToSystemTime || !pSystemTimeToTzSpecificLocalTime) + { + skip("TzSpecificLocalTimeToSystemTime or SystemTimeToTzSpecificLocalTime not present\n"); return; + } + ZeroMemory( &tzE, sizeof(tzE)); ZeroMemory( &tzW, sizeof(tzW)); ZeroMemory( &tzS, sizeof(tzS)); @@ -473,6 +574,10 @@ static void test_TzSpecificLocalTimeToSystemTime(void) START_TEST(time) { + HMODULE hKernel = GetModuleHandle("kernel32"); + pTzSpecificLocalTimeToSystemTime = (void *)GetProcAddress(hKernel, "TzSpecificLocalTimeToSystemTime"); + pSystemTimeToTzSpecificLocalTime = (void *)GetProcAddress( hKernel, "SystemTimeToTzSpecificLocalTime"); + test_conversions(); test_invalid_arg(); test_GetTimeZoneInformation();
1
0
0
0
Andrew Talbot : oleaut32: Constify some variables.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 36720b4945f90896379e7af9dfea2b9a7a214cb9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36720b4945f90896379e7af9d…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Sun Jul 29 00:12:14 2007 +0100 oleaut32: Constify some variables. --- dlls/oleaut32/typelib.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index b55599f..ab1d2d0 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -147,7 +147,7 @@ static void FromLEDWords(void *p_Val, int p_iSize) /* * Find a typelib key which matches a requested maj.min version. */ -static BOOL find_typelib_key( REFGUID guid, WORD *wMaj, WORD *wMin ) +static BOOL find_typelib_key( REFGUID guid, WORD wMaj, WORD *wMin ) { static const WCHAR typelibW[] = {'T','y','p','e','l','i','b','\\',0}; WCHAR buffer[60]; @@ -172,7 +172,7 @@ static BOOL find_typelib_key( REFGUID guid, WORD *wMaj, WORD *wMin ) { TRACE("found %s: %x.%x\n", debugstr_w(buffer), v_maj, v_min); - if (*wMaj == v_maj) + if (wMaj == v_maj) { if (*wMin == v_min) { @@ -274,7 +274,7 @@ HRESULT WINAPI QueryPathOfRegTypeLib( TRACE_(typelib)("(%s, %x.%x, 0x%x, %p)\n", debugstr_guid(guid), wMaj, wMin, lcid, path); - if (!find_typelib_key( guid, &wMaj, &wMin )) return TYPE_E_LIBNOTREGISTERED; + if (!find_typelib_key( guid, wMaj, &wMin )) return TYPE_E_LIBNOTREGISTERED; get_typelib_key( guid, wMaj, wMin, buffer ); res = RegOpenKeyExW( HKEY_CLASSES_ROOT, buffer, 0, KEY_READ, &hkey ); @@ -1425,7 +1425,7 @@ static void *TLB_CopyTypeDesc( TYPEDESC *dest, const TYPEDESC *src, void *buffer * * Functions for reading MSFT typelibs (those created by CreateTypeLib2) */ -static inline unsigned int MSFT_Tell(TLBContext *pcx) +static inline unsigned int MSFT_Tell(const TLBContext *pcx) { return pcx->pos; } @@ -2588,7 +2588,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength) } -static BSTR TLB_MultiByteToBSTR(char *ptr) +static BSTR TLB_MultiByteToBSTR(const char *ptr) { DWORD len; WCHAR *nameW; @@ -2602,7 +2602,7 @@ static BSTR TLB_MultiByteToBSTR(char *ptr) return ret; } -static BOOL TLB_GUIDFromString(char *str, GUID *guid) +static BOOL TLB_GUIDFromString(const char *str, GUID *guid) { char b[3]; int i; @@ -2624,14 +2624,14 @@ static BOOL TLB_GUIDFromString(char *str, GUID *guid) return TRUE; } -static WORD SLTG_ReadString(char *ptr, BSTR *pBstr) +static WORD SLTG_ReadString(const char *ptr, BSTR *pBstr) { WORD bytelen; DWORD len; WCHAR *nameW; *pBstr = NULL; - bytelen = *(WORD*)ptr; + bytelen = *(const WORD*)ptr; if(bytelen == 0xffff) return 2; len = MultiByteToWideChar(CP_ACP, 0, ptr + 2, bytelen, NULL, 0); nameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); @@ -2641,12 +2641,12 @@ static WORD SLTG_ReadString(char *ptr, BSTR *pBstr) return bytelen + 2; } -static WORD SLTG_ReadStringA(char *ptr, char **str) +static WORD SLTG_ReadStringA(const char *ptr, char **str) { WORD bytelen; *str = NULL; - bytelen = *(WORD*)ptr; + bytelen = *(const WORD*)ptr; if(bytelen == 0xffff) return 2; *str = HeapAlloc(GetProcessHeap(), 0, bytelen + 1); memcpy(*str, ptr + 2, bytelen);
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
96
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
Results per page:
10
25
50
100
200