ReactOS 0.4.15-dev-8227-g32d615f
screen.c File Reference
#include "precomp.h"
Include dependency graph for screen.c:

Go to the source code of this file.

Functions

INT CommandScreen (LPTSTR param)
 

Function Documentation

◆ CommandScreen()

INT CommandScreen ( LPTSTR  param)

Definition at line 18 of file screen.c.

19{
20 SHORT x, y;
22 BOOL bSkipText = FALSE;
23
24 if (_tcsncmp(param, _T("/?"), 2) == 0)
25 {
27 return 0;
28 }
29
30 nErrorLevel = 0;
31
32 /* Retrieve the screen dimensions */
34
35 /* Get row */
36 while (_istspace(*param))
37 param++;
38
39 if (!*param)
40 {
42 return 1;
43 }
44
45 y = _ttoi(param);
46 if (y < 0 || y > (maxy-1))
47 {
49 return 1;
50 }
51
52 /* Get column */
53 if (!(param = _tcschr(param, _T(' '))))
54 {
56 return 1;
57 }
58
59 while (_istspace(*param))
60 param++;
61
62 if (!*param)
63 {
65 return 1;
66 }
67
68 x = _ttoi(param);
69 if (x < 0 || x > (maxx-1))
70 {
72 return 1;
73 }
74
75 /* Get text */
76 if (!(param = _tcschr(param, _T(' '))))
77 {
78 bSkipText = TRUE;
79 }
80 else
81 {
82 while (_istspace(*param))
83 param++;
84
85 if (!*param)
86 bSkipText = TRUE;
87 }
88
90
91 if (bSkipText)
92 x = 0;
93
94 SetCursorXY(x, y);
95
96 if (!bSkipText)
98
99 return 0;
100}
INT nErrorLevel
Definition: cmd.c:158
BOOL bIgnoreEcho
Definition: cmd.c:155
VOID error_req_param_missing(VOID)
Definition: error.c:110
VOID SetCursorXY(SHORT x, SHORT y)
Definition: console.c:191
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
Definition: console.c:182
VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
Definition: console.c:236
#define ConErrResPuts(uID)
Definition: console.h:38
#define ConOutPuts(szStr)
Definition: console.h:29
#define ConOutResPuts(uID)
Definition: console.h:35
#define STRING_SCREEN_HELP
Definition: resource.h:168
#define STRING_SCREEN_COL
Definition: resource.h:212
#define STRING_SCREEN_ROW
Definition: resource.h:213
SHORT maxx
Definition: cmdinput.c:115
SHORT maxy
Definition: cmdinput.c:116
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLfloat param
Definition: glext.h:5796
#define _istspace
Definition: tchar.h:1504
#define _tcsncmp
Definition: tchar.h:1428
#define _tcschr
Definition: tchar.h:1406
short SHORT
Definition: pedump.c:59
#define _T(x)
Definition: vfdio.h:22
#define _ttoi
Definition: xmlstorage.h:195