ReactOS  0.4.14-dev-297-g23e575c
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 (param[1] < '0' || param[1] > '9')
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 }
INT nErrorLevel
Definition: cmd.c:157
#define TRUE
Definition: types.h:120
#define _tcsicmp
Definition: xmlstorage.h:205
LPBATCH_CONTEXT bc
Definition: batch.c:66
#define debugstr_aw
Definition: precomp.h:43
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
Definition: console.c:182
int32_t INT
Definition: typedefs.h:56
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
smooth NULL
Definition: ftsmooth.c:416
#define _T(x)
Definition: vfdio.h:22
#define TRACE(s)
Definition: solgame.cpp:4
#define STRING_SHIFT_HELP
Definition: resource.h:169
GLfloat param
Definition: glext.h:5796
VOID error_invalid_switch(TCHAR)
Definition: error.c:70
INT shiftlevel[10]
Definition: batch.h:17
int _tcsncmp(const _TCHAR *s1, const _TCHAR *s2, size_t n)
Definition: tcsncmp.h:9