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
May
April
March
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
June 2011
----- 2025 -----
May 2025
April 2025
March 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
809 discussions
Start a n
N
ew thread
Rico Schüller : d3dx9: Implement ID3DXBaseEffect:: GetIntArray().
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: a93b40f0fc423c7a8157b4c78e54e4784da5b87f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a93b40f0fc423c7a8157b4c78…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Jun 9 07:38:42 2011 +0200 d3dx9: Implement ID3DXBaseEffect::GetIntArray(). --- dlls/d3dx9_36/effect.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index ef5ad0b..137293c 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1662,10 +1662,29 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetIntArray(ID3DXBaseEffect *iface, D3 static HRESULT WINAPI ID3DXBaseEffectImpl_GetIntArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, INT *n, UINT count) { struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface); + struct d3dx_parameter *param = is_valid_parameter(This, parameter); - FIXME("iface %p, parameter %p, n %p, count %u stub\n", This, parameter, n, count); + TRACE("iface %p, parameter %p, n %p, count %u\n", This, parameter, n, count); - return E_NOTIMPL; + if (!param) param = get_parameter_by_name(This, NULL, parameter); + + if (n && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + n[i] = get_int(param->type, (DWORD *)param->data + i); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI ID3DXBaseEffectImpl_SetFloat(ID3DXBaseEffect *iface, D3DXHANDLE parameter, FLOAT f)
1
0
0
0
Rico Schüller : d3dx9: Implement ID3DXBaseEffect:: GetFloatArray().
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: ecf37efd8287740d62392afbf4093e22fd47dd53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ecf37efd8287740d62392afbf…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Jun 9 07:38:34 2011 +0200 d3dx9: Implement ID3DXBaseEffect::GetFloatArray(). --- dlls/d3dx9_36/effect.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index c18d581..ef5ad0b 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1710,10 +1710,29 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetFloatArray(ID3DXBaseEffect *iface, static HRESULT WINAPI ID3DXBaseEffectImpl_GetFloatArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, FLOAT *f, UINT count) { struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface); + struct d3dx_parameter *param = is_valid_parameter(This, parameter); - FIXME("iface %p, parameter %p, f %p, count %u stub\n", This, parameter, f, count); + TRACE("iface %p, parameter %p, f %p, count %u\n", This, parameter, f, count); - return E_NOTIMPL; + if (!param) param = get_parameter_by_name(This, NULL, parameter); + + if (f && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + f[i] = get_float(param->type, (DWORD *)param->data + i); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI ID3DXBaseEffectImpl_SetVector(ID3DXBaseEffect* iface, D3DXHANDLE parameter, CONST D3DXVECTOR4* vector)
1
0
0
0
Dylan Smith : d3dxof: Factor out parse template loops into a function.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 80705f5a91cd7b9e2483fb8625c5b5323fe50334 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80705f5a91cd7b9e2483fb862…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jun 8 15:39:05 2011 -0400 d3dxof: Factor out parse template loops into a function. --- dlls/d3dxof/d3dxof.c | 51 +++++++---------------------------------- dlls/d3dxof/d3dxof_private.h | 4 +-- dlls/d3dxof/parsing.c | 25 ++++++++++++++++++-- 3 files changed, 32 insertions(+), 48 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 031f780..b353020 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -225,20 +225,9 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV if (FAILED(hr)) goto error; - while (object->buf.rem_bytes && is_template_available(&object->buf)) - { - if (!parse_template(&object->buf)) - { - WARN("Template is not correct\n"); - hr = DXFILEERR_BADVALUE; - goto error; - } - else - { - TRACE("Template successfully parsed:\n"); - if (TRACE_ON(d3dxof)) - dump_template(This->xtemplates, &This->xtemplates[This->nb_xtemplates - 1]); - } + if (!parse_templates(&object->buf)) { + hr = DXFILEERR_BADVALUE; + goto error; } if (TRACE_ON(d3dxof)) @@ -299,20 +288,9 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP if (FAILED(hr)) goto cleanup; - while (buf.rem_bytes && is_template_available(&buf)) - { - if (!parse_template(&buf)) - { - WARN("Template is not correct\n"); - hr = DXFILEERR_BADVALUE; - goto cleanup; - } - else - { - TRACE("Template successfully parsed:\n"); - if (TRACE_ON(d3dxof)) - dump_template(This->xtemplates, &This->xtemplates[This->nb_xtemplates - 1]); - } + if (!parse_templates(&buf)) { + hr = DXFILEERR_BADVALUE; + goto cleanup; } if (TRACE_ON(d3dxof)) @@ -970,20 +948,9 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE } /* Check if there are templates defined before the object */ - while (This->buf.rem_bytes && is_template_available(&This->buf)) - { - if (!parse_template(&This->buf)) - { - WARN("Template is not correct\n"); - hr = DXFILEERR_BADVALUE; - goto error; - } - else - { - TRACE("Template successfully parsed:\n"); - if (TRACE_ON(d3dxof)) - dump_template(This->pDirectXFile->xtemplates, &This->pDirectXFile->xtemplates[This->pDirectXFile->nb_xtemplates - 1]); - } + if (!parse_templates(&This->buf)) { + hr = DXFILEERR_BADVALUE; + goto error; } if (!This->buf.rem_bytes) diff --git a/dlls/d3dxof/d3dxof_private.h b/dlls/d3dxof/d3dxof_private.h index 15dca52..40870ac 100644 --- a/dlls/d3dxof/d3dxof_private.h +++ b/dlls/d3dxof/d3dxof_private.h @@ -164,10 +164,8 @@ HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HID BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size) DECLSPEC_HIDDEN; HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN; -BOOL parse_template(parse_buffer * buf) DECLSPEC_HIDDEN; -void dump_template(xtemplate* templates_array, xtemplate* ptemplate) DECLSPEC_HIDDEN; -BOOL is_template_available(parse_buffer * buf) DECLSPEC_HIDDEN; BOOL parse_object(parse_buffer * buf) DECLSPEC_HIDDEN; +BOOL parse_templates(parse_buffer * buf) DECLSPEC_HIDDEN; int mszip_decompress(int inlen, int outlen, char* inbuffer, char* outbuffer) DECLSPEC_HIDDEN; diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index 7682dfe..4d72219 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -125,7 +125,7 @@ static const char* get_primitive_string(WORD token) return NULL; } -void dump_template(xtemplate* templates_array, xtemplate* ptemplate) +static void dump_template(xtemplate* templates_array, xtemplate* ptemplate) { int j, k; GUID* clsid; @@ -858,7 +858,7 @@ static WORD check_TOKEN(parse_buffer * buf) return buf->current_token; } -BOOL is_template_available(parse_buffer * buf) +static BOOL is_template_available(parse_buffer * buf) { return check_TOKEN(buf) == TOKEN_TEMPLATE; } @@ -1076,7 +1076,7 @@ static void go_to_next_definition(parse_buffer * buf) } } -BOOL parse_template(parse_buffer * buf) +static BOOL parse_template(parse_buffer * buf) { if (get_TOKEN(buf) != TOKEN_TEMPLATE) return FALSE; @@ -1104,6 +1104,25 @@ BOOL parse_template(parse_buffer * buf) return TRUE; } +BOOL parse_templates(parse_buffer * buf) +{ + while (buf->rem_bytes && is_template_available(buf)) + { + if (!parse_template(buf)) + { + WARN("Template is not correct\n"); + return FALSE; + } + else + { + TRACE("Template successfully parsed:\n"); + if (TRACE_ON(d3dxof_parsing)) + dump_template(buf->pdxf->xtemplates, &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates - 1]); + } + } + return TRUE; +} + static BOOL check_buffer(parse_buffer * buf, ULONG size) { if ((buf->cur_pos_data + size) > buf->capacity)
1
0
0
0
Dylan Smith : d3dxof: Factor out duplicated code for parsing X file header.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 18740e862362e9558cfb7cfb25a13500d05538fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=18740e862362e9558cfb7cfb2…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jun 8 15:38:58 2011 -0400 d3dxof: Factor out duplicated code for parsing X file header. --- dlls/d3dxof/d3dxof.c | 236 +++++------------------------------------- dlls/d3dxof/d3dxof_private.h | 1 + dlls/d3dxof/parsing.c | 101 ++++++++++++++++++ 3 files changed, 129 insertions(+), 209 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=18740e862362e9558cfb7…
1
0
0
0
Dylan Smith : d3dxof: Remove unnecessary fields from IDirectXFileEnumObjectImpl.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 5819cc5c013ea1d0e273b15087d13dc16a6ba64b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5819cc5c013ea1d0e273b1508…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jun 8 15:38:51 2011 -0400 d3dxof: Remove unnecessary fields from IDirectXFileEnumObjectImpl. --- dlls/d3dxof/d3dxof.c | 46 ++++++++++++++--------------------------- dlls/d3dxof/d3dxof_private.h | 6 +---- 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 6717fc7..8392c31 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -141,17 +141,12 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV IDirectXFileEnumObjectImpl* object; HRESULT hr; DWORD* header; - HANDLE hFile = INVALID_HANDLE_VALUE; - HANDLE file_mapping = 0; - LPBYTE buffer = NULL; - HGLOBAL resource_data = 0; + LPBYTE mapped_memory = NULL; LPBYTE decomp_buffer = NULL; DWORD decomp_size = 0; LPBYTE file_buffer; DWORD file_size; - LPDXFILELOADMEMORY lpdxflm = NULL; - TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj); if (!ppEnumObj) @@ -162,6 +157,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV if (dwLoadOptions == DXFILELOAD_FROMFILE) { + HANDLE hFile, file_mapping; + TRACE("Open source file '%s'\n", (char*)pvSource); hFile = CreateFileA(pvSource, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); @@ -176,21 +173,25 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV file_mapping = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL); if (!file_mapping) { + CloseHandle(hFile); hr = DXFILEERR_BADFILETYPE; goto error; } - buffer = MapViewOfFile(file_mapping, FILE_MAP_READ, 0, 0, 0); - if (!buffer) + mapped_memory = MapViewOfFile(file_mapping, FILE_MAP_READ, 0, 0, 0); + CloseHandle(file_mapping); + CloseHandle(hFile); + if (!mapped_memory) { hr = DXFILEERR_BADFILETYPE; goto error; } - file_buffer = buffer; + file_buffer = mapped_memory; } else if (dwLoadOptions == DXFILELOAD_FROMRESOURCE) { HRSRC resource_info; + HGLOBAL resource_data; LPDXFILELOADRESOURCE lpdxflr = pvSource; TRACE("Source in resource (module = %p, name = %s, type = %s\n", lpdxflr->hModule, debugstr_a(lpdxflr->lpName), debugstr_a(lpdxflr->lpType)); @@ -220,7 +221,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV } else if (dwLoadOptions == DXFILELOAD_FROMMEMORY) { - lpdxflm = pvSource; + LPDXFILELOADMEMORY lpdxflm = pvSource; TRACE("Source in memory at %p with size %d\n", lpdxflm->lpMemory, lpdxflm->dSize); @@ -312,10 +313,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV if (FAILED(hr)) goto error; - object->source = dwLoadOptions; - object->hFile = hFile; - object->file_mapping = file_mapping; - object->buffer = buffer; + object->mapped_memory = mapped_memory; object->decomp_buffer = decomp_buffer; object->pDirectXFile = This; object->buf.pdxf = This; @@ -366,14 +364,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV return DXFILE_OK; error: - if (buffer) - UnmapViewOfFile(buffer); - if (file_mapping) - CloseHandle(file_mapping); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle(hFile); - if (resource_data) - FreeResource(resource_data); + if (mapped_memory) + UnmapViewOfFile(mapped_memory); HeapFree(GetProcessHeap(), 0, decomp_buffer); *ppEnumObj = NULL; @@ -1134,14 +1126,8 @@ static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* i int i; for (i = 0; i < This->nb_xobjects; i++) IDirectXFileData_Release(This->pRefObjects[i]); - if (This->source == DXFILELOAD_FROMFILE) - { - UnmapViewOfFile(This->buffer); - CloseHandle(This->file_mapping); - CloseHandle(This->hFile); - } - else if (This->source == DXFILELOAD_FROMRESOURCE) - FreeResource(This->resource_data); + if (This->mapped_memory) + UnmapViewOfFile(This->mapped_memory); HeapFree(GetProcessHeap(), 0, This->decomp_buffer); HeapFree(GetProcessHeap(), 0, This); } diff --git a/dlls/d3dxof/d3dxof_private.h b/dlls/d3dxof/d3dxof_private.h index 927ccc4..5e61d65 100644 --- a/dlls/d3dxof/d3dxof_private.h +++ b/dlls/d3dxof/d3dxof_private.h @@ -146,11 +146,7 @@ typedef struct { typedef struct { IDirectXFileEnumObject IDirectXFileEnumObject_iface; LONG ref; - DXFILELOADOPTIONS source; - HANDLE hFile; - HANDLE file_mapping; - LPBYTE buffer; - HGLOBAL resource_data; + LPBYTE mapped_memory; LPBYTE decomp_buffer; parse_buffer buf; IDirectXFileImpl* pDirectXFile;
1
0
0
0
Aric Stewart : usp10: Strip dangling joiners for Sinhala.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 0f795650f811d6f27557655c3ab8001fc20f6780 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f795650f811d6f27557655c3…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 8 14:05:22 2011 -0500 usp10: Strip dangling joiners for Sinhala. --- dlls/usp10/shape.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index f64dbd7..03d97f4 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -2036,6 +2036,7 @@ static const VowelComponents Sinhala_vowels[] = { static void ContextualShape_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust) { int cCount = cChars; + int i; WCHAR *input; if (*pcGlyphs != cChars) @@ -2057,7 +2058,15 @@ static void ContextualShape_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS * Indic_ReorderCharacters( input, cCount, sinhala_lex, Reorder_Like_Sinhala); TRACE("reordered string %s\n",debugstr_wn(input,cCount)); - /* Step 3: Get glyphs */ + /* Step 3: Strip dangling joiners */ + for (i = 0; i < cCount; i++) + { + if ((input[i] == 0x200D || input[i] == 0x200C) && + (i == 0 || input[i-1] == 0x0020 || i == cCount-1 || input[i+1] == 0x0020)) + input[i] = 0x0020; + } + + /* Step 4: Get glyphs */ GetGlyphIndicesW(hdc, input, cCount, pwOutGlyphs, 0); *pcGlyphs = cCount;
1
0
0
0
Aric Stewart : usp10: Sinhala vowels are not fully decomposed. The Kombuva is simply split off.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 428d3b025e4049ba5d48fb804e06d6a1b3ecd7d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=428d3b025e4049ba5d48fb804…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 8 14:05:10 2011 -0500 usp10: Sinhala vowels are not fully decomposed. The Kombuva is simply split off. --- dlls/usp10/shape.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 5d0c3d4..f64dbd7 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1806,6 +1806,8 @@ static void DecomposeVowels(HDC hdc, WCHAR *pwOutChars, INT *pcChars, const Vowe if (pwOutChars[cWalk] == vowels[i].base) { ReplaceInsertChars(hdc, cWalk, pcChars, pwOutChars, vowels[i].parts); + if (vowels[i].parts[1]) cWalk++; + if (vowels[i].parts[2]) cWalk++; break; } } @@ -2007,7 +2009,7 @@ static int sinhala_lex(WCHAR c) case 0x0DD9: case 0x0DDB: return lex_Matra_pre; case 0x0DDA: - case 0x0DDC: return lex_Composed_Vowel; + case 0x0DDC: return lex_Matra_post; case 0x200D: return lex_ZWJ; case 0x200C: return lex_ZWNJ; case 0x00A0: return lex_NBSP; @@ -2018,17 +2020,17 @@ static int sinhala_lex(WCHAR c) else if (c>=0x0DD0 && c <=0x0DD1) return lex_Matra_post; else if (c>=0x0DD2 && c <=0x0DD3) return lex_Matra_above; else if (c>=0x0DD4 && c <=0x0DD6) return lex_Matra_below; - else if (c>=0x0DDD && c <=0x0DDE) return lex_Composed_Vowel; + else if (c>=0x0DDD && c <=0x0DDE) return lex_Matra_post; else if (c>=0x0DF2 && c <=0x0DF3) return lex_Matra_post; else return lex_Generic; } } static const VowelComponents Sinhala_vowels[] = { - {0x0DDA, {0x0DD9,0x0DCA,0x0}}, - {0x0DDC, {0x0DD9,0x0DCF,0x0}}, - {0x0DDD, {0x0DD9,0x0DCF,0x0DCA}}, - {0x0DDE, {0x0DD9,0x0DDF,0x0}}, + {0x0DDA, {0x0DD9,0x0DDA,0x0}}, + {0x0DDC, {0x0DD9,0x0DDC,0x0}}, + {0x0DDD, {0x0DD9,0x0DDD,0x0}}, + {0x0DDE, {0x0DD9,0x0DDE,0x0}}, {0x0000, {0x0000,0x0000,0x0}}}; static void ContextualShape_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
1
0
0
0
Alexandre Julliard : rpcrt4/tests: Add a few more marshalling tests.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 3c5688a80d9798a52bcbe73594104c2b533ba486 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c5688a80d9798a52bcbe7359…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 12:07:18 2011 +0200 rpcrt4/tests: Add a few more marshalling tests. --- dlls/rpcrt4/tests/server.c | 53 +++++++++++++++++++++++++++++++++++++++++- dlls/rpcrt4/tests/server.idl | 9 +++++- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 1764718..f959d9d 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -106,6 +106,41 @@ s_sum(int x, int y) return x + y; } +signed char s_sum_char(signed char x, signed char y) +{ + return x + y; +} + +short s_sum_short(short x, short y) +{ + return x + y; +} + +int s_sum_float(float x, float y) +{ + return x + y; +} + +int s_sum_double_int(int x, double y) +{ + return x + y; +} + +hyper s_sum_hyper(hyper x, hyper y) +{ + return x + y; +} + +int s_sum_hyper_int(hyper x, hyper y) +{ + return x + y; +} + +int s_sum_char_hyper(signed char x, hyper y) +{ + return x + y; +} + void s_square_out(int x, int *y) { @@ -825,6 +860,7 @@ basic_tests(void) short h; char c; int x; + hyper y; str_struct_t ss = {string}; wstr_struct_t ws = {wstring}; str_t str; @@ -834,7 +870,22 @@ basic_tests(void) ok(int_return() == INT_CODE, "RPC int_return\n"); ok(square(7) == 49, "RPC square\n"); - ok(sum(23, -4) == 19, "RPC sum\n"); + x = sum(23, -4); + ok(x == 19, "RPC sum got %d\n", x); + c = sum_char(-23, 50); + ok(c == 27, "RPC sum_char got %d\n", (int)c); + h = sum_short(1122, -344); + ok(h == 778, "RPC sum_short got %d\n", (int)h); + x = sum_float(123.45, -32.2); + ok(x == 91, "RPC sum_float got %d\n", x); + x = sum_double_int(-78, 148.46); + ok(x == 70, "RPC sum_double_int got %d\n", x); + y = sum_hyper((hyper)0x12345678 << 16, (hyper)0x33557799 << 16); + ok(y == (hyper)0x4589ce11 << 16, "RPC hyper got %x%08x\n", (DWORD)(y >> 32), (DWORD)y); + x = sum_hyper_int((hyper)0x24242424 << 16, -((hyper)0x24241212 << 16)); + ok(x == 0x12120000, "RPC hyper_int got 0x%x\n", x); + x = sum_char_hyper( 12, ((hyper)0x42424242 << 32) | 0x33334444 ); + ok(x == 0x33334450, "RPC char_hyper got 0x%x\n", x); x = 0; square_out(11, &x); diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index 56bf1a5..3be3f33 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -31,9 +31,7 @@ typedef int fnprintf(const char *format, ...); [ uuid(00000000-4114-0704-2301-000000000000), -#ifndef __midl implicit_handle(handle_t IServer_IfHandle) -#endif ] interface IServer { @@ -81,6 +79,13 @@ cpp_quote("#endif") int int_return(void); int square(int x); int sum(int x, int y); + signed char sum_char(signed char x, signed char y); + short sum_short(short x, short y); + int sum_float(float x, float y); + int sum_double_int(int x, double y); + hyper sum_hyper(hyper x, hyper y); + int sum_hyper_int(hyper x, hyper y); + int sum_char_hyper(signed char x, hyper y); void square_out(int x, [out] int *y); void square_ref([in, out] int *x); int str_length([string] const char *s);
1
0
0
0
Alexandre Julliard : widl: Fix a typo in updating the type format offset for strings.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 3a709fa5bbc7843c8112ba0ee1ff267b55b55e5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a709fa5bbc7843c8112ba0ee…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 13:18:58 2011 +0200 widl: Fix a typo in updating the type format offset for strings. --- tools/widl/typegen.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 2cb8767..e07769c 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -984,8 +984,8 @@ static unsigned char get_parameter_fc( const type_t *type, const attr_list_t *at if (is_declptr( type ) && get_pointer_fc( type, attrs, !is_return ) == RPC_FC_RP) { /* skip over pointer description straight to string description */ - if (is_conformant_array( type )) typestring_offset += 4; - else typestring_offset += 2; + if (is_conformant_array( type )) *typestring_offset += 4; + else *typestring_offset += 2; *flags |= IsSimpleRef; } break;
1
0
0
0
Alexandre Julliard : widl: Fix packing of parameter structures for arguments larger than a pointer.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 211ed7be48002c8af997a1c0b553344a817ce289 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=211ed7be48002c8af997a1c0b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 12:03:54 2011 +0200 widl: Fix packing of parameter structures for arguments larger than a pointer. --- tools/widl/typegen.c | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 04e014a..2cb8767 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -4667,7 +4667,16 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun type_t *rettype = type_function_get_rettype( func ); const var_list_t *args = type_get_function_args( func ); const var_t *arg; + int needs_packing; + unsigned int align = 0; + + if (args) + LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) + if (!is_array( arg->type )) type_memsize_and_alignment( arg->type, &align ); + + needs_packing = (align > pointer_size); + if (needs_packing) print_file( file, 0, "#include <pshpack%u.h>\n", pointer_size ); print_file(file, 1, "struct _PARAM_STRUCT\n" ); print_file(file, 1, "{\n" ); if (is_object( iface )) print_file(file, 2, "%s *This;\n", iface->name ); @@ -4678,8 +4687,13 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun write_type_left( file, (type_t *)arg->type, TRUE ); if (needs_space_after( arg->type )) fputc( ' ', file ); if (is_array( arg->type ) && !type_array_is_decl_as_ptr( arg->type )) fputc( '*', file ); + /* FIXME: should check for large args being passed by pointer */ - if (is_array( arg->type ) || is_ptr( arg->type ) || type_memsize( arg->type ) == pointer_size) + align = 0; + if (is_array( arg->type ) || is_ptr( arg->type )) align = pointer_size; + else type_memsize_and_alignment( arg->type, &align ); + + if (align >= pointer_size) fprintf( file, "%s;\n", arg->name ); else fprintf( file, "%s DECLSPEC_ALIGN(%u);\n", arg->name, pointer_size ); @@ -4693,7 +4707,9 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun else fprintf( file, " DECLSPEC_ALIGN(%u);\n", pointer_size ); } - print_file(file, 1, "} %s;\n\n", var_decl ); + print_file(file, 1, "} %s;\n", var_decl ); + if (needs_packing) print_file( file, 0, "#include <poppack.h>\n" ); + print_file( file, 0, "\n" ); } int write_expr_eval_routines(FILE *file, const char *iface)
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
81
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
Results per page:
10
25
50
100
200