From 2eaefbd1a479946b8798e581b94aa10896296187 Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Mon, 8 Dec 2003 21:58:55 +0000 Subject: [PATCH] Move content of global.h into the appropriate private headers. --- dlls/kernel/atom.c | 1 - dlls/kernel/console.c | 1 + dlls/kernel/dosmem.c | 2 +- dlls/kernel/file.c | 1 + dlls/kernel/global16.c | 1 - dlls/kernel/kernel_main.c | 1 - dlls/kernel/kernel_private.h | 6 ++++++ dlls/kernel/local16.c | 1 - dlls/kernel/ne_module.c | 2 +- dlls/kernel/ne_segment.c | 2 +- dlls/kernel/snoop16.c | 2 +- dlls/kernel/sync.c | 1 + dlls/kernel/task.c | 1 - dlls/kernel/vxd.c | 1 + dlls/ntdll/ntdll_misc.h | 5 +++++ dlls/ntdll/signal_i386.c | 1 - dlls/ntdll/signal_powerpc.c | 1 - dlls/ntdll/signal_sparc.c | 1 - dlls/ntdll/virtual.c | 1 - dlls/user/user_main.c | 1 - dlls/x11drv/dib.c | 2 +- include/global.h | 40 ------------------------------------ objects/metafile.c | 1 - 23 files changed, 20 insertions(+), 56 deletions(-) delete mode 100644 include/global.h diff --git a/dlls/kernel/atom.c b/dlls/kernel/atom.c index 32f86de21d5..3c981ac7fbe 100644 --- a/dlls/kernel/atom.c +++ b/dlls/kernel/atom.c @@ -41,7 +41,6 @@ #include "wine/server.h" #include "wine/unicode.h" #include "wine/winbase16.h" -#include "global.h" #include "kernel_private.h" #include "stackframe.h" diff --git a/dlls/kernel/console.c b/dlls/kernel/console.c index 198765d5cd1..16d185276ca 100644 --- a/dlls/kernel/console.c +++ b/dlls/kernel/console.c @@ -44,6 +44,7 @@ #include "winnls.h" #include "winerror.h" #include "wincon.h" +#include "wine/winbase16.h" #include "wine/server.h" #include "wine/exception.h" #include "wine/unicode.h" diff --git a/dlls/kernel/dosmem.c b/dlls/kernel/dosmem.c index db89db94217..69f3586e3b2 100644 --- a/dlls/kernel/dosmem.c +++ b/dlls/kernel/dosmem.c @@ -40,7 +40,7 @@ #include "winbase.h" #include "wine/winbase16.h" -#include "global.h" +#include "kernel_private.h" #include "miscemu.h" #include "wine/debug.h" diff --git a/dlls/kernel/file.c b/dlls/kernel/file.c index deae039d08b..6767b94d3ba 100644 --- a/dlls/kernel/file.c +++ b/dlls/kernel/file.c @@ -37,6 +37,7 @@ #include "winreg.h" #include "winternl.h" #include "wincon.h" +#include "wine/winbase16.h" #include "kernel_private.h" #include "wine/unicode.h" diff --git a/dlls/kernel/global16.c b/dlls/kernel/global16.c index 8706471ea9c..35c4827ce83 100644 --- a/dlls/kernel/global16.c +++ b/dlls/kernel/global16.c @@ -39,7 +39,6 @@ #include "wine/winbase16.h" #include "ntstatus.h" -#include "global.h" #include "toolhelp.h" #include "miscemu.h" #include "stackframe.h" diff --git a/dlls/kernel/kernel_main.c b/dlls/kernel/kernel_main.c index ed384b208b3..951fe4bc28d 100644 --- a/dlls/kernel/kernel_main.c +++ b/dlls/kernel/kernel_main.c @@ -37,7 +37,6 @@ #include "wine/winbase16.h" #include "wine/library.h" #include "file.h" -#include "global.h" #include "miscemu.h" #include "module.h" #include "thread.h" diff --git a/dlls/kernel/kernel_private.h b/dlls/kernel/kernel_private.h index 8e63520ebaf..d2afc0bba55 100644 --- a/dlls/kernel/kernel_private.h +++ b/dlls/kernel/kernel_private.h @@ -64,6 +64,12 @@ extern void SELECTOR_FreeBlock( WORD sel ); #define IS_SELECTOR_32BIT(sel) \ (wine_ldt_is_system(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT)) +extern HGLOBAL16 GLOBAL_CreateBlock( UINT16 flags, const void *ptr, DWORD size, + HGLOBAL16 hOwner, unsigned char selflags ); +extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle ); +extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, const void *ptr, DWORD size ); +extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner, unsigned char selflags ); + /* this structure is always located at offset 0 of the DGROUP segment */ #include "pshpack1.h" typedef struct diff --git a/dlls/kernel/local16.c b/dlls/kernel/local16.c index adee4fdfabb..53e452f9416 100644 --- a/dlls/kernel/local16.c +++ b/dlls/kernel/local16.c @@ -36,7 +36,6 @@ #include "wine/winbase16.h" #include "wownt32.h" #include "local.h" -#include "global.h" #include "module.h" #include "stackframe.h" #include "toolhelp.h" diff --git a/dlls/kernel/ne_module.c b/dlls/kernel/ne_module.c index 193ec71aee8..e92d7ab4c27 100644 --- a/dlls/kernel/ne_module.c +++ b/dlls/kernel/ne_module.c @@ -41,11 +41,11 @@ #include "wine/library.h" #include "module.h" #include "toolhelp.h" -#include "global.h" #include "file.h" #include "builtin16.h" #include "stackframe.h" #include "excpt.h" +#include "kernel_private.h" #include "wine/unicode.h" #include "wine/exception.h" #include "wine/debug.h" diff --git a/dlls/kernel/ne_segment.c b/dlls/kernel/ne_segment.c index 2e3a5827959..89c478f47c8 100644 --- a/dlls/kernel/ne_segment.c +++ b/dlls/kernel/ne_segment.c @@ -36,7 +36,7 @@ #include "wine/winbase16.h" #include "wownt32.h" #include "wine/library.h" -#include "global.h" +#include "kernel_private.h" #include "file.h" #include "module.h" #include "stackframe.h" diff --git a/dlls/kernel/snoop16.c b/dlls/kernel/snoop16.c index 38e2953ec30..cd951fd243b 100644 --- a/dlls/kernel/snoop16.c +++ b/dlls/kernel/snoop16.c @@ -30,7 +30,7 @@ #include "winnt.h" #include "wine/winbase16.h" #include "wine/library.h" -#include "global.h" +#include "kernel_private.h" #include "module.h" #include "stackframe.h" #include "builtin16.h" diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c index 15722aaa5d1..b0ca5ea0b76 100644 --- a/dlls/kernel/sync.c +++ b/dlls/kernel/sync.c @@ -43,6 +43,7 @@ #include "wine/server.h" #include "wine/unicode.h" +#include "wine/winbase16.h" #include "kernel_private.h" #include "file.h" diff --git a/dlls/kernel/task.c b/dlls/kernel/task.c index 2616ec00f27..9b002c360a8 100644 --- a/dlls/kernel/task.c +++ b/dlls/kernel/task.c @@ -39,7 +39,6 @@ #include "wine/winbase16.h" #include "drive.h" #include "file.h" -#include "global.h" #include "module.h" #include "winternl.h" #include "wine/server.h" diff --git a/dlls/kernel/vxd.c b/dlls/kernel/vxd.c index c034cd8567f..de8d01da37f 100644 --- a/dlls/kernel/vxd.c +++ b/dlls/kernel/vxd.c @@ -39,6 +39,7 @@ #include "ntstatus.h" #include "winnt.h" #include "winternl.h" +#include "wine/winbase16.h" #include "kernel_private.h" #include "wine/debug.h" diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 6e012d156e5..d81cc1364ad 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -95,4 +95,9 @@ extern NTSTATUS CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize); +/* memory/virtual.c */ +typedef BOOL (*HANDLERPROC)(LPVOID, LPCVOID); +extern BOOL VIRTUAL_SetFaultHandler(LPCVOID addr, HANDLERPROC proc, LPVOID arg); +extern DWORD VIRTUAL_HandleFault(LPCVOID addr); + #endif diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 5f15a5991a9..187f323bec2 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -405,7 +405,6 @@ typedef struct #define T_UNKNOWN (-1) /* Unknown fault (TRAP_sig not defined) */ #include "wine/exception.h" -#include "global.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(seh); diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c index 380612856de..a0b6eb0b843 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c @@ -56,7 +56,6 @@ #include "winternl.h" #include "wine/library.h" #include "wine/exception.h" -#include "global.h" #include "ntdll_misc.h" #include "wine/debug.h" diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c index fd4affe6d90..cd4f6b001d5 100644 --- a/dlls/ntdll/signal_sparc.c +++ b/dlls/ntdll/signal_sparc.c @@ -38,7 +38,6 @@ #include "winnt.h" #include "wine/exception.h" -#include "global.h" #include "ntdll_misc.h" #include "wine/debug.h" diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index fec85a03451..967d8061ee9 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -43,7 +43,6 @@ #include "ntstatus.h" #include "thread.h" #include "winternl.h" -#include "global.h" #include "wine/library.h" #include "wine/server.h" #include "wine/debug.h" diff --git a/dlls/user/user_main.c b/dlls/user/user_main.c index d8e5262ce42..8e1542abeec 100644 --- a/dlls/user/user_main.c +++ b/dlls/user/user_main.c @@ -30,7 +30,6 @@ #include "controls.h" #include "cursoricon.h" -#include "global.h" #include "message.h" #include "user.h" #include "win.h" diff --git a/dlls/x11drv/dib.c b/dlls/x11drv/dib.c index 90a86dfe214..487b21d2b0f 100644 --- a/dlls/x11drv/dib.c +++ b/dlls/x11drv/dib.c @@ -41,7 +41,6 @@ #include "wine/debug.h" #include "gdi.h" #include "palette.h" -#include "global.h" WINE_DEFAULT_DEBUG_CHANNEL(bitmap); WINE_DECLARE_DEBUG_CHANNEL(x11drv); @@ -4611,6 +4610,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection( } else if (bm.bmBits) { + extern BOOL VIRTUAL_SetFaultHandler(LPCVOID addr, BOOL (*proc)(LPVOID, LPCVOID), LPVOID arg); /* Install fault handler, if possible */ InitializeCriticalSection(&(dib->lock)); if (VIRTUAL_SetFaultHandler(bm.bmBits, X11DRV_DIB_FaultHandler, (LPVOID)res)) diff --git a/include/global.h b/include/global.h deleted file mode 100644 index 947051a2cc2..00000000000 --- a/include/global.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Global heap declarations - * - * Copyright 1995 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_GLOBAL_H -#define __WINE_GLOBAL_H - -#include -#include -#include - -/* memory/global.c */ -extern HGLOBAL16 GLOBAL_CreateBlock( UINT16 flags, const void *ptr, DWORD size, - HGLOBAL16 hOwner, unsigned char selflags ); -extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle ); -extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, const void *ptr, DWORD size ); -extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner, unsigned char selflags ); - -/* memory/virtual.c */ -typedef BOOL (*HANDLERPROC)(LPVOID, LPCVOID); -extern BOOL VIRTUAL_SetFaultHandler(LPCVOID addr, HANDLERPROC proc, LPVOID arg); -extern DWORD VIRTUAL_HandleFault(LPCVOID addr); - -#endif /* __WINE_GLOBAL_H */ diff --git a/objects/metafile.c b/objects/metafile.c index 5ed4e20afef..d61f9d8ea6c 100644 --- a/objects/metafile.c +++ b/objects/metafile.c @@ -51,7 +51,6 @@ #include "wine/winbase16.h" #include "wine/wingdi16.h" #include "bitmap.h" -#include "global.h" #include "wownt32.h" #include "wine/debug.h"