28 #include "lib/charbuf.h" 29 #include "lib/charval.h" 30 #include "lib/aengine.h" 84 unsigned char ch = character;
104 bool processed =
false;
108 }
else if (ch == 27) {
111 }
else if (ch == 155 || (
escmode && ch == 91)) {
173 if (ch == 13 || ch == 10) {
224 for (
int i = 0; i <
maxLines - 1; i++) {
void Append(const char c)
void Append(const char *source)
CharBuffer()
Initialize without allocating memory.
unsigned int AllocAndCopy(char **destination, const char *source)
Allocate memory and copy a string into the array.
AnsiConoleEngine(const char *prompt, CharValidator *validator)
static const int maxLines
void SetPrompt(const char *string)
CharValidator * validator
void EnsureGrowth(unsigned int size)
int StrLen(const char *string)
Get the length of a null terminated string.
const char * ProcessChar(const unsigned char character)
static const int lineSize
Encapsulate an character array which can be used as a string.
void EnsureSize(unsigned int size)
Ensure a memory block of speficied size is allocated.
virtual bool Validate(char c)=0
void ClearAndAlloc(unsigned int size)
Release memory and allocate new size.