3 * ECHO.C - internal echo commands.
8 * 16 Jul 1998 (Hans B Pufal)
11 * 16 Jul 1998 (John P Price)
12 * Separated commands into individual files.
14 * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>)
15 * Added config.h include
17 * 08-Dec-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
18 * Added help text ("/?").
20 * 19-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
21 * Unicode and redirection ready!
23 * 13-Jul-2000 (Eric Kohl <ekohl@rz-online.de>)
24 * Implemented 'echo.' and 'echoerr.'.
37 INT CommandEcho (LPTSTR cmd, LPTSTR param)
40 DebugPrintf ("CommandEcho '%s' : '%s'\n", cmd, param);
43 if (!_tcsncmp (param, _T("/?"), 2))
45 ConOutPuts ("Displays a message or switches command echoing on or off.\n"
49 " ECHO. prints an empty line\n"
51 "Type ECHO without a parameter to display the current ECHO setting.");
55 if (_tcsicmp (cmd, _T("echo.")) == 0)
58 ConOutChar (_T('\n'));
64 if (_tcsicmp (param, D_OFF) == 0)
66 else if (_tcsicmp (param, D_ON) == 0)
71 ConOutPrintf (_T("ECHO is %s\n"), bEcho ? D_ON : D_OFF);
77 INT CommandEchos (LPTSTR cmd, LPTSTR param)
80 DebugPrintf ("CommandEchos '%s' : '%s'\n", cmd, param);
83 if (!_tcsncmp (param, _T("/?"), 2))
85 ConOutPuts ("Display a messages without trailing carridge return and line feed.\n"
92 ConOutPrintf ("%s", param);
98 INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
101 DebugPrintf ("CommandEchoerr '%s' : '%s'\n", cmd, param);
104 if (!_tcsncmp (param, _T("/?"), 2))
106 ConOutPuts ("Displays a message to the standard error.\n"
109 " ECHOERR. prints an empty line");
113 if (_tcsicmp (cmd, _T("echoerr.")) == 0)
116 ConErrChar (_T('\n'));
128 INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
131 DebugPrintf ("CommandEchoserr '%s' : '%s'\n", cmd, param);
134 if (!_tcsncmp (param, _T("/?"), 2))
136 ConOutPuts ("Prints a messages to standard error output without trailing carridge return and line feed.\n"
138 " ECHOSERR message");
143 ConOutPrintf (_T("%s"), param);