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
May 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
743 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Implement ProcessImageInformation class in NtQueryInformationProcess().
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 54a7e592e44622ecd61160498fb5148a46b2e8db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54a7e592e44622ecd6116049…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 26 13:23:21 2020 +0200 ntdll: Implement ProcessImageInformation class in NtQueryInformationProcess(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/process.c | 23 +++++++++++++++++++++++ dlls/ntdll/tests/info.c | 32 ++++++++++++++++++++++++++++++++ include/wine/server_protocol.h | 3 ++- server/file.h | 1 + server/mapping.c | 11 +++++++++++ server/process.c | 7 +++++++ server/protocol.def | 1 + server/trace.c | 1 + 8 files changed, 78 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 637bef0b65..1bef51b00b 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -621,6 +621,29 @@ NTSTATUS WINAPI NtQueryInformationProcess( else ret = STATUS_INVALID_PARAMETER; break; + + case ProcessImageInformation: + len = sizeof(SECTION_IMAGE_INFORMATION); + if (ProcessInformationLength == len) + { + if (ProcessInformation) + { + pe_image_info_t pe_info; + + SERVER_START_REQ( get_process_info ) + { + req->handle = wine_server_obj_handle( ProcessHandle ); + wine_server_set_reply( req, &pe_info, sizeof(pe_info) ); + if ((ret = wine_server_call( req )) == STATUS_SUCCESS) + virtual_fill_image_information( &pe_info, ProcessInformation ); + } + SERVER_END_REQ; + } + else ret = STATUS_ACCESS_VIOLATION; + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + break; + default: FIXME("(%p,info_class=%d,%p,0x%08x,%p) Unknown information class\n", ProcessHandle,ProcessInformationClass, diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index f923cc7743..cf3f7b9f6f 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1821,6 +1821,34 @@ todo_wine heap_free(buffer); } +static void test_query_process_image_info(void) +{ + IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ); + NTSTATUS status; + SECTION_IMAGE_INFORMATION info; + ULONG len; + + status = pNtQueryInformationProcess( NULL, ProcessImageInformation, &info, sizeof(info), &len ); + ok( status == STATUS_INVALID_HANDLE || broken(status == STATUS_INVALID_PARAMETER), /* winxp */ + "got %08x\n", status); + + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageInformation, &info, sizeof(info)-1, &len ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "got %08x\n", status); + + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageInformation, &info, sizeof(info)+1, &len ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "got %08x\n", status); + + memset( &info, 0xcc, sizeof(info) ); + status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageInformation, &info, sizeof(info), &len ); + ok( status == STATUS_SUCCESS, "got %08x\n", status); + ok( len == sizeof(info), "wrong len %u\n", len ); + + ok( info.SubsystemVersionHigh == nt->OptionalHeader.MajorSubsystemVersion, "wrong major version %x/%x\n", + info.SubsystemVersionHigh, nt->OptionalHeader.MajorSubsystemVersion ); + ok( info.SubsystemVersionLow == nt->OptionalHeader.MinorSubsystemVersion, "wrong minor version %x/%x\n", + info.SubsystemVersionLow, nt->OptionalHeader.MinorSubsystemVersion ); +} + static void test_query_process_debug_object_handle(int argc, char **argv) { char cmdline[MAX_PATH]; @@ -2741,6 +2769,10 @@ START_TEST(info) trace("Starting test_process_debug_flags()\n"); test_query_process_debug_flags(argc, argv); + /* 0x25 ProcessImageInformation */ + trace("Starting test_process_image_info()\n"); + test_query_process_image_info(); + /* 0x4C SystemFirmwareTableInformation */ trace("Starting test_query_firmware()\n"); test_query_firmware(); diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 2419671f0d..3e205d4165 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -962,6 +962,7 @@ struct get_process_info_reply client_cpu_t cpu; short int debugger_present; short int debug_children; + /* VARARG(image,pe_image_info); */ }; @@ -6684,7 +6685,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 603 +#define SERVER_PROTOCOL_VERSION 604 /* ### protocol_version end ### */ diff --git a/server/file.h b/server/file.h index aa5f6216c2..45215c588d 100644 --- a/server/file.h +++ b/server/file.h @@ -171,6 +171,7 @@ extern struct mapping *get_mapping_obj( struct process *process, obj_handle_t ha unsigned int access ); extern struct file *get_mapping_file( struct process *process, client_ptr_t base, unsigned int access, unsigned int sharing ); +extern const pe_image_info_t *get_mapping_image_info( struct process *process, client_ptr_t base ); extern void free_mapped_views( struct process *process ); extern int get_page_size(void); diff --git a/server/mapping.c b/server/mapping.c index 0fcada7f8f..2c34b8f3c8 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -127,6 +127,7 @@ struct memory_view struct fd *fd; /* fd for mapped file */ struct ranges *committed; /* list of committed ranges in this mapping */ struct shared_map *shared; /* temp file for shared PE mapping */ + pe_image_info_t image; /* image info (for PE image mapping) */ unsigned int flags; /* SEC_* flags */ client_ptr_t base; /* view base address (in process addr space) */ mem_size_t size; /* view size */ @@ -894,6 +895,15 @@ struct file *get_mapping_file( struct process *process, client_ptr_t base, return create_file_for_fd_obj( view->fd, access, sharing ); } +/* get the image info for a SEC_IMAGE mapping */ +const pe_image_info_t *get_mapping_image_info( struct process *process, client_ptr_t base ) +{ + struct memory_view *view = find_mapped_view( process, base ); + + if (!view || !(view->flags & SEC_IMAGE)) return NULL; + return &view->image; +} + static void mapping_dump( struct object *obj, int verbose ) { struct mapping *mapping = (struct mapping *)obj; @@ -1062,6 +1072,7 @@ DECL_HANDLER(map_view) view->fd = !is_fd_removable( mapping->fd ) ? (struct fd *)grab_object( mapping->fd ) : NULL; view->committed = mapping->committed ? (struct ranges *)grab_object( mapping->committed ) : NULL; view->shared = mapping->shared ? (struct shared_map *)grab_object( mapping->shared ) : NULL; + if (mapping->flags & SEC_IMAGE) view->image = mapping->image; list_add_tail( ¤t->process->views, &view->entry ); } diff --git a/server/process.c b/server/process.c index 6722addb09..ab3d448b00 100644 --- a/server/process.c +++ b/server/process.c @@ -1447,6 +1447,13 @@ DECL_HANDLER(get_process_info) reply->cpu = process->cpu; reply->debugger_present = !!process->debugger; reply->debug_children = process->debug_children; + if (get_reply_max_size()) + { + const pe_image_info_t *info; + struct process_dll *exe = get_process_exe_module( process ); + if (exe && (info = get_mapping_image_info( process, exe->base ))) + set_reply_data( info, min( sizeof(*info), get_reply_max_size() )); + } release_object( process ); } } diff --git a/server/protocol.def b/server/protocol.def index 2fb8e2ec80..86efb01cc3 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -915,6 +915,7 @@ struct rawinput_device client_cpu_t cpu; /* CPU that this process is running on */ short int debugger_present; /* process is being debugged */ short int debug_children; /* inherit debugger to child processes */ + VARARG(image,pe_image_info); /* image info for main exe */ @END diff --git a/server/trace.c b/server/trace.c index ca2cbb9074..c5c006ce41 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1389,6 +1389,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re dump_client_cpu( ", cpu=", &req->cpu ); fprintf( stderr, ", debugger_present=%d", req->debugger_present ); fprintf( stderr, ", debug_children=%d", req->debug_children ); + dump_varargs_pe_image_info( ", image=", cur_size ); } static void dump_get_process_vm_counters_request( const struct get_process_vm_counters_request *req )
1
0
0
0
Alexandre Julliard : kernel32: Use set_ntstatus() in more places.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: e076fff578c9cedd07b5278640e64db4aa854651 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e076fff578c9cedd07b52786…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 26 12:29:06 2020 +0200 kernel32: Use set_ntstatus() in more places. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 7 +-- dlls/kernel32/debugger.c | 8 +-- dlls/kernel32/file.c | 10 ++-- dlls/kernel32/powermgnt.c | 16 ++---- dlls/kernel32/sync.c | 127 ++++++++++------------------------------------ dlls/kernel32/thread.c | 48 +++++------------- dlls/kernel32/toolhelp.c | 8 ++- 7 files changed, 53 insertions(+), 171 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e076fff578c9cedd07b5…
1
0
0
0
Alexandre Julliard : kernel32: Leave some more space for kernelbase.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 613389059006270fc89abdfb984c43e6fa742a9a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=613389059006270fc89abdfb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 26 12:26:31 2020 +0200 kernel32: Leave some more space for kernelbase. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49208
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in index b3877fe13b..d9b1ca575c 100644 --- a/dlls/kernel32/Makefile.in +++ b/dlls/kernel32/Makefile.in @@ -3,7 +3,7 @@ MODULE = kernel32.dll IMPORTLIB = kernel32 IMPORTS = winecrt0 kernelbase ntdll EXTRALIBS = $(COREFOUNDATION_LIBS) $(POLL_LIBS) $(RT_LIBS) -EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b400000 +EXTRADLLFLAGS = -nodefaultlibs -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b600000 C_SRCS = \ actctx.c \
1
0
0
0
Nikolay Sivov : dwrite: Use global cursor to glyph array for substitutions.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: c9814f90988224afe22adc41dc04eb49cb61f206 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c9814f90988224afe22adc41…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 26 11:16:12 2020 +0300 dwrite: Use global cursor to glyph array for substitutions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 3 +- dlls/dwrite/opentype.c | 273 +++++++++++++++++++++++++++---------------- 2 files changed, 177 insertions(+), 99 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c9814f90988224afe22a…
1
0
0
0
Nikolay Sivov : dwrite: Prefetch all lookup entry fields when collecting them.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 2b5500ce1213374b602cb3eead580f5dfc985b2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2b5500ce1213374b602cb3ee…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 26 11:16:11 2020 +0300 dwrite: Prefetch all lookup entry fields when collecting them. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 98 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 39 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 54d066e017..7e35feb7f5 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4159,7 +4159,12 @@ static void opentype_layout_apply_gpos_lookup(struct scriptshaping_context *cont struct lookup { unsigned short index; + unsigned short type; + unsigned short flags; + unsigned short subtable_count; + unsigned int mask; + unsigned int offset; }; struct lookups @@ -4176,11 +4181,45 @@ static int lookups_sorting_compare(const void *a, const void *b) return left->index < right->index ? -1 : left->index > right->index ? 1 : 0; }; +static BOOL opentype_layout_init_lookup(struct ot_gsubgpos_table *table, unsigned short lookup_index, unsigned int mask, + struct lookup *lookup) +{ + unsigned short subtable_count, lookup_type, flags; + const struct ot_lookup_table *lookup_table; + unsigned int offset; + + if (!(offset = table_read_be_word(&table->table, table->lookup_list + + FIELD_OFFSET(struct ot_lookup_list, lookup[lookup_index])))) + { + return FALSE; + } + + offset += table->lookup_list; + + if (!(lookup_table = table_read_ensure(&table->table, offset, sizeof(*lookup_table)))) + return FALSE; + + if (!(subtable_count = GET_BE_WORD(lookup_table->subtable_count))) + return FALSE; + + lookup_type = GET_BE_WORD(lookup_table->lookup_type); + flags = GET_BE_WORD(lookup_table->flags); + + lookup->index = lookup_index; + lookup->type = lookup_type; + lookup->flags = flags; + lookup->subtable_count = subtable_count; + lookup->mask = mask; + lookup->offset = offset; + + return TRUE; +} + static void opentype_layout_add_lookups(const struct ot_feature_list *feature_list, UINT16 total_lookup_count, struct ot_gsubgpos_table *table, struct shaping_feature *feature, struct lookups *lookups) { UINT16 feature_offset, lookup_count; - unsigned int i, j; + unsigned int i; /* Feature wasn't found */ if (feature->index == 0xffff) @@ -4211,10 +4250,8 @@ static void opentype_layout_add_lookups(const struct ot_feature_list *feature_li if (lookup_index >= total_lookup_count) continue; - j = lookups->count; - lookups->lookups[j].index = lookup_index; - lookups->lookups[j].mask = feature->mask; - lookups->count++; + if (opentype_layout_init_lookup(table, lookup_index, feature->mask, &lookups->lookups[lookups->count])) + lookups->count++; } } @@ -4424,7 +4461,7 @@ void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, heap_free(lookups.lookups); } -static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator *iter, const struct ot_lookup *lookup) +static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator *iter, const struct lookup *lookup) { UINT16 format, coverage, orig_glyph = iter->context->u.subst.glyphs[iter->pos], glyph = orig_glyph; struct scriptshaping_cache *cache = iter->context->cache; @@ -4550,16 +4587,19 @@ static BOOL opentype_layout_context_match_lookahead(struct glyph_iterator *iter, } static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *context, unsigned int first_glyph, - unsigned int glyph_count, int lookup_index, BOOL only_single); + unsigned int glyph_count, struct lookup *lookup, BOOL only_single); static BOOL opentype_layout_context_gsub_apply_lookup(struct glyph_iterator *iter, unsigned int count, unsigned int lookup_count, const UINT16 *lookup_records) { + struct lookup lookup = { 0 }; + if (lookup_count > 1) FIXME("Only first lookup used.\n"); - opentype_layout_apply_gsub_lookup(iter->context, iter->pos + GET_BE_WORD(lookup_records[0]), count, - GET_BE_WORD(lookup_records[1]), TRUE); + if (opentype_layout_init_lookup(&iter->context->cache->gsub, GET_BE_WORD(lookup_records[1]), 0, &lookup)) + opentype_layout_apply_gsub_lookup(iter->context, iter->pos + GET_BE_WORD(lookup_records[0]), count, + &lookup, TRUE); return TRUE; } @@ -4574,7 +4614,7 @@ static BOOL opentype_layout_apply_gsub_chain_context_lookup(struct glyph_iterato opentype_layout_context_gsub_apply_lookup(iter, input_count, lookup_count, lookup_records); } -static BOOL opentype_layout_apply_gsub_chain_context_substitution(struct glyph_iterator *iter, const struct ot_lookup *lookup) +static BOOL opentype_layout_apply_gsub_chain_context_substitution(struct glyph_iterator *iter, const struct lookup *lookup) { struct scriptshaping_cache *cache = iter->context->cache; UINT16 format, coverage; @@ -4661,34 +4701,14 @@ static BOOL opentype_layout_apply_gsub_chain_context_substitution(struct glyph_i } static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *context, unsigned int first_glyph, - unsigned int glyph_count, int lookup_index, BOOL only_single) + unsigned int glyph_count, struct lookup *lookup, BOOL only_single) { - struct ot_gsubgpos_table *table = &context->cache->gsub; - const struct ot_lookup_table *lookup_table; struct glyph_iterator iter; - struct ot_lookup lookup; - WORD lookup_type; - lookup.offset = table_read_be_word(&table->table, table->lookup_list + FIELD_OFFSET(struct ot_lookup_list, lookup[lookup_index])); - if (!lookup.offset) + if (lookup->type != GSUB_LOOKUP_SINGLE_SUBST && only_single) return; - lookup.offset += table->lookup_list; - - if (!(lookup_table = table_read_ensure(&table->table, lookup.offset, sizeof(*lookup_table)))) - return; - - lookup.subtable_count = GET_BE_WORD(lookup_table->subtable_count); - if (!lookup.subtable_count) - return; - - lookup_type = GET_BE_WORD(lookup_table->lookup_type); - lookup.flags = GET_BE_WORD(lookup_table->flags); - - if (lookup_type != GSUB_LOOKUP_SINGLE_SUBST && only_single) - return; - - glyph_iterator_init(context, lookup.flags, first_glyph, glyph_count, &iter); + glyph_iterator_init(context, lookup->flags, first_glyph, glyph_count, &iter); while (iter.pos < first_glyph + iter.len) { @@ -4700,13 +4720,13 @@ static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *cont continue; } - switch (lookup_type) + switch (lookup->type) { case GSUB_LOOKUP_SINGLE_SUBST: - ret = opentype_layout_apply_gsub_single_substitution(&iter, &lookup); + ret = opentype_layout_apply_gsub_single_substitution(&iter, lookup); break; case GSUB_LOOKUP_CHAINING_CONTEXTUAL_SUBST: - ret = opentype_layout_apply_gsub_chain_context_substitution(&iter, &lookup); + ret = opentype_layout_apply_gsub_chain_context_substitution(&iter, lookup); break; case GSUB_LOOKUP_MULTIPLE_SUBST: case GSUB_LOOKUP_ALTERNATE_SUBST: @@ -4714,10 +4734,10 @@ static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *cont case GSUB_LOOKUP_CONTEXTUAL_SUBST: case GSUB_LOOKUP_REVERSE_CHAINING_CONTEXTUAL_SUBST: ret = FALSE; - WARN("Unimplemented lookup %d.\n", lookup_type); + WARN("Unimplemented lookup %d.\n", lookup->type); break; default: - WARN("Unknown lookup type %u.\n", lookup_type); + WARN("Unknown lookup type %u.\n", lookup->type); return; } @@ -4801,7 +4821,7 @@ HRESULT opentype_layout_apply_gsub_features(struct scriptshaping_context *contex opentype_layout_set_glyph_masks(context, features); for (i = 0; i < lookups.count; ++i) - opentype_layout_apply_gsub_lookup(context, 0, context->glyph_count, lookups.lookups[i].index, FALSE); + opentype_layout_apply_gsub_lookup(context, 0, context->glyph_count, &lookups.lookups[i], FALSE); heap_free(lookups.lookups);
1
0
0
0
Nikolay Sivov : dwrite: Use temporary buffers for GetGlyphs().
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 76b1f3fd729bbfb823d2fccb85f6fd49e7e0e04c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76b1f3fd729bbfb823d2fccb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 26 11:16:10 2020 +0300 dwrite: Use temporary buffers for GetGlyphs(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/analyzer.c | 9 +++++++-- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/shape.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 786d68ac27..3754fe39a1 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -1173,10 +1173,11 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, context.length = length; context.is_rtl = is_rtl; context.is_sideways = is_sideways; - context.u.subst.glyphs = glyphs; - context.u.subst.glyph_props = glyph_props; + context.u.subst.glyphs = heap_calloc(max_glyph_count, sizeof(*glyphs)); + context.u.subst.glyph_props = heap_calloc(max_glyph_count, sizeof(*glyph_props)); context.u.subst.clustermap = clustermap; context.u.subst.max_glyph_count = max_glyph_count; + context.u.subst.capacity = max_glyph_count; context.u.subst.digits = digits; context.language_tag = get_opentype_language(locale); context.user_features.features = features; @@ -1190,10 +1191,14 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, if (SUCCEEDED(hr)) { *actual_glyph_count = context.glyph_count; + memcpy(glyphs, context.u.subst.glyphs, context.glyph_count * sizeof(*glyphs)); + memcpy(glyph_props, context.u.subst.glyph_props, context.glyph_count * sizeof(*glyph_props)); hr = default_shaping_ops.set_text_glyphs_props(&context, clustermap, glyphs, *actual_glyph_count, text_props, glyph_props); } + heap_free(context.u.subst.glyph_props); + heap_free(context.u.subst.glyphs); heap_free(context.glyph_infos); return hr; diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index dd25c619c1..ce278e5499 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -491,6 +491,7 @@ struct scriptshaping_context DWRITE_SHAPING_GLYPH_PROPERTIES *glyph_props; UINT16 *clustermap; unsigned int max_glyph_count; + unsigned int capacity; const WCHAR *digits; } subst; } u; diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index 77c5ba1f8a..b7b40d1211 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -400,5 +400,5 @@ HRESULT shape_get_glyphs(struct scriptshaping_context *context, const unsigned i heap_free(features.features); - return S_OK; + return (context->glyph_count <= context->u.subst.max_glyph_count) ? S_OK : E_NOT_SUFFICIENT_BUFFER; }
1
0
0
0
Nikolay Sivov : dwrite: Only enable single substitution lookups for chained substitution.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 5625a8e52deb7a6a43586a2c4ca6d1ad2ba7401a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5625a8e52deb7a6a43586a2c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 26 11:16:09 2020 +0300 dwrite: Only enable single substitution lookups for chained substitution. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 5d90bad79c..54d066e017 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -4550,7 +4550,7 @@ static BOOL opentype_layout_context_match_lookahead(struct glyph_iterator *iter, } static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *context, unsigned int first_glyph, - unsigned int glyph_count, int lookup_index); + unsigned int glyph_count, int lookup_index, BOOL only_single); static BOOL opentype_layout_context_gsub_apply_lookup(struct glyph_iterator *iter, unsigned int count, unsigned int lookup_count, const UINT16 *lookup_records) @@ -4559,7 +4559,7 @@ static BOOL opentype_layout_context_gsub_apply_lookup(struct glyph_iterator *ite FIXME("Only first lookup used.\n"); opentype_layout_apply_gsub_lookup(iter->context, iter->pos + GET_BE_WORD(lookup_records[0]), count, - GET_BE_WORD(lookup_records[1])); + GET_BE_WORD(lookup_records[1]), TRUE); return TRUE; } @@ -4661,7 +4661,7 @@ static BOOL opentype_layout_apply_gsub_chain_context_substitution(struct glyph_i } static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *context, unsigned int first_glyph, - unsigned int glyph_count, int lookup_index) + unsigned int glyph_count, int lookup_index, BOOL only_single) { struct ot_gsubgpos_table *table = &context->cache->gsub; const struct ot_lookup_table *lookup_table; @@ -4685,6 +4685,9 @@ static void opentype_layout_apply_gsub_lookup(struct scriptshaping_context *cont lookup_type = GET_BE_WORD(lookup_table->lookup_type); lookup.flags = GET_BE_WORD(lookup_table->flags); + if (lookup_type != GSUB_LOOKUP_SINGLE_SUBST && only_single) + return; + glyph_iterator_init(context, lookup.flags, first_glyph, glyph_count, &iter); while (iter.pos < first_glyph + iter.len) @@ -4798,7 +4801,7 @@ HRESULT opentype_layout_apply_gsub_features(struct scriptshaping_context *contex opentype_layout_set_glyph_masks(context, features); for (i = 0; i < lookups.count; ++i) - opentype_layout_apply_gsub_lookup(context, 0, context->glyph_count, lookups.lookups[i].index); + opentype_layout_apply_gsub_lookup(context, 0, context->glyph_count, lookups.lookups[i].index, FALSE); heap_free(lookups.lookups);
1
0
0
0
Nikolay Sivov : dwrite: Update glyph properties on single substitution.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: e5c6a7beb302b37caef800e17b42bc4c49708a93 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5c6a7beb302b37caef800e1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 26 11:16:08 2020 +0300 dwrite: Update glyph properties on single substitution. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index abf9cba105..5d90bad79c 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -3137,7 +3137,7 @@ static unsigned int opentype_set_glyph_props(struct scriptshaping_context *conte if (cache->gdef.classdef) { - glyph_class = opentype_layout_get_glyph_class(&cache->gdef.table, cache->gdef.classdef, context->u.subst.glyphs[g]); + glyph_class = opentype_layout_get_glyph_class(&cache->gdef.table, cache->gdef.classdef, glyph); } switch (glyph_class) @@ -3160,6 +3160,13 @@ static unsigned int opentype_set_glyph_props(struct scriptshaping_context *conte return props; } +static void opentype_set_subst_glyph_props(struct scriptshaping_context *context, unsigned int g, UINT16 glyph) +{ + unsigned int glyph_props = opentype_set_glyph_props(context, g, glyph); + context->u.subst.glyph_props[g].isDiacritic = !!(glyph_props == GLYPH_PROP_MARK); + context->u.subst.glyph_props[g].isZeroWidthSpace = !!(glyph_props == GLYPH_PROP_MARK); +} + struct coverage_compare_format1_context { UINT16 glyph; @@ -4419,15 +4426,14 @@ void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator *iter, const struct ot_lookup *lookup) { + UINT16 format, coverage, orig_glyph = iter->context->u.subst.glyphs[iter->pos], glyph = orig_glyph; struct scriptshaping_cache *cache = iter->context->cache; const struct dwrite_fonttable *gsub = &cache->gsub.table; - UINT16 format, coverage; unsigned int i; for (i = 0; i < lookup->subtable_count; ++i) { unsigned int subtable_offset = opentype_layout_get_gsub_subtable(cache, lookup->offset, i); - UINT16 glyph = iter->context->u.subst.glyphs[iter->pos]; unsigned int coverage_index; format = table_read_be_word(&cache->gsub.table, subtable_offset); @@ -4443,7 +4449,7 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator if (coverage_index == GLYPH_NOT_COVERED) continue; - iter->context->u.subst.glyphs[iter->pos] = glyph + GET_BE_WORD(format1->delta); + glyph = orig_glyph + GET_BE_WORD(format1->delta); break; } else if (format == 2) @@ -4456,13 +4462,19 @@ static BOOL opentype_layout_apply_gsub_single_substitution(struct glyph_iterator if (coverage_index == GLYPH_NOT_COVERED || coverage_index >= count) continue; - iter->context->u.subst.glyphs[iter->pos] = GET_BE_WORD(format2->substitutes[coverage_index]); + glyph = GET_BE_WORD(format2->substitutes[coverage_index]); break; } else WARN("Unknown single substitution format %u.\n", format); } + if (glyph != orig_glyph) + { + iter->context->u.subst.glyphs[iter->pos] = glyph; + opentype_set_subst_glyph_props(iter->context, iter->pos, glyph); + } + return FALSE; } @@ -4762,11 +4774,7 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c context->u.subst.glyphs[g] = font->get_glyph(context->cache->context, codepoint); context->u.subst.glyph_props[g].justification = SCRIPT_JUSTIFY_CHARACTER; context->u.subst.glyph_props[g].isClusterStart = 1; - if (opentype_set_glyph_props(context, g, context->u.subst.glyphs[g]) == GLYPH_PROP_MARK) - { - context->u.subst.glyph_props[g].isDiacritic = 1; - context->u.subst.glyph_props[g].isZeroWidthSpace = 1; - } + opentype_set_subst_glyph_props(context, g, context->u.subst.glyphs[g]); context->glyph_count++; clustermap[i] = i;
1
0
0
0
Alex Henrie : ws2_32: Reimplement inet_ntop on top of ntdll functions.
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: a294f755ceaeeb07bdf08e1cb445cbcd542fa533 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a294f755ceaeeb07bdf08e1c…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon May 25 22:36:24 2020 -0600 ws2_32: Reimplement inet_ntop on top of ntdll functions. And add a couple of tests for IPv6 addresses that Windows represents using dot-decimal notation for the last 32 bits but GNU/Linux does not. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 --- configure.ac | 3 --- dlls/ws2_32/socket.c | 20 ++++++-------------- dlls/ws2_32/tests/sock.c | 6 ++++++ include/config.h.in | 9 --------- 5 files changed, 12 insertions(+), 29 deletions(-) diff --git a/configure b/configure index e2e03dc4ba..a5516fe60e 100755 --- a/configure +++ b/configure @@ -18296,9 +18296,6 @@ for ac_func in \ getprotobyname \ getprotobynumber \ getservbyport \ - inet_addr \ - inet_network \ - inet_ntop \ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/configure.ac b/configure.ac index d81f5cc88c..b43ec73929 100644 --- a/configure.ac +++ b/configure.ac @@ -2249,9 +2249,6 @@ AC_CHECK_FUNCS(\ getprotobyname \ getprotobynumber \ getservbyport \ - inet_addr \ - inet_network \ - inet_ntop \ ) dnl Check for clock_gettime which may be in -lrt diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index bdfe63ee19..199b7187a8 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -8351,10 +8351,8 @@ int WINAPI WSARemoveServiceClass(LPGUID info) */ PCSTR WINAPI WS_inet_ntop( INT family, PVOID addr, PSTR buffer, SIZE_T len ) { -#ifdef HAVE_INET_NTOP - struct WS_in6_addr *in6; - struct WS_in_addr *in; - PCSTR pdst; + NTSTATUS status; + ULONG size = min( len, (ULONG)-1 ); TRACE("family %d, addr (%p), buffer (%p), len %ld\n", family, addr, buffer, len); if (!buffer) @@ -8367,14 +8365,12 @@ PCSTR WINAPI WS_inet_ntop( INT family, PVOID addr, PSTR buffer, SIZE_T len ) { case WS_AF_INET: { - in = addr; - pdst = inet_ntop( AF_INET, &in->WS_s_addr, buffer, len ); + status = RtlIpv4AddressToStringExA( (IN_ADDR *)addr, 0, buffer, &size ); break; } case WS_AF_INET6: { - in6 = addr; - pdst = inet_ntop( AF_INET6, in6->WS_s6_addr, buffer, len ); + status = RtlIpv6AddressToStringExA( (IN6_ADDR *)addr, 0, 0, buffer, &size ); break; } default: @@ -8382,13 +8378,9 @@ PCSTR WINAPI WS_inet_ntop( INT family, PVOID addr, PSTR buffer, SIZE_T len ) return NULL; } - if (!pdst) SetLastError( STATUS_INVALID_PARAMETER ); - return pdst; -#else - FIXME( "not supported on this platform\n" ); - SetLastError( WSAEAFNOSUPPORT ); + if (status == STATUS_SUCCESS) return buffer; + SetLastError( STATUS_INVALID_PARAMETER ); return NULL; -#endif } /*********************************************************************** diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index c72dc7a77a..cd9a13937c 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -5008,6 +5008,12 @@ static void test_inet_pton(void) "0x12345678", NULL, NULL}, {AF_INET6, 0, 0, /* windows bug */ "::1:2:3:4:5:6:7", NULL, NULL}, + {AF_INET6, 1, 0, /* Test 30 */ + "::5efe:1.2.3.4", "::5efe:1.2.3.4", + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\xfe\x01\x02\x03\x04"}, + {AF_INET6, 1, 0, + "::ffff:0:1.2.3.4", "::ffff:0:1.2.3.4", + "\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x01\x02\x03\x04"}, }; int i, ret; DWORD err; diff --git a/include/config.h.in b/include/config.h.in index d2933eee65..2642487312 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -296,18 +296,9 @@ /* Define to 1 if you have the `ilogbf' function. */ #undef HAVE_ILOGBF -/* Define to 1 if you have the `inet_addr' function. */ -#undef HAVE_INET_ADDR - /* Define to 1 if you have the <inet/mib2.h> header file. */ #undef HAVE_INET_MIB2_H -/* Define to 1 if you have the `inet_network' function. */ -#undef HAVE_INET_NETWORK - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H
1
0
0
0
Alex Henrie : ntdll: Implement RtlIpv6AddressToString(Ex)[AW].
by Alexandre Julliard
26 May '20
26 May '20
Module: wine Branch: master Commit: 0af08318b75bd31928c31c875239c0f863ab4e0d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0af08318b75bd31928c31c87…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon May 25 22:36:23 2020 -0600 ntdll: Implement RtlIpv6AddressToString(Ex)[AW]. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46788
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 8 +-- dlls/ntdll/rtl.c | 129 ++++++++++++++++++++++++++++++++++++ dlls/ntdll/tests/rtl.c | 14 +--- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 8 +-- include/ip2string.h | 7 ++ 5 files changed, 147 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0af08318b75bd31928c3…
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
75
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
Results per page:
10
25
50
100
200