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.'.
30 INT
CommandEcho (LPTSTR cmd
, LPTSTR param
)
33 DebugPrintf (_T("CommandEcho '%s' : '%s'\n"), cmd
, param
);
36 if (!_tcsncmp (param
, _T("/?"), 2))
38 ConOutPuts (_T("Displays a message or switches command echoing on or off.\n"
42 " ECHO. prints an empty line\n"
44 "Type ECHO without a parameter to display the current ECHO setting."));
48 if (_tcsicmp (cmd
, _T("echo.")) == 0)
51 ConOutChar (_T('\n'));
57 if (_tcsicmp (param
, D_OFF
) == 0)
59 else if (_tcsicmp (param
, D_ON
) == 0)
64 ConOutPrintf (_T("ECHO is %s\n"), bEcho
? D_ON
: D_OFF
);
70 INT
CommandEchos (LPTSTR cmd
, LPTSTR param
)
73 DebugPrintf (_T("CommandEchos '%s' : '%s'\n"), cmd
, param
);
76 if (!_tcsncmp (param
, _T("/?"), 2))
78 ConOutPuts (_T("Display a messages without trailing carridge return and line feed.\n"
85 ConOutPrintf (_T("%s"), param
);
91 INT
CommandEchoerr (LPTSTR cmd
, LPTSTR param
)
94 DebugPrintf (_T("CommandEchoerr '%s' : '%s'\n"), cmd
, param
);
97 if (!_tcsncmp (param
, _T("/?"), 2))
99 ConOutPuts (_T("Displays a message to the standard error.\n"
102 " ECHOERR. prints an empty line"));
106 if (_tcsicmp (cmd
, _T("echoerr.")) == 0)
109 ConErrChar (_T('\n'));
121 INT
CommandEchoserr (LPTSTR cmd
, LPTSTR param
)
124 DebugPrintf (_T("CommandEchoserr '%s' : '%s'\n"), cmd
, param
);
127 if (!_tcsncmp (param
, _T("/?"), 2))
129 ConOutPuts (_T("Prints a messages to standard error output without trailing carridge return and line feed.\n"
131 " ECHOSERR message"));
136 ConOutPrintf (_T("%s"), param
);