Skip to content

Commit 98a8996

Browse files
committed
[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.
1 parent f5204f8 commit 98a8996

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

base/applications/network/netsh/help.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ PrintShortCommands(
6666
{
6767
if (LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer, 80) == 0)
6868
szBuffer[0] = UNICODE_NULL;
69-
ConPrintf(StdOut, L"%-15s - %s\n", pCommand->pwszCmdToken, szBuffer);
69+
ConPrintf(StdOut, L"%-15s - %s", pCommand->pwszCmdToken, szBuffer);
7070
pCommand = pCommand->pNext;
7171
}
7272
}
@@ -85,7 +85,7 @@ PrintShortGroups(
8585
{
8686
if (LoadStringW(pContext->hModule, pGroup->dwShortCmdHelpToken, szBuffer, 80) == 0)
8787
szBuffer[0] = UNICODE_NULL;
88-
ConPrintf(StdOut, L"%-15s - %s\n", pGroup->pwszCmdGroupToken, szBuffer);
88+
ConPrintf(StdOut, L"%-15s - %s", pGroup->pwszCmdGroupToken, szBuffer);
8989
pGroup = pGroup->pNext;
9090
}
9191
}
@@ -124,7 +124,7 @@ PrintShortGroupCommands(
124124
swprintf(szBuffer1, L"%s %s", pGroup->pwszCmdGroupToken, pCommand->pwszCmdToken);
125125
LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer2, 80);
126126

127-
ConPrintf(StdOut, L"%-15s - %s\n", szBuffer1, szBuffer2);
127+
ConPrintf(StdOut, L"%-15s - %s", szBuffer1, szBuffer2);
128128
pCommand = pCommand->pNext;
129129
}
130130
}

base/applications/network/netsh/lang/en-US.rc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@ BEGIN
2525
IDS_HELP_FOOTER "\nHelp Footer\n\n"
2626
IDS_SUBCONTEXT_HEADER "\nThe following sub-contexts are available:\n"
2727

28-
IDS_HLP_UP "Goes up one context level."
28+
IDS_HLP_UP "Goes up one context level.\n"
2929
IDS_HLP_UP_EX "Syntax: ..\n\n Goes up one context level.\n\n"
30-
IDS_HLP_EXIT "Exits the program."
30+
IDS_HLP_EXIT "Exits the program.\n"
3131
IDS_HLP_EXIT_EX "Syntax: exit\n\n Exits the program.\n\n"
32-
IDS_HLP_HELP "Displays a list of commands."
32+
IDS_HLP_HELP "Displays a list of commands.\n"
3333
IDS_HLP_HELP_EX "Syntax: help\n\n Displays a list of commands.\n\n"
34-
IDS_HLP_POPD "Changes to the context on the stack."
34+
IDS_HLP_POPD "Changes to the context on the stack.\n"
3535
IDS_HLP_POPD_EX "Syntax: popd\n\n Changes to the context on the stack.\n\n"
36-
IDS_HLP_PUSHD "Stores the current context on the stack."
36+
IDS_HLP_PUSHD "Stores the current context on the stack.\n"
3737
IDS_HLP_PUSHD_EX "Syntax: pushd\n\n Stores the current context on the stack.\n\n"
3838

39-
IDS_HLP_ADD_HELPER "Installs a helper DLL."
39+
IDS_HLP_ADD_HELPER "Installs a helper DLL.\n"
4040
IDS_HLP_ADD_HELPER_EX "Syntax: add helper <dll file name>\n\n Installs the specified helper DLL in netsh.\n\n"
4141

42-
IDS_HLP_DEL_HELPER "Removes a helper DLL."
42+
IDS_HLP_DEL_HELPER "Removes a helper DLL.\n"
4343
IDS_HLP_DEL_HELPER_EX "Syntax: delete helper <dll file name>\n\n Removes the specified helper DLL from netsh.\n\n"
4444

45-
IDS_HLP_SHOW_HELPER "Lists all the top-level helpers."
45+
IDS_HLP_SHOW_HELPER "Lists all the top-level helpers.\n"
4646
IDS_HLP_SHOW_HELPER_EX "Syntax: show helper\n\n Lists all the top-level helpers.\n\n"
4747

48-
IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries."
49-
IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries."
50-
IDS_HLP_GROUP_SHOW "Displays information."
48+
IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries.\n"
49+
IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries.\n"
50+
IDS_HLP_GROUP_SHOW "Displays information.\n"
5151
END

dll/win32/ifmon/lang/en-US.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ BEGIN
66
IDS_HLP_INTERFACE_SHOW_INTERFACE "Displays interfaces.\n"
77
IDS_HLP_INTERFACE_SHOW_INTERFACE_EX "\nUsage:\n"
88

9-
IDS_HLP_IP_SHOW "Displays IP information."
10-
IDS_HLP_ADDRESSES "Displays IP address configuration."
9+
IDS_HLP_IP_SHOW "Displays IP information.\n"
10+
IDS_HLP_ADDRESSES "Displays IP address configuration.\n"
1111
IDS_HLP_ADDRESSES_EX "Usage: addresses [string]\n\n Display IP address configuration.\n"
12-
IDS_HLP_CONFIG "Displays IP address and additional information."
12+
IDS_HLP_CONFIG "Displays IP address and additional information.\n"
1313
IDS_HLP_CONFIG_EX "Usage: config [string]\n\n Display IP address and additional information.\n"
14-
IDS_HLP_DNS "Displays the DNS server addresses."
14+
IDS_HLP_DNS "Displays the DNS server addresses.\n"
1515
IDS_HLP_DNS_EX "Usage: dns [string]\n\n Display DNS server adresses.\n"
1616

1717
IDS_IP_HEADER "\nConfiguration for interface ""%s""\n"

0 commit comments

Comments
 (0)