Author: ekohl
Date: Sun Nov 16 10:34:49 2014
New Revision: 65418
URL:
http://svn.reactos.org/svn/reactos?rev=65418&view=rev
Log:
[NET]
Replace remaining hard coded 'padding' strings.
Modified:
trunk/reactos/base/applications/network/net/cmdLocalGroup.c
trunk/reactos/base/applications/network/net/cmdUser.c
trunk/reactos/base/applications/network/net/main.c
trunk/reactos/base/applications/network/net/net.h
Modified: trunk/reactos/base/applications/network/net/cmdLocalGroup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdLocalGroup.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdLocalGroup.c [iso-8859-1] Sun Nov 16
10:34:49 2014
@@ -41,7 +41,8 @@
PrintToConsole(L"\n");
PrintResourceString(IDS_LOCALGROUP_ALIASES, pServer->sv100_name);
PrintToConsole(L"\n\n");
- PrintToConsole(L"------------------------------------------\n");
+ PrintPadding(L'-', 79);
+ PrintToConsole(L"\n");
NetApiBufferFree(pServer);
@@ -62,7 +63,7 @@
for (i = 0; i < dwRead; i++)
{
- if (pBuffer[i].lgrpi0_name)
+ if (pBuffer[i].lgrpi0_name)
PrintToConsole(L"*%s\n", pBuffer[i].lgrpi0_name);
}
@@ -141,7 +142,8 @@
PrintResourceString(IDS_LOCALGROUP_MEMBERS);
PrintToConsole(L"\n\n");
- PrintToConsole(L"------------------------------------------\n");
+ PrintPadding(L'-', 79);
+ PrintToConsole(L"\n");
for (i = 0; i < dwRead; i++)
{
Modified: trunk/reactos/base/applications/network/net/cmdUser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] Sun Nov 16 10:34:49
2014
@@ -40,7 +40,8 @@
PrintToConsole(L"\n");
PrintResourceString(IDS_USER_ACCOUNTS, pServer->sv100_name);
PrintToConsole(L"\n\n");
- PrintToConsole(L"------------------------------------------\n");
+ PrintPadding(L'-', 79);
+ PrintToConsole(L"\n");
NetApiBufferFree(pServer);
@@ -263,7 +264,7 @@
for (i = 0; i < dwLocalGroupTotal; i++)
{
if (i != 0)
- PrintToConsole(L" ");
+ PrintPadding(L' ', nPaddedLength);
PrintToConsole(L"*%s\n", pLocalGroupInfo[i].lgrui0_name);
}
}
@@ -278,7 +279,7 @@
for (i = 0; i < dwGroupTotal; i++)
{
if (i != 0)
- PrintToConsole(L" ");
+ PrintPadding(L' ', nPaddedLength);
PrintToConsole(L"*%s\n", pGroupInfo[i].grui0_name);
}
}
Modified: trunk/reactos/base/applications/network/net/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/main.c [iso-8859-1] Sun Nov 16 10:34:49
2014
@@ -85,6 +85,22 @@
VOID
+PrintPadding(
+ WCHAR chr,
+ INT nPaddedLength)
+{
+ WCHAR szMsgBuffer[MAX_BUFFER_SIZE];
+ INT i;
+
+ for (i = 0; i < nPaddedLength; i++)
+ szMsgBuffer[i] = chr;
+ szMsgBuffer[nPaddedLength] = UNICODE_NULL;
+
+ WriteToConsole(szMsgBuffer);
+}
+
+
+VOID
PrintToConsole(
LPWSTR lpFormat,
...)
Modified: trunk/reactos/base/applications/network/net/net.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/net.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/net.h [iso-8859-1] Sun Nov 16 10:34:49
2014
@@ -36,6 +36,11 @@
INT nPaddedLength);
VOID
+PrintPadding(
+ WCHAR chr,
+ INT nPaddedLength);
+
+VOID
PrintToConsole(
LPWSTR lpFormat,
...);