Removed some unnecessary includes.

Got rid of ldt.h.
This commit is contained in:
Alexandre Julliard 2000-12-13 20:23:41 +00:00
parent 6c8edaa667
commit db0747d095
34 changed files with 20 additions and 102 deletions

View File

@ -6,7 +6,6 @@
#include <signal.h>
#include <X11/Xlib.h>
#include "config.h"
#include "ldt.h"
#include "windows.h"
#include "toolhelp.h"
#include "debugger.h"

View File

@ -41,7 +41,6 @@
#include "winbase.h"
#include "ntddk.h"
#include "winnls.h"
#include "ldt.h"
#include "heap.h"
#include "commdlg.h"
#include "dlgs.h"

View File

@ -7,7 +7,6 @@
#include "wine/winbase16.h"
#include "gdi.h"
#include "global.h"
#include "tweak.h"
#include "win16drv.h"
#include "winbase.h"

View File

@ -10,7 +10,6 @@
#include "ole2.h"
#include "heap.h"
#include "ldt.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ole);

View File

@ -13,7 +13,6 @@
#include "wine/winuser16.h"
#include "heap.h"
#include "ldt.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(resource);

View File

@ -17,7 +17,6 @@
#include "options.h"
#include "heap.h"
#include "debugtools.h"
#include "ldt.h"
DEFAULT_DEBUG_CHANNEL(aspi);

View File

@ -37,7 +37,6 @@
#include "dsdriver.h"
#include "oss.h"
#include "heap.h"
#include "ldt.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(wave);

View File

@ -25,7 +25,6 @@
#include "oss.h"
#include "debugtools.h"
#include "heap.h"
#include "ldt.h"
DEFAULT_DEBUG_CHANNEL(midi);

View File

@ -10,7 +10,6 @@
#include "wingdi.h"
#include "gdi.h"
#include "heap.h"
#include "global.h"
#include "enhmetafile.h"
#include "enhmetafiledrv.h"
#include "debugtools.h"

View File

@ -8,7 +8,6 @@
#include "wine/winbase16.h"
#include "gdi.h"
#include "heap.h"
#include "global.h"
#include "metafile.h"
#include "metafiledrv.h"
#include "debugtools.h"

View File

@ -17,7 +17,6 @@
#include "bitmap.h"
#include "heap.h"
#include "debugtools.h"
#include "local.h"
#include "x11drv.h"
#include "wingdi.h"
#include "windef.h"

View File

@ -14,7 +14,6 @@
#include "color.h"
#include "x11drv.h"
#include "debugtools.h"
#include "local.h"
DEFAULT_DEBUG_CHANNEL(gdi);

View File

@ -15,7 +15,6 @@
#include "region.h"
#include "debugtools.h"
#include "heap.h"
#include "local.h"
DEFAULT_DEBUG_CHANNEL(x11drv);

View File

@ -13,7 +13,6 @@
#include "brush.h"
#include "font.h"
#include "pen.h"
#include "local.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(gdi);

View File

@ -26,7 +26,6 @@ typedef unsigned long Pixel;
#include "debugtools.h"
#include "gdi.h"
#include "heap.h"
#include "local.h"
#include "tweak.h"
#include "x11drv.h"

View File

@ -31,7 +31,6 @@
#include "options.h"
#include "font.h"
#include "debugtools.h"
#include "ldt.h"
#include "tweak.h"
#include "x11font.h"
#include "server.h"

View File

@ -12,8 +12,6 @@
#include "windef.h"
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "ldt.h"
#include "local.h"
#include "path.h"
#include <math.h>

View File

@ -1,44 +0,0 @@
/*
* 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 */

View File

