Author: ekohl
Date: Mon Jun 9 12:56:05 2014
New Revision: 63575
URL:
http://svn.reactos.org/svn/reactos?rev=63575&view=rev
Log:
[NET]
Convert help and usage texts to string resources.
Modified:
trunk/reactos/base/applications/network/net/cmdHelpMsg.c
trunk/reactos/base/applications/network/net/cmdPause.c
trunk/reactos/base/applications/network/net/cmdStop.c
trunk/reactos/base/applications/network/net/help.c
trunk/reactos/base/applications/network/net/lang/en-US.rc
trunk/reactos/base/applications/network/net/main.c
trunk/reactos/base/applications/network/net/resource.h
Modified: trunk/reactos/base/applications/network/net/cmdHelpMsg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdHelpMsg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdHelpMsg.c [iso-8859-1] Mon Jun 9
12:56:05 2014
@@ -19,14 +19,14 @@
if (argc < 3)
{
- puts("Usage: NET HELPMSG <Error Code>");
+ PrintResourceString(IDS_HELPMSG_SYNTAX);
return 1;
}
errNum = wcstol(argv[2], &endptr, 10);
if (*endptr != 0)
{
- puts("Usage: NET HELPMSG <Error Code>");
+ PrintResourceString(IDS_HELPMSG_SYNTAX);
return 1;
}
Modified: trunk/reactos/base/applications/network/net/cmdPause.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdPause.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdPause.c [iso-8859-1] Mon Jun 9
12:56:05 2014
@@ -18,7 +18,7 @@
if (argc != 3)
{
- puts("Usage: NET PAUSE <Service Name>");
+ PrintResourceString(IDS_PAUSE_SYNTAX);
return 1;
}
Modified: trunk/reactos/base/applications/network/net/cmdStop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/cmdStop.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/cmdStop.c [iso-8859-1] Mon Jun 9 12:56:05
2014
@@ -19,8 +19,7 @@
if (argc != 3)
{
- /* FIXME: Print usage message! */
- printf("Usage: NET STOP <Service name>\n");
+ PrintResourceString(IDS_STOP_SYNTAX);
return 1;
}
Modified: trunk/reactos/base/applications/network/net/help.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/help.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/help.c [iso-8859-1] Mon Jun 9 12:56:05
2014
@@ -13,184 +13,150 @@
{
if (argc != 3)
{
- return 0;
+ PrintResourceString(IDS_HELP_SYNTAX);
+ return 0;
}
- if (_wcsicmp(argv[2],L"ACCOUNTS")==0)
+ if (_wcsicmp(argv[2],L"ACCOUNTS") == 0)
{
PrintResourceString(IDS_ACCOUNTS_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"COMPUTER")==0)
+ if (_wcsicmp(argv[2],L"COMPUTER") == 0)
{
- puts("COMPUTER");
- puts("help text");
+ PrintResourceString(IDS_COMPUTER_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"CONFIG")==0)
+ if (_wcsicmp(argv[2],L"CONFIG") == 0)
{
- puts("CONFIG");
- puts("help text");
+ PrintResourceString(IDS_CONFIG_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"CONTINUE")==0)
+ if (_wcsicmp(argv[2],L"CONTINUE") == 0)
{
PrintResourceString(IDS_CONTINUE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"FILE")==0)
+ if (_wcsicmp(argv[2],L"FILE") == 0)
{
- puts("FILE");
- puts("help text");
+ PrintResourceString(IDS_FILE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"GROUP")==0)
+ if (_wcsicmp(argv[2],L"GROUP") == 0)
{
- puts("GROUP");
- puts("help text");
+ PrintResourceString(IDS_GROUP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"HELP")==0)
+ if (_wcsicmp(argv[2],L"HELPMSG") == 0)
{
- puts("HELP");
- puts("help text");
+ PrintResourceString(IDS_HELPMSG_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"HELPMSG")==0)
+ if (_wcsicmp(argv[2],L"LOCALGROUP") == 0)
{
- puts("HELPMSG");
- puts("help text");
+ PrintResourceString(IDS_LOCALGROUP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"LOCALGROUP")==0)
+ if (_wcsicmp(argv[2],L"NAME") == 0)
{
- puts("LOCALGROUP");
- puts("help text");
+ PrintResourceString(IDS_NAME_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"NAME")==0)
+ if (_wcsicmp(argv[2],L"PAUSE") == 0)
{
- puts("NAME");
- puts("help text");
+ PrintResourceString(IDS_PAUSE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"PRINT")==0)
+ if (_wcsicmp(argv[2],L"PRINT") == 0)
{
- puts("PRINT");
- puts("help text");
+ PrintResourceString(IDS_PRINT_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SEND")==0)
+ if (_wcsicmp(argv[2],L"SEND") == 0)
{
- puts("SEND");
- puts("help text");
+ PrintResourceString(IDS_SEND_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SESSION")==0)
+ if (_wcsicmp(argv[2],L"SESSION") == 0)
{
- puts("SESSION");
- puts("help text");
+ PrintResourceString(IDS_SESSION_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SHARE")==0)
+ if (_wcsicmp(argv[2],L"SHARE") == 0)
{
- puts("SHARE");
- puts("help text");
+ PrintResourceString(IDS_SHARE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"START")==0)
+ if (_wcsicmp(argv[2],L"START") == 0)
{
- puts("START");
- puts("help text");
+ PrintResourceString(IDS_START_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"STATISTICS")==0)
+ if (_wcsicmp(argv[2],L"STATISTICS") == 0)
{
- puts("STATISTICS");
- puts("help text");
+ PrintResourceString(IDS_STATISTICS_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"STOP")==0)
+ if (_wcsicmp(argv[2],L"STOP") == 0)
{
- puts("STOP");
- puts("help text");
+ PrintResourceString(IDS_STOP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"TIME")==0)
+ if (_wcsicmp(argv[2],L"TIME") == 0)
{
- puts("TIME");
- puts("help text");
+ PrintResourceString(IDS_TIME_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"USE")==0)
+ if (_wcsicmp(argv[2],L"USE") == 0)
{
- puts("USE");
- puts("help text");
+ PrintResourceString(IDS_USE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"USER")==0)
+ if (_wcsicmp(argv[2],L"USER") == 0)
{
- puts("USER");
- puts("help text");
+ PrintResourceString(IDS_USER_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"VIEW")==0)
+ if (_wcsicmp(argv[2],L"VIEW") == 0)
{
- puts("VIEW");
- puts("help text");
+ PrintResourceString(IDS_VIEW_HELP);
return 0;
}
- help();
+#if 0
+ if (_wcsicmp(argv[2],L"SERVICES") == 0)
+ {
+ return 0;
+ }
+
+ if (_wcsicmp(argv[2],L"SYNTAX") == 0)
+ {
+ return 0;
+ }
+#endif
+
+ PrintResourceString(IDS_HELP_SYNTAX);
+
return 0;
}
-VOID help(VOID)
-{
- puts("NET ACCOUNTS");
- puts("NET COMPUTER");
- puts("NET CONFIG");
- puts("NET CONFIG SERVER");
- puts("NET CONFIG WORKSTATION");
- puts("NET CONTINUE");
- puts("NET FILE");
- puts("NET GROUP");
-
- puts("NET HELP");
- puts("NET HELPMSG");
- puts("NET LOCALGROUP");
- puts("NET NAME");
- puts("NET PAUSE");
- puts("NET PRINT");
- puts("NET SEND");
- puts("NET SESSION");
-
- puts("NET SHARE");
- puts("NET START");
- puts("NET STATISTICS");
- puts("NET STOP");
- puts("NET TIME");
- puts("NET USE");
- puts("NET USER");
- puts("NET VIEW");
-}
Modified: trunk/reactos/base/applications/network/net/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/lang/en-US.rc [iso-8859-1] Mon Jun 9
12:56:05 2014
@@ -5,7 +5,59 @@
IDS_ACCOUNTS_SYNTAX "Usage:\nNET ACCOUNTS [/FORCELOGOFF:{Minutes|NO}]
[/MINPWLEN:Length]\n\
[/MAXPWAGE:{Days|UNLIMITED}] [/MINPWAGE:Days]\n\
[/UNIQUEPW:Count] [/DOMAIN]\n"
- IDS_ACCOUNTS_HELP "ACCOUNTS\nhelp text"
+ IDS_ACCOUNTS_HELP "ACCOUNTS\n..."
+ IDS_COMPUTER_SYNTAX "Usage:\nNET COMPUTER ..."
+ IDS_COMPUTER_HELP "COMPUTER\n..."
+ IDS_CONFIG_SYNTAX "Usage:\nNET CONFIG ..."
+ IDS_CONFIG_HELP "CONFIG\n..."
IDS_CONTINUE_SYNTAX "Usage:\nNET CONTINUE <Service Name>"
- IDS_CONTINUE_HELP "CONTINUE\nhelp text"
+ IDS_CONTINUE_HELP "CONTINUE\n..."
+ IDS_FILE_SYNTAX "Usage:\nNET FILE ..."
+ IDS_FILE_HELP "FILE\n..."
+ IDS_GROUP_SYNTAX "Usage:\nNET GROUP ..."
+ IDS_GROUP_HELP "GROUP\n..."
+ IDS_HELPMSG_SYNTAX "Usage:\nNET HELPMSG <Error Code>"
+ IDS_HELPMSG_HELP "HELPMSG\n..."
+ IDS_LOCALGROUP_SYNTAX "Usage:\nNET LOCALGROUP ..."
+ IDS_LOCALGROUP_HELP "LOCALGROUP\n..."
+ IDS_NAME_SYNTAX "Usage:\nNET NAME ..."
+ IDS_NAME_HELP "NAME\n..."
+ IDS_PRINT_SYNTAX "Usage:\nNET PRINT ..."
+ IDS_PRINT_HELP "PRINT\n..."
+ IDS_PAUSE_SYNTAX "Usage:\nNET PAUSE <Service Name>"
+ IDS_PAUSE_HELP "PAUSE\n..."
+ IDS_SEND_SYNTAX "Usage:\nNET SEND ..."
+ IDS_SEND_HELP "SEND\n..."
+ IDS_SESSION_SYNTAX "Usage:\nNET SESSION ..."
+ IDS_SESSION_HELP "SESSION\n..."
+ IDS_SHARE_SYNTAX "Usage:\nNET SHARE ..."
+ IDS_SHARE_HELP "SHARE\n..."
+ IDS_START_SYNTAX "Usage:\nNET START ..."
+ IDS_START_HELP "START\n..."
+ IDS_STATISTICS_SYNTAX "Usage:\nNET STATISTICS ..."
+ IDS_STATISTICS_HELP "STATISTICS\n..."
+ IDS_STOP_SYNTAX "Usage:\nNET STOP <Service name>"
+ IDS_STOP_HELP "STOP\n..."
+ IDS_TIME_SYNTAX "Usage:\nNET TIME ..."
+ IDS_TIME_HELP "TIME\n..."
+ IDS_USE_SYNTAX "Usage:\nNET USE ..."
+ IDS_USE_HELP "USE\n..."
+ IDS_USER_SYNTAX "Usage:\nNET USER ..."
+ IDS_USER_HELP "USER\n..."
+ IDS_VIEW_SYNTAX "Usage:\nNET VIEW ..."
+ IDS_VIEW_HELP "VIEW\n..."
+ IDS_HELP_SYNTAX "Usage:\nNET HELP <Command>\n - or -\nNET
<Command> /HELP\n\n\
+ The following commands are available:\n\n\
+ NET ACCOUNTS NET HELP NET SHARE\n\
+ NET COMPUTER NET HELPMSG NET START\n\
+ NET CONFIG NET LOCALGROUP NET STATISTICS\n\
+ NET CONFIG SERVER NET NAME NET STOP\n\
+ NET CONFIG WORKSTATION NET PAUSE NET TIME\n\
+ NET CONTINUE NET PRINT NET USE\n\
+ NET FILE NET SEND NET USER\n\
+ NET GROUP NET SESSION NET VIEW\n\n\
+ ..."
+ IDS_NET_SYNTAX "Usage:\nNET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE |
GROUP | HELP |\n\
+ HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
+ SHARE | START | STATISTICS | STOP | TIME | USE | NET USER | VIEW ]\n"
END
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] Mon Jun 9 12:56:05
2014
@@ -30,8 +30,8 @@
{L"helpmsg", cmdHelpMsg},
{L"localgroup", unimplemented},
{L"name", unimplemented},
+ {L"pause", cmdPause},
{L"print", unimplemented},
- {L"pause", cmdPause},
{L"send", unimplemented},
{L"session", unimplemented},
{L"share", unimplemented},
@@ -67,7 +67,7 @@
if (argc < 2)
{
- help();
+ PrintResourceString(IDS_NET_SYNTAX);
return 1;
}
@@ -80,7 +80,7 @@
}
}
- help();
+ PrintResourceString(IDS_NET_SYNTAX);
return 1;
}
Modified: trunk/reactos/base/applications/network/net/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/resource.h [iso-8859-1] Mon Jun 9
12:56:05 2014
@@ -1,6 +1,46 @@
#pragma once
-#define IDS_ACCOUNTS_SYNTAX 100
-#define IDS_ACCOUNTS_HELP 101
-#define IDS_CONTINUE_SYNTAX 102
-#define IDS_CONTINUE_HELP 103
+#define IDS_ACCOUNTS_SYNTAX 100
+#define IDS_ACCOUNTS_HELP 101
+#define IDS_COMPUTER_SYNTAX 102
+#define IDS_COMPUTER_HELP 103
+#define IDS_CONFIG_SYNTAX 104
+#define IDS_CONFIG_HELP 105
+#define IDS_CONTINUE_SYNTAX 106
+#define IDS_CONTINUE_HELP 107
+#define IDS_FILE_SYNTAX 108
+#define IDS_FILE_HELP 109
+#define IDS_GROUP_SYNTAX 110
+#define IDS_GROUP_HELP 111
+#define IDS_HELPMSG_SYNTAX 112
+#define IDS_HELPMSG_HELP 113
+#define IDS_LOCALGROUP_SYNTAX 114
+#define IDS_LOCALGROUP_HELP 115
+#define IDS_NAME_SYNTAX 116
+#define IDS_NAME_HELP 117
+#define IDS_PAUSE_SYNTAX 118
+#define IDS_PAUSE_HELP 119
+#define IDS_PRINT_SYNTAX 120
+#define IDS_PRINT_HELP 121
+#define IDS_SEND_SYNTAX 122
+#define IDS_SEND_HELP 123
+#define IDS_SESSION_SYNTAX 124
+#define IDS_SESSION_HELP 125
+#define IDS_SHARE_SYNTAX 126
+#define IDS_SHARE_HELP 127
+#define IDS_START_SYNTAX 128
+#define IDS_START_HELP 129
+#define IDS_STATISTICS_SYNTAX 130
+#define IDS_STATISTICS_HELP 131
+#define IDS_STOP_SYNTAX 132
+#define IDS_STOP_HELP 133
+#define IDS_TIME_SYNTAX 134
+#define IDS_TIME_HELP 135
+#define IDS_USE_SYNTAX 136
+#define IDS_USE_HELP 137
+#define IDS_USER_SYNTAX 138
+#define IDS_USER_HELP 139
+#define IDS_VIEW_SYNTAX 140
+#define IDS_VIEW_HELP 141
+#define IDS_HELP_SYNTAX 142
+#define IDS_NET_SYNTAX 143