Rebase against 0c5ce58505e24bf07cbd4c09752ef2f949d64fd0

This commit is contained in:
Alistair Leslie-Hughes
2018-11-23 11:24:39 +11:00
parent a56cf4623e
commit e871a1020b
5 changed files with 85 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
From cc87b15eede29e05caba38bbf2d15614dcbb1f4a Mon Sep 17 00:00:00 2001
From 29f88a1e1278d0ffec52d4463b3d743765fc1ad2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 16 Aug 2017 02:45:23 +0200
Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
Subject: [PATCH 1/2] kernelbase: Add semi-stub for PathCchCombineEx.
---
.../api-ms-win-core-path-l1-1-0.spec | 2 +-
@@ -11,7 +11,7 @@ Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
4 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
index 0524e7c..c11746e 100644
index 61eb220..8c720ee 100644
--- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
+++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
@@ -8,7 +8,7 @@
@@ -21,7 +21,7 @@ index 0524e7c..c11746e 100644
-@ stub PathCchCombineEx
+@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx
@ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension
@ stub PathCchIsRoot
@ stdcall PathCchIsRoot(wstr) kernelbase.PathCchIsRoot
@ stub PathCchRemoveBackslash
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
index a7db45e..78c19bd 100644
@@ -36,7 +36,7 @@ index a7db45e..78c19bd 100644
C_SRCS = \
main.c \
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 6ee822d..fc5ddfd 100644
index ffb5a95..53d45c4 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1037,7 +1037,7 @@
@@ -46,10 +46,10 @@ index 6ee822d..fc5ddfd 100644
-# @ stub PathCchCombineEx
+@ stdcall PathCchCombineEx(ptr long ptr ptr long)
@ stdcall PathCchFindExtension(wstr long ptr)
# @ stub PathCchIsRoot
@ stdcall PathCchIsRoot(wstr)
# @ stub PathCchRemoveBackslash
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c
index 047017e..598229a 100644
index 75faf0b..047149e 100644
--- a/dlls/kernelbase/path.c
+++ b/dlls/kernelbase/path.c
@@ -22,6 +22,7 @@
@@ -60,9 +60,9 @@ index 047017e..598229a 100644
#include "strsafe.h"
#include "wine/debug.h"
@@ -183,3 +184,29 @@ HRESULT WINAPI PathCchRenameExtension(WCHAR *path, SIZE_T size, const WCHAR *ext
hr = PathCchAddExtension(path, size, extension);
return FAILED(hr) ? hr : S_OK;
@@ -419,3 +420,29 @@ BOOL WINAPI PathIsUNCEx(const WCHAR *path, const WCHAR **server)
if (server) *server = result;
return result ? TRUE : FALSE;
}
+
+/***********************************************************************

View File

@@ -1,25 +1,25 @@
From 64f1f3000c1ef0a6211ace3fd361dcfebd000757 Mon Sep 17 00:00:00 2001
From 1971ae905df4731f0f3f8b3e27329fff1a0c7b92 Mon Sep 17 00:00:00 2001
From: Julien Schueller <schueller@phimeca.com>
Date: Wed, 4 Jul 2018 22:35:16 +0200
Subject: [PATCH] kernelbase: Implement
Subject: [PATCH 2/2] kernelbase: Implement
PathCchRemoveBackslash()/PathCchRemoveBackslashEx().
---
.../api-ms-win-core-path-l1-1-0.spec | 4 +-
dlls/kernelbase/kernelbase.spec | 4 +-
dlls/kernelbase/path.c | 31 +++++
dlls/kernelbase/tests/path.c | 128 +++++++++++++++++++++
dlls/kernelbase/tests/path.c | 129 +++++++++++++++++++++
include/pathcch.h | 2 +
5 files changed, 165 insertions(+), 4 deletions(-)
5 files changed, 166 insertions(+), 4 deletions(-)
diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
index c11746e..c899fd9 100644
index 8c720ee..418ed61 100644
--- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
+++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
@@ -11,8 +11,8 @@
@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx
@ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension
@ stub PathCchIsRoot
@ stdcall PathCchIsRoot(wstr) kernelbase.PathCchIsRoot
-@ stub PathCchRemoveBackslash
-@ stub PathCchRemoveBackslashEx
+@ stdcall PathCchRemoveBackslash(wstr long) kernelbase.PathCchRemoveBackslash
@@ -28,13 +28,13 @@ index c11746e..c899fd9 100644
@ stub PathCchRemoveFileSpec
@ stdcall PathCchRenameExtension(wstr long wstr) kernelbase.PathCchRenameExtension
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index fc5ddfd..9863d9f 100644
index 53d45c4..a568627 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1040,8 +1040,8 @@
@ stdcall PathCchCombineEx(ptr long ptr ptr long)
@ stdcall PathCchFindExtension(wstr long ptr)
# @ stub PathCchIsRoot
@ stdcall PathCchIsRoot(wstr)
-# @ stub PathCchRemoveBackslash
-# @ stub PathCchRemoveBackslashEx
+@ stdcall PathCchRemoveBackslash(wstr long)
@@ -43,10 +43,10 @@ index fc5ddfd..9863d9f 100644
# @ stub PathCchRemoveFileSpec
@ stdcall PathCchRenameExtension(wstr long wstr)
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c
index 598229a..68c8dcb 100644
index 047149e..a413e94 100644
--- a/dlls/kernelbase/path.c
+++ b/dlls/kernelbase/path.c
@@ -210,3 +210,34 @@ HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, con
@@ -446,3 +446,34 @@ HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, con
return S_OK;
}
@@ -82,7 +82,7 @@ index 598229a..68c8dcb 100644
+}
+
diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c
index 1d6f44e..61d2232 100644
index 2edd49b..97bf7dd 100644
--- a/dlls/kernelbase/tests/path.c
+++ b/dlls/kernelbase/tests/path.c
@@ -33,6 +33,8 @@
@@ -93,8 +93,8 @@ index 1d6f44e..61d2232 100644
+HRESULT (WINAPI *pPathCchRemoveBackslashEx)(WCHAR *out, SIZE_T size, WCHAR **endptr, SIZE_T *remaining);
HRESULT (WINAPI *pPathCchCombineEx)(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags);
HRESULT (WINAPI *pPathCchFindExtension)(const WCHAR *path, SIZE_T size, const WCHAR **extension);
HRESULT (WINAPI *pPathCchRemoveExtension)(WCHAR *path, SIZE_T size);
@@ -632,6 +634,127 @@ static void test_PathCchRenameExtension(void)
BOOL (WINAPI *pPathCchIsRoot)(const WCHAR *path);
@@ -1097,6 +1099,127 @@ static void test_PathIsUNCEx(void)
}
}
@@ -222,9 +222,9 @@ index 1d6f44e..61d2232 100644
START_TEST(path)
{
HMODULE hmod = LoadLibraryA("kernelbase.dll");
@@ -644,6 +767,9 @@ START_TEST(path)
pPathCchRemoveExtension = (void *)GetProcAddress(hmod, "PathCchRemoveExtension");
pPathCchRenameExtension = (void *)GetProcAddress(hmod, "PathCchRenameExtension");
@@ -1114,6 +1237,9 @@ START_TEST(path)
pPathCchStripToRoot = (void *)GetProcAddress(hmod, "PathCchStripToRoot");
pPathIsUNCEx = (void *)GetProcAddress(hmod, "PathIsUNCEx");
+ pPathCchRemoveBackslash = (void *)GetProcAddress(hmod, "PathCchRemoveBackslash");
+ pPathCchRemoveBackslashEx = (void *)GetProcAddress(hmod, "PathCchRemoveBackslashEx");
@@ -232,15 +232,16 @@ index 1d6f44e..61d2232 100644
test_PathCchCombineEx();
test_PathCchAddBackslash();
test_PathCchAddBackslashEx();
@@ -651,4 +777,6 @@ START_TEST(path)
test_PathCchFindExtension();
test_PathCchRemoveExtension();
test_PathCchRenameExtension();
@@ -1126,4 +1252,7 @@ START_TEST(path)
test_PathCchStripPrefix();
test_PathCchStripToRoot();
test_PathIsUNCEx();
+
+ test_PathCchRemoveBackslash();
+ test_PathCchRemoveBackslashEx();
}
diff --git a/include/pathcch.h b/include/pathcch.h
index 3057b6c..dd92b83 100644
index 443ccd3..fec4567 100644
--- a/include/pathcch.h
+++ b/include/pathcch.h
@@ -28,6 +28,8 @@
@@ -251,7 +252,7 @@ index 3057b6c..dd92b83 100644
+HRESULT WINAPI PathCchRemoveBackslashEx(WCHAR *path, SIZE_T size, WCHAR **end, SIZE_T *remaining);
HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags);
HRESULT WINAPI PathCchFindExtension(const WCHAR *path, SIZE_T size, const WCHAR **extension);
HRESULT WINAPI PathCchRemoveExtension(WCHAR *path, SIZE_T size);
BOOL WINAPI PathCchIsRoot(const WCHAR *path);
--
1.9.1