Commit f899ef07 authored by Alexandre Julliard's avatar Alexandre Julliard

Removed some unnecessary includes.

parent c85b9fdd
......@@ -512,11 +512,16 @@ extern char* DEBUG_XStrDup(const char *str);
malloc() arena (and other heaps) can be totally wasted and it'll still
work, etc... if someone could make optimized routines so it wouldn't
take so long to load, it could be made default) */
#include "heap.h"
#define DBG_alloc(x) HeapAlloc(dbg_heap,0,x)
#define DBG_realloc(x,y) HeapRealloc(dbg_heap,0,x,y)
#define DBG_free(x) HeapFree(dbg_heap,0,x)
#define DBG_strdup(x) HEAP_strdupA(dbg_heap,0,x)
inline static LPSTR DBG_strdup( LPCSTR str )
{
INT len = strlen(str) + 1;
LPSTR p = DBG_alloc( len );
if (p) memcpy( p, str, len );
return p;
}
#define DBG_need_heap
extern HANDLE dbg_heap;
#endif
......
......@@ -11,7 +11,6 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "toolhelp.h"
#include "tlhelp32.h"
#include "debugger.h"
#include "expr.h"
......
......@@ -11,7 +11,6 @@
#include <string.h>
#include "debugger.h"
#include "miscemu.h"
#include "winbase.h"
#ifdef __i386__
......
......@@ -10,7 +10,6 @@
#include <stdio.h>
#include <string.h>
#include "debugger.h"
#include "toolhelp.h"
#include "wingdi.h"
#include "winuser.h"
......
......@@ -24,7 +24,8 @@
#define PATH_MAX _MAX_PATH
#endif
#include "debugger.h"
#include "file.h"
#define MAX_PATHNAME_LEN 1024
typedef struct
{
......
......@@ -13,7 +13,6 @@
#include "ntddk.h"
#include "thread.h"
#include "file.h"
#include "wincon.h"
#include "wingdi.h"
#include "winuser.h"
......
......@@ -25,8 +25,6 @@
#include "dsurface/user.h"
#include "dsurface/hal.h"
#include "options.h"
DEFAULT_DEBUG_CHANNEL(ddraw);
static ICOM_VTABLE(IDirectDraw7) HAL_DirectDraw_VTable;
......
......@@ -20,7 +20,6 @@
#include "ddraw.h"
#include "d3d.h"
#include "debugtools.h"
#include "options.h"
#include "bitmap.h"
#include "ddraw_private.h"
......
......@@ -9,7 +9,6 @@
#include "winerror.h"
#include "ddraw.h"
#include "d3d.h"
#include "options.h"
#include "debugtools.h"
#include "d3d_private.h"
......
......@@ -12,7 +12,6 @@
#include "ddraw_private.h"
#include "mesa_private.h"
#include "options.h"
#include "debugtools.h"
......
......@@ -17,7 +17,6 @@
#include "wine/exception.h"
#include "ddraw_private.h"
#include "heap.h"
#include "options.h"
#include "debugtools.h"
......
......@@ -25,7 +25,6 @@
#include "debugtools.h"
#include "gdi.h"
#include "callback.h"
#include "options.h"
#include "heap.h"
#include "file.h"
......
......@@ -11,7 +11,6 @@
#include "setupx16.h"
#include "heap.h"
#include "callback.h"
#include "stackframe.h"
#include "winreg.h"
#include "setupapi_private.h"
......
......@@ -9,7 +9,6 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "gdi.h"
#include "message.h"
#include "user.h"
#include "win.h"
#include "debugtools.h"
......
......@@ -13,7 +13,6 @@
#include "aspi.h"
#include "wnaspi32.h"
#include "winescsi.h"
#include "options.h"
#include "heap.h"
#include "debugtools.h"
......
......@@ -5,7 +5,6 @@
*
*/
#include "gdi.h"
#include "psdrv.h"
#include "debugtools.h"
#include "bitmap.h"
......
......@@ -63,6 +63,11 @@ static BOOL synchronous; /* run in synchronous mode? */
static char *desktop_geometry;
static XVisualInfo *desktop_vi;
#define IS_OPTION_TRUE(ch) \
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
#define IS_OPTION_FALSE(ch) \
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
#ifdef NO_REENTRANT_X11
static int* (*old_errno_location)(void);
static int* (*old_h_errno_location)(void);
......
......@@ -13,11 +13,9 @@
#include "wine/winbase16.h"
#include "win16drv.h"
#include "heap.h"
#include "brush.h"
#include "callback.h"
#include "debugtools.h"
#include "bitmap.h"
#include "pen.h"
DEFAULT_DEBUG_CHANNEL(win16drv);
......
......@@ -18,10 +18,7 @@
#include "winreg.h"
#include "winuser.h"
#include "bitmap.h"
#include "color.h"
#include "gdi.h"
#include "metafile.h"
#include "options.h"
#include "x11drv.h"
#include "debugtools.h"
......@@ -523,12 +520,6 @@ main()
#endif /* BITBLT_TEST */
static inline BOOL get_bool(const char *buffer, BOOL def_value)
{
if(IS_OPTION_TRUE(buffer[0])) return TRUE;
if(IS_OPTION_FALSE(buffer[0])) return FALSE;
return def_value;
}
/***********************************************************************
* perfect_graphics
......@@ -548,7 +539,10 @@ static inline int perfect_graphics(void)
{
DWORD type, count = sizeof(buffer);
if(!RegQueryValueExA(hkey, "PerfectGraphics", 0, &type, buffer, &count))
perfect = get_bool(buffer, 0);
{
char ch = buffer[0];
perfect = (ch == 'y' || ch == 'Y' || ch == 't' || ch == 'T' || ch == '1');
}
RegCloseKey(hkey);
}
}
......
......@@ -30,9 +30,7 @@
#include "x11font.h"
#include "bitmap.h"
#include "gdi.h"
#include "metafile.h"
#include "palette.h"
#include "color.h"
#include "region.h"
#include "debugtools.h"
......
......@@ -25,7 +25,6 @@ typedef unsigned long Pixel;
#include "wine/winuser16.h"
#include "bitmap.h"
#include "color.h"
#include "cursoricon.h"
#include "debugtools.h"
#include "gdi.h"
......
......@@ -15,7 +15,6 @@
#include "color.h"
#include "debugtools.h"
#include "gdi.h"
#include "options.h"
#include "palette.h"
#include "windef.h"
#include "winreg.h"
......@@ -89,12 +88,6 @@ static void X11DRV_PALETTE_FormatSystemPalette(void);
static BOOL X11DRV_PALETTE_CheckSysColor(COLORREF c);
static int X11DRV_PALETTE_LookupSystemXPixel(COLORREF col);
static inline BOOL get_bool(const char *buffer, BOOL def_value)
{
if(IS_OPTION_TRUE(buffer[0])) return TRUE;
if(IS_OPTION_FALSE(buffer[0])) return FALSE;
return def_value;
}
/***********************************************************************
* COLOR_Init
......@@ -130,7 +123,10 @@ BOOL X11DRV_PALETTE_Init(void)
char buffer[20];
DWORD type, count = sizeof(buffer);
if(!RegQueryValueExA(hkey, "PrivateColorMap", 0, &type, buffer, &count))
private_color_map = get_bool(buffer, 0);
{
char ch = buffer[0];
private_color_map = (ch == 'y' || ch == 'Y' || ch == 't' || ch == 'T' || ch == '1');
}
RegCloseKey(hkey);
}
......
/*
* Module/Library loadorder
*
* Copyright 1999 Bertho Stultiens
*/
#ifndef __WINE_LOADORDER_H
#define __WINE_LOADORDER_H
#include "windef.h"
enum loadorder_type
{
LOADORDER_INVALID = 0, /* Must be 0 */
LOADORDER_DLL, /* Native DLLs */
LOADORDER_SO, /* Native .so libraries */
LOADORDER_BI, /* Built-in modules */
LOADORDER_NTYPES
};
extern void MODULE_InitLoadOrder(void);
extern void MODULE_GetLoadOrder( enum loadorder_type plo[], const char *path, BOOL win32 );
extern void MODULE_AddLoadOrderOption( const char *option );
#endif
......@@ -18,19 +18,8 @@ typedef struct
METAHEADER *mh;
} METAFILEOBJ;
#include "pshpack1.h"
typedef struct {
DWORD dw1, dw2, dw3;
WORD w4;
CHAR filename[0x100];
} METAHEADERDISK;
#include "poppack.h"
#define MFHEADERSIZE (sizeof(METAHEADER))
#define MFVERSION 0x300
#define META_EOF 0x0000
/* values of mtType in METAHEADER. Note however that the disk image of a disk
based metafile has mtType == 1 */
#define METAFILE_MEMORY 1
......
......@@ -161,6 +161,15 @@ extern WINE_MODREF *MODULE_modref_list;
((IMAGE_SECTION_HEADER*)((LPBYTE)&PE_HEADER(module)->OptionalHeader + \
PE_HEADER(module)->FileHeader.SizeOfOptionalHeader))
enum loadorder_type
{
LOADORDER_INVALID = 0, /* Must be 0 */
LOADORDER_DLL, /* Native DLLs */
LOADORDER_SO, /* Native .so libraries */
LOADORDER_BI, /* Built-in modules */
LOADORDER_NTYPES
};
/* module.c */
extern WINE_MODREF *MODULE_AllocModRef( HMODULE hModule, LPCSTR filename );
extern FARPROC MODULE_GetProcAddress( HMODULE hModule, LPCSTR function, BOOL snoop );
......@@ -224,6 +233,11 @@ extern WINE_MODREF *PE_CreateModule( HMODULE hModule, LPCSTR filename,
extern void PE_InitTls(void);
extern BOOL PE_InitDLL( HMODULE module, DWORD type, LPVOID lpReserved );
/* loader/loadorder.c */
extern void MODULE_InitLoadOrder(void);
extern void MODULE_GetLoadOrder( enum loadorder_type plo[], const char *path, BOOL win32 );
extern void MODULE_AddLoadOrderOption( const char *option );
/* loader/elf.c */
extern WINE_MODREF *ELF_LoadLibraryExA( LPCSTR libname, DWORD flags);
......
......@@ -38,9 +38,4 @@ extern char* PROFILE_GetStringItem( char* );
extern void VERSION_ParseWinVersion( const char *arg );
extern void VERSION_ParseDosVersion( const char *arg );
#define IS_OPTION_TRUE(ch) \
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
#define IS_OPTION_FALSE(ch) \
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
#endif /* __WINE_OPTIONS_H */
......@@ -13,7 +13,6 @@
#include "winreg.h"
#include "winerror.h"
#include "options.h"
#include "loadorder.h"
#include "heap.h"
#include "file.h"
#include "module.h"
......
......@@ -18,9 +18,9 @@
#include "drive.h"
#include "file.h"
#include "options.h"
#include "module.h"
#include "debugtools.h"
#include "wine/server.h"
#include "loadorder.h"
DEFAULT_DEBUG_CHANNEL(server);
......
......@@ -18,7 +18,6 @@
#include "module.h"
#include "debugtools.h"
#include "callback.h"
#include "loadorder.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(module);
......
......@@ -23,7 +23,6 @@
#include "builtin16.h"
#include "stackframe.h"
#include "debugtools.h"
#include "loadorder.h"
DEFAULT_DEBUG_CHANNEL(module);
DECLARE_DEBUG_CHANNEL(loaddll);
......
......@@ -13,7 +13,7 @@
#include "ntddk.h"
#include "wine/library.h"
#include "options.h"
#include "loadorder.h"
#include "module.h"
#include "version.h"
#include "debugtools.h"
......
......@@ -11,7 +11,6 @@
#include "winnls.h"
#include "font.h"
#include "heap.h"
#include "metafile.h"
#include "options.h"
#include "debugtools.h"
#include "gdi.h"
......
......@@ -41,12 +41,23 @@
#include "global.h"
#include "heap.h"
#include "metafile.h"
#include "toolhelp.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(metafile);
#include "pshpack1.h"
typedef struct
{
DWORD dw1, dw2, dw3;
WORD w4;
CHAR filename[0x100];
} METAHEADERDISK;
#include "poppack.h"
#define MFHEADERSIZE (sizeof(METAHEADER))
#define MFVERSION 0x300
/******************************************************************
* MF_AddHandle
*
......
......@@ -25,7 +25,6 @@
#include "win.h"
#include "controls.h"
#include "dce.h"
#include "toolhelp.h"
#include "winproc.h"
#include "debugtools.h"
......@@ -1277,6 +1276,8 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name,
}
#if 0 /* toolhelp is in kernel, so this cannot work */
/***********************************************************************
* ClassFirst (TOOLHELP.69)
*/
......@@ -1311,3 +1312,4 @@ BOOL16 WINAPI ClassNext16( CLASSENTRY *pClassEntry )
sizeof(pClassEntry->szClassName) );
return TRUE;
}
#endif
......@@ -17,7 +17,6 @@
#include "controls.h"
#include "cursoricon.h"
#include "hook.h"
#include "toolhelp.h"
#include "message.h"
#include "miscemu.h"
#include "sysmetrics.h"
......
......@@ -28,12 +28,10 @@
#include "heap.h"
#include "input.h"
#include "keyboard.h"
#include "message.h"
#include "mouse.h"
#include "options.h"
#include "win.h"
#include "winpos.h"
#include "file.h"
#include "windef.h"
#include "winreg.h"
#include "x11drv.h"
......
......@@ -31,7 +31,6 @@
#include "debugtools.h"
#include "user.h"
#include "keyboard.h"
#include "message.h"
#include "winnls.h"
#include "win.h"
#include "x11drv.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment