https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3ff08b6404534535415d9…
commit 3ff08b6404534535415d9f6f84c4efeebf678eeb
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Sun Jun 14 13:49:22 2020 +0200
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sat Aug 31 18:23:01 2024 +0300
[VFD] Properly mark ReactOS's diffs
Addendum to 25c7e1a (0.4.7-dev-1106) and follow-ups.
---
.../rosapps/applications/cmdutils/vfdcmd/vfdmsg.mc | 7 +++++++
modules/rosapps/drivers/vfd/imports.h | 8 ++++----
modules/rosapps/drivers/vfd/vfddbg.c | 4 +++-
modules/rosapps/drivers/vfd/vfdimg.c | 2 +-
modules/rosapps/drivers/vfd/vfdmnt.c | 2 +-
modules/rosapps/drivers/vfd/vfdpnp.c | 2 +-
modules/rosapps/include/vfd/vfdio.h | 4 ++--
modules/rosapps/lib/vfdlib/vfdctl.c | 4 ++--
modules/rosapps/lib/vfdlib/vfdguiopen.c | 8 ++++++--
modules/rosapps/lib/vfdlib/vfdguisave.c | 20 ++++++++++++++++++--
modules/rosapps/lib/vfdlib/vfdguitip.c | 13 +++++++++++++
modules/rosapps/lib/vfdlib/vfdmsg_lib.mc | 6 ++++++
modules/rosapps/lib/vfdlib/vfdshext.h | 2 +-
modules/rosapps/lib/vfdlib/vfdshmenu.cpp | 3 ++-
modules/rosapps/lib/vfdlib/vfdshutil.cpp | 4 ++--
15 files changed, 69 insertions(+), 20 deletions(-)
diff --git a/modules/rosapps/applications/cmdutils/vfdcmd/vfdmsg.mc
b/modules/rosapps/applications/cmdutils/vfdcmd/vfdmsg.mc
index 33ee9145c2c..8c428cf944a 100644
--- a/modules/rosapps/applications/cmdutils/vfdcmd/vfdmsg.mc
+++ b/modules/rosapps/applications/cmdutils/vfdcmd/vfdmsg.mc
@@ -11,6 +11,11 @@
;#ifndef _VFDMSG_H_
;#define _VFDMSG_H_
;
+;/*
+; __REACTOS__:
+; - Removed Japanese language.
+; + Added a second blank line between some entries.
+;*/
MessageIdTypedef=DWORD
LanguageNames=(English=0x409:MSG0409)
@@ -1161,6 +1166,7 @@ of the shell extension.
.
+;// __REACTOS__: s/read only/read-only/.
MessageId=
SymbolicName=MSG_HELP_OPEN
Language=English
@@ -1360,6 +1366,7 @@ The SAVE command always fails if the target is a ZIP compressed
file.
.
+;// __REACTOS__: s/read only/read-only/.
MessageId=
SymbolicName=MSG_HELP_PROTECT
Language=English
diff --git a/modules/rosapps/drivers/vfd/imports.h
b/modules/rosapps/drivers/vfd/imports.h
index 8a9ca901be7..f88c03c0a9d 100644
--- a/modules/rosapps/drivers/vfd/imports.h
+++ b/modules/rosapps/drivers/vfd/imports.h
@@ -27,17 +27,15 @@
extern "C" {
#endif // __cplusplus
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(push,3)
#endif
#include <ntddk.h>
#include <ntdddisk.h>
#include <ntverp.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(pop)
-#endif
-#ifdef _MSC_VER
// disable unwanted (and trivial) warnings :
// 4054 - type cast from a function pointer to a data pointer
// 4201 - anonymous structure
@@ -179,6 +177,8 @@ typedef struct _MOUNTMGR_MOUNT_POINTS {
#endif // (VER_PRODUCTBUILD < 2195)
+// __REACTOS__: NTAPI added on some functions in this file, vfddrv.h and some *.c.
+
#if (VER_PRODUCTBUILD < 2600)
//
// Imports from Windows XP DDK <ntdddisk.h>
diff --git a/modules/rosapps/drivers/vfd/vfddbg.c b/modules/rosapps/drivers/vfd/vfddbg.c
index 829f25b07a4..286dae101fa 100644
--- a/modules/rosapps/drivers/vfd/vfddbg.c
+++ b/modules/rosapps/drivers/vfd/vfddbg.c
@@ -9,9 +9,11 @@
#if !DBG
+#if !defined(__REACTOS__) || defined(_MSC_VER)
// suppress empty compile unit warning
#pragma warning (disable: 4206)
#pragma message ("Debug feature is disabled.")
+#endif
#else // DBG
@@ -514,7 +516,7 @@ GetIoControlName(
CASE_RETURN_STR(IOCTL_DISK_GROW_PARTITION);
CASE_RETURN_STR(IOCTL_DISK_GET_CACHE_INFORMATION);
CASE_RETURN_STR(IOCTL_DISK_SET_CACHE_INFORMATION);
-#if (NTDDI_VERSION < NTDDI_WS03)
+#if !defined(__REACTOS__) || (NTDDI_VERSION < NTDDI_WS03)
CASE_RETURN_STR(IOCTL_DISK_GET_WRITE_CACHE_STATE);
#else
CASE_RETURN_STR(OBSOLETE_DISK_GET_WRITE_CACHE_STATE);
diff --git a/modules/rosapps/drivers/vfd/vfdimg.c b/modules/rosapps/drivers/vfd/vfdimg.c
index c04d1978ffb..d20be32ee1e 100644
--- a/modules/rosapps/drivers/vfd/vfdimg.c
+++ b/modules/rosapps/drivers/vfd/vfdimg.c
@@ -284,7 +284,7 @@ VfdOpenImage (
#ifndef __REACTOS__
&file_object,
#else
- (PVOID *)&file_object,
+ (PVOID *)&file_object,
#endif
NULL);
diff --git a/modules/rosapps/drivers/vfd/vfdmnt.c b/modules/rosapps/drivers/vfd/vfdmnt.c
index 7d84180adac..2bcda2c75f8 100644
--- a/modules/rosapps/drivers/vfd/vfdmnt.c
+++ b/modules/rosapps/drivers/vfd/vfdmnt.c
@@ -13,7 +13,7 @@
so DO NOT define VFD_MOUNT_MANAGER macro
unless you know exactly what you are doing...
*/
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
// suppress empty compile unit warning
#pragma warning (disable: 4206)
#pragma message ("Mount Manager support feature is disabled.")
diff --git a/modules/rosapps/drivers/vfd/vfdpnp.c b/modules/rosapps/drivers/vfd/vfdpnp.c
index e0885e7ada0..9c943e25f6b 100644
--- a/modules/rosapps/drivers/vfd/vfdpnp.c
+++ b/modules/rosapps/drivers/vfd/vfdpnp.c
@@ -13,8 +13,8 @@
so DO NOT define VFD_PNP macro
unless you know exactly what you are doing...
*/
+#if !defined(__REACTOS__) || defined(_MSC_VER)
// suppress empty compile unit warning
-#ifdef _MSC_VER
#pragma warning (disable: 4206)
#pragma message ("Plug and play support feature is disabled.")
#endif
diff --git a/modules/rosapps/include/vfd/vfdio.h b/modules/rosapps/include/vfd/vfdio.h
index b3f4a56e4a9..6df7b76fd22 100644
--- a/modules/rosapps/include/vfd/vfdio.h
+++ b/modules/rosapps/include/vfd/vfdio.h
@@ -55,7 +55,7 @@
// Used for IOCTL_VFD_OPEN_IMAGE and IOCTL_VFD_QUERY_IMAGE
//
#pragma pack (push,2)
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning (push)
#pragma warning (disable: 4200) // Zero sized struct member warning
#endif
@@ -70,7 +70,7 @@ typedef struct _VFD_IMAGE_INFO {
CHAR FileName[0]; // variable length file name string
} VFD_IMAGE_INFO, *PVFD_IMAGE_INFO;
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning (pop)
#endif
#pragma pack (pop)
diff --git a/modules/rosapps/lib/vfdlib/vfdctl.c b/modules/rosapps/lib/vfdlib/vfdctl.c
index 21672b96621..d3952dcedc2 100644
--- a/modules/rosapps/lib/vfdlib/vfdctl.c
+++ b/modules/rosapps/lib/vfdlib/vfdctl.c
@@ -15,12 +15,12 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <dbt.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning (push, 3)
#endif
#include <shlobj.h>
#include <winioctl.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning (pop)
#endif
#include <stdio.h>
diff --git a/modules/rosapps/lib/vfdlib/vfdguiopen.c
b/modules/rosapps/lib/vfdlib/vfdguiopen.c
index e7fb6262b59..35103a5954f 100644
--- a/modules/rosapps/lib/vfdlib/vfdguiopen.c
+++ b/modules/rosapps/lib/vfdlib/vfdguiopen.c
@@ -14,11 +14,11 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(push,3)
#endif
#include <commdlg.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(pop)
#endif
@@ -404,7 +404,11 @@ void OnBrowse(
ofn.nMaxFile = sizeof(file);
ofn.lpstrInitialDir = dir;
ofn.lpstrTitle = title ? title : FALLBACK_IMAGE_TITLE;
+#ifndef __REACTOS__
+ ofn.Flags = OFN_ENABLESIZING | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
+#else
ofn.Flags = OFN_EXPLORER | OFN_ENABLESIZING | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
+#endif
// show the open file dialog box
diff --git a/modules/rosapps/lib/vfdlib/vfdguisave.c
b/modules/rosapps/lib/vfdlib/vfdguisave.c
index b0ea780d450..31f57ce73c2 100644
--- a/modules/rosapps/lib/vfdlib/vfdguisave.c
+++ b/modules/rosapps/lib/vfdlib/vfdguisave.c
@@ -14,11 +14,11 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(push,3)
#endif
#include <commdlg.h>
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma warning(pop)
#endif
@@ -195,7 +195,11 @@ void OnInit(
{
// Store parameters
+#ifndef __REACTOS__
+ SetWindowLong(hDlg, GWL_USERDATA, (ULONG)pParam);
+#else
SetWindowLongPtr(hDlg, GWLP_USERDATA, (ULONG_PTR)pParam);
+#endif
// clear the target existence flag
@@ -293,7 +297,11 @@ void OnTarget(
//
// get the current image info
//
+#ifndef __REACTOS__
+ param = (PCSAVE_PARAM)GetWindowLong(hDlg, GWL_USERDATA);
+#else
param = (PCSAVE_PARAM)GetWindowLongPtr(hDlg, GWLP_USERDATA);
+#endif
if (_stricmp(param->ImageName, buf) == 0) {
@@ -422,7 +430,11 @@ void OnBrowse(
ofn.lpstrInitialDir = dir;
ofn.lpstrTitle = title ? title : "Save Image";
ofn.lpstrFilter = "*.*\0*.*\0";
+#ifndef __REACTOS__
+ ofn.Flags = OFN_ENABLESIZING | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
+#else
ofn.Flags = OFN_EXPLORER | OFN_ENABLESIZING | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST;
+#endif
if (GetSaveFileName(&ofn)) {
SetDlgItemText(hDlg, IDC_TARGETFILE, file);
@@ -469,7 +481,11 @@ DWORD OnOK(
BOOL truncate;
DWORD ret;
+#ifndef __REACTOS__
+ param = (PCSAVE_PARAM)GetWindowLong(hDlg, GWL_USERDATA);
+#else
param = (PCSAVE_PARAM)GetWindowLongPtr(hDlg, GWLP_USERDATA);
+#endif
if (!param) {
return ERROR_INVALID_FUNCTION;
diff --git a/modules/rosapps/lib/vfdlib/vfdguitip.c
b/modules/rosapps/lib/vfdlib/vfdguitip.c
index c3fcc3a7696..390233efea5 100644
--- a/modules/rosapps/lib/vfdlib/vfdguitip.c
+++ b/modules/rosapps/lib/vfdlib/vfdguitip.c
@@ -41,8 +41,13 @@ static LRESULT CALLBACK ToolTipProc(
switch (uMsg) {
case WM_CREATE:
// Store Font handle
+#ifndef __REACTOS__
+ SetWindowLong(hWnd, GWL_USERDATA,
+ (LONG)((LPCREATESTRUCT)lParam)->lpCreateParams);
+#else
SetWindowLongPtr(hWnd, GWLP_USERDATA,
(LONG_PTR)((LPCREATESTRUCT)lParam)->lpCreateParams);
+#endif
return 0;
case WM_PAINT:
@@ -56,7 +61,11 @@ static LRESULT CALLBACK ToolTipProc(
RECT rc;
+#ifndef __REACTOS__
+ SelectObject(hDC, (HFONT)GetWindowLong(hWnd, GWL_USERDATA));
+#else
SelectObject(hDC, (HFONT)GetWindowLongPtr(hWnd, GWLP_USERDATA));
+#endif
SetTextColor(hDC, GetSysColor(COLOR_INFOTEXT));
SetBkMode(hDC, TRANSPARENT);
@@ -121,7 +130,11 @@ static LRESULT CALLBACK ToolTipProc(
case WM_DESTROY:
// delete font
+#ifndef __REACTOS__
+ DeleteObject((HFONT)GetWindowLong(hWnd, GWL_USERDATA));
+#else
DeleteObject((HFONT)GetWindowLongPtr(hWnd, GWLP_USERDATA));
+#endif
return 0;
}
diff --git a/modules/rosapps/lib/vfdlib/vfdmsg_lib.mc
b/modules/rosapps/lib/vfdlib/vfdmsg_lib.mc
index cffa15b93d3..5292bef5b20 100644
--- a/modules/rosapps/lib/vfdlib/vfdmsg_lib.mc
+++ b/modules/rosapps/lib/vfdlib/vfdmsg_lib.mc
@@ -11,6 +11,12 @@
;#ifndef _VFDMSG_H_
;#define _VFDMSG_H_
;
+;/*
+; __REACTOS__:
+; * Renamed file from vfdmsg.mc.
+; - Removed Japanese language.
+; + Added a second blank line between some entries.
+;*/
MessageIdTypedef=DWORD
LanguageNames=(English=0x409:msg0409)
diff --git a/modules/rosapps/lib/vfdlib/vfdshext.h
b/modules/rosapps/lib/vfdlib/vfdshext.h
index 728aaec6dcb..5d45b2287ee 100644
--- a/modules/rosapps/lib/vfdlib/vfdshext.h
+++ b/modules/rosapps/lib/vfdlib/vfdshext.h
@@ -70,7 +70,7 @@ public:
#ifndef __REACTOS__
UINT idCmd,
#else
- UINT_PTR idCmd,
+ UINT_PTR idCmd,
#endif
UINT uFlags,
UINT *reserved,
diff --git a/modules/rosapps/lib/vfdlib/vfdshmenu.cpp
b/modules/rosapps/lib/vfdlib/vfdshmenu.cpp
index 35a67142659..cda760a870e 100644
--- a/modules/rosapps/lib/vfdlib/vfdshmenu.cpp
+++ b/modules/rosapps/lib/vfdlib/vfdshmenu.cpp
@@ -270,7 +270,7 @@ STDMETHODIMP CVfdShExt::GetCommandString(
#ifndef __REACTOS__
UINT idCmd,
#else
- UINT_PTR idCmd,
+ UINT_PTR idCmd,
#endif
UINT uFlags,
UINT *reserved,
@@ -350,6 +350,7 @@ STDMETHODIMP CVfdShExt::InvokeCommand(
}
#endif
+
if (!unicode && HIWORD(lpcmi->lpVerb)) {
VFDTRACE(0, ("ANSI: %s\n", lpcmi->lpVerb));
diff --git a/modules/rosapps/lib/vfdlib/vfdshutil.cpp
b/modules/rosapps/lib/vfdlib/vfdshutil.cpp
index be9b8f47c83..a3a6e965a7a 100644
--- a/modules/rosapps/lib/vfdlib/vfdshutil.cpp
+++ b/modules/rosapps/lib/vfdlib/vfdshutil.cpp
@@ -22,14 +22,14 @@
// Initialize the GUID instance
//=====================================
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma data_seg(".text")
#endif
#define INITGUID
#include <initguid.h>
#include <shlguid.h>
#include "vfdshguid.h"
-#ifdef _MSC_VER
+#if !defined(__REACTOS__) || defined(_MSC_VER)
#pragma data_seg()
#endif