From eaee5e840b9b02aaf04ae430bbda379790512b04 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 10 Mar 2019 01:04:26 +0100 Subject: [PATCH] [NET] Implement the NET SYNTAX pseudo command. --- base/applications/network/net/cmdHelp.c | 11 +- base/applications/network/net/main.c | 1 + base/applications/network/net/net.h | 1 + sdk/include/reactos/mc/net_msg.mc | 270 +++++++++++++++++++++++- 4 files changed, 274 insertions(+), 9 deletions(-) diff --git a/base/applications/network/net/cmdHelp.c b/base/applications/network/net/cmdHelp.c index b1643a2c4f6..97e22e34b25 100644 --- a/base/applications/network/net/cmdHelp.c +++ b/base/applications/network/net/cmdHelp.c @@ -186,12 +186,13 @@ INT cmdHelp(INT argc, WCHAR **argv) { return 0; } +#endif if (_wcsicmp(argv[2], L"SYNTAX") == 0) { + PrintNetMessage(MSG_SYNTAX_HELP); return 0; } -#endif PrintNetMessage(MSG_HELP_SYNTAX); PrintNetMessage(MSG_HELP_HELP); @@ -199,3 +200,11 @@ INT cmdHelp(INT argc, WCHAR **argv) return 0; } + +INT +cmdSyntax(INT argc, WCHAR **argv) +{ + ConResPuts(StdOut, IDS_GENERIC_SYNTAX); + PrintNetMessage(MSG_SYNTAX_HELP); + return 0; +} diff --git a/base/applications/network/net/main.c b/base/applications/network/net/main.c index 773c25fd944..63c825a11b6 100644 --- a/base/applications/network/net/main.c +++ b/base/applications/network/net/main.c @@ -38,6 +38,7 @@ COMMAND cmds[] = {L"start", cmdStart}, {L"statistics", cmdStatistics}, {L"stop", cmdStop}, + {L"syntax", cmdSyntax}, {L"time", unimplemented}, {L"use", cmdUse}, {L"user", cmdUser}, diff --git a/base/applications/network/net/net.h b/base/applications/network/net/net.h index d4845232eb4..43c5ae5a6a1 100644 --- a/base/applications/network/net/net.h +++ b/base/applications/network/net/net.h @@ -68,6 +68,7 @@ INT cmdPause(INT argc, WCHAR **argv); INT cmdStart(INT argc, WCHAR **argv); INT cmdStatistics(INT argc, WCHAR **argv); INT cmdStop(INT argc, WCHAR **argv); +INT cmdSyntax(INT argc, WCHAR **argv); INT cmdUse(INT argc, WCHAR **argv); INT cmdUser(INT argc, WCHAR **argv); diff --git a/sdk/include/reactos/mc/net_msg.mc b/sdk/include/reactos/mc/net_msg.mc index 5e7b14deb5f..dd0f13d1887 100644 --- a/sdk/include/reactos/mc/net_msg.mc +++ b/sdk/include/reactos/mc/net_msg.mc @@ -1273,7 +1273,8 @@ Language=English NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Polish Dostępne polecenia to: @@ -1287,7 +1288,8 @@ Language=Polish NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Romanian Sunt disponibile următoarele comenzi: @@ -1301,7 +1303,8 @@ Language=Romanian NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Russian Доступны следующие команды: @@ -1315,7 +1318,8 @@ Language=Russian NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Spanish Éstos son los argumentos de línea de comandos disponibles: @@ -1329,7 +1333,8 @@ Language=Spanish NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Turkish Aşağıdaki komutlar kullanılabilir: @@ -1343,7 +1348,8 @@ Language=Turkish NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Chinese 以下命令可用: @@ -1357,7 +1363,8 @@ Language=Chinese NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . Language=Taiwanese 以下命令是可用的: @@ -1371,7 +1378,8 @@ Language=Taiwanese NET FILE NET SEND NET USER NET GROUP NET SESSION NET VIEW - ... + NET HELP SYNTAX explains how to read NET HELP syntax lines. + NET HELP command | MORE displays Help one screen at a time. . @@ -2776,3 +2784,249 @@ NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP | HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ] . + + +MessageId=10047 +SymbolicName=MSG_SYNTAX_HELP +Severity=Success +Facility=System +Language=English +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Polish +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Romanian +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Russian +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Spanish +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Turkish +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Chinese +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +. +Language=Taiwanese +SYNTAX +The following conventions are used to indicate command syntax: + +- Capital letters represent words that must be typed as shown. Lower- + case letters represent names of items that may vary, such as filenames. + +- The [ and ] characters surround optional items that can be supplied + with the command. + +- The { and } characters surround lists of items. You must supply one + of the items with the command. + +- The | character separates items in a list. Only one of the items can + be supplied with the command. + + For example, in the following syntax, you must type NET COMMAND and + either SWITCH1 or SWITCH2. Supplying a name is optional. + NET COMMAND [name] {SWITCH1 | SWITCH2} + +- The [...] characters mean you can repeat the previous item. + Separate items with spaces. + +- The [,...] characters mean you can repeat the previous item, but + you must separate items with commas or semicolons, not spaces. + +- When typed at the command prompt, service names of two words or + more must be enclosed in quotation marks. For example, + NET START "COMPUTER BROWSER" starts the computer browser service. +.