ReactOS 0.4.15-dev-7924-g5949c20
echo.c File Reference
#include "precomp.h"
Include dependency graph for echo.c:

Go to the source code of this file.

Functions

BOOL OnOffCommand (LPTSTR param, LPBOOL flag, INT message)
 
INT CommandEcho (LPTSTR param)
 
INT CommandEchos (LPTSTR param)
 
INT CommandEchoerr (LPTSTR param)
 
INT CommandEchoserr (LPTSTR param)
 

Function Documentation

◆ CommandEcho()

INT CommandEcho ( LPTSTR  param)

Definition at line 65 of file echo.c.

66{
67 LPTSTR p1;
68
69 TRACE ("CommandEcho: '%s'\n", debugstr_aw(param));
70
71 /* skip all spaces for the check of '/?', 'ON' and 'OFF' */
72 p1 = param;
73 while(_istspace(*p1))
74 p1++;
75
76 if (!_tcsncmp (p1, _T("/?"), 2))
77 {
79 return 0;
80 }
81
83 {
84 /* skip the first character */
85 ConOutPuts(param + 1);
86 ConOutChar(_T('\n'));
87 }
88 return 0;
89}
BOOL bEcho
Definition: batch.c:73
VOID ConOutChar(TCHAR c)
Definition: console.c:123
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
Definition: console.c:182
#define ConOutPuts(szStr)
Definition: console.h:29
#define debugstr_aw
Definition: precomp.h:43
#define STRING_ECHO_HELP5
Definition: resource.h:124
#define STRING_ECHO_HELP4
Definition: resource.h:123
#define TRUE
Definition: types.h:120
GLfloat param
Definition: glext.h:5796
#define _istspace
Definition: tchar.h:1504
#define _tcsncmp
Definition: tchar.h:1428
BOOL OnOffCommand(LPTSTR param, LPBOOL flag, INT message)
Definition: echo.c:32
#define TRACE(s)
Definition: solgame.cpp:4
#define _T(x)
Definition: vfdio.h:22
CHAR * LPTSTR
Definition: xmlstorage.h:192

◆ CommandEchoerr()

INT CommandEchoerr ( LPTSTR  param)

Definition at line 106 of file echo.c.

107{
108 TRACE ("CommandEchoerr: '%s'\n", debugstr_aw(param));
109
110 if (!_tcsncmp (param, _T("/?"), 2))
111 {
113 return 0;
114 }
115
117 return 0;
118}
#define ConErrPuts(szStr)
Definition: console.h:32
#define ConOutResPuts(uID)
Definition: console.h:35
#define STRING_ECHO_HELP2
Definition: resource.h:121

◆ CommandEchos()

INT CommandEchos ( LPTSTR  param)

Definition at line 91 of file echo.c.

92{
93 TRACE ("CommandEchos: '%s'\n", debugstr_aw(param));
94
95 if (!_tcsncmp (param, _T("/?"), 2))
96 {
98 return 0;
99 }
100
101 ConOutPrintf (_T("%s"), param);
102 return 0;
103}
#define ConOutPrintf(szStr,...)
Definition: console.h:41
#define STRING_ECHO_HELP1
Definition: resource.h:120

◆ CommandEchoserr()

INT CommandEchoserr ( LPTSTR  param)

Definition at line 121 of file echo.c.

122{
123 TRACE ("CommandEchoserr: '%s'\n", debugstr_aw(param));
124
125 if (!_tcsncmp (param, _T("/?"), 2))
126 {
128 return 0;
129 }
130
131 ConErrPrintf (_T("%s"), param);
132 return 0;
133}
#define ConErrPrintf(szStr,...)
Definition: console.h:44
#define STRING_ECHO_HELP3
Definition: resource.h:122

◆ OnOffCommand()

BOOL OnOffCommand ( LPTSTR  param,
LPBOOL  flag,
INT  message 
)

Definition at line 32 of file echo.c.

33{
34 TCHAR *p2;
35 if (_tcsnicmp(param, D_OFF, sizeof(D_OFF)/sizeof(TCHAR) - 1) == 0)
36 {
37 p2 = param + sizeof(D_OFF)/sizeof(TCHAR) - 1;
38 while (_istspace(*p2))
39 p2++;
40 if (*p2 == _T('\0'))
41 {
42 *flag = FALSE;
43 return TRUE;
44 }
45 }
46 else if (_tcsnicmp(param, D_ON, sizeof(D_ON)/sizeof(TCHAR) - 1) == 0)
47 {
48 p2 = param + sizeof(D_ON)/sizeof(TCHAR) - 1;
49 while (_istspace(*p2))
50 p2++;
51 if (*p2 == _T('\0'))
52 {
53 *flag = TRUE;
54 return TRUE;
55 }
56 }
57 else if (*param == _T('\0'))
58 {
60 return TRUE;
61 }
62 return FALSE;
63}
#define D_OFF
Definition: cmd.h:41
#define D_ON
Definition: cmd.h:40
#define ConOutResPrintf(uID,...)
Definition: console.h:47
#define FALSE
Definition: types.h:117
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
Definition: tftpd.h:60
char TCHAR
Definition: xmlstorage.h:189
#define _tcsnicmp
Definition: xmlstorage.h:207

Referenced by cmd_verify(), and CommandEcho().