[PATCH 2/6] reg: Merge common header #includes into reg.h

Hugh McMaster hugh.mcmaster at outlook.com
Thu Mar 18 06:36:49 CDT 2021


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/reg/add.c    | 2 --
 programs/reg/delete.c | 2 --
 programs/reg/export.c | 4 ----
 programs/reg/import.c | 6 +-----
 programs/reg/query.c  | 2 --
 programs/reg/reg.c    | 4 +---
 programs/reg/reg.h    | 2 ++
 7 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/programs/reg/add.c b/programs/reg/add.c
index 2d8521f9234..054023df7ab 100644
--- a/programs/reg/add.c
+++ b/programs/reg/add.c
@@ -18,8 +18,6 @@
 
 #include <errno.h>
 #include <stdlib.h>
-#include <windows.h>
-#include <wine/heap.h>
 #include "reg.h"
 
 static DWORD wchar_get_type(const WCHAR *type_name)
diff --git a/programs/reg/delete.c b/programs/reg/delete.c
index 530d4513ece..e0730e5c12f 100644
--- a/programs/reg/delete.c
+++ b/programs/reg/delete.c
@@ -16,8 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <windows.h>
-#include <wine/heap.h>
 #include "reg.h"
 
 int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
diff --git a/programs/reg/export.c b/programs/reg/export.c
index 3de57062b7f..214c94b1368 100644
--- a/programs/reg/export.c
+++ b/programs/reg/export.c
@@ -16,12 +16,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <wine/heap.h>
-
 #include "reg.h"
 
 static void write_file(HANDLE hFile, const WCHAR *str)
diff --git a/programs/reg/import.c b/programs/reg/import.c
index 7ad7b35d5dc..9e21bcc6a7e 100644
--- a/programs/reg/import.c
+++ b/programs/reg/import.c
@@ -16,15 +16,11 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <windows.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <wine/debug.h>
-#include <wine/heap.h>
-
 #include "reg.h"
+#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(reg);
 
diff --git a/programs/reg/query.c b/programs/reg/query.c
index 3d81d120bd2..b24edb2f0b2 100644
--- a/programs/reg/query.c
+++ b/programs/reg/query.c
@@ -17,8 +17,6 @@
  */
 
 #include <stdio.h>
-#include <windows.h>
-#include <wine/heap.h>
 #include "reg.h"
 
 static const WCHAR *reg_type_to_wchar(DWORD type)
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index dab77530cce..354ece86f61 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -16,11 +16,9 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <windows.h>
 #include <stdlib.h>
-#include <wine/debug.h>
-#include <wine/heap.h>
 #include "reg.h"
+#include <wine/debug.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(reg);
 
diff --git a/programs/reg/reg.h b/programs/reg/reg.h
index 4cb31c4671a..b29c2c21a1f 100644
--- a/programs/reg/reg.h
+++ b/programs/reg/reg.h
@@ -19,6 +19,8 @@
 #ifndef __REG_H__
 #define __REG_H__
 
+#include <windows.h>
+#include <wine/heap.h>
 #include "resource.h"
 
 #define MAX_SUBKEY_LEN   257
-- 
2.31.0




More information about the wine-devel mailing list