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 2012
----- 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
972 discussions
Start a n
N
ew thread
Jörg Höhle : dsound: Fix the computation of the mixer position in bytes.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 35cdb8bb22a15e32f4e97151a67a1a0d43949cd1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35cdb8bb22a15e32f4e97151a…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sun Jan 1 20:39:34 2012 +0100 dsound: Fix the computation of the mixer position in bytes. --- dlls/dsound/mixer.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index d3b5fd8..23af6ce 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -820,8 +820,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) return; } - pos_bytes = (clock_pos * device->pwfx->nBlockAlign * clock_freq) / - device->pwfx->nSamplesPerSec; + pos_bytes = (clock_pos * device->pwfx->nSamplesPerSec * device->pwfx->nBlockAlign) / clock_freq; delta_frags = (pos_bytes - device->last_pos_bytes) / device->fraglen; if(delta_frags > 0){
1
0
0
0
André Hentschel : d3drm: Add IDirect3DRMFrame2 interface.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 8f0ac41d3f5c2da96423b536986f33f0697008aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f0ac41d3f5c2da96423b5369…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Dec 30 16:42:59 2011 +0100 d3drm: Add IDirect3DRMFrame2 interface. --- dlls/d3drm/Makefile.in | 1 + dlls/d3drm/d3drm.c | 14 +- dlls/d3drm/d3drm_private.h | 1 + dlls/d3drm/frame.c | 944 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 956 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8f0ac41d3f5c2da96423b…
1
0
0
0
André Hentschel : ntdll/tests: Add optional return value for some win7 machines.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: cc50de11568d9b70ff07ad15fc473297d594f289 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc50de11568d9b70ff07ad15f…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Dec 30 16:33:23 2011 +0100 ntdll/tests: Add optional return value for some win7 machines. --- dlls/ntdll/tests/reg.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 5ca14eb..1bd0a01 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -396,7 +396,8 @@ static void test_NtCreateKey(void) /* Only attributes */ status = pNtCreateKey(NULL, 0, &attr, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); + ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_ACCESS_DENIED /* Win7 */, + "Expected STATUS_ACCESS_VIOLATION or STATUS_ACCESS_DENIED, got: 0x%08x\n", status); /* Length > sizeof(OBJECT_ATTRIBUTES) */ attr.Length *= 2;
1
0
0
0
Piotr Caban : msvcp90: Update data pointer after resizing string.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: f90d5a8f724c16279ca1928531629c282ee5b173 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f90d5a8f724c16279ca192853…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 3 17:01:46 2012 +0100 msvcp90: Update data pointer after resizing string. --- dlls/msvcp90/string.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index 189a0cc..27f3ab7 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -1958,8 +1958,10 @@ basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_ch if(basic_string_char_inside(this, str)) inside_pos = str-ptr; - if(len < str_len) + if(len < str_len) { basic_string_char_grow(this, this->size-len+str_len, FALSE); + ptr = basic_string_char_ptr(this); + } if(inside_pos == -1) { memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char)); @@ -2044,8 +2046,10 @@ basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *th if(MSVCP_basic_string_char_npos-count <= this->size-len) MSVCP__String_base_Xlen(); - if(len < count) + if(len < count) { basic_string_char_grow(this, this->size-len+count, FALSE); + ptr = basic_string_char_ptr(this); + } memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char)); MSVCP_char_traits_char_assignn(ptr+off, count, ch); @@ -3911,8 +3915,10 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_ if(basic_string_wchar_inside(this, str)) inside_pos = str-ptr; - if(len < str_len) + if(len < str_len) { basic_string_wchar_grow(this, this->size-len+str_len, FALSE); + ptr = basic_string_wchar_ptr(this); + } if(inside_pos == -1) { memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); @@ -4005,8 +4011,10 @@ basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar if(MSVCP_basic_string_wchar_npos-count <= this->size-len) MSVCP__String_base_Xlen(); - if(len < count) + if(len < count) { basic_string_wchar_grow(this, this->size-len+count, FALSE); + ptr = basic_string_wchar_ptr(this); + } memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); MSVCP_char_traits_wchar_assignn(ptr+off, count, ch);
1
0
0
0
Jacek Caban : ieframe: Remove useless #undef.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 0633ee42582c459d1d22c0836771109cdb2d2689 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0633ee42582c459d1d22c0836…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jan 3 16:49:45 2012 +0100 ieframe: Remove useless #undef. --- dlls/ieframe/ie.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/ieframe/ie.c b/dlls/ieframe/ie.c index 5fe0a26..5fbc368 100644 --- a/dlls/ieframe/ie.c +++ b/dlls/ieframe/ie.c @@ -625,8 +625,6 @@ static HRESULT WINAPI InternetExplorer_put_Resizable(IWebBrowser2 *iface, VARIAN return E_NOTIMPL; } -#undef impl_from_IWebBrowser2 - static const IWebBrowser2Vtbl InternetExplorerVtbl = { InternetExplorer_QueryInterface,
1
0
0
0
Hans Leidekker : msi: VolumeLabel and DiskPrompt are optional fields in the Media table.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 2a1902161074ebe8bf1472f182983e9c4377f1af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a1902161074ebe8bf1472f18…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 3 13:53:50 2012 +0100 msi: VolumeLabel and DiskPrompt are optional fields in the Media table. --- dlls/msi/media.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index f8ed27e..d5ace5a 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -820,10 +820,13 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi) volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS) { mi->disk_id = id; - mi->volume_label = msi_realloc(mi->volume_label, ++volumesz * sizeof(WCHAR)); - lstrcpyW(mi->volume_label, volume); - mi->disk_prompt = msi_realloc(mi->disk_prompt, ++promptsz * sizeof(WCHAR)); - lstrcpyW(mi->disk_prompt, prompt); + msi_free( mi->volume_label ); + if (!(mi->volume_label = msi_alloc( ++volumesz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY; + strcpyW( mi->volume_label, volume ); + + msi_free( mi->disk_prompt ); + if (!(mi->disk_prompt = msi_alloc( ++promptsz * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY; + strcpyW( mi->disk_prompt, prompt ); if (source_matches_volume(mi, source)) {
1
0
0
0
Hans Leidekker : msi: Accept a missing left backquote in SQL identifiers.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: 4def593456d720252ee319b2a561113cd55767d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4def593456d720252ee319b2a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jan 3 13:53:14 2012 +0100 msi: Accept a missing left backquote in SQL identifiers. --- dlls/msi/query.h | 2 +- dlls/msi/sql.y | 5 +++-- dlls/msi/tests/db.c | 30 ++++++++++++++++++++++++++++++ dlls/msi/tokenize.c | 5 ++++- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/dlls/msi/query.h b/dlls/msi/query.h index 8f8a244..ca34b4c 100644 --- a/dlls/msi/query.h +++ b/dlls/msi/query.h @@ -131,7 +131,7 @@ UINT STORAGES_CreateView( MSIDATABASE *db, MSIVIEW **view ) DECLSPEC_HIDDEN; UINT DROP_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name ) DECLSPEC_HIDDEN; -int sqliteGetToken(const WCHAR *z, int *tokenType) DECLSPEC_HIDDEN; +int sqliteGetToken(const WCHAR *z, int *tokenType, int *skip) DECLSPEC_HIDDEN; MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec ) DECLSPEC_HIDDEN; diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index 548e142..ead7743 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -797,7 +797,7 @@ static column_info *parser_alloc_column( void *info, LPCWSTR table, LPCWSTR colu static int sql_lex( void *SQL_lval, SQL_input *sql ) { - int token; + int token, skip; struct sql_str * str = SQL_lval; do @@ -807,11 +807,12 @@ static int sql_lex( void *SQL_lval, SQL_input *sql ) return 0; /* end of input */ /* TRACE("string : %s\n", debugstr_w(&sql->command[sql->n])); */ - sql->len = sqliteGetToken( &sql->command[sql->n], &token ); + sql->len = sqliteGetToken( &sql->command[sql->n], &token, &skip ); if( sql->len==0 ) break; str->data = &sql->command[sql->n]; str->len = sql->len; + sql->n += skip; } while( token == TK_SPACE ); diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 6ecd642..d33eb0c 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -727,6 +727,36 @@ static void test_msibadqueries(void) r = try_query( hdb, "select * from 'c'"); ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); + r = try_query( hdb, "select `c`.`b` from `c` order by `c`.`order`"); + ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.b` from `c`"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.`b from `c`"); + ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.b from `c`"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c.`b` from `c`"); + ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %u\n", r ); + + r = try_query( hdb, "select c`.`b` from `c`"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + + r = try_query( hdb, "select c.`b` from `c`"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.`b` from c`"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.`b` from `c"); + ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %u\n", r ); + + r = try_query( hdb, "select `c`.`b` from c"); + ok( r == ERROR_SUCCESS, "query failed: %u\n", r ); + r = try_query( hdb, "CREATE TABLE `\5a` (`b` CHAR NOT NULL PRIMARY KEY `b`)" ); ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c index 64e14b8..c432888 100644 --- a/dlls/msi/tokenize.c +++ b/dlls/msi/tokenize.c @@ -190,8 +190,10 @@ static const char isIdChar[] = { ** -1 if the token is (or might be) incomplete. Store the token ** type in *tokenType before returning. */ -int sqliteGetToken(const WCHAR *z, int *tokenType){ +int sqliteGetToken(const WCHAR *z, int *tokenType, int *skip){ int i; + + *skip = 0; switch( *z ){ case ' ': case '\t': case '\n': case '\f': for(i=1; isspace(z[i]) && z[i] != '\r'; i++){} @@ -280,6 +282,7 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){ } for(i=1; isIdChar[z[i]]; i++){} *tokenType = sqliteKeywordCode(z, i); + if( *tokenType == TK_ID && z[i] == '`' ) *skip = 1; return i; } *tokenType = TK_ILLEGAL;
1
0
0
0
Aric Stewart : usp10: Cache feature lookups.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: f7a21f8cba067ec41214b35947bdeb82a1671fcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7a21f8cba067ec41214b3594…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jan 3 06:51:33 2012 -0600 usp10: Cache feature lookups. --- dlls/usp10/shape.c | 53 +++++++++++++++++++++++------------------- dlls/usp10/usp10.c | 5 ++++ dlls/usp10/usp10_internal.h | 2 + 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 1240739..b51e982 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1089,18 +1089,23 @@ static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WO return GSUB_E_NOGLYPH; } -static INT GSUB_apply_feature_all_lookups(const GSUB_Header * header, const GSUB_Feature* feature, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +static INT apply_GSUB_lookup(LPCVOID table, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) +{ + const GSUB_Header *header = (const GSUB_Header *)table; + const GSUB_LookupList *lookup = (const GSUB_LookupList*)((const BYTE*)header + GET_BE_WORD(header->LookupList)); + + return GSUB_apply_lookup(lookup, lookup_index, glyphs, glyph_index, write_dir, glyph_count); +} + +static INT GSUB_apply_feature_all_lookups(LPCVOID header, LoadedFeature *feature, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int i; int out_index = GSUB_E_NOGLYPH; - const GSUB_LookupList *lookup; - lookup = (const GSUB_LookupList*)((const BYTE*)header + GET_BE_WORD(header->LookupList)); - - TRACE("%i lookups\n", GET_BE_WORD(feature->LookupCount)); - for (i = 0; i < GET_BE_WORD(feature->LookupCount); i++) + TRACE("%i lookups\n", feature->lookup_count); + for (i = 0; i < feature->lookup_count; i++) { - out_index = GSUB_apply_lookup(lookup, GET_BE_WORD(feature->LookupListIndex[i]), glyphs, glyph_index, write_dir, glyph_count); + out_index = apply_GSUB_lookup(header, feature->lookups[i], glyphs, glyph_index, write_dir, glyph_count); if (out_index != GSUB_E_NOGLYPH) break; } @@ -1202,7 +1207,7 @@ static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCach return GSUB_E_NOFEATURE; TRACE("applying feature %s\n",feat); - return GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature->feature, glyphs, index, write_dir, glyph_count); + return GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature, glyphs, index, write_dir, glyph_count); } static VOID *load_gsub_table(HDC hdc) @@ -1469,22 +1474,15 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W { if (psc->GSUB_Table) { - LoadedFeature *load_feature; - const GSUB_Feature *feature; - const GSUB_LookupList *lookup; - const GSUB_Header *header = psc->GSUB_Table; - int lookup_index, lookup_count; + LoadedFeature *feature; + int lookup_index; - load_feature = load_GSUB_feature(hdc, psa, psc, feat); - if (!load_feature) + feature = load_GSUB_feature(hdc, psa, psc, feat); + if (!feature) return GSUB_E_NOFEATURE; - feature = load_feature->feature; - TRACE("applying feature %s\n",debugstr_an(feat,4)); - lookup = (const GSUB_LookupList*)((const BYTE*)header + GET_BE_WORD(header->LookupList)); - lookup_count = GET_BE_WORD(feature->LookupCount); - TRACE("%i lookups\n", lookup_count); - for (lookup_index = 0; lookup_index < lookup_count; lookup_index++) + TRACE("applying feature %s: %i lookups\n",debugstr_an(feat,4),feature->lookup_count); + for (lookup_index = 0; lookup_index < feature->lookup_count; lookup_index++) { int i; @@ -1492,13 +1490,13 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W i = 0; else i = *pcGlyphs-1; - TRACE("applying lookup (%i/%i)\n",lookup_index,lookup_count); + TRACE("applying lookup (%i/%i)\n",lookup_index,feature->lookup_count); while(i < *pcGlyphs && i >= 0) { INT nextIndex; INT prevCount = *pcGlyphs; - nextIndex = GSUB_apply_lookup(lookup, GET_BE_WORD(feature->LookupListIndex[lookup_index]), pwOutGlyphs, i, write_dir, pcGlyphs); + nextIndex = apply_GSUB_lookup(psc->GSUB_Table, feature->lookups[lookup_index], pwOutGlyphs, i, write_dir, pcGlyphs); if (*pcGlyphs != prevCount) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, write_dir, cChars, pwLogClust); @@ -2200,7 +2198,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps { INT nextIndex; INT prevCount = *pcGlyphs; - nextIndex = GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature->feature, pwOutGlyphs, index, 1, pcGlyphs); + nextIndex = GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature, pwOutGlyphs, index, 1, pcGlyphs); if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); @@ -3855,10 +3853,17 @@ static void GSUB_initialize_feature_cache(LPCVOID table, LoadedLanguage *languag for (i = 0; i < language->feature_count; i++) { + const GSUB_Feature *feature; + int j; int index = GET_BE_WORD(lang->FeatureIndex[i]); language->features[i].tag = MS_MAKE_TAG(feature_list->FeatureRecord[index].FeatureTag[0], feature_list->FeatureRecord[index].FeatureTag[1], feature_list->FeatureRecord[index].FeatureTag[2], feature_list->FeatureRecord[index].FeatureTag[3]); language->features[i].feature = ((const BYTE*)feature_list + GET_BE_WORD(feature_list->FeatureRecord[index].Feature)); + feature = (const GSUB_Feature*)language->features[i].feature; + language->features[i].lookup_count = GET_BE_WORD(feature->LookupCount); + language->features[i].lookups = HeapAlloc(GetProcessHeap(),0,sizeof(WORD) * language->features[i].lookup_count); + for (j = 0; j < language->features[i].lookup_count; j++) + language->features[i].lookups[j] = GET_BE_WORD(feature->LookupListIndex[j]); } } } diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 1479b7c..9ddff1b 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -929,7 +929,12 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc) { int j; for (j = 0; j < ((ScriptCache *)*psc)->scripts[i].language_count; j++) + { + int k; + for (k = 0; k < ((ScriptCache *)*psc)->scripts[i].languages[j].feature_count; k++) + heap_free(((ScriptCache *)*psc)->scripts[i].languages[j].features[k].lookups); heap_free(((ScriptCache *)*psc)->scripts[i].languages[j].features); + } heap_free(((ScriptCache *)*psc)->scripts[i].languages); } heap_free(((ScriptCache *)*psc)->scripts); diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 6df9b50..c606389 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -128,6 +128,8 @@ typedef struct { OPENTYPE_TAG tag; LPCVOID feature; + INT lookup_count; + WORD *lookups; } LoadedFeature; typedef struct {
1
0
0
0
Aric Stewart : usp10: Have load_GSUB_feature return LoadedFeature*.
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: c632f71e085fc1cf9ba3b35de7abb814939509c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c632f71e085fc1cf9ba3b35de…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jan 3 06:51:30 2012 -0600 usp10: Have load_GSUB_feature return LoadedFeature*. --- dlls/usp10/shape.c | 44 +++++++++++++++++++------------------------- 1 files changed, 19 insertions(+), 25 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 2358e53..1240739 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1159,7 +1159,7 @@ static OPENTYPE_TAG get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCac } } -static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, const char* feat) +static LoadedFeature* load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, const char* feat) { LoadedFeature *feature = NULL; @@ -1189,28 +1189,20 @@ static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc GSUB_GetFontFeatureTags(psc, MS_MAKE_TAG('l','a','t','n'), MS_MAKE_TAG('d','f','l','t'), FALSE, MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]), 1, &tags, &cTags, &feature); } - if (feature) - { - TRACE("Feature %s located at %p\n",debugstr_an(feat,4),feature->feature); - return feature->feature; - } - else - { - TRACE("Feature %s not located\n",debugstr_an(feat,4)); - return NULL; - } + TRACE("Feature %s located at %p\n",debugstr_an(feat,4),feature); + return feature; } static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, WORD *glyphs, INT index, INT write_dir, INT* glyph_count, const char* feat) { - const GSUB_Feature *feature; + LoadedFeature *feature; feature = load_GSUB_feature(hdc, psa, psc, feat); if (!feature) return GSUB_E_NOFEATURE; TRACE("applying feature %s\n",feat); - return GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature, glyphs, index, write_dir, glyph_count); + return GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature->feature, glyphs, index, write_dir, glyph_count); } static VOID *load_gsub_table(HDC hdc) @@ -1477,14 +1469,16 @@ static int apply_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, W { if (psc->GSUB_Table) { + LoadedFeature *load_feature; const GSUB_Feature *feature; const GSUB_LookupList *lookup; const GSUB_Header *header = psc->GSUB_Table; int lookup_index, lookup_count; - feature = load_GSUB_feature(hdc, psa, psc, feat); - if (!feature) + load_feature = load_GSUB_feature(hdc, psa, psc, feat); + if (!load_feature) return GSUB_E_NOFEATURE; + feature = load_feature->feature; TRACE("applying feature %s\n",debugstr_an(feat,4)); lookup = (const GSUB_LookupList*)((const BYTE*)header + GET_BE_WORD(header->LookupList)); @@ -2195,7 +2189,7 @@ static inline void shift_syllable_glyph_indexs(IndicSyllable *glyph_index, INT i glyph_index->pref+= shift; } -static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT* pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, const GSUB_Feature *feature ) +static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT* pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, LoadedFeature *feature ) { int index = glyph_index->start; @@ -2206,7 +2200,7 @@ static void Apply_Indic_BasicForm(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *ps { INT nextIndex; INT prevCount = *pcGlyphs; - nextIndex = GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature, pwOutGlyphs, index, 1, pcGlyphs); + nextIndex = GSUB_apply_feature_all_lookups(psc->GSUB_Table, feature->feature, pwOutGlyphs, index, 1, pcGlyphs); if (nextIndex > GSUB_E_NOGLYPH) { UpdateClusters(nextIndex, *pcGlyphs - prevCount, 1, cChars, pwLogClust); @@ -2332,13 +2326,13 @@ static void ShapeIndicSyllables(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, { int c; int overall_shift = 0; - const GSUB_Feature *locl = (modern)?load_GSUB_feature(hdc, psa, psc, "locl"):NULL; - const GSUB_Feature *nukt = load_GSUB_feature(hdc, psa, psc, "nukt"); - const GSUB_Feature *akhn = load_GSUB_feature(hdc, psa, psc, "akhn"); - const GSUB_Feature *rkrf = (modern)?load_GSUB_feature(hdc, psa, psc, "rkrf"):NULL; - const GSUB_Feature *pstf = load_GSUB_feature(hdc, psa, psc, "pstf"); - const GSUB_Feature *vatu = (!rkrf)?load_GSUB_feature(hdc, psa, psc, "vatu"):NULL; - const GSUB_Feature *cjct = (modern)?load_GSUB_feature(hdc, psa, psc, "cjct"):NULL; + LoadedFeature *locl = (modern)?load_GSUB_feature(hdc, psa, psc, "locl"):NULL; + LoadedFeature *nukt = load_GSUB_feature(hdc, psa, psc, "nukt"); + LoadedFeature *akhn = load_GSUB_feature(hdc, psa, psc, "akhn"); + LoadedFeature *rkrf = (modern)?load_GSUB_feature(hdc, psa, psc, "rkrf"):NULL; + LoadedFeature *pstf = load_GSUB_feature(hdc, psa, psc, "pstf"); + LoadedFeature *vatu = (!rkrf)?load_GSUB_feature(hdc, psa, psc, "vatu"):NULL; + LoadedFeature *cjct = (modern)?load_GSUB_feature(hdc, psa, psc, "cjct"):NULL; BOOL rphf = (load_GSUB_feature(hdc, psa, psc, "rphf") != NULL); BOOL pref = (load_GSUB_feature(hdc, psa, psc, "pref") != NULL); BOOL blwf = (load_GSUB_feature(hdc, psa, psc, "blwf") != NULL); @@ -3592,7 +3586,7 @@ rpRangeProperties = &ShapingData[psa->eScript].defaultTextRange; HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa) { - const GSUB_Feature *feature; + LoadedFeature *feature; int i; if (!ShapingData[psa->eScript].requiredFeatures)
1
0
0
0
Aric Stewart : usp10: Replace GSUB_get_feature with GSUB_GetFontFeatureTags .
by Alexandre Julliard
03 Jan '12
03 Jan '12
Module: wine Branch: master Commit: f04b6b2fc87ac902d1147f1e5e94d9ef575619a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f04b6b2fc87ac902d1147f1e5…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jan 3 06:51:27 2012 -0600 usp10: Replace GSUB_get_feature with GSUB_GetFontFeatureTags. --- dlls/usp10/shape.c | 78 +++++++++++------------------------------- dlls/usp10/usp10.c | 1 - dlls/usp10/usp10_internal.h | 3 -- 3 files changed, 21 insertions(+), 61 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 5801253..2358e53 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -349,6 +349,7 @@ typedef struct { static INT GSUB_apply_lookup(const GSUB_LookupList* lookup, INT lookup_index, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count); static HRESULT GSUB_GetFontScriptTags(ScriptCache *psc, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pScriptTags, int *pcTags, LPCVOID* script_table); static HRESULT GSUB_GetFontLanguageTags(ScriptCache *psc, OPENTYPE_TAG script_tag, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pLanguageTags, int *pcTags, LPCVOID* language_table); +static HRESULT GSUB_GetFontFeatureTags(ScriptCache *psc, OPENTYPE_TAG script_tag, OPENTYPE_TAG language_tag, BOOL filtered, OPENTYPE_TAG searchingFor, int cMaxTags, OPENTYPE_TAG *pFeatureTags, int *pcTags, LoadedFeature** feature); typedef struct tagVowelComponents { @@ -767,26 +768,6 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph) return -1; } -static const GSUB_Feature * GSUB_get_feature(const GSUB_Header *header, const GSUB_LangSys *lang, const char* tag) -{ - int i; - const GSUB_FeatureList *feature; - feature = (const GSUB_FeatureList*)((const BYTE*)header + GET_BE_WORD(header->FeatureList)); - - TRACE("%i features\n",GET_BE_WORD(lang->FeatureCount)); - for (i = 0; i < GET_BE_WORD(lang->FeatureCount); i++) - { - int index = GET_BE_WORD(lang->FeatureIndex[i]); - if (strncmp(feature->FeatureRecord[index].FeatureTag,tag,4)==0) - { - const GSUB_Feature *feat; - feat = (const GSUB_Feature*)((const BYTE*)feature + GET_BE_WORD(feature->FeatureRecord[index].Feature)); - return feat; - } - } - return NULL; -} - static INT GSUB_apply_SingleSubst(const GSUB_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int j; @@ -1180,61 +1161,44 @@ static OPENTYPE_TAG get_opentype_script(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCac static LPCVOID load_GSUB_feature(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc, const char* feat) { - const GSUB_Feature *feature; - OPENTYPE_TAG script; - int i; - - script = get_opentype_script(hdc,psa,psc,FALSE); - - for (i = 0; i < psc->feature_count; i++) - { - if (psc->features[i].tag == MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3])&& psc->features[i].script == script) - return psc->features[i].feature; - } - - feature = NULL; + LoadedFeature *feature = NULL; if (psc->GSUB_Table) { - const GSUB_LangSys *language = NULL; int attempt = 2; - OPENTYPE_TAG scriptTags; + OPENTYPE_TAG tags; + OPENTYPE_TAG language; + OPENTYPE_TAG script; int cTags; do { + script = get_opentype_script(hdc,psa,psc,(attempt==2)); if (psc->userLang != 0) - GSUB_GetFontLanguageTags(psc, get_opentype_script(hdc,psa,psc,(attempt==2)), psc->userLang, 1, &scriptTags, &cTags, (LPCVOID*)&language); + language = psc->userLang; else - GSUB_GetFontLanguageTags(psc, get_opentype_script(hdc,psa,psc,(attempt==2)), MS_MAKE_TAG('x','x','x','x'), 1, &scriptTags, &cTags, (LPCVOID*)&language); /* Need to get Lang tag */ - + language = MS_MAKE_TAG('d','f','l','t'); attempt--; - if (language) - feature = GSUB_get_feature(psc->GSUB_Table, language, feat); + + GSUB_GetFontFeatureTags(psc, script, language, FALSE, MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]), 1, &tags, &cTags, &feature); + } while(attempt && !feature); /* try in the default (latin) table */ if (!feature) - { - GSUB_GetFontLanguageTags(psc, MS_MAKE_TAG('l','a','t','n'), MS_MAKE_TAG('x','x','x','x'), 1, &scriptTags, &cTags, (LPCVOID*)&language); /* Need to get Lang tag */ - if (language) - feature = GSUB_get_feature(psc->GSUB_Table, language, feat); - } + GSUB_GetFontFeatureTags(psc, MS_MAKE_TAG('l','a','t','n'), MS_MAKE_TAG('d','f','l','t'), FALSE, MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]), 1, &tags, &cTags, &feature); } - TRACE("Feature %s located at %p\n",debugstr_an(feat,4),feature); - - psc->feature_count++; - - if (psc->features) - psc->features = HeapReAlloc(GetProcessHeap(), 0, psc->features, psc->feature_count * sizeof(LoadedFeature)); + if (feature) + { + TRACE("Feature %s located at %p\n",debugstr_an(feat,4),feature->feature); + return feature->feature; + } else - psc->features = HeapAlloc(GetProcessHeap(), 0, psc->feature_count * sizeof(LoadedFeature)); - - psc->features[psc->feature_count - 1].tag = MS_MAKE_TAG(feat[0],feat[1],feat[2],feat[3]); - psc->features[psc->feature_count - 1].script = script; - psc->features[psc->feature_count - 1].feature = feature; - return feature; + { + TRACE("Feature %s not located\n",debugstr_an(feat,4)); + return NULL; + } } static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, WORD *glyphs, INT index, INT write_dir, INT* glyph_count, const char* feat) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 152db1e..1479b7c 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -933,7 +933,6 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc) heap_free(((ScriptCache *)*psc)->scripts[i].languages); } heap_free(((ScriptCache *)*psc)->scripts); - heap_free(((ScriptCache *)*psc)->features); heap_free(*psc); *psc = NULL; } diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index 5fd5d75..6df9b50 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -127,7 +127,6 @@ typedef struct { OPENTYPE_TAG tag; - OPENTYPE_TAG script; LPCVOID feature; } LoadedFeature; @@ -156,8 +155,6 @@ typedef struct { LPVOID GDEF_Table; LPVOID CMAP_Table; LPVOID CMAP_format12_Table; - INT feature_count; - LoadedFeature *features; INT script_count; LoadedScript *scripts;
1
0
0
0
← Newer
1
...
88
89
90
91
92
93
94
...
98
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
Results per page:
10
25
50
100
200