diff --git a/include/reactos/libs/soft386/soft386.h b/include/reactos/libs/soft386/soft386.h index 9db92e0346f..fc66d211774 100644 --- a/include/reactos/libs/soft386/soft386.h +++ b/include/reactos/libs/soft386/soft386.h @@ -9,11 +9,6 @@ #ifndef _SOFT386_H_ #define _SOFT386_H_ -/* INCLUDES *******************************************************************/ - -#include -#include - /* DEFINES ********************************************************************/ #define SOFT386_NUM_GEN_REGS 8 @@ -34,8 +29,7 @@ #define SOFT386_CR0_PG (1 << 31) struct _SOFT386_STATE; -typedef struct _SOFT386_STATE SOFT386_STATE; -typedef struct _SOFT386_STATE *PSOFT386_STATE; +typedef struct _SOFT386_STATE SOFT386_STATE, *PSOFT386_STATE; enum _SOFT386_GEN_REGS { @@ -89,7 +83,7 @@ BOOLEAN ( PSOFT386_STATE State, ULONG Address, - LPVOID Buffer, + PVOID Buffer, ULONG Size ); @@ -99,7 +93,7 @@ BOOLEAN ( PSOFT386_STATE State, ULONG Address, - LPVOID Buffer, + PVOID Buffer, ULONG Size ); @@ -109,7 +103,7 @@ VOID ( PSOFT386_STATE State, ULONG Port, - LPVOID Buffer, + PVOID Buffer, ULONG Size ); @@ -119,7 +113,7 @@ VOID ( PSOFT386_STATE State, ULONG Port, - LPVOID Buffer, + PVOID Buffer, ULONG Size ); @@ -131,7 +125,7 @@ typedef union _SOFT386_REG UCHAR HighByte; }; USHORT LowWord; - ULONG Long; + ULONG Long; } SOFT386_REG, *PSOFT386_REG; typedef struct _SOFT386_SEG_REG @@ -185,7 +179,7 @@ typedef struct typedef struct _SOFT386_TABLE_REG { USHORT Size; - ULONG Address; + ULONG Address; } SOFT386_TABLE_REG, *PSOFT386_TABLE_REG; typedef union _SOFT386_FLAGS_REG diff --git a/lib/soft386/common.c b/lib/soft386/common.c index 45e6e52d2cf..0612e6298bf 100644 --- a/lib/soft386/common.c +++ b/lib/soft386/common.c @@ -8,8 +8,16 @@ /* INCLUDES *******************************************************************/ +// #define WIN32_NO_STATUS +// #define _INC_WINDOWS +#include + +#include #include "common.h" +// #define NDEBUG +#include + /* PRIVATE FUNCTIONS **********************************************************/ static @@ -100,7 +108,7 @@ Soft386ReadMemory(PSOFT386_STATE State, else { /* Read the memory directly */ - RtlMoveMemory(Buffer, (LPVOID)LinearAddress, Size); + RtlMoveMemory(Buffer, (PVOID)LinearAddress, Size); } return TRUE; @@ -177,7 +185,7 @@ Soft386WriteMemory(PSOFT386_STATE State, else { /* Write the memory directly */ - RtlMoveMemory((LPVOID)LinearAddress, Buffer, Size); + RtlMoveMemory((PVOID)LinearAddress, Buffer, Size); } return TRUE; @@ -344,7 +352,7 @@ Soft386LoadSegment(PSOFT386_STATE State, INT Segment, WORD Selector) else { RtlMoveMemory(&GdtEntry, - (LPVOID)(State->Gdtr.Address + (PVOID)(State->Gdtr.Address + GET_SEGMENT_INDEX(Selector)), sizeof(GdtEntry)); } diff --git a/lib/soft386/common.h b/lib/soft386/common.h index 9b4e958f054..d8c0b0f9f67 100644 --- a/lib/soft386/common.h +++ b/lib/soft386/common.h @@ -9,10 +9,6 @@ #ifndef _COMMON_H_ #define _COMMON_H_ -/* INCLUDES *******************************************************************/ - -#include - /* DEFINES ********************************************************************/ #define GET_SEGMENT_RPL(s) ((s) & 3) diff --git a/lib/soft386/soft386.c b/lib/soft386/soft386.c index a59cd171ea4..040508a4aaa 100644 --- a/lib/soft386/soft386.c +++ b/lib/soft386/soft386.c @@ -8,8 +8,16 @@ /* INCLUDES *******************************************************************/ +// #define WIN32_NO_STATUS +// #define _INC_WINDOWS +#include + +#include #include "common.h" +// #define NDEBUG +#include + /* DEFINES ********************************************************************/ typedef enum