Commit 69a1fba4 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Move some 16-bit definitions to kernel16_private.h.

parent e5288bf4
......@@ -188,6 +188,13 @@ static inline void stack16_pop( int size )
NtCurrentTeb()->WOW32Reserved = (char *)NtCurrentTeb()->WOW32Reserved + size;
}
/* dosmem.c */
extern BOOL DOSMEM_Init(void);
extern LPVOID DOSMEM_MapRealToLinear(DWORD); /* real-mode to linear */
extern LPVOID DOSMEM_MapDosToLinear(UINT); /* linear DOS to Wine */
extern UINT DOSMEM_MapLinearToDos(LPVOID); /* linear Wine to DOS */
extern BOOL load_winedos(void);
/* global16.c */
extern HGLOBAL16 GLOBAL_CreateBlock( UINT16 flags, void *ptr, DWORD size,
HGLOBAL16 hOwner, unsigned char selflags );
......@@ -195,6 +202,10 @@ extern BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle );
extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, void *ptr, DWORD size );
extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner, unsigned char selflags );
/* instr.c */
extern DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context );
extern LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs );
/* ne_module.c */
extern NE_MODULE *NE_GetPtr( HMODULE16 hModule );
extern WORD NE_GetOrdinal( HMODULE16 hModule, const char *name );
......@@ -239,9 +250,35 @@ extern void TASK_InstallTHHook( THHOOK *pNewThook );
extern BOOL WOWTHUNK_Init(void);
extern struct winedos_exports
{
/* for global16.c */
void* (*AllocDosBlock)(UINT size, UINT16* pseg);
BOOL (*FreeDosBlock)(void* ptr);
UINT (*ResizeDosBlock)(void *ptr, UINT size, BOOL exact);
/* for instr.c */
BOOL (WINAPI *EmulateInterruptPM)( CONTEXT86 *context, BYTE intnum );
void (WINAPI *CallBuiltinHandler)( CONTEXT86 *context, BYTE intnum );
DWORD (WINAPI *inport)( int port, int size );
void (WINAPI *outport)( int port, int size, DWORD val );
} winedos;
extern WORD DOSMEM_0000H;
extern WORD DOSMEM_BiosDataSeg;
extern WORD DOSMEM_BiosSysSeg;
extern DWORD CallTo16_DataSelector;
extern DWORD CallTo16_TebSelector;
extern SEGPTR CALL32_CBClient_RetAddr;
extern SEGPTR CALL32_CBClientEx_RetAddr;
#ifdef __i386__
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \
".byte 0x68\n\t" /* pushl $__regs_func */ \
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
".byte 0x6a," #args "\n\t" /* pushl $args */ \
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#endif
#endif /* __WINE_KERNEL16_PRIVATE_H */
......@@ -75,9 +75,6 @@ extern void FILE_SetDosError(void);
extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc );
extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen );
extern DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context );
extern LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs );
/* return values for MODULE_GetBinaryType */
#define BINARY_UNKNOWN 0x00
#define BINARY_PE 0x01
......@@ -98,17 +95,6 @@ extern BOOL NLS_IsUnicodeOnlyLcid(LCID);
extern HANDLE VXD_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
extern WORD DOSMEM_0000H;
extern WORD DOSMEM_BiosDataSeg;
extern WORD DOSMEM_BiosSysSeg;
/* dosmem.c */
extern BOOL DOSMEM_Init(void);
extern LPVOID DOSMEM_MapRealToLinear(DWORD); /* real-mode to linear */
extern LPVOID DOSMEM_MapDosToLinear(UINT); /* linear DOS to Wine */
extern UINT DOSMEM_MapLinearToDos(LPVOID); /* linear Wine to DOS */
extern BOOL load_winedos(void);
/* environ.c */
extern void ENV_CopyStartupInformation(void);
......@@ -122,32 +108,7 @@ extern void LOCALE_InitRegistry(void);
/* oldconfig.c */
extern void convert_old_config(void);
extern struct winedos_exports
{
/* for global16.c */
void* (*AllocDosBlock)(UINT size, UINT16* pseg);
BOOL (*FreeDosBlock)(void* ptr);
UINT (*ResizeDosBlock)(void *ptr, UINT size, BOOL exact);
/* for instr.c */
BOOL (WINAPI *EmulateInterruptPM)( CONTEXT86 *context, BYTE intnum );
void (WINAPI *CallBuiltinHandler)( CONTEXT86 *context, BYTE intnum );
DWORD (WINAPI *inport)( int port, int size );
void (WINAPI *outport)( int port, int size, DWORD val );
} winedos;
/* returns directory handle for named objects */
extern HANDLE get_BaseNamedObjects_handle(void);
/* Register functions */
#ifdef __i386__
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \
".byte 0x68\n\t" /* pushl $__regs_func */ \
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
".byte 0x6a," #args "\n\t" /* pushl $args */ \
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#endif
#endif
......@@ -26,7 +26,7 @@
#include "wine/winbase16.h"
#include "wine/server.h"
#include "wine/debug.h"
#include "kernel_private.h"
#include "kernel16_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(selector);
......
......@@ -39,7 +39,7 @@
#include "winerror.h"
#include "winternl.h"
#include "winioctl.h"
#include "kernel_private.h"
#include "kernel16_private.h"
#include "wine/library.h"
#include "wine/unicode.h"
#include "wine/server.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