From 2c8e8ba5d3381a70e617c3a0624f7fe940144fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 27 Oct 2013 11:42:44 +0000 Subject: [PATCH] [FAST486] - Remove an unneeded inclusion to the CRT header: limits.h (and use instead NDK definitions for max/min long values). - Remove unneeded comments... [NTVDM] Remove an unneeded add_dependencies(...) command. svn path=/branches/ntvdm/; revision=60767 --- include/reactos/libs/fast486/fast486.h | 6 ++++++ lib/fast486/common.c | 2 -- lib/fast486/common.h | 6 ++---- lib/fast486/extraops.c | 2 -- lib/fast486/extraops.h | 3 +++ lib/fast486/fast486.c | 2 -- lib/fast486/opcodes.c | 9 +-------- lib/fast486/opcodes.h | 6 ++---- lib/fast486/opgroups.c | 2 -- lib/fast486/opgroups.h | 2 ++ subsystems/ntvdm/CMakeLists.txt | 1 - 11 files changed, 16 insertions(+), 25 deletions(-) diff --git a/include/reactos/libs/fast486/fast486.h b/include/reactos/libs/fast486/fast486.h index 0ace07995cf..61d176eea6a 100644 --- a/include/reactos/libs/fast486/fast486.h +++ b/include/reactos/libs/fast486/fast486.h @@ -22,8 +22,14 @@ #ifndef _FAST486_H_ #define _FAST486_H_ +#pragma once + /* DEFINES ********************************************************************/ +#ifndef FASTCALL +#define FASTCALL __fastcall +#endif + #define FAST486_NUM_GEN_REGS 8 #define FAST486_NUM_SEG_REGS 6 #define FAST486_NUM_CTRL_REGS 3 diff --git a/lib/fast486/common.c b/lib/fast486/common.c index 9cd40a198d5..0d3746cad27 100644 --- a/lib/fast486/common.c +++ b/lib/fast486/common.c @@ -21,8 +21,6 @@ /* INCLUDES *******************************************************************/ -// #define WIN32_NO_STATUS -// #define _INC_WINDOWS #include // #define NDEBUG diff --git a/lib/fast486/common.h b/lib/fast486/common.h index 2e36df77654..8bb8d02a771 100644 --- a/lib/fast486/common.h +++ b/lib/fast486/common.h @@ -22,11 +22,9 @@ #ifndef _COMMON_H_ #define _COMMON_H_ -/* DEFINES ********************************************************************/ +#pragma once -#ifndef FASTCALL -#define FASTCALL __fastcall -#endif +/* DEFINES ********************************************************************/ #define SIGN_FLAG_BYTE 0x80 #define SIGN_FLAG_WORD 0x8000 diff --git a/lib/fast486/extraops.c b/lib/fast486/extraops.c index 7c6da5e9c06..fc76e42cd10 100644 --- a/lib/fast486/extraops.c +++ b/lib/fast486/extraops.c @@ -21,8 +21,6 @@ /* INCLUDES *******************************************************************/ -// #define WIN32_NO_STATUS -// #define _INC_WINDOWS #include // #define NDEBUG diff --git a/lib/fast486/extraops.h b/lib/fast486/extraops.h index 46ad8610098..94ebbb729fa 100644 --- a/lib/fast486/extraops.h +++ b/lib/fast486/extraops.h @@ -22,7 +22,10 @@ #ifndef _EXTRAOPS_H_ #define _EXTRAOPS_H_ +#pragma once + /* DEFINES ********************************************************************/ + FAST486_OPCODE_HANDLER(Fast486ExtOpcodeClts); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreControlReg); FAST486_OPCODE_HANDLER(Fast486ExtOpcodeStoreDebugReg); diff --git a/lib/fast486/fast486.c b/lib/fast486/fast486.c index 04a87760670..0dec8c195ea 100644 --- a/lib/fast486/fast486.c +++ b/lib/fast486/fast486.c @@ -21,8 +21,6 @@ /* INCLUDES *******************************************************************/ -// #define WIN32_NO_STATUS -// #define _INC_WINDOWS #include // #define NDEBUG diff --git a/lib/fast486/opcodes.c b/lib/fast486/opcodes.c index 083c349fda6..7eb974f868c 100644 --- a/lib/fast486/opcodes.c +++ b/lib/fast486/opcodes.c @@ -21,10 +21,7 @@ /* INCLUDES *******************************************************************/ -// #define WIN32_NO_STATUS -// #define _INC_WINDOWS #include -#include // #define NDEBUG #include @@ -3694,11 +3691,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeImulModrmImm) } /* Check for carry/overflow */ - if ((Product < LONG_MIN) || (Product > LONG_MAX)) - { - State->Flags.Cf = State->Flags.Of = TRUE; - } - else State->Flags.Cf = State->Flags.Of = FALSE; + State->Flags.Cf = State->Flags.Of = ((Product < MINLONG) || (Product > MAXLONG)); /* Write-back the result */ return Fast486WriteModrmDwordOperands(State, diff --git a/lib/fast486/opcodes.h b/lib/fast486/opcodes.h index 8a35dcfc84b..3d29e4794c7 100644 --- a/lib/fast486/opcodes.h +++ b/lib/fast486/opcodes.h @@ -22,11 +22,9 @@ #ifndef _OPCODES_H_ #define _OPCODES_H_ -/* DEFINES ********************************************************************/ +#pragma once -#ifndef FASTCALL -#define FASTCALL __fastcall -#endif +/* DEFINES ********************************************************************/ #define FAST486_NUM_OPCODE_HANDLERS 256 #define FAST486_OPCODE_WRITE_REG (1 << 1) diff --git a/lib/fast486/opgroups.c b/lib/fast486/opgroups.c index 2ab82e5c923..0c5690a331b 100644 --- a/lib/fast486/opgroups.c +++ b/lib/fast486/opgroups.c @@ -21,8 +21,6 @@ /* INCLUDES *******************************************************************/ -// #define WIN32_NO_STATUS -// #define _INC_WINDOWS #include // #define NDEBUG diff --git a/lib/fast486/opgroups.h b/lib/fast486/opgroups.h index f88bdea4f10..a7ce7079b8e 100644 --- a/lib/fast486/opgroups.h +++ b/lib/fast486/opgroups.h @@ -22,6 +22,8 @@ #ifndef _OPGROUPS_H_ #define _OPGROUPS_H_ +#pragma once + /* DEFINES ********************************************************************/ FAST486_OPCODE_HANDLER(Fast486OpcodeGroup8082); diff --git a/subsystems/ntvdm/CMakeLists.txt b/subsystems/ntvdm/CMakeLists.txt index cab497c38e5..accf3f74344 100644 --- a/subsystems/ntvdm/CMakeLists.txt +++ b/subsystems/ntvdm/CMakeLists.txt @@ -20,5 +20,4 @@ add_executable(ntvdm ${SOURCE}) set_module_type(ntvdm win32cui UNICODE) target_link_libraries(ntvdm fast486) add_importlibs(ntvdm msvcrt user32 gdi32 kernel32 ntdll) -add_dependencies(ntvdm fast486) add_cd_file(TARGET ntvdm DESTINATION reactos/system32 FOR all)