From 98a89969540b6eac3bd3693e24a094840194d03f Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 28 Sep 2025 23:23:46 +0200 Subject: [PATCH] [NETSH][IFMON] Make output windows compatible - Help text string resources must be newline terminated. - Format strings must not be newline terminated. - Tested with WinXP ifmon.dll. --- base/applications/network/netsh/help.c | 6 ++--- base/applications/network/netsh/lang/en-US.rc | 22 +++++++++---------- dll/win32/ifmon/lang/en-US.rc | 8 +++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/base/applications/network/netsh/help.c b/base/applications/network/netsh/help.c index 9a43ef19baf..f95f8a5e749 100644 --- a/base/applications/network/netsh/help.c +++ b/base/applications/network/netsh/help.c @@ -66,7 +66,7 @@ PrintShortCommands( { if (LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer, 80) == 0) szBuffer[0] = UNICODE_NULL; - ConPrintf(StdOut, L"%-15s - %s\n", pCommand->pwszCmdToken, szBuffer); + ConPrintf(StdOut, L"%-15s - %s", pCommand->pwszCmdToken, szBuffer); pCommand = pCommand->pNext; } } @@ -85,7 +85,7 @@ PrintShortGroups( { if (LoadStringW(pContext->hModule, pGroup->dwShortCmdHelpToken, szBuffer, 80) == 0) szBuffer[0] = UNICODE_NULL; - ConPrintf(StdOut, L"%-15s - %s\n", pGroup->pwszCmdGroupToken, szBuffer); + ConPrintf(StdOut, L"%-15s - %s", pGroup->pwszCmdGroupToken, szBuffer); pGroup = pGroup->pNext; } } @@ -124,7 +124,7 @@ PrintShortGroupCommands( swprintf(szBuffer1, L"%s %s", pGroup->pwszCmdGroupToken, pCommand->pwszCmdToken); LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer2, 80); - ConPrintf(StdOut, L"%-15s - %s\n", szBuffer1, szBuffer2); + ConPrintf(StdOut, L"%-15s - %s", szBuffer1, szBuffer2); pCommand = pCommand->pNext; } } diff --git a/base/applications/network/netsh/lang/en-US.rc b/base/applications/network/netsh/lang/en-US.rc index 88e09e45eb5..2edcf4400e0 100644 --- a/base/applications/network/netsh/lang/en-US.rc +++ b/base/applications/network/netsh/lang/en-US.rc @@ -25,27 +25,27 @@ BEGIN IDS_HELP_FOOTER "\nHelp Footer\n\n" IDS_SUBCONTEXT_HEADER "\nThe following sub-contexts are available:\n" - IDS_HLP_UP "Goes up one context level." + IDS_HLP_UP "Goes up one context level.\n" IDS_HLP_UP_EX "Syntax: ..\n\n Goes up one context level.\n\n" - IDS_HLP_EXIT "Exits the program." + IDS_HLP_EXIT "Exits the program.\n" IDS_HLP_EXIT_EX "Syntax: exit\n\n Exits the program.\n\n" - IDS_HLP_HELP "Displays a list of commands." + IDS_HLP_HELP "Displays a list of commands.\n" IDS_HLP_HELP_EX "Syntax: help\n\n Displays a list of commands.\n\n" - IDS_HLP_POPD "Changes to the context on the stack." + IDS_HLP_POPD "Changes to the context on the stack.\n" IDS_HLP_POPD_EX "Syntax: popd\n\n Changes to the context on the stack.\n\n" - IDS_HLP_PUSHD "Stores the current context on the stack." + IDS_HLP_PUSHD "Stores the current context on the stack.\n" IDS_HLP_PUSHD_EX "Syntax: pushd\n\n Stores the current context on the stack.\n\n" - IDS_HLP_ADD_HELPER "Installs a helper DLL." + IDS_HLP_ADD_HELPER "Installs a helper DLL.\n" IDS_HLP_ADD_HELPER_EX "Syntax: add helper \n\n Installs the specified helper DLL in netsh.\n\n" - IDS_HLP_DEL_HELPER "Removes a helper DLL." + IDS_HLP_DEL_HELPER "Removes a helper DLL.\n" IDS_HLP_DEL_HELPER_EX "Syntax: delete helper \n\n Removes the specified helper DLL from netsh.\n\n" - IDS_HLP_SHOW_HELPER "Lists all the top-level helpers." + IDS_HLP_SHOW_HELPER "Lists all the top-level helpers.\n" IDS_HLP_SHOW_HELPER_EX "Syntax: show helper\n\n Lists all the top-level helpers.\n\n" - IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries." - IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries." - IDS_HLP_GROUP_SHOW "Displays information." + IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries.\n" + IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries.\n" + IDS_HLP_GROUP_SHOW "Displays information.\n" END diff --git a/dll/win32/ifmon/lang/en-US.rc b/dll/win32/ifmon/lang/en-US.rc index f7fd185191f..fdf2d557742 100644 --- a/dll/win32/ifmon/lang/en-US.rc +++ b/dll/win32/ifmon/lang/en-US.rc @@ -6,12 +6,12 @@ BEGIN IDS_HLP_INTERFACE_SHOW_INTERFACE "Displays interfaces.\n" IDS_HLP_INTERFACE_SHOW_INTERFACE_EX "\nUsage:\n" - IDS_HLP_IP_SHOW "Displays IP information." - IDS_HLP_ADDRESSES "Displays IP address configuration." + IDS_HLP_IP_SHOW "Displays IP information.\n" + IDS_HLP_ADDRESSES "Displays IP address configuration.\n" IDS_HLP_ADDRESSES_EX "Usage: addresses [string]\n\n Display IP address configuration.\n" - IDS_HLP_CONFIG "Displays IP address and additional information." + IDS_HLP_CONFIG "Displays IP address and additional information.\n" IDS_HLP_CONFIG_EX "Usage: config [string]\n\n Display IP address and additional information.\n" - IDS_HLP_DNS "Displays the DNS server addresses." + IDS_HLP_DNS "Displays the DNS server addresses.\n" IDS_HLP_DNS_EX "Usage: dns [string]\n\n Display DNS server adresses.\n" IDS_IP_HEADER "\nConfiguration for interface ""%s""\n"