1 /* $Id: echo.c,v 1.4 2004/08/15 22:15:23 chorns Exp $
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.'.
36 INT
CommandEcho (LPTSTR cmd
, LPTSTR param
)
39 DebugPrintf (_T("CommandEcho '%s' : '%s'\n"), cmd
, param
);
42 if (!_tcsncmp (param
, _T("/?"), 2))
44 ConOutPuts (_T("Displays a message or switches command echoing on or off.\n"
48 " ECHO. prints an empty line\n"
50 "Type ECHO without a parameter to display the current ECHO setting."));
54 if (_tcsicmp (cmd
, _T("echo.")) == 0)
57 ConOutChar (_T('\n'));
63 if (_tcsicmp (param
, D_OFF
) == 0)
65 else if (_tcsicmp (param
, D_ON
) == 0)
70 ConOutPrintf (_T("ECHO is %s\n"), bEcho
? D_ON
: D_OFF
);
76 INT
CommandEchos (LPTSTR cmd
, LPTSTR param
)
79 DebugPrintf (_T("CommandEchos '%s' : '%s'\n"), cmd
, param
);
82 if (!_tcsncmp (param
, _T("/?"), 2))
84 ConOutPuts (_T("Display a messages without trailing carridge return and line feed.\n"
91 ConOutPrintf (_T("%s"), param
);
97 INT
CommandEchoerr (LPTSTR cmd
, LPTSTR param
)
100 DebugPrintf (_T("CommandEchoerr '%s' : '%s'\n"), cmd
, param
);
103 if (!_tcsncmp (param
, _T("/?"), 2))
105 ConOutPuts (_T("Displays a message to the standard error.\n"
108 " ECHOERR. prints an empty line"));
112 if (_tcsicmp (cmd
, _T("echoerr.")) == 0)
115 ConErrChar (_T('\n'));
127 INT
CommandEchoserr (LPTSTR cmd
, LPTSTR param
)
130 DebugPrintf (_T("CommandEchoserr '%s' : '%s'\n"), cmd
, param
);
133 if (!_tcsncmp (param
, _T("/?"), 2))
135 ConOutPuts (_T("Prints a messages to standard error output without trailing carridge return and line feed.\n"
137 " ECHOSERR message"));
142 ConOutPrintf (_T("%s"), param
);