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
January 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
736 discussions
Start a n
N
ew thread
Christian Costa : d3dx9_36: Initialize properly object in CreateEnumObject.
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: 8aa700e7ba41e57e299c4033a866c4e1e02e8417 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8aa700e7ba41e57e299c4033a…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Jan 18 08:49:09 2013 +0100 d3dx9_36: Initialize properly object in CreateEnumObject. --- dlls/d3dx9_36/xfile.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c index 234e071..d54ef0f 100644 --- a/dlls/d3dx9_36/xfile.c +++ b/dlls/d3dx9_36/xfile.c @@ -492,7 +492,7 @@ static HRESULT WINAPI ID3DXFileImpl_CreateEnumObject(ID3DXFile *iface, const voi return E_NOTIMPL; } - object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object)); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) return E_OUTOFMEMORY;
1
0
0
0
Christian Costa : winealsa.drv: Fix F0 and F7 byte insertion + memory leak and remove LP stuff in modLongData .
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: d727596a5be24073a7f79aa39f2965580f7395b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d727596a5be24073a7f79aa39…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Jan 18 08:48:22 2013 +0100 winealsa.drv: Fix F0 and F7 byte insertion + memory leak and remove LP stuff in modLongData. --- dlls/winealsa.drv/midi.c | 51 ++++++++++++++++++++++----------------------- 1 files changed, 25 insertions(+), 26 deletions(-) diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c index 7c496c5..25a722e 100644 --- a/dlls/winealsa.drv/midi.c +++ b/dlls/winealsa.drv/midi.c @@ -931,8 +931,8 @@ static DWORD modData(WORD wDevID, DWORD dwParam) */ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) { - int len_add = 0; - LPBYTE lpData, lpNewData = NULL; + int len_add = 0; + BYTE *lpData, *lpNewData = NULL; snd_seq_event_t event; TRACE("(%04X, %p, %08X);\n", wDevID, lpMidiHdr, dwSize); @@ -941,7 +941,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) * but it seems to be used only for midi input. * Taking a look at the WAVEHDR structure (which is quite similar) confirms this assumption. */ - + if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID; if (!MidiOutDev[wDevID].bEnabled) return MIDIERR_NODEVICE; @@ -950,8 +950,8 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) return MIDIERR_NODEVICE; } - lpData = (LPBYTE) lpMidiHdr->lpData; - + lpData = (BYTE*)lpMidiHdr->lpData; + if (lpData == NULL) return MIDIERR_UNPREPARED; if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) @@ -978,25 +978,25 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) switch (MidiOutDev[wDevID].caps.wTechnology) { case MOD_FMSYNTH: - /* FIXME: I don't think there is much to do here */ - break; + /* FIXME: I don't think there is much to do here */ + HeapFree(GetProcessHeap(), 0, lpNewData); + break; case MOD_MIDIPORT: - if (lpData[0] != 0xF0) { - /* Send start of System Exclusive */ - len_add = 1; - lpData[0] = 0xF0; - memcpy(lpNewData, lpData, lpMidiHdr->dwBufferLength); - WARN("Adding missing 0xF0 marker at the beginning of " - "system exclusive byte stream\n"); - } - if (lpData[lpMidiHdr->dwBufferLength-1] != 0xF7) { - /* Send end of System Exclusive */ - memcpy(lpData + len_add, lpData, lpMidiHdr->dwBufferLength); - lpNewData[lpMidiHdr->dwBufferLength + len_add - 1] = 0xF0; - len_add++; - WARN("Adding missing 0xF7 marker at the end of " - "system exclusive byte stream\n"); - } + if (lpData[0] != 0xF0) { + /* Send start of System Exclusive */ + len_add = 1; + lpNewData[0] = 0xF0; + memcpy(lpNewData + 1, lpData, lpMidiHdr->dwBufferLength); + WARN("Adding missing 0xF0 marker at the beginning of system exclusive byte stream\n"); + } + if (lpData[lpMidiHdr->dwBufferLength-1] != 0xF7) { + /* Send end of System Exclusive */ + if (!len_add) + memcpy(lpNewData, lpData, lpMidiHdr->dwBufferLength); + lpNewData[lpMidiHdr->dwBufferLength + len_add] = 0xF7; + len_add++; + WARN("Adding missing 0xF7 marker at the end of system exclusive byte stream\n"); + } snd_seq_ev_clear(&event); snd_seq_ev_set_direct(&event); snd_seq_ev_set_source(&event, port_out); @@ -1004,9 +1004,8 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) TRACE("client = %d port = %d\n", MidiOutDev[wDevID].addr.client, MidiOutDev[wDevID].addr.port); snd_seq_ev_set_sysex(&event, lpMidiHdr->dwBufferLength + len_add, lpNewData ? lpNewData : lpData); snd_seq_event_output_direct(midiSeq, &event); - if (lpNewData) - HeapFree(GetProcessHeap(), 0, lpData); - break; + HeapFree(GetProcessHeap(), 0, lpNewData); + break; default: WARN("Technology not supported (yet) %d !\n", MidiOutDev[wDevID].caps.wTechnology);
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: d7ac251e8dc69687c8c64f4ecd63168783e2ff60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7ac251e8dc69687c8c64f4ec…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 18 08:38:28 2013 +0400 po: Update Russian translation. --- po/ru.po | 164 ++++++++++++++++++++++++++++++-------------------------------- 1 files changed, 79 insertions(+), 85 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d7ac251e8dc69687c8c64…
1
0
0
0
Nikolay Sivov : xmllite: Initial support for start tag parsing.
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: 61b46738274a7d4ad9b7bc5c5b51615feb8951bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61b46738274a7d4ad9b7bc5c5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 18 10:04:27 2013 +0400 xmllite: Initial support for start tag parsing. --- dlls/xmllite/reader.c | 140 +++++++++++++++++++++++++++++++++++++++--- dlls/xmllite/tests/reader.c | 67 ++++++++++++++++++++ 2 files changed, 197 insertions(+), 10 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index c3f53b4..058875a 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -51,7 +51,8 @@ typedef enum XmlReadInState_Misc_DTD, XmlReadInState_DTD, XmlReadInState_DTD_Misc, - XmlReadInState_Element + XmlReadInState_Element, + XmlReadInState_Content } XmlReaderInternalState; typedef enum @@ -448,11 +449,28 @@ static void readerinput_grow(xmlreaderinput *readerinput, int length) } } -static HRESULT readerinput_detectencoding(xmlreaderinput *readerinput, xml_encoding *enc) +static inline int readerinput_is_utf8(xmlreaderinput *readerinput) { - encoded_buffer *buffer = &readerinput->buffer->encoded; static char startA[] = {'<','?'}; static char commentA[] = {'<','!'}; + encoded_buffer *buffer = &readerinput->buffer->encoded; + unsigned char *ptr = (unsigned char*)buffer->data; + + return !memcmp(buffer->data, startA, sizeof(startA)) || + !memcmp(buffer->data, commentA, sizeof(commentA)) || + /* test start byte */ + (ptr[0] == '<' && + ( + (ptr[1] && (ptr[1] <= 0x7f)) || + (buffer->data[1] >> 5) == 0x6 || /* 2 bytes */ + (buffer->data[1] >> 4) == 0xe || /* 3 bytes */ + (buffer->data[1] >> 3) == 0x1e) /* 4 bytes */ + ); +} + +static HRESULT readerinput_detectencoding(xmlreaderinput *readerinput, xml_encoding *enc) +{ + encoded_buffer *buffer = &readerinput->buffer->encoded; static WCHAR startW[] = {'<','?'}; static WCHAR commentW[] = {'<','!'}; static char utf8bom[] = {0xef,0xbb,0xbf}; @@ -464,8 +482,7 @@ static HRESULT readerinput_detectencoding(xmlreaderinput *readerinput, xml_encod /* try start symbols if we have enough data to do that, input buffer should contain first chunk already */ - if (!memcmp(buffer->data, startA, sizeof(startA)) || - !memcmp(buffer->data, commentA, sizeof(commentA))) + if (readerinput_is_utf8(readerinput)) *enc = XmlEncoding_UTF8; else if (!memcmp(buffer->data, startW, sizeof(startW)) || !memcmp(buffer->data, commentW, sizeof(commentW))) @@ -987,9 +1004,10 @@ static inline int is_namestartchar(WCHAR ch) (ch >= 0xfdf0 && ch <= 0xfffd); } -static inline int is_namechar(WCHAR ch) +/* [4 NS] NCName ::= Name - (Char* ':' Char*) */ +static inline int is_ncnamechar(WCHAR ch) { - return (ch == ':') || (ch >= 'A' && ch <= 'Z') || + return (ch >= 'A' && ch <= 'Z') || (ch == '_') || (ch >= 'a' && ch <= 'z') || (ch == '-') || (ch == '.') || (ch >= '0' && ch <= '9') || @@ -1011,6 +1029,11 @@ static inline int is_namechar(WCHAR ch) (ch >= 0xfdf0 && ch <= 0xfffd); } +static inline int is_namechar(WCHAR ch) +{ + return (ch == ':') || is_ncnamechar(ch); +} + /* [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] @@ -1316,11 +1339,106 @@ static HRESULT reader_parse_dtd(xmlreader *reader) return S_OK; } +/* [7 NS] QName ::= PrefixedName | UnprefixedName + [8 NS] PrefixedName ::= Prefix ':' LocalPart + [9 NS] UnprefixedName ::= LocalPart + [10 NS] Prefix ::= NCName + [11 NS] LocalPart ::= NCName */ +static HRESULT reader_parse_qname(xmlreader *reader, strval *prefix, strval *local, strval *qname) +{ + WCHAR *ptr, *start = reader_get_cur(reader); + + ptr = start; + if (!is_ncnamechar(*ptr)) return NC_E_QNAMECHARACTER; + + while (is_ncnamechar(*ptr)) + { + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + } + + /* got a qualified name */ + if (*ptr == ':') + { + prefix->str = start; + prefix->len = ptr-start; + + reader_skipn(reader, 1); + start = ptr = reader_get_cur(reader); + + while (is_ncnamechar(*ptr)) + { + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + } + } + else + { + prefix->str = NULL; + prefix->len = 0; + } + + local->str = start; + local->len = ptr-start; + + if (prefix->len) + TRACE("qname %s:%s\n", debugstr_wn(prefix->str, prefix->len), debugstr_wn(local->str, local->len)); + else + TRACE("ncname %s\n", debugstr_wn(local->str, local->len)); + + qname->str = prefix->str ? prefix->str : local->str; + /* count ':' too */ + qname->len = (prefix->len ? prefix->len + 1 : 0) + local->len; + + return S_OK; +} + +/* [12 NS] STag ::= '<' QName (S Attribute)* S? '>' + [14 NS] EmptyElemTag ::= '<' QName (S Attribute)* S? '/>' */ +static HRESULT reader_parse_stag(xmlreader *reader, strval *prefix, strval *local, strval *qname) +{ + static const WCHAR endW[] = {'/','>',0}; + HRESULT hr; + + /* skip '<' */ + reader_skipn(reader, 1); + + hr = reader_parse_qname(reader, prefix, local, qname); + if (FAILED(hr)) return hr; + + reader_skipspaces(reader); + + if (!reader_cmp(reader, endW)) return S_OK; + + FIXME("only empty elements without attributes supported\n"); + return E_NOTIMPL; +} + /* [39] element ::= EmptyElemTag | STag content ETag */ static HRESULT reader_parse_element(xmlreader *reader) { - FIXME("element parsing not implemented\n"); - return E_NOTIMPL; + static const WCHAR ltW[] = {'<',0}; + strval qname, prefix, local; + HRESULT hr; + + /* check if we are really on element */ + if (reader_cmp(reader, ltW)) return S_FALSE; + reader_shrink(reader); + + /* this handles empty elements too */ + hr = reader_parse_stag(reader, &prefix, &local, &qname); + if (FAILED(hr)) return hr; + + /* FIXME: need to check for defined namespace to reject invalid prefix, + currently reject all prefixes */ + if (prefix.len) return NC_E_UNDECLAREDPREFIX; + + reader->nodetype = XmlNodeType_Element; + reader_set_strvalue(reader, StringValue_LocalName, &local); + reader_set_strvalue(reader, StringValue_QualifiedName, &qname); + + FIXME("element content parsing not implemented\n"); + return hr; } static HRESULT reader_parse_nextnode(xmlreader *reader) @@ -1389,7 +1507,9 @@ static HRESULT reader_parse_nextnode(xmlreader *reader) case XmlReadInState_Element: hr = reader_parse_element(reader); if (FAILED(hr)) return hr; - break; + + reader->instate = XmlReadInState_Content; + return hr; default: FIXME("internal state %d not handled\n", reader->instate); return E_NOTIMPL; diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index d084e7b..7394564 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -1022,6 +1022,72 @@ todo_wine { IXmlReader_Release(reader); } +static struct test_entry element_tests[] = { + { "<a/>", "a", "", S_OK }, + { "<a />", "a", "", S_OK }, + { "<a:b/>", "a:b", "", NC_E_UNDECLAREDPREFIX }, + { "<:a/>", NULL, NULL, NC_E_QNAMECHARACTER }, + { "< a/>", NULL, NULL, NC_E_QNAMECHARACTER }, + { NULL } +}; + +static void test_read_element(void) +{ + struct test_entry *test = element_tests; + IXmlReader *reader; + HRESULT hr; + + hr = pCreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL); + ok(hr == S_OK, "S_OK, got %08x\n", hr); + + while (test->xml) + { + XmlNodeType type; + IStream *stream; + + stream = create_stream_on_data(test->xml, strlen(test->xml)+1); + hr = IXmlReader_SetInput(reader, (IUnknown*)stream); + ok(hr == S_OK, "got %08x\n", hr); + + type = XmlNodeType_None; + hr = IXmlReader_Read(reader, &type); + if (test->hr_broken) + ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml); + else + ok(hr == test->hr, "got %08x for %s\n", hr, test->xml); + if (hr == S_OK) + { + const WCHAR *str; + WCHAR *str_exp; + UINT len; + + ok(type == XmlNodeType_Element, "got %d for %s\n", type, test->xml); + + len = 0; + str = NULL; + hr = IXmlReader_GetQualifiedName(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(len == strlen(test->name), "got %u\n", len); + str_exp = a2w(test->name); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + free_str(str_exp); + + /* value */ + len = 1; + str = NULL; + hr = IXmlReader_GetValue(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(len == 0, "got %u\n", len); + ok(*str == 0, "got %s\n", wine_dbgstr_w(str)); + } + + IStream_Release(stream); + test++; + } + + IXmlReader_Release(reader); +} + START_TEST(reader) { HRESULT r; @@ -1041,6 +1107,7 @@ START_TEST(reader) test_read_comment(); test_read_pi(); test_read_dtd(); + test_read_element(); test_read_full(); test_read_xmldeclaration();
1
0
0
0
Nikolay Sivov : qmgr: Remove separate release helpers.
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: 53e25cb4f60bd2d760a9b2fe8b83de3765ad89d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53e25cb4f60bd2d760a9b2fe8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 18 08:39:15 2013 +0400 qmgr: Remove separate release helpers. --- dlls/qmgr/file.c | 15 ++++++--------- dlls/qmgr/job.c | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c index 5fa5d09..ccba81b 100644 --- a/dlls/qmgr/file.c +++ b/dlls/qmgr/file.c @@ -40,14 +40,6 @@ static inline BackgroundCopyFileImpl *impl_from_IBackgroundCopyFile(IBackgroundC return CONTAINING_RECORD(iface, BackgroundCopyFileImpl, IBackgroundCopyFile_iface); } -static void BackgroundCopyFileDestructor(BackgroundCopyFileImpl *This) -{ - IBackgroundCopyJob2_Release(&This->owner->IBackgroundCopyJob2_iface); - HeapFree(GetProcessHeap(), 0, This->info.LocalName); - HeapFree(GetProcessHeap(), 0, This->info.RemoteName); - HeapFree(GetProcessHeap(), 0, This); -} - static HRESULT WINAPI BITS_IBackgroundCopyFile_QueryInterface( IBackgroundCopyFile* iface, REFIID riid, @@ -86,7 +78,12 @@ static ULONG WINAPI BITS_IBackgroundCopyFile_Release( TRACE("(%p)->(%d)\n", This, ref); if (ref == 0) - BackgroundCopyFileDestructor(This); + { + IBackgroundCopyJob2_Release(&This->owner->IBackgroundCopyJob2_iface); + HeapFree(GetProcessHeap(), 0, This->info.LocalName); + HeapFree(GetProcessHeap(), 0, This->info.RemoteName); + HeapFree(GetProcessHeap(), 0, This); + } return ref; } diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 26fc43e..4abf220 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -28,14 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qmgr); -static void BackgroundCopyJobDestructor(BackgroundCopyJobImpl *This) -{ - This->cs.DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&This->cs); - HeapFree(GetProcessHeap(), 0, This->displayName); - HeapFree(GetProcessHeap(), 0, This); -} - static inline BackgroundCopyJobImpl *impl_from_IBackgroundCopyJob2(IBackgroundCopyJob2 *iface) { return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJob2_iface); @@ -77,7 +69,12 @@ static ULONG WINAPI BITS_IBackgroundCopyJob_Release(IBackgroundCopyJob2 *iface) TRACE("(%p)->(%d)\n", This, ref); if (ref == 0) - BackgroundCopyJobDestructor(This); + { + This->cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&This->cs); + HeapFree(GetProcessHeap(), 0, This->displayName); + HeapFree(GetProcessHeap(), 0, This); + } return ref; }
1
0
0
0
Nikolay Sivov : qmgr: COM cleanup for IBackgroundCopyFile interface.
by Alexandre Julliard
18 Jan '13
18 Jan '13
Module: wine Branch: master Commit: d4edda8c4627c76dfa2ef769b864faaec6959caa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4edda8c4627c76dfa2ef769b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jan 18 08:38:49 2013 +0400 qmgr: COM cleanup for IBackgroundCopyFile interface. --- dlls/qmgr/enum_files.c | 4 +- dlls/qmgr/file.c | 53 ++++++++++++++++++++++++++++------------------- dlls/qmgr/job.c | 6 +--- dlls/qmgr/qmgr.h | 4 +- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/dlls/qmgr/enum_files.c b/dlls/qmgr/enum_files.c index 9f1b505..7b0e505 100644 --- a/dlls/qmgr/enum_files.c +++ b/dlls/qmgr/enum_files.c @@ -202,8 +202,8 @@ HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBack i = 0; LIST_FOR_EACH_ENTRY(file, &job->files, BackgroundCopyFileImpl, entryFromJob) { - file->lpVtbl->AddRef((IBackgroundCopyFile *) file); - This->files[i] = (IBackgroundCopyFile *) file; + IBackgroundCopyFile_AddRef(&file->IBackgroundCopyFile_iface); + This->files[i] = &file->IBackgroundCopyFile_iface; ++i; } LeaveCriticalSection(&job->cs); diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c index 9d9d9c1..5fa5d09 100644 --- a/dlls/qmgr/file.c +++ b/dlls/qmgr/file.c @@ -35,6 +35,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(qmgr); +static inline BackgroundCopyFileImpl *impl_from_IBackgroundCopyFile(IBackgroundCopyFile *iface) +{ + return CONTAINING_RECORD(iface, BackgroundCopyFileImpl, IBackgroundCopyFile_iface); +} + static void BackgroundCopyFileDestructor(BackgroundCopyFileImpl *This) { IBackgroundCopyJob2_Release(&This->owner->IBackgroundCopyJob2_iface); @@ -43,38 +48,43 @@ static void BackgroundCopyFileDestructor(BackgroundCopyFileImpl *This) HeapFree(GetProcessHeap(), 0, This); } -static ULONG WINAPI BITS_IBackgroundCopyFile_AddRef(IBackgroundCopyFile* iface) -{ - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; - return InterlockedIncrement(&This->ref); -} - static HRESULT WINAPI BITS_IBackgroundCopyFile_QueryInterface( IBackgroundCopyFile* iface, REFIID riid, - void **ppvObject) + void **obj) { - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IBackgroundCopyFile)) { - *ppvObject = &This->lpVtbl; - BITS_IBackgroundCopyFile_AddRef(iface); + *obj = iface; + IBackgroundCopyFile_AddRef(iface); return S_OK; } - *ppvObject = NULL; + *obj = NULL; return E_NOINTERFACE; } +static ULONG WINAPI BITS_IBackgroundCopyFile_AddRef(IBackgroundCopyFile* iface) +{ + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p)->(%d)\n", This, ref); + return ref; +} static ULONG WINAPI BITS_IBackgroundCopyFile_Release( IBackgroundCopyFile* iface) { - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); ULONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p)->(%d)\n", This, ref); + if (ref == 0) BackgroundCopyFileDestructor(This); @@ -86,7 +96,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetRemoteName( IBackgroundCopyFile* iface, LPWSTR *pVal) { - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); int n = (lstrlenW(This->info.RemoteName) + 1) * sizeof(WCHAR); *pVal = CoTaskMemAlloc(n); @@ -101,7 +111,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetLocalName( IBackgroundCopyFile* iface, LPWSTR *pVal) { - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); int n = (lstrlenW(This->info.LocalName) + 1) * sizeof(WCHAR); *pVal = CoTaskMemAlloc(n); @@ -116,7 +126,7 @@ static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress( IBackgroundCopyFile* iface, BG_FILE_PROGRESS *pVal) { - BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface; + BackgroundCopyFileImpl *This = impl_from_IBackgroundCopyFile(iface); EnterCriticalSection(&This->owner->cs); pVal->BytesTotal = This->fileProgress.BytesTotal; @@ -139,13 +149,12 @@ static const IBackgroundCopyFileVtbl BITS_IBackgroundCopyFile_Vtbl = HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, LPCWSTR remoteName, LPCWSTR localName, - LPVOID *ppObj) + BackgroundCopyFileImpl **file) { BackgroundCopyFileImpl *This; int n; - TRACE("(%s,%s,%p)\n", debugstr_w(remoteName), - debugstr_w(localName), ppObj); + TRACE("(%s, %s, %p)\n", debugstr_w(remoteName), debugstr_w(localName), file); This = HeapAlloc(GetProcessHeap(), 0, sizeof *This); if (!This) @@ -170,7 +179,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, } memcpy(This->info.LocalName, localName, n); - This->lpVtbl = &BITS_IBackgroundCopyFile_Vtbl; + This->IBackgroundCopyFile_iface.lpVtbl = &BITS_IBackgroundCopyFile_Vtbl; This->ref = 1; This->fileProgress.BytesTotal = BG_SIZE_UNKNOWN; @@ -179,7 +188,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, This->owner = owner; IBackgroundCopyJob2_AddRef(&owner->IBackgroundCopyJob2_iface); - *ppObj = &This->lpVtbl; + *file = This; return S_OK; } @@ -236,7 +245,7 @@ static ULONG WINAPI DLBindStatusCallback_Release(IBindStatusCallback *iface) if (ref == 0) { - IBackgroundCopyFile_Release((IBackgroundCopyFile *) This->file); + IBackgroundCopyFile_Release(&This->file->IBackgroundCopyFile_iface); HeapFree(GetProcessHeap(), 0, This); } @@ -365,7 +374,7 @@ static DLBindStatusCallback *DLBindStatusCallbackConstructor( return NULL; This->IBindStatusCallback_iface.lpVtbl = &DLBindStatusCallback_Vtbl; - IBackgroundCopyFile_AddRef((IBackgroundCopyFile *) file); + IBackgroundCopyFile_AddRef(&file->IBackgroundCopyFile_iface); This->file = file; This->ref = 1; return This; diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 4d9bf18..26fc43e 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -106,20 +106,18 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_AddFile( LPCWSTR LocalName) { BackgroundCopyJobImpl *This = impl_from_IBackgroundCopyJob2(iface); - IBackgroundCopyFile *pFile; BackgroundCopyFileImpl *file; HRESULT res; /* We should return E_INVALIDARG in these cases. */ FIXME("Check for valid filenames and supported protocols\n"); - res = BackgroundCopyFileConstructor(This, RemoteUrl, LocalName, (LPVOID *) &pFile); + res = BackgroundCopyFileConstructor(This, RemoteUrl, LocalName, &file); if (res != S_OK) return res; /* Add a reference to the file to file list */ - IBackgroundCopyFile_AddRef(pFile); - file = (BackgroundCopyFileImpl *) pFile; + IBackgroundCopyFile_AddRef(&file->IBackgroundCopyFile_iface); EnterCriticalSection(&This->cs); list_add_head(&This->files, &file->entryFromJob); This->jobProgress.BytesTotal = BG_SIZE_UNKNOWN; diff --git a/dlls/qmgr/qmgr.h b/dlls/qmgr/qmgr.h index 0039db7..215c200 100644 --- a/dlls/qmgr/qmgr.h +++ b/dlls/qmgr/qmgr.h @@ -49,7 +49,7 @@ typedef struct /* Background copy file vtbl and related data */ typedef struct { - const IBackgroundCopyFileVtbl *lpVtbl; + IBackgroundCopyFile IBackgroundCopyFile_iface; LONG ref; BG_FILE_INFO info; BG_FILE_PROGRESS fileProgress; @@ -84,7 +84,7 @@ HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr, IEnumBackgroundCopyJobs **enumjob) DECLSPEC_HIDDEN; HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, LPCWSTR remoteName, LPCWSTR localName, - LPVOID *ppObj) DECLSPEC_HIDDEN; + BackgroundCopyFileImpl **file) DECLSPEC_HIDDEN; HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl*, IEnumBackgroundCopyFiles**) DECLSPEC_HIDDEN; DWORD WINAPI fileTransfer(void *param) DECLSPEC_HIDDEN; void processJob(BackgroundCopyJobImpl *job) DECLSPEC_HIDDEN;
1
0
0
0
Lauri Kenttä : po: Update Finnish translation.
by Alexandre Julliard
17 Jan '13
17 Jan '13
Module: wine Branch: master Commit: 175039e736fde0b8114c38068aeceadc0bc03759 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=175039e736fde0b8114c38068…
Author: Lauri Kenttä <lauri.kentta(a)gmail.com> Date: Thu Jan 17 21:24:30 2013 +0200 po: Update Finnish translation. --- po/fi.po | 78 ++++++++++++++++++++------------------------------------------ 1 files changed, 25 insertions(+), 53 deletions(-) diff --git a/po/fi.po b/po/fi.po index b2e0ffa..cd023d1 100644 --- a/po/fi.po +++ b/po/fi.po @@ -3535,7 +3535,7 @@ msgstr "Päättymätön merkkijonovakio" #: jscript.rc:39 msgid "'return' statement outside of function" -msgstr "" +msgstr "'return' funktion ulkopuolella" #: jscript.rc:40 msgid "Can't have 'break' outside of loop" @@ -8269,16 +8269,12 @@ msgid "Don't install" msgstr "Älä asenna" #: urlmon.rc:40 -#, fuzzy -#| msgid "" -#| "When installed, ActiveX has full access to your computer.Do not click " -#| "install unless you have absolute trust in the above source." msgid "" "When installed, an ActiveX component has full access to your computer. Do " "not click install unless you have absolute trust in the above source." msgstr "" -"Asennuksen jälkeen ActiveX voi täysin hallita tietokonettasi. Asenna vain, " -"jos luotat yllä mainittuun lähteeseen täysin." +"Asennuksen jälkeen ActiveX-komponentti voi täysin hallita tietokonettasi. " +"Asenna vain, jos luotat yllä mainittuun lähteeseen täysin." #: urlmon.rc:48 msgid "Installation of component failed: %08x" @@ -10072,10 +10068,8 @@ msgid "Wine Command Prompt" msgstr "Winen komentokehote" #: cmd.rc:349 -#, fuzzy -#| msgid "CMD Version %1!S!\n" msgid "Wine CMD Version %1!S!\n" -msgstr "CMD versio %1!S!\n" +msgstr "Wine CMD versio %1!S!\n" #: cmd.rc:350 msgid "More? " @@ -10108,27 +10102,27 @@ msgstr "'%1' ei ole sisäinen eikä ulkoinen komento eikä komentojono.\n" #: cmd.rc:357 msgid "Division by zero error.\n" -msgstr "" +msgstr "Virheellinen jako nollalla.\n" #: cmd.rc:358 msgid "Expected an operand.\n" -msgstr "" +msgstr "Odotettiin operandia.\n" #: cmd.rc:359 -#, fuzzy -#| msgid "Unexpected network error.\n" msgid "Expected an operator.\n" -msgstr "Odottamaton verkkovirhe.\n" +msgstr "Odotettiin operaattoria.\n" #: cmd.rc:360 msgid "Mismatch in parentheses.\n" -msgstr "" +msgstr "Sulut eivät täsmää.\n" #: cmd.rc:361 msgid "" "Badly formed number - must be one of decimal (12),\n" " hexadecimal (0x34) or octal (056).\n" msgstr "" +"Luvun muoto on virheellinen – täytyy olla desimaaliluku (12),\n" +" heksadesimaaliluku (0x34) tai oktaaliluku (056).\n" #: dxdiag.rc:27 msgid "DirectX Diagnostic Tool" @@ -10177,10 +10171,8 @@ msgid "Connection-specific DNS suffix" msgstr "Yhteysspesifinen DNS-pääte" #: ipconfig.rc:33 -#, fuzzy -#| msgid "IP address" msgid "IPv4 address" -msgstr "IP-osoite" +msgstr "IPv4-osoite" #: ipconfig.rc:34 msgid "Hostname" @@ -10223,10 +10215,8 @@ msgid "Default gateway" msgstr "Oletusyhdyskäytävä" #: ipconfig.rc:47 -#, fuzzy -#| msgid "IP address" msgid "IPv6 address" -msgstr "IP-osoite" +msgstr "IPv6-osoite" #: net.rc:27 msgid "" @@ -10359,78 +10349,60 @@ msgid "The following services are running:\n" msgstr "Seuraavat palvelut ovat toiminnassa:\n" #: netstat.rc:27 -#, fuzzy -#| msgid "LAN Connection" msgid "Active Connections" -msgstr "Lähiverkkoyhteys" +msgstr "Aktiiviset yhteydet" #: netstat.rc:28 msgid "Proto" -msgstr "" +msgstr "Prot." #: netstat.rc:29 -#, fuzzy -#| msgid "Email Address" msgid "Local Address" -msgstr "Sähköpostiosoite" +msgstr "Paikallinen osoite" #: netstat.rc:30 -#, fuzzy -#| msgid "Street Address" msgid "Foreign Address" -msgstr "Katuosoite" +msgstr "Etäosoite" #: netstat.rc:31 -#, fuzzy -#| msgid "Status" msgid "State" msgstr "Tila" #: netstat.rc:32 -#, fuzzy -#| msgid "Interfaces" msgid "Interface Statistics" -msgstr "Rajapinnat" +msgstr "Rajapinnan tilastot" #: netstat.rc:33 msgid "Sent" -msgstr "" +msgstr "Lähetetty" #: netstat.rc:34 msgid "Received" -msgstr "" +msgstr "Vastaanotettu" #: netstat.rc:35 -#, fuzzy -#| msgid "bytes" msgid "Bytes" -msgstr "tavua" +msgstr "Tavuja" #: netstat.rc:36 msgid "Unicast packets" -msgstr "" +msgstr "Unicast-paketteja" #: netstat.rc:37 msgid "Non-unicast packets" -msgstr "" +msgstr "Ei-unicast-paketteja" #: netstat.rc:38 -#, fuzzy -#| msgid "Disclaimer" msgid "Discards" -msgstr "Vastuuvapaus" +msgstr "Hylkäyksiä" #: netstat.rc:39 -#, fuzzy -#| msgid "Error" msgid "Errors" -msgstr "Virhe" +msgstr "Virheitä" #: netstat.rc:40 -#, fuzzy -#| msgid "Unknown port.\n" msgid "Unknown protocols" -msgstr "Tuntematon portti.\n" +msgstr "Vieraita protokollia" #: notepad.rc:27 msgid "&New\tCtrl+N"
1
0
0
0
Nikolay Sivov : qmgr: COM cleanup of IBackgroundCopyJob2 interface.
by Alexandre Julliard
17 Jan '13
17 Jan '13
Module: wine Branch: master Commit: a7449dbf598c009f4af62c04969dff0f77f5a12d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7449dbf598c009f4af62c049…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jan 17 22:39:26 2013 +0400 qmgr: COM cleanup of IBackgroundCopyJob2 interface. --- dlls/qmgr/enum_files.c | 7 ++--- dlls/qmgr/enum_jobs.c | 6 ++-- dlls/qmgr/file.c | 4 +- dlls/qmgr/job.c | 64 +++++++++++++++++++++++++++-------------------- dlls/qmgr/qmgr.c | 9 +++--- dlls/qmgr/qmgr.h | 7 ++--- 6 files changed, 52 insertions(+), 45 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a7449dbf598c009f4af62…
1
0
0
0
Aric Stewart : usp10: Implement GPOS Cursive Attachment Positioning Subtable.
by Alexandre Julliard
17 Jan '13
17 Jan '13
Module: wine Branch: master Commit: 62b4f31d6ddcbb7a76f6ca5378ffe157288d4835 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62b4f31d6ddcbb7a76f6ca537…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Jan 17 09:57:16 2013 -0600 usp10: Implement GPOS Cursive Attachment Positioning Subtable. --- dlls/usp10/opentype.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index e729919..3bec2d3 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -375,6 +375,18 @@ typedef struct { } GPOS_PairSet; typedef struct { + WORD EntryAnchor; + WORD ExitAnchor; +} GPOS_EntryExitRecord; + +typedef struct { + WORD PosFormat; + WORD Coverage; + WORD EntryExitCount; + GPOS_EntryExitRecord EntryExitRecord[1]; +} GPOS_CursivePosFormat1; + +typedef struct { WORD PosFormat; WORD MarkCoverage; WORD BaseCoverage; @@ -1333,6 +1345,49 @@ static INT GPOS_apply_PairAdjustment(const OT_LookupTable *look, const SCRIPT_AN return glyph_index+1; } +static VOID GPOS_apply_CursiveAttachment(const OT_LookupTable *look, const SCRIPT_ANALYSIS *analysis, const WORD *glyphs, INT glyph_index, + INT glyph_count, INT ppem, LPPOINT pt) +{ + int j; + int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1; + + if (glyph_index + write_dir < 0 || glyph_index + write_dir >= glyph_count) return; + + TRACE("Cursive Attachment Positioning Subtable\n"); + + for (j = 0; j < GET_BE_WORD(look->SubTableCount); j++) + { + const GPOS_CursivePosFormat1 *cpf1; + WORD offset = GET_BE_WORD(look->SubTable[j]); + cpf1 = (const GPOS_CursivePosFormat1*)((const BYTE*)look+offset); + if (GET_BE_WORD(cpf1->PosFormat) == 1) + { + int index_exit, index_entry; + offset = GET_BE_WORD( cpf1->Coverage ); + index_exit = GSUB_is_glyph_covered((const BYTE*)cpf1+offset, glyphs[glyph_index]); + if (index_exit != -1 && cpf1->EntryExitRecord[index_exit].ExitAnchor!= 0) + { + index_entry = GSUB_is_glyph_covered((const BYTE*)cpf1+offset, glyphs[glyph_index+write_dir]); + if (index_entry != -1 && cpf1->EntryExitRecord[index_entry].EntryAnchor != 0) + { + POINT exit_pt, entry_pt; + offset = GET_BE_WORD(cpf1->EntryExitRecord[index_exit].ExitAnchor); + GPOS_get_anchor_values((const BYTE*)cpf1 + offset, &exit_pt, ppem); + offset = GET_BE_WORD(cpf1->EntryExitRecord[index_entry].EntryAnchor); + GPOS_get_anchor_values((const BYTE*)cpf1 + offset, &entry_pt, ppem); + TRACE("Found linkage %x[%i,%i] %x[%i,%i]\n",glyphs[glyph_index], exit_pt.x,exit_pt.y, glyphs[glyph_index+write_dir], entry_pt.x, entry_pt.y); + pt->x = entry_pt.x - exit_pt.x; + pt->y = entry_pt.y - exit_pt.y; + return; + } + } + } + else + FIXME("Cursive Attachment Positioning: Format %i Unhandled\n",GET_BE_WORD(cpf1->PosFormat)); + } + return; +} + static VOID GPOS_apply_MarkToBase(const OT_LookupTable *look, const SCRIPT_ANALYSIS *analysis, const WORD *glyphs, INT glyph_index, INT glyph_count, INT ppem, LPPOINT pt) { @@ -1726,6 +1781,21 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c } return index; } + case 3: + { + POINT desU = {0,0}; + double devX, devY; + int write_dir = (analysis->fRTL && !analysis->fLogicalOrder) ? -1 : 1; + + GPOS_apply_CursiveAttachment(look, analysis, glyphs, glyph_index, glyph_count, ppem, &desU); + if (desU.x || desU.y) + { + GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY); + /* Windows does not appear to apply X offsets here */ + pGoffset[glyph_index].dv = round(devY) + pGoffset[glyph_index+write_dir].dv; + } + break; + } case 4: { double devX, devY;
1
0
0
0
Hans Leidekker : wmiutils: Implement IWbemPath::SetNamespaceAt.
by Alexandre Julliard
17 Jan '13
17 Jan '13
Module: wine Branch: master Commit: f4597120b150eaa6fd0d7ba6b12b435dbffb53fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4597120b150eaa6fd0d7ba6b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 17 15:31:45 2013 +0100 wmiutils: Implement IWbemPath::SetNamespaceAt. --- dlls/wmiutils/path.c | 48 ++++++++++++++++++++++-- dlls/wmiutils/tests/path.c | 75 ++++++++++++++++++++++++++++++++++++++ dlls/wmiutils/wmiutils_private.h | 6 +++ 3 files changed, 125 insertions(+), 4 deletions(-) diff --git a/dlls/wmiutils/path.c b/dlls/wmiutils/path.c index 73c1c62..afcad67 100644 --- a/dlls/wmiutils/path.c +++ b/dlls/wmiutils/path.c @@ -500,11 +500,50 @@ static HRESULT WINAPI path_GetNamespaceCount( static HRESULT WINAPI path_SetNamespaceAt( IWbemPath *iface, - ULONG uIndex, - LPCWSTR pszName) + ULONG idx, + LPCWSTR name) { - FIXME("%p, %u, %s\n", iface, uIndex, debugstr_w(pszName)); - return E_NOTIMPL; + struct path *path = impl_from_IWbemPath( iface ); + static const ULONGLONG flags = + WBEMPATH_INFO_V1_COMPLIANT | WBEMPATH_INFO_V2_COMPLIANT | + WBEMPATH_INFO_CIM_COMPLIANT; + int i, *tmp_len; + WCHAR **tmp, *new; + DWORD size; + + TRACE("%p, %u, %s\n", iface, idx, debugstr_w(name)); + + if (idx > path->num_namespaces || !name) return WBEM_E_INVALID_PARAMETER; + if (!(new = strdupW( name ))) return WBEM_E_OUT_OF_MEMORY; + + size = (path->num_namespaces + 1) * sizeof(WCHAR *); + if (path->namespaces) tmp = heap_realloc( path->namespaces, size ); + else tmp = heap_alloc( size ); + if (!tmp) + { + heap_free( new ); + return WBEM_E_OUT_OF_MEMORY; + } + path->namespaces = tmp; + size = (path->num_namespaces + 1) * sizeof(int); + if (path->len_namespaces) tmp_len = heap_realloc( path->len_namespaces, size ); + else tmp_len = heap_alloc( size ); + if (!tmp_len) + { + heap_free( new ); + return WBEM_E_OUT_OF_MEMORY; + } + path->len_namespaces = tmp_len; + for (i = idx; i < path->num_namespaces; i++) + { + path->namespaces[i + 1] = path->namespaces[i]; + path->len_namespaces[i + 1] = path->len_namespaces[i]; + } + path->namespaces[idx] = new; + path->len_namespaces[idx] = strlenW( new ); + path->num_namespaces++; + path->flags |= flags; + return S_OK; } static HRESULT WINAPI path_GetNamespaceAt( @@ -532,6 +571,7 @@ static HRESULT WINAPI path_RemoveNamespaceAt( TRACE("%p, %u\n", iface, idx); if (idx >= path->num_namespaces) return WBEM_E_INVALID_PARAMETER; + heap_free( path->namespaces[idx] ); while (idx < path->num_namespaces - 1) { diff --git a/dlls/wmiutils/tests/path.c b/dlls/wmiutils/tests/path.c index 049d9b3..31246e9 100644 --- a/dlls/wmiutils/tests/path.c +++ b/dlls/wmiutils/tests/path.c @@ -702,6 +702,80 @@ static void test_IWbemPath_RemoveNamespaceAt(void) IWbemPath_Release( path ); } +static void test_IWbemPath_SetNamespaceAt(void) +{ + static const ULONGLONG expected_flags = + WBEMPATH_INFO_ANON_LOCAL_MACHINE | WBEMPATH_INFO_V1_COMPLIANT | + WBEMPATH_INFO_V2_COMPLIANT | WBEMPATH_INFO_CIM_COMPLIANT | + WBEMPATH_INFO_SERVER_NAMESPACE_ONLY; + static const WCHAR rootW[] = {'r','o','o','t',0}; + static const WCHAR cimv2W[] = {'c','i','m','v','2',0}; + IWbemPath *path; + WCHAR buf[16]; + ULONG len, count; + ULONGLONG flags; + HRESULT hr; + + if (!(path = create_path())) return; + + hr = IWbemPath_SetNamespaceAt( path, 0, NULL ); + ok( hr == WBEM_E_INVALID_PARAMETER, "got %08x\n", hr ); + + hr = IWbemPath_SetNamespaceAt( path, 1, cimv2W ); + ok( hr == WBEM_E_INVALID_PARAMETER, "got %08x\n", hr ); + + hr = IWbemPath_SetNamespaceAt( path, 0, cimv2W ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = IWbemPath_GetNamespaceCount( path, &count ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 1, "got %u\n", count ); + + flags = 0; + hr = IWbemPath_GetInfo( path, 0, &flags ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( flags == expected_flags, + "got %lx%08lx\n", (unsigned long)(flags >> 32), (unsigned long)flags ); + + buf[0] = 0; + len = sizeof(buf) / sizeof(buf[0]); + hr = IWbemPath_GetNamespaceAt( path, 0, &len, buf ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !lstrcmpW( buf, cimv2W ), "unexpected buffer contents %s\n", wine_dbgstr_w(buf) ); + ok( len == lstrlenW( cimv2W ) + 1, "unexpected length %u\n", len ); + + hr = IWbemPath_SetNamespaceAt( path, 0, rootW ); + ok( hr == S_OK, "got %08x\n", hr ); + + flags = 0; + hr = IWbemPath_GetInfo( path, 0, &flags ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( flags == expected_flags, + "got %lx%08lx\n", (unsigned long)(flags >> 32), (unsigned long)flags ); + + count = 0xdeadbeef; + hr = IWbemPath_GetNamespaceCount( path, &count ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + + buf[0] = 0; + len = sizeof(buf) / sizeof(buf[0]); + hr = IWbemPath_GetNamespaceAt( path, 0, &len, buf ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !lstrcmpW( buf, rootW ), "unexpected buffer contents %s\n", wine_dbgstr_w(buf) ); + ok( len == lstrlenW( rootW ) + 1, "unexpected length %u\n", len ); + + buf[0] = 0; + len = sizeof(buf) / sizeof(buf[0]); + hr = IWbemPath_GetNamespaceAt( path, 1, &len, buf ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !lstrcmpW( buf, cimv2W ), "unexpected buffer contents %s\n", wine_dbgstr_w(buf) ); + ok( len == lstrlenW( cimv2W ) + 1, "unexpected length %u\n", len ); + + IWbemPath_Release( path ); +} + START_TEST (path) { CoInitialize( NULL ); @@ -716,6 +790,7 @@ START_TEST (path) test_IWbemPath_GetNamespaceAt(); test_IWbemPath_RemoveAllNamespaces(); test_IWbemPath_RemoveNamespaceAt(); + test_IWbemPath_SetNamespaceAt(); CoUninitialize(); } diff --git a/dlls/wmiutils/wmiutils_private.h b/dlls/wmiutils/wmiutils_private.h index 9837ce8..98180c9 100644 --- a/dlls/wmiutils/wmiutils_private.h +++ b/dlls/wmiutils/wmiutils_private.h @@ -27,6 +27,12 @@ static inline void *heap_alloc( size_t len ) return HeapAlloc( GetProcessHeap(), 0, len ); } +static void *heap_realloc( void *mem, size_t len ) __WINE_ALLOC_SIZE(2); +static inline void *heap_realloc( void *mem, size_t len ) +{ + return HeapReAlloc( GetProcessHeap(), 0, mem, len ); +} + static inline BOOL heap_free( void *mem ) { return HeapFree( GetProcessHeap(), 0, mem );
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
74
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
Results per page:
10
25
50
100
200