From a77feaee58c04a7a4fad5ce0334b29ec196bf916 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 1 Jan 2014 22:20:28 +0000 Subject: [PATCH] [XMLLITE] * Move some inclusions to the main header. * Set the default debugging channel globally through the main header. * Remove inclusions and definitions that already exist in the main header. * Improve the GUIDs situation. CORE-7716 svn path=/trunk/; revision=61484 --- reactos/dll/win32/xmllite/CMakeLists.txt | 3 ++- reactos/dll/win32/xmllite/guid.c | 17 +++++++++++++++++ reactos/dll/win32/xmllite/reader.c | 18 ++---------------- reactos/dll/win32/xmllite/writer.c | 15 +-------------- reactos/dll/win32/xmllite/xmllite_main.c | 10 +--------- reactos/dll/win32/xmllite/xmllite_private.h | 18 ++++++++++++++++++ 6 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 reactos/dll/win32/xmllite/guid.c diff --git a/reactos/dll/win32/xmllite/CMakeLists.txt b/reactos/dll/win32/xmllite/CMakeLists.txt index 6b358ce7117..4694dce61ab 100644 --- a/reactos/dll/win32/xmllite/CMakeLists.txt +++ b/reactos/dll/win32/xmllite/CMakeLists.txt @@ -7,11 +7,12 @@ list(APPEND SOURCE reader.c writer.c xmllite_main.c + guid.c ${CMAKE_CURRENT_BINARY_DIR}/xmllite_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/xmllite.def) add_library(xmllite SHARED ${SOURCE}) set_module_type(xmllite win32dll) -target_link_libraries(xmllite wine) +target_link_libraries(xmllite uuid wine) add_importlibs(xmllite msvcrt kernel32 ntdll) add_cd_file(TARGET xmllite DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/win32/xmllite/guid.c b/reactos/dll/win32/xmllite/guid.c new file mode 100644 index 00000000000..94805255fb3 --- /dev/null +++ b/reactos/dll/win32/xmllite/guid.c @@ -0,0 +1,17 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include +#include +#include +#include +#include + +DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda); + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/reactos/dll/win32/xmllite/reader.c b/reactos/dll/win32/xmllite/reader.c index 66c0ab6bc1f..a9a46ad246b 100644 --- a/reactos/dll/win32/xmllite/reader.c +++ b/reactos/dll/win32/xmllite/reader.c @@ -18,27 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include -#include #include "xmllite_private.h" -#include +#include + #include #include -WINE_DEFAULT_DEBUG_CHANNEL(xmllite); - /* not defined in public headers */ DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda); diff --git a/reactos/dll/win32/xmllite/writer.c b/reactos/dll/win32/xmllite/writer.c index 789472f7f20..7fad8ab2df3 100644 --- a/reactos/dll/win32/xmllite/writer.c +++ b/reactos/dll/win32/xmllite/writer.c @@ -17,21 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define COBJMACROS - -#include -#include -#include -#include -#include - -#include - -WINE_DEFAULT_DEBUG_CHANNEL(xmllite); +#include "xmllite_private.h" typedef struct _xmlwriter { diff --git a/reactos/dll/win32/xmllite/xmllite_main.c b/reactos/dll/win32/xmllite/xmllite_main.c index cff6a1ec8f9..63d4046d0ab 100644 --- a/reactos/dll/win32/xmllite/xmllite_main.c +++ b/reactos/dll/win32/xmllite/xmllite_main.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#include - -#include -#include -#include - -WINE_DEFAULT_DEBUG_CHANNEL(xmllite); +#include "xmllite_private.h" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { diff --git a/reactos/dll/win32/xmllite/xmllite_private.h b/reactos/dll/win32/xmllite/xmllite_private.h index 97993e10b6e..babae48542f 100644 --- a/reactos/dll/win32/xmllite/xmllite_private.h +++ b/reactos/dll/win32/xmllite/xmllite_private.h @@ -21,6 +21,24 @@ #ifndef __XMLLITE_PRIVATE__ #define __XMLLITE_PRIVATE__ +#include + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS + +#include +#include +#include +#include + +#include +WINE_DEFAULT_DEBUG_CHANNEL(xmllite); + /* memory allocation functions */ static inline void *heap_alloc(size_t len) {