@ -8,7 +8,7 @@
#define __WINE_MISCEMU_H
#include "winnt.h"
#include "ldt.h"
#include "selectors.h"
#include "wine/windef16.h"
/* msdos/dosconf.c */
@ -248,6 +248,9 @@ extern void WINAPI XMS_Handler(CONTEXT86*);
/* misc/aspi.c */
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
* (via DeviceIoControl) 32-bit. For automatic conversion of pointer
* parameters, interrupt handlers should use CTX_SEG_OFF_TO_LIN with
@ -265,7 +268,7 @@ extern void ASPI_DOS_HandleInt(CONTEXT86 *context);
*/
#define CTX_SEG_OFF_TO_LIN(context,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) \
ERR( "int%x: unknown/not implemented parameters:\n" \

View File

@ -8,35 +8,25 @@
#define __WINE_SELECTORS_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_ReallocBlock( WORD sel, const void *base, DWORD size );
extern void SELECTOR_FreeBlock( WORD sel );
#ifdef __i386__
# ifdef __GNUC__
# define __DEFINE_GET_SEG(seg) \
extern inline unsigned short __get_##seg(void) \
{ unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
# define __DEFINE_SET_SEG(seg) \
extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
# else /* __GNUC__ */
# define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
# define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int);
# endif /* __GNUC__ */
#else /* __i386__ */
# define __DEFINE_GET_SEG(seg) static inline unsigned short __get_##seg(void) { return 0; }
# define __DEFINE_SET_SEG(seg) /* nothing */
#endif /* __i386__ */
extern UINT W32S_offset;
__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)
#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) >> 3] & 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) >> 3) < FIRST_LDT_ENTRY_TO_ALLOC))
#define IS_SELECTOR_32BIT(sel) \
(IS_SELECTOR_SYSTEM(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT))
#endif /* __WINE_SELECTORS_H */

View File

@ -22,7 +22,6 @@
#include "wine/unicode.h"
#include "winnls.h"
#include "heap.h"
#include "ldt.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(resource);

View File

@ -5,7 +5,6 @@
#include "wine/winaspi.h"
#include "heap.h"
#include "debugtools.h"
#include "selectors.h"
#include "miscemu.h" /* DOSMEM_* */
#include "callback.h"
#include "winerror.h"

View File

@ -7,7 +7,6 @@
#include <fcntl.h>
#include <unistd.h>
#include "msdos.h"
#include "ldt.h"
#include "miscemu.h"
#include "drive.h"
#include "debugtools.h"

View File

@ -6,7 +6,6 @@
#include <fcntl.h>
#include <unistd.h>
#include "msdos.h"
#include "ldt.h"
#include "miscemu.h"
#include "drive.h"
#include "debugtools.h"

View File

@ -19,6 +19,7 @@
#include "brush.h"
#include "font.h"
#include "heap.h"
#include "local.h"
#include "options.h"
#include "palette.h"
#include "pen.h"

View File

@ -21,7 +21,6 @@
#include "windef.h"
#include "wine/winbase16.h"
#include "wine/library.h"
#include "global.h"
#include "module.h"
#include "file.h"
#include "heap.h"

View File

@ -11,7 +11,6 @@
#include "config.h"
#include "winnt.h"
#include "selectors.h"
#include "stackframe.h"
#include "syslevel.h"
#include "module.h"

View File

@ -13,7 +13,6 @@
#include "winnt.h"
#include "heap.h"
#include "snoop.h"
#include "selectors.h"
#include "stackframe.h"
#include "debugtools.h"
#include "wine/exception.h"

View File

@ -18,10 +18,8 @@
#include "drive.h"
#include "module.h"
#include "file.h"
#include "global.h"
#include "heap.h"
#include "task.h"
#include "ldt.h"
#include "thread.h"
#include "winerror.h"
#include "server.h"

View File

@ -9,7 +9,6 @@
#include "ntddk.h"
#include "syslevel.h"
#include "heap.h"
#include "selectors.h"
#include "stackframe.h"
#include "debugtools.h"

View File

@ -801,7 +801,6 @@ void BuildGlue( FILE *outfile, FILE *infile )
fprintf( outfile, "/* File generated automatically from %s; do not edit! */\n\n",
input_file_name );
fprintf( outfile, "#include \"builtin16.h\"\n" );
fprintf( outfile, "#include \"stackframe.h\"\n\n" );
fprintf( outfile, "extern WORD WINAPI wine_call_to_16_word( FARPROC16 target, INT nArgs );\n" );

View File

@ -27,7 +27,6 @@
#include "winerror.h"
#include "ntddk.h"
#include "wine/exception.h"
#include "selectors.h"
#include "callback.h"
#include "thread.h"
#include "stackframe.h"

View File

@ -24,7 +24,6 @@
#include "gdi.h"
#include "region.h"
#include "heap.h"
#include "local.h"
#include "user.h"
#include "debugtools.h"
#include "windef.h"

View File

@ -20,7 +20,6 @@
#include "hook.h"
#include "nonclient.h"
#include "queue.h"
#include "selectors.h"
#include "tweak.h"
#include "debugtools.h"
#include "options.h"