Skip to content

Commit

Permalink
Rebase against 2ad09b01673381261815bfc804a2f69ce4d85f86.
Browse files Browse the repository at this point in the history
  • Loading branch information
alesliehughes committed Nov 30, 2020
1 parent 47fea9f commit d3b70d6
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 1,240 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 7529755fcc41fda650aac6b27f34438354435d34 Mon Sep 17 00:00:00 2001
From b51fdc7e211f676d169c937209bf689e57252c5d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
Expand All @@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 9280b5d32..2f0974a4c 100644
index aa51c744297..7cad015480f 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1887,7 +1887,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -2130,7 +2130,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
Expand All @@ -21,7 +21,7 @@ index 9280b5d32..2f0974a4c 100644
}

struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1895,7 +1895,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -2138,7 +2138,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
Expand All @@ -31,18 +31,18 @@ index 9280b5d32..2f0974a4c 100644

static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index b9321157a..76ea23ba6 100644
index 1f6201a6a93..35791d5c22e 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5895,7 +5895,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
@@ -5886,7 +5886,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
- CONTAINING_RECORD(iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}

HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight,
--
2.24.0
2.29.2

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From 25b5e818272cf6fc52a8707c80b9ade3a5ca5df5 Mon Sep 17 00:00:00 2001
From a207d7f2c77296798e047ed03d88d8a060139aff Mon Sep 17 00:00:00 2001
From: Jason Edmeades <us@edmeades.me.uk>
Date: Tue, 16 Jul 2019 13:49:18 +1000
Subject: [PATCH 1/2] cmd: Support for launching programs based on file
association
Subject: [PATCH] cmd: Support for launching programs based on file association

cmd already handles exe, cmd, bat etc but if you run a file with another extension,
then use the associations set in the registry (for example via ftype / assoc) to
Expand All @@ -12,14 +11,14 @@ fred.msi for msiexec to be launched.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18154
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
---
programs/cmd/wcmdmain.c | 140 +++++++++++++++++++++++++++++-----------
1 file changed, 104 insertions(+), 36 deletions(-)
programs/cmd/wcmdmain.c | 138 +++++++++++++++++++++++++++++-----------
1 file changed, 102 insertions(+), 36 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 29e498a48d..2a9e4c75ee 100644
index cacb7ea7751..19a807c1624 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1142,8 +1142,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1135,8 +1135,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)

/* 1. If extension supplied, see if that file exists */
if (extensionsupplied) {
Expand All @@ -31,25 +30,17 @@ index 29e498a48d..2a9e4c75ee 100644
}
}

@@ -1174,6 +1176,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1166,6 +1168,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
}

if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
+ WINE_TRACE("Found via search and pathext as '%s'\n", wine_dbgstr_w(thisDir));
found = TRUE;
thisExt = NULL;
}
@@ -1191,58 +1194,123 @@ void WCMD_run_program (WCHAR *command, BOOL called)
WCHAR *ext = wcsrchr( thisDir, '.' );
static const WCHAR batExt[] = {'.','b','a','t','\0'};
static const WCHAR cmdExt[] = {'.','c','m','d','\0'};
+ static const WCHAR exeExt[] = {'.','e','x','e','\0'};
+ static const WCHAR comExt[] = {'.','c','o','m','\0'};

WINE_TRACE("Found as %s\n", wine_dbgstr_w(thisDir));

@@ -1187,52 +1190,115 @@ void WCMD_run_program (WCHAR *command, BOOL called)
/* Special case BAT and CMD */
if (ext && (!wcsicmp(ext, batExt) || !wcsicmp(ext, cmdExt))) {
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
BOOL oldinteractive = interactive;
+ WINE_TRACE("Calling batch program\n");
interactive = FALSE;
Expand Down Expand Up @@ -95,7 +86,7 @@ index 29e498a48d..2a9e4c75ee 100644
+
+ /* If it is not a .com or .exe, try to launch through ShellExecuteExW
+ which takes into account the association for the extension. */
+ if (ext && (wcsicmp(ext, exeExt) && wcsicmp(ext, comExt))) {
+ if (ext && (wcsicmp(ext, L".exe") && wcsicmp(ext, L".com"))) {
+
+ SHELLEXECUTEINFOW shexw;
+ BOOL rc;
Expand Down Expand Up @@ -199,5 +190,5 @@ index 29e498a48d..2a9e4c75ee 100644
}

--
2.17.1
2.29.2

0 comments on commit d3b70d6

Please sign in to comment.