Commit db0747d0 authored by Alexandre Julliard's avatar Alexandre Julliard

Removed some unnecessary includes.

Got rid of ldt.h.
parent 6c8edaa6
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <signal.h> #include <signal.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "config.h" #include "config.h"
#include "ldt.h"
#include "windows.h" #include "windows.h"
#include "toolhelp.h" #include "toolhelp.h"
#include "debugger.h" #include "debugger.h"
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "winbase.h" #include "winbase.h"
#include "ntddk.h" #include "ntddk.h"
#include "winnls.h" #include "winnls.h"
#include "ldt.h"
#include "heap.h" #include "heap.h"
#include "commdlg.h" #include "commdlg.h"
#include "dlgs.h" #include "dlgs.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "gdi.h" #include "gdi.h"
#include "global.h"
#include "tweak.h" #include "tweak.h"
#include "win16drv.h" #include "win16drv.h"
#include "winbase.h" #include "winbase.h"
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ole2.h" #include "ole2.h"
#include "heap.h" #include "heap.h"
#include "ldt.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ole); DEFAULT_DEBUG_CHANNEL(ole);
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "heap.h" #include "heap.h"
#include "ldt.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(resource); DEFAULT_DEBUG_CHANNEL(resource);
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "options.h" #include "options.h"
#include "heap.h" #include "heap.h"
#include "debugtools.h" #include "debugtools.h"
#include "ldt.h"
DEFAULT_DEBUG_CHANNEL(aspi); DEFAULT_DEBUG_CHANNEL(aspi);
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "dsdriver.h" #include "dsdriver.h"
#include "oss.h" #include "oss.h"
#include "heap.h" #include "heap.h"
#include "ldt.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(wave); DEFAULT_DEBUG_CHANNEL(wave);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "oss.h" #include "oss.h"
#include "debugtools.h" #include "debugtools.h"
#include "heap.h" #include "heap.h"
#include "ldt.h"
DEFAULT_DEBUG_CHANNEL(midi); DEFAULT_DEBUG_CHANNEL(midi);
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "gdi.h" #include "gdi.h"
#include "heap.h" #include "heap.h"
#include "global.h"
#include "enhmetafile.h" #include "enhmetafile.h"
#include "enhmetafiledrv.h" #include "enhmetafiledrv.h"
#include "debugtools.h" #include "debugtools.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "gdi.h" #include "gdi.h"
#include "heap.h" #include "heap.h"
#include "global.h"
#include "metafile.h" #include "metafile.h"
#include "metafiledrv.h" #include "metafiledrv.h"
#include "debugtools.h" #include "debugtools.h"
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "bitmap.h" #include "bitmap.h"
#include "heap.h" #include "heap.h"
#include "debugtools.h" #include "debugtools.h"
#include "local.h"
#include "x11drv.h" #include "x11drv.h"
#include "wingdi.h" #include "wingdi.h"
#include "windef.h" #include "windef.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "color.h" #include "color.h"
#include "x11drv.h" #include "x11drv.h"
#include "debugtools.h" #include "debugtools.h"
#include "local.h"
DEFAULT_DEBUG_CHANNEL(gdi); DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "region.h" #include "region.h"
#include "debugtools.h" #include "debugtools.h"
#include "heap.h" #include "heap.h"
#include "local.h"
DEFAULT_DEBUG_CHANNEL(x11drv); DEFAULT_DEBUG_CHANNEL(x11drv);
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "brush.h" #include "brush.h"
#include "font.h" #include "font.h"
#include "pen.h" #include "pen.h"
#include "local.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(gdi); DEFAULT_DEBUG_CHANNEL(gdi);
......
...@@ -26,7 +26,6 @@ typedef unsigned long Pixel; ...@@ -26,7 +26,6 @@ typedef unsigned long Pixel;
#include "debugtools.h" #include "debugtools.h"
#include "gdi.h" #include "gdi.h"
#include "heap.h" #include "heap.h"
#include "local.h"
#include "tweak.h" #include "tweak.h"
#include "x11drv.h" #include "x11drv.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "options.h" #include "options.h"
#include "font.h" #include "font.h"
#include "debugtools.h" #include "debugtools.h"
#include "ldt.h"
#include "tweak.h" #include "tweak.h"
#include "x11font.h" #include "x11font.h"
#include "server.h" #include "server.h"
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include "windef.h" #include "windef.h"
#include "wingdi.h" #include "wingdi.h"
#include "wine/wingdi16.h" #include "wine/wingdi16.h"
#include "ldt.h"
#include "local.h"
#include "path.h" #include "path.h"
#include <math.h> #include <math.h>
......
/*
* LDT copy
*
* Copyright 1995 Alexandre Julliard
*/
#ifndef __WINE_LDT_H
#define __WINE_LDT_H
#include "windef.h"
#include "wine/library.h"
#define __AHSHIFT 3 /* don't change! */
#define __AHINCR (1 << __AHSHIFT)
/* Convert a segmented ptr (16:16) to a linear (32) pointer */
#define PTR_SEG_OFF_TO_LIN(seg,off) \
((void*)((char*)wine_ldt_copy.base[LOWORD(seg) >> __AHSHIFT] + (unsigned int)(off)))
#define PTR_REAL_TO_LIN(seg,off) \
((void*)(((unsigned int)(seg) << 4) + LOWORD(off)))
#define PTR_SEG_TO_LIN(ptr) \
PTR_SEG_OFF_TO_LIN(SELECTOROF(ptr),OFFSETOF(ptr))
#define PTR_SEG_OFF_TO_SEGPTR(seg,off) \
((SEGPTR)MAKELONG(off,seg))
#define PTR_SEG_OFF_TO_HUGEPTR(seg,off) \
PTR_SEG_OFF_TO_SEGPTR( (seg) + (HIWORD(off) << __AHSHIFT), LOWORD(off) )
extern UINT W32S_offset;
#define W32S_APP2WINE(addr) ((addr)? (DWORD)(addr) + W32S_offset : 0)
#define W32S_WINE2APP(addr) ((addr)? (DWORD)(addr) - W32S_offset : 0)
#define FIRST_LDT_ENTRY_TO_ALLOC 17
#define IS_SELECTOR_FREE(sel) (!(wine_ldt_copy.flags[LOWORD(sel) >> __AHSHIFT] & WINE_LDT_FLAGS_ALLOCATED))
/* Determine if sel is a system selector (i.e. not managed by Wine) */
#define IS_SELECTOR_SYSTEM(sel) \
(!((sel) & 4) || ((LOWORD(sel) >> __AHSHIFT) < FIRST_LDT_ENTRY_TO_ALLOC))
#define IS_SELECTOR_32BIT(sel) \
(IS_SELECTOR_SYSTEM(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> __AHSHIFT] & WINE_LDT_FLAGS_32BIT))
#endif /* __WINE_LDT_H */
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define __WINE_MISCEMU_H #define __WINE_MISCEMU_H
#include "winnt.h" #include "winnt.h"
#include "ldt.h" #include "selectors.h"
#include "wine/windef16.h" #include "wine/windef16.h"
/* msdos/dosconf.c */ /* msdos/dosconf.c */
...@@ -248,6 +248,9 @@ extern void WINAPI XMS_Handler(CONTEXT86*); ...@@ -248,6 +248,9 @@ extern void WINAPI XMS_Handler(CONTEXT86*);
/* misc/aspi.c */ /* misc/aspi.c */
extern void ASPI_DOS_HandleInt(CONTEXT86 *context); extern void ASPI_DOS_HandleInt(CONTEXT86 *context);
#define PTR_REAL_TO_LIN(seg,off) \
((void*)(((unsigned int)(seg) << 4) + LOWORD(off)))
/* NOTE: Interrupts might get called from three modes: real mode, 16-bit, and /* NOTE: Interrupts might get called from three modes: real mode, 16-bit, and
* (via DeviceIoControl) 32-bit. For automatic conversion of pointer * (via DeviceIoControl) 32-bit. For automatic conversion of pointer
* parameters, interrupt handlers should use CTX_SEG_OFF_TO_LIN with * parameters, interrupt handlers should use CTX_SEG_OFF_TO_LIN with
...@@ -265,7 +268,7 @@ extern void ASPI_DOS_HandleInt(CONTEXT86 *context); ...@@ -265,7 +268,7 @@ extern void ASPI_DOS_HandleInt(CONTEXT86 *context);
*/ */
#define CTX_SEG_OFF_TO_LIN(context,seg,off) \ #define CTX_SEG_OFF_TO_LIN(context,seg,off) \
(ISV86(context) ? PTR_REAL_TO_LIN((seg),(off)) : \ (ISV86(context) ? PTR_REAL_TO_LIN((seg),(off)) : \
(!seg || IS_SELECTOR_SYSTEM(seg))? (void *)(off) : PTR_SEG_OFF_TO_LIN((seg),LOWORD(off))) (!seg || IS_SELECTOR_SYSTEM(seg))? (void *)(off) : MapSL(MAKESEGPTR((seg),(off))))
#define INT_BARF(context,num) \ #define INT_BARF(context,num) \
ERR( "int%x: unknown/not implemented parameters:\n" \ ERR( "int%x: unknown/not implemented parameters:\n" \
......
...@@ -8,35 +8,25 @@ ...@@ -8,35 +8,25 @@
#define __WINE_SELECTORS_H #define __WINE_SELECTORS_H
#include "windef.h" #include "windef.h"
#include "ldt.h" #include "wine/library.h"
extern WORD SELECTOR_AllocBlock( const void *base, DWORD size, unsigned char flags ); extern WORD SELECTOR_AllocBlock( const void *base, DWORD size, unsigned char flags );
extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size ); extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size );
extern void SELECTOR_FreeBlock( WORD sel ); extern void SELECTOR_FreeBlock( WORD sel );
#ifdef __i386__ extern UINT W32S_offset;
# ifdef __GNUC__
# define __DEFINE_GET_SEG(seg) \ #define W32S_APP2WINE(addr) ((addr)? (DWORD)(addr) + W32S_offset : 0)
extern inline unsigned short __get_##seg(void) \ #define W32S_WINE2APP(addr) ((addr)? (DWORD)(addr) - W32S_offset : 0)
{ unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
# define __DEFINE_SET_SEG(seg) \ #define FIRST_LDT_ENTRY_TO_ALLOC 17
extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
# else /* __GNUC__ */ #define IS_SELECTOR_FREE(sel) (!(wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_ALLOCATED))
# define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
# define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int); /* Determine if sel is a system selector (i.e. not managed by Wine) */
# endif /* __GNUC__ */ #define IS_SELECTOR_SYSTEM(sel) \
#else /* __i386__ */ (!((sel) & 4) || ((LOWORD(sel) >> 3) < FIRST_LDT_ENTRY_TO_ALLOC))
# define __DEFINE_GET_SEG(seg) static inline unsigned short __get_##seg(void) { return 0; } #define IS_SELECTOR_32BIT(sel) \
# define __DEFINE_SET_SEG(seg) /* nothing */ (IS_SELECTOR_SYSTEM(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT))
#endif /* __i386__ */
__DEFINE_GET_SEG(cs)
__DEFINE_GET_SEG(ds)
__DEFINE_GET_SEG(es)
__DEFINE_GET_SEG(fs)
__DEFINE_GET_SEG(gs)
__DEFINE_GET_SEG(ss)
__DEFINE_SET_SEG(fs)
__DEFINE_SET_SEG(gs)
#endif /* __WINE_SELECTORS_H */ #endif /* __WINE_SELECTORS_H */
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "wine/unicode.h" #include "wine/unicode.h"
#include "winnls.h" #include "winnls.h"
#include "heap.h" #include "heap.h"
#include "ldt.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(resource); DEFAULT_DEBUG_CHANNEL(resource);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "wine/winaspi.h" #include "wine/winaspi.h"
#include "heap.h" #include "heap.h"
#include "debugtools.h" #include "debugtools.h"
#include "selectors.h"
#include "miscemu.h" /* DOSMEM_* */ #include "miscemu.h" /* DOSMEM_* */
#include "callback.h" #include "callback.h"
#include "winerror.h" #include "winerror.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include "msdos.h" #include "msdos.h"
#include "ldt.h"
#include "miscemu.h" #include "miscemu.h"
#include "drive.h" #include "drive.h"
#include "debugtools.h" #include "debugtools.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include "msdos.h" #include "msdos.h"
#include "ldt.h"
#include "miscemu.h" #include "miscemu.h"
#include "drive.h" #include "drive.h"
#include "debugtools.h" #include "debugtools.h"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "brush.h" #include "brush.h"
#include "font.h" #include "font.h"
#include "heap.h" #include "heap.h"
#include "local.h"
#include "options.h" #include "options.h"
#include "palette.h" #include "palette.h"
#include "pen.h" #include "pen.h"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "windef.h" #include "windef.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/library.h" #include "wine/library.h"
#include "global.h"
#include "module.h" #include "module.h"
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "config.h" #include "config.h"
#include "winnt.h" #include "winnt.h"
#include "selectors.h"
#include "stackframe.h" #include "stackframe.h"
#include "syslevel.h" #include "syslevel.h"
#include "module.h" #include "module.h"
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "winnt.h" #include "winnt.h"
#include "heap.h" #include "heap.h"
#include "snoop.h" #include "snoop.h"
#include "selectors.h"
#include "stackframe.h" #include "stackframe.h"
#include "debugtools.h" #include "debugtools.h"
#include "wine/exception.h" #include "wine/exception.h"
......
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
#include "drive.h" #include "drive.h"
#include "module.h" #include "module.h"
#include "file.h" #include "file.h"
#include "global.h"
#include "heap.h" #include "heap.h"
#include "task.h" #include "task.h"
#include "ldt.h"
#include "thread.h" #include "thread.h"
#include "winerror.h" #include "winerror.h"
#include "server.h" #include "server.h"
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "ntddk.h" #include "ntddk.h"
#include "syslevel.h" #include "syslevel.h"
#include "heap.h" #include "heap.h"
#include "selectors.h"
#include "stackframe.h" #include "stackframe.h"
#include "debugtools.h" #include "debugtools.h"
......
...@@ -801,7 +801,6 @@ void BuildGlue( FILE *outfile, FILE *infile ) ...@@ -801,7 +801,6 @@ void BuildGlue( FILE *outfile, FILE *infile )
fprintf( outfile, "/* File generated automatically from %s; do not edit! */\n\n", fprintf( outfile, "/* File generated automatically from %s; do not edit! */\n\n",
input_file_name ); input_file_name );
fprintf( outfile, "#include \"builtin16.h\"\n" );
fprintf( outfile, "#include \"stackframe.h\"\n\n" ); fprintf( outfile, "#include \"stackframe.h\"\n\n" );
fprintf( outfile, "extern WORD WINAPI wine_call_to_16_word( FARPROC16 target, INT nArgs );\n" ); fprintf( outfile, "extern WORD WINAPI wine_call_to_16_word( FARPROC16 target, INT nArgs );\n" );
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "winerror.h" #include "winerror.h"
#include "ntddk.h" #include "ntddk.h"
#include "wine/exception.h" #include "wine/exception.h"
#include "selectors.h"
#include "callback.h" #include "callback.h"
#include "thread.h" #include "thread.h"
#include "stackframe.h" #include "stackframe.h"
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "gdi.h" #include "gdi.h"
#include "region.h" #include "region.h"
#include "heap.h" #include "heap.h"
#include "local.h"
#include "user.h" #include "user.h"
#include "debugtools.h" #include "debugtools.h"
#include "windef.h" #include "windef.h"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "hook.h" #include "hook.h"
#include "nonclient.h" #include "nonclient.h"
#include "queue.h" #include "queue.h"
#include "selectors.h"
#include "tweak.h" #include "tweak.h"
#include "debugtools.h" #include "debugtools.h"
#include "options.h" #include "options.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