mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
reg-Implement_Query: Update patchset.
This commit is contained in:
parent
1fa34cfef0
commit
1f66129ef4
@ -5786,7 +5786,7 @@ if test "$enable_reg_Implement_Query" -eq 1; then
|
||||
patch_apply reg-Implement_Query/0001-reg-Query-all-values-and-subkeys-in-a-specified-key.patch
|
||||
patch_apply reg-Implement_Query/0002-reg-Add-support-for-querying-the-registry-with-the-v.patch
|
||||
(
|
||||
echo '+ { "Hugh McMaster", "reg: Query all values and subkeys in a specified key.", 2 },';
|
||||
echo '+ { "Hugh McMaster", "reg: Query all values and subkeys in a specified key.", 3 },';
|
||||
echo '+ { "Hugh McMaster", "reg: Add support for querying the registry with the /v and /ve switches.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -1,20 +1,20 @@
|
||||
From 47f219c26491fdffccf4b74e319daf80baf06de6 Mon Sep 17 00:00:00 2001
|
||||
From 1a268f2380cc56623c1aed055dcd259c2fc3e53a Mon Sep 17 00:00:00 2001
|
||||
From: Hugh McMaster <hugh.mcmaster@outlook.com>
|
||||
Date: Thu, 17 Mar 2016 16:10:25 +1100
|
||||
Subject: reg: Query all values and subkeys in a specified key (v2)
|
||||
Subject: reg: Query all values and subkeys in a specified key (v3)
|
||||
|
||||
Displays all values and subkeys in a specified key. Recursion is supported.
|
||||
|
||||
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
|
||||
---
|
||||
programs/reg/reg.c | 298 +++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 291 insertions(+), 7 deletions(-)
|
||||
programs/reg/reg.c | 292 +++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 285 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
|
||||
index b2066e0..ab04ee9 100644
|
||||
index e56ddfe..334bb18 100644
|
||||
--- a/programs/reg/reg.c
|
||||
+++ b/programs/reg/reg.c
|
||||
@@ -536,14 +536,298 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
|
||||
@@ -537,14 +537,292 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -27,16 +27,16 @@ index b2066e0..ab04ee9 100644
|
||||
+
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case REG_NONE:
|
||||
+ case REG_SZ:
|
||||
+ case REG_EXPAND_SZ:
|
||||
+ buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
|
||||
+ strcpyW(buffer, (WCHAR *)src);
|
||||
+ break;
|
||||
+ case REG_NONE:
|
||||
+ case REG_BINARY:
|
||||
+ {
|
||||
+ WCHAR *ptr;
|
||||
+ WCHAR fmt[] = {'%','0','2','x',0};
|
||||
+ WCHAR fmt[] = {'%','0','2','X',0};
|
||||
+
|
||||
+ buffer = HeapAlloc(GetProcessHeap(), 0, (size_bytes * 2 + 1) * sizeof(WCHAR));
|
||||
+ ptr = buffer;
|
||||
@ -48,17 +48,11 @@ index b2066e0..ab04ee9 100644
|
||||
+ /* case REG_DWORD_LITTLE_ENDIAN: */
|
||||
+ case REG_DWORD_BIG_ENDIAN:
|
||||
+ {
|
||||
+ DWORD value = 0;
|
||||
+ const int zero_x_dword = 10;
|
||||
+ WCHAR fmt[] = {'0','x','%','x',0};
|
||||
+
|
||||
+ for (i = size_bytes; i-- > 0;)
|
||||
+ {
|
||||
+ value <<= 8;
|
||||
+ value |= src[i];
|
||||
+ }
|
||||
+ buffer = HeapAlloc(GetProcessHeap(), 0, (zero_x_dword + 1) * sizeof(WCHAR));
|
||||
+ sprintfW(buffer, fmt, value);;
|
||||
+ sprintfW(buffer, fmt, *(DWORD *)src);
|
||||
+ break;
|
||||
+ }
|
||||
+ case REG_MULTI_SZ:
|
||||
@ -317,7 +311,7 @@ index b2066e0..ab04ee9 100644
|
||||
}
|
||||
|
||||
int wmain(int argc, WCHAR *argvW[])
|
||||
@@ -667,7 +951,7 @@ int wmain(int argc, WCHAR *argvW[])
|
||||
@@ -668,7 +946,7 @@ int wmain(int argc, WCHAR *argvW[])
|
||||
else if (!lstrcmpiW(argvW[1], queryW))
|
||||
{
|
||||
WCHAR *key_name, *value_name = NULL;
|
||||
@ -326,7 +320,7 @@ index b2066e0..ab04ee9 100644
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
@@ -695,9 +979,9 @@ int wmain(int argc, WCHAR *argvW[])
|
||||
@@ -696,9 +974,9 @@ int wmain(int argc, WCHAR *argvW[])
|
||||
else if (!lstrcmpiW(argvW[i], slashVEW))
|
||||
value_empty = TRUE;
|
||||
else if (!lstrcmpiW(argvW[i], slashSW))
|
||||
|
Loading…
Reference in New Issue
Block a user