winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1216 discussions
Start a n
N
ew thread
Alexander Nicolaysen Sørnes : Allow removing downloadurl from queued versions
by Chris Morgan
03 Oct '08
03 Oct '08
Module: appdb Branch: master Commit: e738a6d58e8305aabbe07be8e326bc66ffc6e1ae URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=e738a6d58e8305aabbe07be8…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Oct 3 13:53:13 2008 +0200 Allow removing downloadurl from queued versions --- include/downloadurl.php | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/downloadurl.php b/include/downloadurl.php index 340e2f2..4b0498d 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -351,6 +351,12 @@ class downloadurl if(!$this->bQueued && !$this->canEdit($this->iVersionId)) return FALSE; + if(!$this->sDescription && !$this->sUrl) + { + $this->delete(); + return true; + } + $hResult = query_parameters("UPDATE appData SET description = '?', url = '?' WHERE id = '?'", $this->sDescription, $this->sUrl, $this->iId);
1
0
0
0
Alexander Nicolaysen Sørnes : Remove downloadurl::processFormSingle
by Chris Morgan
03 Oct '08
03 Oct '08
Module: appdb Branch: master Commit: a57d236392c96ebd038db66f120d69d2ffc038f4 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=a57d236392c96ebd038db66f…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Oct 3 13:48:56 2008 +0200 Remove downloadurl::processFormSingle --- include/downloadurl.php | 31 ------------------------------- include/version_queue.php | 5 ++--- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/include/downloadurl.php b/include/downloadurl.php index d4903da..340e2f2 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -361,37 +361,6 @@ class downloadurl return TRUE; } - /* Process a form made only for submitting one URL */ - function processFormSingle($iVersionId, $aValues, $bUnQueue = FALSE) - { - /* Calling this function without suitable input data is perfectly valid, - but in that case there is nothing to do here */ - if(empty($aValues['sDownloadUrlDescription']) || - empty($aValues['sDownloadUrlUrl'])) - return; - - $iId = null; - if($hResult = appData::getData($iVersionId, "downloadurl", TRUE, TRUE)) - { - $oObject = query_fetch_object($hResult); - $iId = $oObject->id; - } - - $oDownloadurl = new downloadurl($iId); - - $oDownloadurl->sDescription = $aValues['sDownloadUrlDescription']; - $oDownloadurl->sUrl = $aValues['sDownloadUrlUrl']; - $oDownloadurl->iVersionId = $iVersionId; - - if($iId) - $oDownloadurl->update(); - else - $oDownloadurl->create(); - - if($bUnQueue) - $oDownloadurl->unQueue(); - } - function unQueue() { if($this->mustBeQueued()) diff --git a/include/version_queue.php b/include/version_queue.php index db3dd01..e2bba12 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -46,9 +46,8 @@ class version_queue $this->oTestDataQueue->oTestData->iVersionId = $this->oVersion->iVersionId; $this->oTestDataQueue->create(); - $this->oDownloadUrl->processFormSingle($this->oVersion->iVersionId, - $aClean, - $this->oVersion->canEdit()); + $this->oDownloadUrl->objectSetParent($this->oVersion->objectGetId()); + $this->oDownloadUrl->create(); return TRUE; }
1
0
0
0
Alexander Nicolaysen Sørnes : Allow adding downloadurl to queued versions
by Chris Morgan
03 Oct '08
03 Oct '08
Module: appdb Branch: master Commit: 20712278953e3d6da9106dc1e09aa62f19edcd65 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=20712278953e3d6da9106dc1…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Oct 3 13:20:45 2008 +0200 Allow adding downloadurl to queued versions --- include/downloadurl.php | 5 +++++ include/version_queue.php | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/include/downloadurl.php b/include/downloadurl.php index acdfdf4..d4903da 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -63,6 +63,11 @@ class downloadurl return $sReturn; } + public function objectSetParent($iId, $sClass = 'version') + { + $this->iVersionId = $iId; + } + function objectGetChildren($bIncludeDeleted = false) { /* We have none */ diff --git a/include/version_queue.php b/include/version_queue.php index 553cb8e..db3dd01 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -33,6 +33,9 @@ class version_queue $this->oTestDataQueue = new testData_queue($iTestingId); $this->oDownloadUrl = new downloadurl($iDownloadUrlId); + + if(!$this->oDownloadUrl->objectGetId() && $iVersionId) + $this->oDownloadUrl->objectSetParent($iVersionId); } function create() @@ -69,7 +72,13 @@ class version_queue function update() { $this->oVersion->update(); - $this->oDownloadUrl->update(); + + /* A downloadurl is optional and can thus be added later */ + if($this->oDownloadUrl->objectGetId()) + $this->oDownloadUrl->update(); + else + $this->oDownloadUrl->create(); + $this->oTestDataQueue->update(); }
1
0
0
0
Alexander Nicolaysen Sørnes : Fix handling of queued downloadurls
by Chris Morgan
03 Oct '08
03 Oct '08
Module: appdb Branch: master Commit: e86ccd1390852e1de7da9163f8e286e3fa4d5b52 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=e86ccd1390852e1de7da9163…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Oct 3 12:53:26 2008 +0200 Fix handling of queued downloadurls --- include/appData.php | 6 +++++- include/downloadurl.php | 2 +- include/version_queue.php | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/appData.php b/include/appData.php index a5e32c4..407c079 100644 --- a/include/appData.php +++ b/include/appData.php @@ -120,10 +120,14 @@ class appData function listSubmittedBy($iUserId, $bQueued = true) { + $sExtra = ''; + if($bQueued) // downloadurls are only queued together with versions + $sExtra = " AND appData.type != 'downloadurl' "; + $hResult = query_parameters("SELECT * FROM appData WHERE appData.submitterId = '?' AND - appData.state = '?' + appData.state = '?' $sExtra ORDER BY appData.id", $iUserId, $bQueued ? 'queued' : 'accepted'); diff --git a/include/downloadurl.php b/include/downloadurl.php index 3a50457..acdfdf4 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -330,7 +330,7 @@ class downloadurl VALUES('?', '?', '?', '?', '?', ?, '?')", $this->iVersionId, "downloadurl", $this->sDescription, $this->sUrl, - downloadurl::canEdit($this->iVersionId) ? 'accepted' : 'queued', + $this->mustBeQueued() ? 'queued' : 'accepted', "NOW()", $_SESSION['current']->iUserId); diff --git a/include/version_queue.php b/include/version_queue.php index 18cf062..553cb8e 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -69,6 +69,7 @@ class version_queue function update() { $this->oVersion->update(); + $this->oDownloadUrl->update(); $this->oTestDataQueue->update(); } @@ -195,6 +196,7 @@ class version_queue { $this->oVersion->iAppId = $aClean['iAppId']; $this->oVersion->getOutputEditorValues($aClean); + $this->oDownloadUrl->getOutputEditorValues($aClean); $this->oTestDataQueue->getOutputEditorValues($aClean); }
1
0
0
0
Jeff Zaroyko : msvcrt: Avoid a NULL pointer deref in ctime.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: 82f77cc17a190dbc87415fc697e76261fcbd972f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82f77cc17a190dbc87415fc69…
Author: Jeff Zaroyko <jeffz(a)jeffz.name> Date: Tue Sep 30 15:34:51 2008 +1000 msvcrt: Avoid a NULL pointer deref in ctime. --- dlls/msvcrt/tests/time.c | 8 ++++++++ dlls/msvcrt/time.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c index 1fe6cbf..33b2e56 100644 --- a/dlls/msvcrt/tests/time.c +++ b/dlls/msvcrt/tests/time.c @@ -31,6 +31,13 @@ #define MINSPERHOUR 60 #define HOURSPERDAY 24 +static void test_ctime(void) +{ + time_t badtime = -1; + char* ret; + ret = ctime(&badtime); + ok(ret == NULL, "expected ctime to return NULL, got %s\n", ret); +} static void test_gmtime(void) { time_t gmt = (time_t)NULL; @@ -249,6 +256,7 @@ static void test_wstrtime(void) START_TEST(time) { + test_ctime(); test_gmtime(); test_mktime(); test_localtime(); diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 69762e0..ba4e95c 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -447,7 +447,10 @@ MSVCRT_wchar_t * CDECL MSVCRT__wasctime(const struct MSVCRT_tm *mstm) */ char * CDECL MSVCRT_ctime(const MSVCRT_time_t *time) { - return MSVCRT_asctime( MSVCRT_localtime(time) ); + struct MSVCRT_tm *t; + t = MSVCRT_localtime( time ); + if (!t) return NULL; + return MSVCRT_asctime( t ); } /*********************************************************************
1
0
0
0
John Klehm : wintab32: Handle negative output context range for y-axe.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: b77f0a16726a962ede71b12128611d4826581448 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b77f0a16726a962ede71b1212…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Mon Sep 29 17:20:15 2008 -0500 wintab32: Handle negative output context range for y-axe. --- dlls/wintab32/context.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c index cf62154..bf46170 100644 --- a/dlls/wintab32/context.c +++ b/dlls/wintab32/context.c @@ -215,6 +215,8 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd) /* flip the Y axis */ if (ptr->context.lcOutExtY > 0) packet->pkY = ptr->context.lcOutExtY - packet->pkY; + else if (ptr->context.lcOutExtY < 0) + packet->pkY = abs(ptr->context.lcOutExtY + packet->pkY); DUMPPACKET(*packet);
1
0
0
0
John Klehm : wintab32: Improve tracing of LOGCONTEXT struct.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: bf1f0568d0eb32b809781fea846f2160430c095a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf1f0568d0eb32b809781fea8…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Wed Oct 1 11:26:05 2008 -0500 wintab32: Improve tracing of LOGCONTEXT struct. --- dlls/wintab32/context.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c index 9b1da18..cf62154 100644 --- a/dlls/wintab32/context.c +++ b/dlls/wintab32/context.c @@ -114,7 +114,19 @@ static inline void DUMPPACKET(WTPACKET packet) static inline void DUMPCONTEXT(LOGCONTEXTW lc) { - TRACE("context: %s, %x, %x, %x, %x, %x, %x, %x%s, %x%s, %x%s, %x, %x, %i, %i, %i, %i ,%i, %i, %i, %i, %i,%i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i %i %i\n", + TRACE("Name: %s, Options: %x, Status: %x, Locks: %x, MsgBase: %x, " + "Device: %x, PktRate: %x, " + "%x%s, %x%s, %x%s, " + "BtnDnMask: %x, BtnUpMask: %x, " + "InOrgX: %i, InOrgY: %i, InOrgZ: %i, " + "InExtX: %i, InExtY: %i, InExtZ: %i, " + "OutOrgX: %i, OutOrgY: %i, OutOrgZ: %i, " + "OutExtX: %i, OutExtY: %i, OutExtZ: %i, " + "SensX: %i, SensY: %i, SensZ: %i, " + "SysMode: %i, " + "SysOrgX: %i, SysOrgY: %i, " + "SysExtX: %i, SysExtY: %i, " + "SysSensX: %i, SysSensY: %i\n", wine_dbgstr_w(lc.lcName), lc.lcOptions, lc.lcStatus, lc.lcLocks, lc.lcMsgBase, lc.lcDevice, lc.lcPktRate, lc.lcPktData, DUMPBITS(lc.lcPktData), lc.lcPktMode, DUMPBITS(lc.lcPktMode), lc.lcMoveMask,
1
0
0
0
Andrey Turkin : dwmapi: Add a few stub implementations.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: a8790e55fdbbe944b9d389dfc6a6095087779599 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8790e55fdbbe944b9d389dfc…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Wed Oct 1 19:53:23 2008 +0400 dwmapi: Add a few stub implementations. --- dlls/dwmapi/dwmapi.spec | 6 +++--- dlls/dwmapi/dwmapi_main.c | 30 ++++++++++++++++++++++++++++++ include/dwmapi.h | 2 ++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/dwmapi/dwmapi.spec b/dlls/dwmapi/dwmapi.spec index bce53e5..63ee2f5 100644 --- a/dlls/dwmapi/dwmapi.spec +++ b/dlls/dwmapi/dwmapi.spec @@ -25,9 +25,9 @@ @ stub DwmDetachMilContent @ stub DwmEnableBlurBehindWindow @ stub DwmEnableMMCSS -@ stub DwmExtendFrameIntoClientArea -@ stub DwmFlush -@ stub DwmGetColorizationColor +@ stdcall DwmExtendFrameIntoClientArea(long ptr) +@ stdcall DwmFlush() +@ stdcall DwmGetColorizationColor(ptr long) @ stub DwmGetCompositionTimingInfo @ stub DwmGetGraphicsStreamClient @ stub DwmGetGraphicsStreamTransformHint diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 6a87701..e306c56 100644 --- a/dlls/dwmapi/dwmapi_main.c +++ b/dlls/dwmapi/dwmapi_main.c @@ -71,6 +71,36 @@ HRESULT WINAPI DwmEnableComposition(UINT uCompositionAction) } /********************************************************************** + * DwmExtendFrameIntoClientArea (DWMAPI.@) + */ +HRESULT WINAPI DwmExtendFrameIntoClientArea(HWND hwnd, const MARGINS* margins) +{ + FIXME("(%p, %p) stub\n", hwnd, margins); + + return E_NOTIMPL; +} + +/********************************************************************** + * DwmGetColorizationColor (DWMAPI.@) + */ +HRESULT WINAPI DwmGetColorizationColor(DWORD *colorization, BOOL opaque_blend) +{ + FIXME("(%p, %d) stub\n", colorization, opaque_blend); + + return E_NOTIMPL; +} + +/********************************************************************** + * DwmFlush (DWMAPI.@) + */ +HRESULT WINAPI DwmFlush() +{ + FIXME("() stub\n"); + + return E_NOTIMPL; +} + +/********************************************************************** * DwmSetWindowAttribute (DWMAPI.@) */ HRESULT WINAPI DwmSetWindowAttribute(HWND hwnd, DWORD attributenum, LPCVOID attribute, DWORD size) diff --git a/include/dwmapi.h b/include/dwmapi.h index 967efed..710e3f4 100644 --- a/include/dwmapi.h +++ b/include/dwmapi.h @@ -32,6 +32,8 @@ extern "C" { DECLARE_HANDLE(HTHUMBNAIL); DWMAPI DwmEnableComposition(UINT); +DWMAPI DwmExtendFrameIntoClientArea(HWND,const MARGINS*); +DWMAPI DwmGetColorizationColor(DWORD*,BOOL); DWMAPI DwmIsCompositionEnabled(BOOL*); DWMAPI DwmSetWindowAttribute(HWND, DWORD, LPCVOID, DWORD); DWMAPI DwmUnregisterThumbnail(HTHUMBNAIL);
1
0
0
0
Piotr Caban : msxml: Fix implementation of ISAXContentHandler_characters.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: 2a55b8d8e7002c16fca54f5b87a82a73e267b176 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a55b8d8e7002c16fca54f5b8…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Oct 1 19:52:48 2008 +0200 msxml: Fix implementation of ISAXContentHandler_characters. --- dlls/msxml3/saxreader.c | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 7d3946a..62058d1 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -197,6 +197,23 @@ static BSTR QName_from_xmlChar(const xmlChar *prefix, const xmlChar *name) return bstr; } +BSTR bstr_from_xmlChar_wn(const xmlChar *buf, int len) +{ + DWORD size; + LPWSTR str; + BSTR bstr; + + if(!buf) return NULL; + + size = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, NULL, 0); + str = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, size*sizeof(WCHAR)); + if(!str) return NULL; + MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)buf, len, str, size); + bstr = SysAllocStringLen(str, size); + HeapFree(GetProcessHeap(), 0, str); + return bstr; +} + static void format_error_message_from_id(saxlocator *This, HRESULT hr) { xmlStopParser(This->pParserCtxt); @@ -1176,8 +1193,6 @@ static void libxmlCharacters( chEnd = This->lastCur+len; while(*chEnd != '<') chEnd++; - Chars = bstr_from_xmlChar(ch); - lastCurCopy = This->lastCur; columnCopy = This->column; lineCopy = This->line; @@ -1195,7 +1210,7 @@ static void libxmlCharacters( end++; } - Chars = bstr_from_xmlChar(This->lastCur); + Chars = bstr_from_xmlChar_wn(This->lastCur, end-This->lastCur+2); if(*end == '\r' && *(end+1) == '\n') {
1
0
0
0
Piotr Caban : msxml: Partial implementation of ISAXXMLReader_putProperty.
by Alexandre Julliard
02 Oct '08
02 Oct '08
Module: wine Branch: master Commit: c7fc92655255024820207cd945281d60cb0765a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7fc92655255024820207cd94…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Wed Oct 1 19:52:36 2008 +0200 msxml: Partial implementation of ISAXXMLReader_putProperty. --- dlls/msxml3/saxreader.c | 171 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 165 insertions(+), 6 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 646df91..7d3946a 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -55,7 +55,12 @@ typedef struct _saxreader struct IVBSAXContentHandler *vbcontentHandler; struct ISAXErrorHandler *errorHandler; struct IVBSAXErrorHandler *vberrorHandler; + struct ISAXLexicalHandler *lexicalHandler; + struct IVBSAXLexicalHandler *vblexicalHandler; + struct ISAXDeclHandler *declHandler; + struct IVBSAXDeclHandler *vbdeclHandler; xmlSAXHandler sax; + BOOL isParsing; } saxreader; typedef struct _saxlocator @@ -1664,8 +1669,10 @@ static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int siz locator->pParserCtxt->sax = &locator->saxreader->sax; locator->pParserCtxt->userData = locator; + This->isParsing = TRUE; if(xmlParseDocument(locator->pParserCtxt)) hr = E_FAIL; else hr = locator->ret; + This->isParsing = FALSE; if(locator->pParserCtxt) { @@ -1702,6 +1709,7 @@ static HRESULT internal_parseStream(saxreader *This, IStream *stream, BOOL vbInt return E_FAIL; } + This->isParsing = TRUE; while(1) { hr = IStream_Read(stream, data, sizeof(data), &dataRead); @@ -1721,6 +1729,7 @@ static HRESULT internal_parseStream(saxreader *This, IStream *stream, BOOL vbInt break; } } + This->isParsing = FALSE; locator->pParserCtxt->sax = NULL; xmlFreeParserCtxt(locator->pParserCtxt); @@ -1975,6 +1984,143 @@ static HRESULT WINAPI internal_parseURL( return S_OK; } +static HRESULT WINAPI internal_putProperty( + saxreader* This, + const WCHAR *pProp, + VARIANT value, + BOOL vbInterface) +{ + static const WCHAR wszCharset[] = { + 'c','h','a','r','s','e','t',0 + }; + static const WCHAR wszDeclarationHandler[] = { + 'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/', + 's','a','x','/','p','r','o','p','e','r','t','i','e','s','/', + 'd','e','c','l','a','r','a','t','i','o','n', + '-','h','a','n','d','l','e','r',0 + }; + static const WCHAR wszDomNode[] = { + 'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/', + 's','a','x','/','p','r','o','p','e','r','t','i','e','s','/', + 'd','o','m','-','n','o','d','e',0 + }; + static const WCHAR wszInputSource[] = { + 'i','n','p','u','t','-','s','o','u','r','c','e',0 + }; + static const WCHAR wszLexicalHandler[] = { + 'h','t','t','p',':','/','/','x','m','l','.','o','r','g','/', + 's','a','x','/','p','r','o','p','e','r','t','i','e','s','/', + 'l','e','x','i','c','a','l','-','h','a','n','d','l','e','r',0 + }; + static const WCHAR wszMaxElementDepth[] = { + 'm','a','x','-','e','l','e','m','e','n','t','-','d','e','p','t','h',0 + }; + static const WCHAR wszMaxXMLSize[] = { + 'm','a','x','-','x','m','l','-','s','i','z','e',0 + }; + static const WCHAR wszSchemaDeclarationHandler[] = { + 's','c','h','e','m','a','-', + 'd','e','c','l','a','r','a','t','i','o','n','-', + 'h','a','n','d','l','e','r',0 + }; + static const WCHAR wszXMLDeclEncoding[] = { + 'x','m','l','d','e','c','l','-','e','n','c','o','d','i','n','g',0 + }; + static const WCHAR wszXMLDeclStandalone[] = { + 'x','m','l','d','e','c','l', + '-','s','t','a','n','d','a','l','o','n','e',0 + }; + static const WCHAR wszXMLDeclVersion[] = { + 'x','m','l','d','e','c','l','-','v','e','r','s','i','o','n',0 + }; + + FIXME("(%p)->(%s): semi-stub\n", This, debugstr_w(pProp)); + + if(!memcmp(pProp, wszCharset, sizeof(wszCharset))) + return E_NOTIMPL; + + if(!memcmp(pProp, wszDeclarationHandler, sizeof(wszDeclarationHandler))) + { + if(This->isParsing) return E_FAIL; + + if(V_UNKNOWN(&value)) + { + if(vbInterface) + IVBSAXDeclHandler_AddRef((IVBSAXDeclHandler*)V_UNKNOWN(&value)); + else + ISAXDeclHandler_AddRef((ISAXDeclHandler*)V_UNKNOWN(&value)); + } + if((vbInterface && This->vbdeclHandler) + || (!vbInterface && This->declHandler)) + { + if(vbInterface) + IVBSAXDeclHandler_Release(This->vbdeclHandler); + else + ISAXDeclHandler_Release(This->declHandler); + } + if(vbInterface) + This->vbdeclHandler = (IVBSAXDeclHandler*)V_UNKNOWN(&value); + else + This->declHandler = (ISAXDeclHandler*)V_UNKNOWN(&value); + return S_OK; + } + + if(!memcmp(pProp, wszDomNode, sizeof(wszDomNode))) + return E_FAIL; + + if(!memcmp(pProp, wszInputSource, sizeof(wszInputSource))) + return E_NOTIMPL; + + if(!memcmp(pProp, wszLexicalHandler, sizeof(wszLexicalHandler))) + { + if(This->isParsing) return E_FAIL; + + if(V_UNKNOWN(&value)) + { + if(vbInterface) + IVBSAXLexicalHandler_AddRef( + (IVBSAXLexicalHandler*)V_UNKNOWN(&value)); + else + ISAXLexicalHandler_AddRef( + (ISAXLexicalHandler*)V_UNKNOWN(&value)); + } + if((vbInterface && This->vblexicalHandler) + || (!vbInterface && This->lexicalHandler)) + { + if(vbInterface) + IVBSAXLexicalHandler_Release(This->vblexicalHandler); + else + ISAXLexicalHandler_Release(This->lexicalHandler); + } + if(vbInterface) + This->vblexicalHandler = (IVBSAXLexicalHandler*)V_UNKNOWN(&value); + else + This->lexicalHandler = (ISAXLexicalHandler*)V_UNKNOWN(&value); + return S_OK; + } + + if(!memcmp(pProp, wszMaxElementDepth, sizeof(wszMaxElementDepth))) + return E_NOTIMPL; + + if(!memcmp(pProp, wszMaxXMLSize, sizeof(wszMaxXMLSize))) + return E_NOTIMPL; + + if(!memcmp(pProp, wszSchemaDeclarationHandler, + sizeof(wszSchemaDeclarationHandler))) + return E_NOTIMPL; + + if(!memcmp(pProp, wszXMLDeclEncoding, sizeof(wszXMLDeclEncoding))) + return E_FAIL; + + if(!memcmp(pProp, wszXMLDeclStandalone, sizeof(wszXMLDeclStandalone))) + return E_FAIL; + + if(!memcmp(pProp, wszXMLDeclVersion, sizeof(wszXMLDeclVersion))) + return E_FAIL; + + return E_INVALIDARG; +} + /*** IVBSAXXMLReader interface ***/ /*** IUnknown methods ***/ static HRESULT WINAPI saxxmlreader_QueryInterface(IVBSAXXMLReader* iface, REFIID riid, void **ppvObject) @@ -2036,6 +2182,18 @@ static ULONG WINAPI saxxmlreader_Release( if(This->vberrorHandler) IVBSAXErrorHandler_Release(This->vberrorHandler); + if(This->lexicalHandler) + ISAXLexicalHandler_Release(This->lexicalHandler); + + if(This->vblexicalHandler) + IVBSAXLexicalHandler_Release(This->vblexicalHandler); + + if(This->declHandler) + ISAXDeclHandler_Release(This->declHandler); + + if(This->vbdeclHandler) + IVBSAXDeclHandler_Release(This->vbdeclHandler); + HeapFree( GetProcessHeap(), 0, This ); } @@ -2164,9 +2322,7 @@ static HRESULT WINAPI saxxmlreader_putProperty( VARIANT value) { saxreader *This = impl_from_IVBSAXXMLReader( iface ); - - FIXME("(%p)->(%s) stub\n", This, debugstr_w(pProp)); - return E_NOTIMPL; + return internal_putProperty(This, pProp, value, TRUE); } static HRESULT WINAPI saxxmlreader_get_entityResolver( @@ -2379,9 +2535,7 @@ static HRESULT WINAPI isaxxmlreader_putProperty( VARIANT value) { saxreader *This = impl_from_ISAXXMLReader( iface ); - return IVBSAXXMLReader_putProperty( - (IVBSAXXMLReader*)&This->lpVBSAXXMLReaderVtbl, - pProp, value); + return internal_putProperty(This, pProp, value, FALSE); } static HRESULT WINAPI isaxxmlreader_getEntityResolver( @@ -2546,6 +2700,11 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) reader->vbcontentHandler = NULL; reader->errorHandler = NULL; reader->vberrorHandler = NULL; + reader->lexicalHandler = NULL; + reader->vblexicalHandler = NULL; + reader->declHandler = NULL; + reader->vbdeclHandler = NULL; + reader->isParsing = FALSE; memset(&reader->sax, 0, sizeof(xmlSAXHandler)); reader->sax.initialized = XML_SAX2_MAGIC;
1
0
0
0
← Newer
1
...
108
109
110
111
112
113
114
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200