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 2021
----- 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
1 participants
728 discussions
Start a n
N
ew thread
Zebediah Figura : crypt32: Copy the CRL_INFO structure instead of recalculating it.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: bdcddf024ff36a731acfd8a2086af1f34a21cc7d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bdcddf024ff36a731acfd8a2…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jul 15 11:25:17 2021 -0500 crypt32: Copy the CRL_INFO structure instead of recalculating it. Steam calls CertGetCertificateChain() on a certificate with a 20 MB CRL, which can take over 400 ms to parse each time. Avoid parsing it more often than we need to. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/crl.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 7 deletions(-) diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index 4dc77c2a246..657810e0c6b 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -38,6 +38,108 @@ static void CRL_free(context_t *context) static const context_vtbl_t crl_vtbl; +static char *copy_string(char *p, char **dst, const char *src) +{ + size_t size = strlen(src) + 1; + + *dst = memcpy(p, src, size); + return p + size; +} + +static char *copy_blob(char *p, DATA_BLOB *dst, const DATA_BLOB *src) +{ + size_t size = src->cbData; + + dst->cbData = size; + dst->pbData = memcpy(p, src->pbData, size); + return p + size; +} + +static char *copy_extension(char *p, CERT_EXTENSION *dst, const CERT_EXTENSION *src) +{ + p = copy_string(p, &dst->pszObjId, src->pszObjId); + dst->fCritical = src->fCritical; + return copy_blob(p, &dst->Value, &src->Value); +} + +static CRL_INFO *clone_crl_info(const CRL_INFO *src) +{ + size_t size = sizeof(CRL_INFO); + CRL_INFO *dst; + DWORD i, j; + char *p; + + if (src->SignatureAlgorithm.pszObjId) + size += strlen(src->SignatureAlgorithm.pszObjId) + 1; + size += src->SignatureAlgorithm.Parameters.cbData; + size += src->Issuer.cbData; + for (i = 0; i < src->cCRLEntry; ++i) + { + const CRL_ENTRY *entry = &src->rgCRLEntry[i]; + + size += sizeof(CRL_ENTRY); + size += entry->SerialNumber.cbData; + for (j = 0; j < entry->cExtension; ++j) + { + const CERT_EXTENSION *ext = &entry->rgExtension[j]; + + size += sizeof(CERT_EXTENSION); + size += strlen(ext->pszObjId) + 1; + size += ext->Value.cbData; + } + } + + for (j = 0; j < src->cExtension; ++j) + { + const CERT_EXTENSION *ext = &src->rgExtension[j]; + + size += sizeof(CERT_EXTENSION); + size += strlen(ext->pszObjId) + 1; + size += ext->Value.cbData; + } + + if (!(dst = LocalAlloc(LPTR, size))) + return NULL; + p = (char *)(dst + 1); + + dst->dwVersion = src->dwVersion; + if (src->SignatureAlgorithm.pszObjId) + p = copy_string(p, &dst->SignatureAlgorithm.pszObjId, src->SignatureAlgorithm.pszObjId); + p = copy_blob(p, &dst->SignatureAlgorithm.Parameters, &src->SignatureAlgorithm.Parameters); + p = copy_blob(p, &dst->Issuer, &src->Issuer); + dst->ThisUpdate = src->ThisUpdate; + dst->NextUpdate = src->NextUpdate; + + dst->cCRLEntry = src->cCRLEntry; + dst->rgCRLEntry = (CRL_ENTRY *)p; + p += src->cCRLEntry * sizeof(CRL_ENTRY); + + dst->cExtension = src->cExtension; + dst->rgExtension = (CERT_EXTENSION *)p; + p += src->cExtension * sizeof(CERT_EXTENSION); + + for (i = 0; i < src->cCRLEntry; ++i) + { + const CRL_ENTRY *src_entry = &src->rgCRLEntry[i]; + CRL_ENTRY *dst_entry = &dst->rgCRLEntry[i]; + + p = copy_blob(p, &dst_entry->SerialNumber, &src_entry->SerialNumber); + dst_entry->RevocationDate = src_entry->RevocationDate; + dst_entry->cExtension = src_entry->cExtension; + dst_entry->rgExtension = (CERT_EXTENSION *)p; + p += src_entry->cExtension * sizeof(CERT_EXTENSION); + + for (j = 0; j < src_entry->cExtension; ++j) + p = copy_extension(p, &dst_entry->rgExtension[j], &src_entry->rgExtension[j]); + } + + for (j = 0; j < src->cExtension; ++j) + p = copy_extension(p, &dst->rgExtension[j], &src->rgExtension[j]); + + assert(p - (char *)dst == size); + return dst; +} + static context_t *CRL_clone(context_t *context, WINECRYPT_CERTSTORE *store, BOOL use_link) { crl_t *dst; @@ -47,8 +149,6 @@ static context_t *CRL_clone(context_t *context, WINECRYPT_CERTSTORE *store, BOOL return NULL; }else { const crl_t *src = (const crl_t*)context; - DWORD size = 0; - BOOL res; if (!(dst = (crl_t *)Context_CreateDataContext(sizeof(CRL_CONTEXT), &crl_vtbl, store))) return NULL; @@ -60,11 +160,8 @@ static context_t *CRL_clone(context_t *context, WINECRYPT_CERTSTORE *store, BOOL memcpy(dst->ctx.pbCrlEncoded, src->ctx.pbCrlEncoded, src->ctx.cbCrlEncoded); dst->ctx.cbCrlEncoded = src->ctx.cbCrlEncoded; - /* FIXME: We don't need to decode the object here, we could just clone dst info. */ - res = CryptDecodeObjectEx(dst->ctx.dwCertEncodingType, X509_CERT_CRL_TO_BE_SIGNED, - dst->ctx.pbCrlEncoded, dst->ctx.cbCrlEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, - &dst->ctx.pCrlInfo, &size); - if(!res) { + if (!(dst->ctx.pCrlInfo = clone_crl_info(src->ctx.pCrlInfo))) + { CertFreeCRLContext(&dst->ctx); return NULL; }
1
0
0
0
Zebediah Figura : crypt32: Rename "crl" and "cloned" to "dst" and "src" in CRL_clone().
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 1c501c65875f9bb1bb3d1ae3023563a1f9422ce8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1c501c65875f9bb1bb3d1ae3…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Jul 15 11:25:16 2021 -0500 crypt32: Rename "crl" and "cloned" to "dst" and "src" in CRL_clone(). "cloned" is very ambiguous and can be interpreted as the destination rather than the source. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/crl.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index 31bf35bd041..4dc77c2a246 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -40,40 +40,38 @@ static const context_vtbl_t crl_vtbl; static context_t *CRL_clone(context_t *context, WINECRYPT_CERTSTORE *store, BOOL use_link) { - crl_t *crl; + crl_t *dst; if(use_link) { - crl = (crl_t*)Context_CreateLinkContext(sizeof(CRL_CONTEXT), context, store); - if(!crl) + if (!(dst = (crl_t *)Context_CreateLinkContext(sizeof(CRL_CONTEXT), context, store))) return NULL; }else { - const crl_t *cloned = (const crl_t*)context; + const crl_t *src = (const crl_t*)context; DWORD size = 0; BOOL res; - crl = (crl_t*)Context_CreateDataContext(sizeof(CRL_CONTEXT), &crl_vtbl, store); - if(!crl) + if (!(dst = (crl_t *)Context_CreateDataContext(sizeof(CRL_CONTEXT), &crl_vtbl, store))) return NULL; - Context_CopyProperties(&crl->ctx, &cloned->ctx); + Context_CopyProperties(&dst->ctx, &src->ctx); - crl->ctx.dwCertEncodingType = cloned->ctx.dwCertEncodingType; - crl->ctx.pbCrlEncoded = CryptMemAlloc(cloned->ctx.cbCrlEncoded); - memcpy(crl->ctx.pbCrlEncoded, cloned->ctx.pbCrlEncoded, cloned->ctx.cbCrlEncoded); - crl->ctx.cbCrlEncoded = cloned->ctx.cbCrlEncoded; + dst->ctx.dwCertEncodingType = src->ctx.dwCertEncodingType; + dst->ctx.pbCrlEncoded = CryptMemAlloc(src->ctx.cbCrlEncoded); + memcpy(dst->ctx.pbCrlEncoded, src->ctx.pbCrlEncoded, src->ctx.cbCrlEncoded); + dst->ctx.cbCrlEncoded = src->ctx.cbCrlEncoded; - /* FIXME: We don't need to decode the object here, we could just clone crl info. */ - res = CryptDecodeObjectEx(crl->ctx.dwCertEncodingType, X509_CERT_CRL_TO_BE_SIGNED, - crl->ctx.pbCrlEncoded, crl->ctx.cbCrlEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, - &crl->ctx.pCrlInfo, &size); + /* FIXME: We don't need to decode the object here, we could just clone dst info. */ + res = CryptDecodeObjectEx(dst->ctx.dwCertEncodingType, X509_CERT_CRL_TO_BE_SIGNED, + dst->ctx.pbCrlEncoded, dst->ctx.cbCrlEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, + &dst->ctx.pCrlInfo, &size); if(!res) { - CertFreeCRLContext(&crl->ctx); + CertFreeCRLContext(&dst->ctx); return NULL; } } - crl->ctx.hCertStore = store; - return &crl->base; + dst->ctx.hCertStore = store; + return &dst->base; } static const context_vtbl_t crl_vtbl = {
1
0
0
0
Nikolay Sivov : mf/session: Fail start requests when no topology was set.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: b3e321dfd5e2d038fe0f70040e3a639fa4e9d23f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3e321dfd5e2d038fe0f7004…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jul 21 17:27:08 2021 +0300 mf/session: Fail start requests when no topology was set. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 80cc8ab7135..0377b19c51f 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -841,6 +841,15 @@ static void session_start(struct media_session *session, const GUID *time_format switch (session->state) { case SESSION_STATE_STOPPED: + + /* Start request with no current topology. */ + if (session->presentation.topo_status == MF_TOPOSTATUS_INVALID) + { + session_command_complete_with_event(session, MESessionStarted, MF_E_INVALIDREQUEST, NULL); + break; + } + + /* fallthrough */ case SESSION_STATE_PAUSED: session->presentation.time_format = *time_format;
1
0
0
0
Nikolay Sivov : mf/session: Add a helper to send events while completing commands.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 10ba5a90fc81a2f12d1f82131e0067248d01bd95 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=10ba5a90fc81a2f12d1f8213…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Jul 21 17:27:07 2021 +0300 mf/session: Add a helper to send events while completing commands. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 91d8f0cac87..80cc8ab7135 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -826,6 +826,13 @@ static void session_command_complete(struct media_session *session) } } +static void session_command_complete_with_event(struct media_session *session, MediaEventType event, + HRESULT status, const PROPVARIANT *param) +{ + IMFMediaEventQueue_QueueEventParamVar(session->event_queue, event, &GUID_NULL, status, param); + session_command_complete(session); +} + static void session_start(struct media_session *session, const GUID *time_format, const PROPVARIANT *start_position) { struct media_source *source; @@ -863,9 +870,7 @@ static void session_start(struct media_session *session, const GUID *time_format session_command_complete(session); break; default: - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionStarted, &GUID_NULL, - MF_E_INVALIDREQUEST, NULL); - session_command_complete(session); + session_command_complete_with_event(session, MESessionStarted, MF_E_INVALIDREQUEST, NULL); break; } } @@ -911,8 +916,7 @@ static void session_set_paused(struct media_session *session, unsigned int state if (state != ~0u) session->state = state; if (SUCCEEDED(status)) session_set_caps(session, session->caps & ~MFSESSIONCAP_PAUSE); - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionPaused, &GUID_NULL, status, NULL); - session_command_complete(session); + session_command_complete_with_event(session, MESessionPaused, status, NULL); } static void session_set_closed(struct media_session *session, HRESULT status) @@ -920,8 +924,7 @@ static void session_set_closed(struct media_session *session, HRESULT status) session->state = SESSION_STATE_CLOSED; if (SUCCEEDED(status)) session_set_caps(session, session->caps & ~(MFSESSIONCAP_START | MFSESSIONCAP_SEEK)); - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionClosed, &GUID_NULL, status, NULL); - session_command_complete(session); + session_command_complete_with_event(session, MESessionClosed, status, NULL); } static void session_pause(struct media_session *session) @@ -1007,8 +1010,7 @@ static void session_stop(struct media_session *session) hr = S_OK; /* fallthrough */ default: - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionStopped, &GUID_NULL, hr, NULL); - session_command_complete(session); + session_command_complete_with_event(session, MESessionStopped, hr, NULL); break; } } @@ -1077,9 +1079,7 @@ static void session_clear_topologies(struct media_session *session) hr = MF_E_INVALIDREQUEST; else session_clear_queued_topologies(session); - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionTopologiesCleared, - &GUID_NULL, hr, NULL); - session_command_complete(session); + session_command_complete_with_event(session, MESessionTopologiesCleared, hr, NULL); } static struct media_source *session_get_media_source(struct media_session *session, IMFMediaSource *source)
1
0
0
0
Jacek Caban : advapi32: Link to msvcrt.dll.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 2b3a300cbfee15dd6771a0a984c13591a2b36358 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2b3a300cbfee15dd6771a0a9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 21 15:15:51 2021 +0200 advapi32: Link to msvcrt.dll. Some applications expect msvcrt.dll to be pulled by system DLLs. On Windows, loading advapi32 causes msvcrt.dll to be loaded. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51465
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index 5175563cea1..11b3b5aaaf7 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_ADVAPI32_ MODULE = advapi32.dll IMPORTLIB = advapi32 -IMPORTS = kernelbase sechost +IMPORTS = kernelbase sechost msvcrt DELAYIMPORTS = rpcrt4 EXTRADLLFLAGS = -mno-cygwin
1
0
0
0
Hugh McMaster : kernel32/tests: Test whether font information and window size are copied to the new screen buffer.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: b6e707ee60566f6471559dbfc053c685ff2a267c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b6e707ee60566f6471559dbf…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Wed Jul 21 22:24:48 2021 +1000 kernel32/tests: Test whether font information and window size are copied to the new screen buffer. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/console.c | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 6b723c3d6c8..9fa0ce06854 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -973,6 +973,58 @@ static void testScreenBuffer(HANDLE hConOut) SetConsoleOutputCP(oldcp); } +static void test_new_screen_buffer_properties(HANDLE hConOut) +{ + BOOL ret; + HANDLE hConOut2; + CONSOLE_FONT_INFOEX cfi, cfi2; + CONSOLE_SCREEN_BUFFER_INFO csbi, csbi2; + + /* Font information */ + cfi.cbSize = cfi2.cbSize = sizeof(CONSOLE_FONT_INFOEX); + + ret = GetCurrentConsoleFontEx(hConOut, FALSE, &cfi); + ok(ret, "GetCurrentConsoleFontEx failed: error %u\n", GetLastError()); + + hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + + ret = GetCurrentConsoleFontEx(hConOut2, FALSE, &cfi2); + ok(ret, "GetCurrentConsoleFontEx failed: error %u\n", GetLastError()); + CloseHandle(hConOut2); + + ok(cfi2.nFont == cfi.nFont, "Font index should match: " + "got %u, expected %u\n", cfi2.nFont, cfi.nFont); + ok(cfi2.dwFontSize.X == cfi.dwFontSize.X, "Font width should match: " + "got %d, expected %d\n", cfi2.dwFontSize.X, cfi.dwFontSize.X); + ok(cfi2.dwFontSize.Y == cfi.dwFontSize.Y, "Font height should match: " + "got %d, expected %d\n", cfi2.dwFontSize.Y, cfi.dwFontSize.Y); + ok(cfi2.FontFamily == cfi.FontFamily, "Font family should match: " + "got %u, expected %u\n", cfi2.FontFamily, cfi.FontFamily); + ok(cfi2.FontWeight == cfi.FontWeight, "Font weight should match: " + "got %u, expected %u\n", cfi2.FontWeight, cfi.FontWeight); + ok(!lstrcmpW(cfi2.FaceName, cfi.FaceName), "Font name should match: " + "got %s, expected %s\n", wine_dbgstr_w(cfi2.FaceName), wine_dbgstr_w(cfi.FaceName)); + + /* Display window size */ + ret = GetConsoleScreenBufferInfo(hConOut, &csbi); + ok(ret, "GetConsoleScreenBufferInfo failed: error %u\n", GetLastError()); + + hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + + ret = GetConsoleScreenBufferInfo(hConOut2, &csbi2); + ok(ret, "GetConsoleScreenBufferInfo failed: error %u\n", GetLastError()); + CloseHandle(hConOut2); + + ok(csbi2.srWindow.Left == csbi.srWindow.Left, "Left coordinate should match\n"); + ok(csbi2.srWindow.Top == csbi.srWindow.Top, "Top coordinate should match\n"); + ok(csbi2.srWindow.Right == csbi.srWindow.Right, "Right coordinate should match\n"); + ok(csbi2.srWindow.Bottom == csbi.srWindow.Bottom, "Bottom coordinate should match\n"); +} + static void test_new_screen_buffer_color_attributes(HANDLE hConOut) { CONSOLE_SCREEN_BUFFER_INFOEX csbi, csbi2; @@ -4583,6 +4635,7 @@ START_TEST(console) testScroll(hConOut, sbi.dwSize); /* will test sb creation / modification / codepage handling */ if (!test_current) testScreenBuffer(hConOut); + test_new_screen_buffer_properties(hConOut); test_new_screen_buffer_color_attributes(hConOut); /* Test waiting for a console handle */ testWaitForConsoleInput(hConIn);
1
0
0
0
Hugh McMaster : kernel32/tests: Test whether console color attributes are copied to the new screen buffer.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 0a6d0e689b5bf860bdcc5aee5d64c5b71bdc430a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0a6d0e689b5bf860bdcc5aee…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Wed Jul 21 22:24:47 2021 +1000 kernel32/tests: Test whether console color attributes are copied to the new screen buffer. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/console.c | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 918ecac8ac4..6b723c3d6c8 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -973,6 +973,83 @@ static void testScreenBuffer(HANDLE hConOut) SetConsoleOutputCP(oldcp); } +static void test_new_screen_buffer_color_attributes(HANDLE hConOut) +{ + CONSOLE_SCREEN_BUFFER_INFOEX csbi, csbi2; + BOOL ret; + HANDLE hConOut2; + WORD orig_attr, orig_popup, attr; + + csbi.cbSize = csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX); + + ret = GetConsoleScreenBufferInfoEx(hConOut, &csbi); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + orig_attr = csbi.wAttributes; + orig_popup = csbi.wPopupAttributes; + + hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + + ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + CloseHandle(hConOut2); + + todo_wine ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: " + "got %#x, expected %#x\n", csbi2.wAttributes, orig_attr); + todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n"); + todo_wine ok(csbi2.wPopupAttributes == orig_attr, "Popup Attributes should match Character Attributes\n"); + + /* Test different Character Attributes */ + attr = FOREGROUND_BLUE|BACKGROUND_GREEN; + ret = SetConsoleTextAttribute(hConOut, attr); + ok(ret, "SetConsoleTextAttribute failed: error %u\n", GetLastError()); + + hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + + memset(&csbi2, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFOEX)); + csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX); + + ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + CloseHandle(hConOut2); + + todo_wine ok(csbi2.wAttributes == attr, "Character Attributes should have been copied: " + "got %#x, expected %#x\n", csbi2.wAttributes, attr); + todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n"); + todo_wine ok(csbi2.wPopupAttributes == attr, "Popup Attributes should match Character Attributes\n"); + + ret = SetConsoleTextAttribute(hConOut, orig_attr); + ok(ret, "SetConsoleTextAttribute failed: error %u\n", GetLastError()); + + /* Test inheritance of different Popup Attributes */ + csbi.wPopupAttributes = attr; + ret = SetConsoleScreenBufferInfoEx(hConOut, &csbi); + ok(ret, "SetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + + hConOut2 = CreateConsoleScreenBuffer(GENERIC_READ|GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + ok(hConOut2 != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer failed: error %u\n", GetLastError()); + + memset(&csbi2, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFOEX)); + csbi2.cbSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX); + + ret = GetConsoleScreenBufferInfoEx(hConOut2, &csbi2); + ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); + CloseHandle(hConOut2); + + todo_wine ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: " + "got %#x, expected %#x\n", csbi2.wAttributes, orig_attr); + todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n"); + todo_wine ok(csbi2.wPopupAttributes == orig_attr, "Popup Attributes should match Character Attributes\n"); + + csbi.wPopupAttributes = orig_popup; + ret = SetConsoleScreenBufferInfoEx(hConOut, &csbi); + ok(ret, "SetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError()); +} + static void CALLBACK signaled_function(void *p, BOOLEAN timeout) { HANDLE event = p; @@ -4506,6 +4583,7 @@ START_TEST(console) testScroll(hConOut, sbi.dwSize); /* will test sb creation / modification / codepage handling */ if (!test_current) testScreenBuffer(hConOut); + test_new_screen_buffer_color_attributes(hConOut); /* Test waiting for a console handle */ testWaitForConsoleInput(hConIn); test_wait(hConIn, hConOut);
1
0
0
0
Francois Gouget : oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 5c86b4d201e46a799cef7eef9922df3610b1568a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5c86b4d201e46a799cef7eef…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Jul 21 15:10:59 2021 +0200 oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests. Windows <= 8.1 uses an obsolete currency symbol for the Swiss Franc and Windows 8.1 incorrectly doubled the right-to-left mark in the Moroccan dirham. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 0ce165b44fa..d3a1a2e3a31 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -2164,14 +2164,26 @@ static void test_VarParseNumFromStrMisc(void) lcid = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH_SWISS),SORT_DEFAULT); WCONVERT(L"3CHF", NUMPRS_CURRENCY|NUMPRS_USE_ALL); - todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); - EXPECT2(3,FAILDIG); + /* Windows <= 8.1 uses an old currency symbol: "fr. 5" */ + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + if (hres == S_OK) + { + todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); + EXPECT2(3,FAILDIG); + } /* 5 Moroccan dirham */ lcid = MAKELCID(MAKELANGID(LANG_ARABIC,SUBLANG_ARABIC_MOROCCO),SORT_DEFAULT); WCONVERT(L"5\x62f.\x645.\x200f", NUMPRS_CURRENCY|NUMPRS_USE_ALL); - todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); - EXPECT2(5,FAILDIG); + /* Windows 8.1 incorrectly doubles the right-to-left mark: + * "\x62f.\x645.\x200f\x200f 5" + */ + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + if (hres == S_OK) + { + todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); + EXPECT2(5,FAILDIG); + } /* Test Arabic numerals in an Arabic locale */
1
0
0
0
Francois Gouget : oleaut32/tests: Remove unneeded casts in vartest.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: bf9077cf97aa9b73e0627d468fb9a9376ff897a1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf9077cf97aa9b73e0627d46…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Jul 21 14:15:56 2021 +0200 oleaut32/tests: Remove unneeded casts in vartest. The error codes are already defined with an HRESULT cast so there is no need to cast them again. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index c0c20dcf10f..0ce165b44fa 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1288,8 +1288,8 @@ static HRESULT convert_str( const char *str, INT dig, ULONG flags, static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULONG b, ULONG c, INT d, INT e, INT f ) { - ok_(__FILE__,line)(hres == (HRESULT)S_OK, "returned %08x\n", hres); - if (hres == (HRESULT)S_OK) + ok_(__FILE__,line)(hres == S_OK, "returned %08x\n", hres); + if (hres == S_OK) { ok_(__FILE__,line)(np->cDig == a, "Expected cDig = %d, got %d\n", a, np->cDig); ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%x, got 0x%x\n", b, np->dwInFlags); @@ -1306,7 +1306,7 @@ static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULON #define CONVERT(str,flags) CONVERTN(str,sizeof(rgb),flags) #define EXPECT(a,b,c,d,e,f) expect_NumFromStr( __LINE__, hres, &np, a, b, c, d, e, f ) #define EXPECTRGB(a,b) ok(rgb[a] == b, "Digit[%d], expected %d, got %d\n", a, b, rgb[a]) -#define EXPECTFAIL ok(hres == (HRESULT)DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08x\n", hres) +#define EXPECTFAIL ok(hres == DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08x\n", hres) #define EXPECT2(a,b) EXPECTRGB(0,a); EXPECTRGB(1,b) static void test_VarParseNumFromStrEn(void) @@ -2190,10 +2190,10 @@ static HRESULT (WINAPI *pVarNumFromParseNum)(NUMPARSE*,BYTE*,ULONG,VARIANT*); np.cDig = (a); np.dwInFlags = (b); np.dwOutFlags = (c); np.cchUsed = (d); \ np.nBaseShift = (e); np.nPwr10 = (f); hres = pVarNumFromParseNum(&np, rgb, bits, &vOut) static const char *szFailOverflow = "Expected overflow, hres = %08x\n"; -#define EXPECT_OVERFLOW ok(hres == (HRESULT)DISP_E_OVERFLOW, szFailOverflow, hres) +#define EXPECT_OVERFLOW ok(hres == DISP_E_OVERFLOW, szFailOverflow, hres) static const char *szFailOk = "Call failed, hres = %08x\n"; -#define EXPECT_OK ok(hres == (HRESULT)S_OK, szFailOk, hres); \ - if (hres == (HRESULT)S_OK) +#define EXPECT_OK ok(hres == S_OK, szFailOk, hres); \ + if (hres == S_OK) #define EXPECT_TYPE(typ) ok(V_VT(&vOut) == typ,"Expected Type = " #typ ", got %d\n", V_VT(&vOut)) #define EXPECT_I1(val) EXPECT_OK { EXPECT_TYPE(VT_I1); \ ok(V_I1(&vOut) == val, "Expected i1 = %d, got %d\n", (signed char)val, V_I1(&vOut)); }
1
0
0
0
Piotr Caban : msvcrt: Introduce fenv_encode helper in all runtime versions.
by Alexandre Julliard
21 Jul '21
21 Jul '21
Module: wine Branch: master Commit: 2f9312fe5f923d048db0ef77666ef641deb868ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f9312fe5f923d048db0ef77…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jul 21 13:21:33 2021 +0200 msvcrt: Introduce fenv_encode helper in all runtime versions. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 922fd7818a5..4e5dedd3576 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -5586,6 +5586,7 @@ static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y) { __msvcrt_ulong ret = 0; +#ifdef __i386__ if (x & _EM_INVALID) ret |= FENV_X_INVALID; if (x & _EM_DENORMAL) ret |= FENV_X_DENORMAL; if (x & _EM_ZERODIVIDE) ret |= FENV_X_ZERODIVIDE; @@ -5597,6 +5598,7 @@ static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y) if (x & _RC_DOWN) ret |= FENV_X_DOWN; if (x & _PC_24) ret |= FENV_X_24; if (x & _PC_53) ret |= FENV_X_53; +#endif x &= ~(_MCW_EM | _MCW_IC | _MCW_RC | _MCW_PC); if (y & _EM_INVALID) ret |= FENV_Y_INVALID; @@ -5652,6 +5654,11 @@ static BOOL fenv_decode(__msvcrt_ulong enc, unsigned int *x, unsigned int *y) } #endif #elif _MSVCR_VER >= 120 +static __msvcrt_ulong fenv_encode(unsigned int x, unsigned int y) +{ + return x | y; +} + #if (defined(__i386__) || defined(__x86_64__)) static BOOL fenv_decode(__msvcrt_ulong enc, unsigned int *x, unsigned int *y) { @@ -5716,16 +5723,8 @@ int CDECL fesetexceptflag(const fexcept_t *status, int excepts) return 0; fegetenv(&env); -#if _MSVCR_VER>=140 && (defined(__i386__) || defined(__x86_64__)) env._Fe_stat &= ~fenv_encode(excepts, excepts); env._Fe_stat |= *status & fenv_encode(excepts, excepts); -#elif _MSVCR_VER>=140 - env._Fe_stat &= ~fenv_encode(0, excepts); - env._Fe_stat |= *status & fenv_encode(0, excepts); -#else - env._Fe_stat &= ~excepts; - env._Fe_stat |= *status & excepts; -#endif return fesetenv(&env); } @@ -5738,13 +5737,7 @@ int CDECL feraiseexcept(int flags) flags &= FE_ALL_EXCEPT; fegetenv(&env); -#if _MSVCR_VER>=140 && defined(__i386__) env._Fe_stat |= fenv_encode(flags, flags); -#elif _MSVCR_VER>=140 - env._Fe_stat |= fenv_encode(0, flags); -#else - env._Fe_stat |= flags; -#endif return fesetenv(&env); } @@ -5757,11 +5750,7 @@ int CDECL feclearexcept(int flags) fegetenv(&env); flags &= FE_ALL_EXCEPT; -#if _MSVCR_VER>=140 env._Fe_stat &= ~fenv_encode(flags, flags); -#else - env._Fe_stat &= ~flags; -#endif return fesetenv(&env); } @@ -5774,10 +5763,8 @@ int CDECL fegetexceptflag(fexcept_t *status, int excepts) unsigned int x87, sse; _statusfp2(&x87, &sse); *status = fenv_encode(x87 & excepts, sse & excepts); -#elif _MSVCR_VER>=140 - *status = fenv_encode(0, _statusfp() & excepts); #else - *status = _statusfp() & excepts; + *status = fenv_encode(0, _statusfp() & excepts); #endif return 0; }
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
73
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
Results per page:
10
25
50
100
200