ReactOS  0.4.12-dev-51-ge94618b
ansiprsr.h
Go to the documentation of this file.
1 #pragma once
2 
3 // added this color table to make things go faster (Paul Branann 5/8/98)
5 extern const int ANSIColors[];
6 
7 // This should be greater than the largest conceivable window size
8 // 200 should suffice
9 #define MAX_TAB_POSITIONS 200
10 
11 // Added by Frediano Ziglio 6/2/2000
12 // Include Meridian Emulator support
13 // undefine it to remove support
14 #define MTE_SUPPORT 1
15 
16 // TANSIParser is now properly no longer a base class for TTelnetParser.
17 // Screen output is handled in TConsole.cpp.
18 // (Paul Brannan 6/15/98)
19 class TANSIParser : public TParser {
20 private:
21  char* ParseEscapeANSI(char* pszBuffer, char* pszBufferEnd);
22  char* ParseANSIBuffer(char* pszBuffer, char* pszBufferEnd);
23  char* ParseEscape(char* pszBuffer, char* pszBufferEnd);
24  // Added by I.Ioannou 06/04/97
25  char* PrintBuffer(char* pszBuffer, char* pszBufferEnd);
26  char* PrintGoodChars(char * pszHead, char * pszTail);
27 
28 #ifdef MTE_SUPPORT
29  // Added by Frediano Ziglio, 5/31/2000
30  char* ParseEscapeMTE(char* pszBuffer, char* pszBufferEnd);
32 #endif
33 
34  void ConSetAttribute(unsigned char wAttr);
35  const char *GetTerminalID();
36  void ConSetCursorPos(int x, int y);
37  void ResetTerminal();
38  void Init();
39 
40  void SaveCurX(int iX);
41  void SaveCurY(int iY);
42 
43  void resetTabStops();
44 
47  unsigned char iSavedAttributes;
49 
50  // Added by I.Ioannou 06 April 1997
54 
55  char last_char; // TITUS++: 2. November 98
56 
57  char map_G0, map_G1;
59  bool vt52_mode;
60  bool print_ctrl;
62  bool fast_write;
64 
66 
67 public:
68  // Changed by Paul Brannan 5/13/98
70  TScroller &RefScroller, TNetwork &NetHandler, TCharmap &RefCharmap);
71  ~TANSIParser();
72 
73  char* ParseBuffer(char* pszBuffer, char* pszBufferEnd);
74  static int StripBuffer(char* pszBuffer, char* pszBufferEnd, int width);
75 };
void SaveCurY(int iY)
Definition: ansiprsr.cpp:114
int iSavedCurY
Definition: ansiprsr.h:46
bool vt52_mode
Definition: ansiprsr.h:59
GLint GLint GLsizei width
Definition: gl.h:1546
TConsole & Console
Definition: tparser.h:41
unsigned char iSavedAttributes
Definition: ansiprsr.h:47
static int StripBuffer(char *pszBuffer, char *pszBufferEnd, int width)
Definition: ansiprsr.cpp:1164
Definition: ansiprsr.h:4
Definition: ansiprsr.h:4
char * ParseEscapeMTE(char *pszBuffer, char *pszBufferEnd)
bool fast_write
Definition: ansiprsr.h:62
short int mteRegionYF
Definition: ansiprsr.h:31
void ConSetCursorPos(int x, int y)
Definition: ansiprsr.cpp:213
#define MAX_TAB_POSITIONS
Definition: ansiprsr.h:9
void Init()
Definition: ansiprsr.cpp:86
int inGraphMode
Definition: ansiprsr.h:53
const int ANSIColors[]
Definition: ansiprsr.cpp:54
FILE * printfile
Definition: ansiprsr.h:51
bool print_ctrl
Definition: ansiprsr.h:60
INT INT y
Definition: msvc.h:62
Definition: ansiprsr.h:4
char map_G0
Definition: ansiprsr.h:57
Definition: ansiprsr.h:4
const char * GetTerminalID()
Definition: ansiprsr.cpp:220
TANSIParser(TConsole &Console, KeyTranslator &RefKeyTrans, TScroller &RefScroller, TNetwork &NetHandler, TCharmap &RefCharmap)
Definition: ansiprsr.cpp:58
bool newline_mode
Definition: ansiprsr.h:63
void ConSetAttribute(unsigned char wAttr)
Definition: ansiprsr.cpp:128
char * PrintGoodChars(char *pszHead, char *pszTail)
Definition: ansiprsr.cpp:1431
char map_G1
Definition: ansiprsr.h:57
bool ignore_margins
Definition: ansiprsr.h:61
Colors
Definition: ansiprsr.h:4
char InPrintMode
Definition: ansiprsr.h:52
char * ParseANSIBuffer(char *pszBuffer, char *pszBufferEnd)
Definition: ansiprsr.cpp:1212
char * PrintBuffer(char *pszBuffer, char *pszBufferEnd)
Definition: ansiprsr.cpp:1375
void SaveCurX(int iX)
Definition: ansiprsr.cpp:118
char * ParseBuffer(char *pszBuffer, char *pszBufferEnd)
Definition: ansiprsr.cpp:1127
int current_map
Definition: ansiprsr.h:58
Definition: ansiprsr.h:4
FILE * dumpfile
Definition: ansiprsr.h:48
char * ParseEscape(char *pszBuffer, char *pszBufferEnd)
Definition: ansiprsr.cpp:916
short int mteRegionXF
Definition: ansiprsr.h:31
void resetTabStops()
Definition: ansiprsr.cpp:122
Definition: ansiprsr.h:4
INT x
Definition: msvc.h:62
int iSavedCurX
Definition: ansiprsr.h:45
char last_char
Definition: ansiprsr.h:55
void ResetTerminal()
Definition: ansiprsr.cpp:109
int tab_stops[MAX_TAB_POSITIONS]
Definition: ansiprsr.h:65
Definition: ansiprsr.h:4
char * ParseEscapeANSI(char *pszBuffer, char *pszBufferEnd)
Definition: ansiprsr.cpp:246