ReactOS 0.4.15-dev-7674-gc0b4db1
tscroll.cpp File Reference
#include "precomp.h"
Include dependency graph for tscroll.cpp:

Go to the source code of this file.

Enumerations

enum  { HEX , DUMP , DUMPB , TEXTB }
 

Functions

int DummyStripBuffer (char *start, char *end, int width)
 
static BOOL WriteConsoleOutputCharAndAttribute (HANDLE hConsoleOutput, CHAR *lpWriteBuffer, WORD wAttrib, SHORT sX, SHORT sY)
 
static void hexify (int x, char *str, int len)
 
static int setmaxlines (int iDisplay, int iScrollSize, int strippedlines, int con_width)
 
static void setstatusline (char *szStatusLine, int len, int iDisplay)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HEX 
DUMP 
DUMPB 
TEXTB 

Definition at line 43 of file tscroll.cpp.

43 {
44 HEX,
45 DUMP,
46 DUMPB,
47 TEXTB,
48};
@ TEXTB
Definition: tscroll.cpp:47
@ DUMPB
Definition: tscroll.cpp:46
@ DUMP
Definition: tscroll.cpp:45
@ HEX
Definition: tscroll.cpp:44

Function Documentation

◆ DummyStripBuffer()

int DummyStripBuffer ( char start,
char end,
int  width 
)

Definition at line 50 of file tscroll.cpp.

50{return 0;}

Referenced by TScroller::TScroller().

◆ hexify()

static void hexify ( int  x,
char str,
int  len 
)
static

Definition at line 130 of file tscroll.cpp.

130 {
131 for(int j = len - 1; j >= 0; j--) {
132 str[j] = x % 16;
133 if(str[j] > 9) str[j] += 'A' - 10;
134 else str[j] += '0';
135 x /= 16;
136 }
137}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLenum GLsizei len
Definition: glext.h:6722
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 GLint GLint j
Definition: glfuncs.h:250
const WCHAR * str

Referenced by TScroller::ScrollBack().

◆ setmaxlines()

static int setmaxlines ( int  iDisplay,
int  iScrollSize,
int  strippedlines,
int  con_width 
)
static

Definition at line 139 of file tscroll.cpp.

140 {
141 switch(iDisplay) {
142 case HEX: return(iScrollSize / 16); break;
143 case DUMP:
144 case DUMPB: return(iScrollSize / con_width); break;
145 case TEXTB: return(strippedlines); break;
146 }
147 return 0;
148}

Referenced by TScroller::ScrollBack().

◆ setstatusline()

static void setstatusline ( char szStatusLine,
int  len,
int  iDisplay 
)
static

Definition at line 150 of file tscroll.cpp.

150 {
151 memset(szStatusLine, ' ', len);
152 memcpy(&szStatusLine[1], "Scrollback Mode", 15);
153 switch(iDisplay) {
154 case HEX: memcpy(&szStatusLine[len / 2 - 1], "HEX", 3); break;
155 case DUMP: memcpy(&szStatusLine[len / 2 - 2], "DUMP", 4); break;
156 case DUMPB: memcpy(&szStatusLine[len / 2 - 5], "BINARY DUMP", 11); break;
157 case TEXTB: memcpy(&szStatusLine[len / 2 - 2], "TEXT", 4); break;
158 }
159 memcpy(&szStatusLine[len - 6], "READY", 5);
160 szStatusLine[len] = 0;
161}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memset(x, y, z)
Definition: compat.h:39

Referenced by TScroller::ScrollBack().

◆ WriteConsoleOutputCharAndAttribute()

static BOOL WriteConsoleOutputCharAndAttribute ( HANDLE  hConsoleOutput,
CHAR lpWriteBuffer,
WORD  wAttrib,
SHORT  sX,
SHORT  sY 
)
static

Definition at line 97 of file tscroll.cpp.

102 {
103 // we ought to allocate memory before writing to an address (PB 5/12/98)
104 DWORD cWritten;
105 const LPDWORD lpcWritten = &cWritten;
106
107 DWORD cWriteCells = strlen(lpWriteBuffer);
108 COORD coordWrite = {sX,sY};
109 LPWORD lpwAttribute = new WORD[cWriteCells];
110 for (unsigned int i = 0; i < cWriteCells; i++)
111 lpwAttribute[i] = wAttrib;
113 hConsoleOutput, // handle of a console screen buffer
114 lpwAttribute, // address of buffer to write attributes from
115 cWriteCells, // number of character cells to write to
116 coordWrite, // coordinates of first cell to write to
117 lpcWritten // address of number of cells written to
118 );
120 hConsoleOutput, // handle of a console screen buffer
121 lpWriteBuffer, // address of buffer to write characters from
122 cWriteCells, // number of character cells to write to
123 coordWrite, // coordinates of first cell to write to
124 lpcWritten // address of number of cells written to
125 );
126 delete [] lpwAttribute;
127 return 1;
128}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN CONST WORD *lpAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
Definition: readwrite.c:1653
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
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
Definition: bl.h:1338
uint16_t * LPWORD
Definition: typedefs.h:56
uint32_t * LPDWORD
Definition: typedefs.h:59
#define WriteConsoleOutputCharacter
Definition: wincon.h:789

Referenced by TScroller::ScrollBack().