ReactOS 0.4.15-dev-7711-g5627da4
shift.c File Reference
#include "precomp.h"
Include dependency graph for shift.c:

Go to the source code of this file.

Functions

INT cmd_shift (LPTSTR param)
 

Function Documentation

◆ cmd_shift()

INT cmd_shift ( LPTSTR  param)

Definition at line 38 of file shift.c.

39{
40 INT i = 0;
41 TRACE ("cmd_shift: (\'%s\')\n", debugstr_aw(param));
42
43 if (!_tcsncmp (param, _T("/?"), 2))
44 {
46 return 0;
47 }
48
49 nErrorLevel = 0;
50
51 if (bc == NULL)
52 {
53 /* not in batch - error!! */
54 nErrorLevel = 1;
55 return 1;
56 }
57
58 if (!_tcsicmp (param, _T("down")))
59 {
60 if (bc->shiftlevel[0])
61 for (; i <= 9; i++)
62 bc->shiftlevel[i]--;
63 }
64 else /* shift up */
65 {
66 if (*param == _T('/'))
67 {
68 if (!_istdigit(param[1]))
69 {
71 return 1;
72 }
73 i = param[1] - '0';
74 }
75
76 for (; i < 9; i++)
77 bc->shiftlevel[i] = bc->shiftlevel[i + 1];
78 bc->shiftlevel[i]++;
79 }
80
81 return 0;
82}
PBATCH_CONTEXT bc
Definition: batch.c:67
INT nErrorLevel
Definition: cmd.c:158
VOID error_invalid_switch(TCHAR ch)
Definition: error.c:72
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
Definition: console.c:182
#define debugstr_aw
Definition: precomp.h:43
#define STRING_SHIFT_HELP
Definition: resource.h:169
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
GLfloat param
Definition: glext.h:5796
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define _istdigit
Definition: tchar.h:1494
#define _tcsncmp
Definition: tchar.h:1428
#define TRACE(s)
Definition: solgame.cpp:4
INT shiftlevel[10]
Definition: batch.h:36
int32_t INT
Definition: typedefs.h:58
#define _T(x)
Definition: vfdio.h:22
#define _tcsicmp
Definition: xmlstorage.h:205